2024-05-24 01:31:11 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
|
2024-05-25 15:41:39 +00:00
|
|
|
user-install: terminal-url-open
|
2024-05-24 01:31:11 +00:00
|
|
|
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
|
|
|
|
|
2024-05-25 15:41:39 +00:00
|
|
|
terminal-url-open: terminal-url-open.go
|
|
|
|
go build -o $@ ./$<
|
2024-05-24 01:31:11 +00:00
|
|
|
|
|
|
|
get-default:
|
|
|
|
xdg-settings get default-url-scheme-handler terminal
|
|
|
|
|