terminal-url-handler/Makefile
Vincent Batts b89aa4d153
*: switch to golang
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2024-12-02 16:31:56 -05:00

26 lines
754 B
Makefile

SCRIPT_FILE = terminal-url-open
DESKTOP_FILE = terminal-url-scheme-handler.desktop
.PHONY: default
default: help
.PHONY: help
help:
@echo " - help - this text"
@echo " - user-install - install the 'terminal://' handler for only $(USER)"
@echo " - get-default - see the xdg-settings default handler for 'terminal://' scheme"
user-install: terminal-url-open
mkdir -p ~/.local/bin && \
ln -sf $(shell realpath $(SCRIPT_FILE)) ~/.local/bin && \
mkdir -p ~/.local/share/applications && \
ln -sf $(shell realpath $(DESKTOP_FILE)) ~/.local/share/applications/ && \
update-desktop-database ~/.local/share/applications
terminal-url-open: terminal-url-open.go
go build -o $@ ./$<
get-default:
xdg-settings get default-url-scheme-handler terminal