init commit

This commit is contained in:
ysandler
2026-01-27 22:01:30 -06:00
commit ee23a4f39c
22 changed files with 1605 additions and 0 deletions

36
Makefile Normal file
View File

@@ -0,0 +1,36 @@
VERSION := $(shell cat VERSION)
BINARY := klp
LDFLAGS := -ldflags "-X github.com/yeho/klp/cmd.Version=$(VERSION)"
.PHONY: build install clean service-install service-uninstall
build:
go build $(LDFLAGS) -o $(BINARY) .
install: build
mkdir -p ~/.local/bin
-~/.local/bin/klp service stop 2>/dev/null || true
cp $(BINARY) ~/.local/bin/
~/.local/bin/klp service start
clean:
rm -f $(BINARY)
service-install:
mkdir -p ~/.config/systemd/user
cp klp.service ~/.config/systemd/user/
systemctl --user daemon-reload
@echo "Service installed. Enable with: systemctl --user enable --now klp"
service-uninstall:
systemctl --user stop klp || true
systemctl --user disable klp || true
rm -f ~/.config/systemd/user/klp.service
systemctl --user daemon-reload
autostart-install:
mkdir -p ~/.config/autostart
cp klp.desktop ~/.config/autostart/
autostart-uninstall:
rm -f ~/.config/autostart/klp.desktop