diff --git a/rofi/desktop/MediaControls.desktop b/rofi/desktop/MediaControls.desktop new file mode 100755 index 0000000..8496444 --- /dev/null +++ b/rofi/desktop/MediaControls.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] + +Type=Application +Version=1.0 +Name=Media Controls +Exec=sh ~/.config/rofi/scripts/media_controls +Terminal=false \ No newline at end of file diff --git a/rofi/desktop/Power.desktop b/rofi/desktop/Power.desktop new file mode 100755 index 0000000..e4cab04 --- /dev/null +++ b/rofi/desktop/Power.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] + +Type=Application +Version=1.0 +Name=Power +Exec=sh ~/.config/rofi/scripts/media_controls +Terminal=false diff --git a/rofi/desktop/btctl.desktop b/rofi/desktop/btctl.desktop new file mode 100755 index 0000000..dc36028 --- /dev/null +++ b/rofi/desktop/btctl.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] + +Type=Application +Version=1.0 +Name=Bluetooth Controls +Exec=sh ~/.config/rofi/scripts/btctl +Terminal=false \ No newline at end of file diff --git a/rofi/desktop/readme.md b/rofi/desktop/readme.md new file mode 100644 index 0000000..c315e43 --- /dev/null +++ b/rofi/desktop/readme.md @@ -0,0 +1 @@ +These files are copied over to `~/.local/applications` to provide a means to launch these through rofi's run menu. diff --git a/rofi/makefile b/rofi/makefile index 11871d4..152c643 100644 --- a/rofi/makefile +++ b/rofi/makefile @@ -3,12 +3,18 @@ SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) include ../lib/shared.mk TARGET := $(XDG_DIR)/rofi +DESKTOP_SRC := $(SRC)/desktop +DESKTOP_TARGET := ~/.local/share/applications + install: | init update init: ifeq ($(call cmd_exist,rofi), true) $(info => Setting up rofi) $(mk_link) $(SRC) $(TARGET) + $(MAKE) -C $(SRC) desktop_init +else + $(report) warn "rofi not installed. Skipping." endif update: @@ -16,3 +22,24 @@ update: remove: $(info => Remvoing rofi) $(rm_link) $(TARGET) + $(MAKE) -C $(SRC) desktop_remove + +desktop_init: +ifeq ($(shell [ -e $(DESKTOP_TARGET) ] $(return_val_truthy) ), true) + $(info ==> Setting up desktop shortcuts.) + cd $(DESKTOP_SRC) ; \ + for i in *.desktop; do ; \ + $(mk_link) $(DESKTOP_SRC)/$$i $(DESKTOP_TARGET)/$$i ; \ + done +else + $(report) warn "$(DESKTOP_TARGET) does not exist. Skipping." +endif + +desktop_remove: +ifeq ($(shell [ -e $(DESKTOP_TARGET) ] $(return_val_truthy) ), true) + $(info ==> removing rofi desktop entries.) + cd $(DESKTOP_SRC) ; \ + for i in *.desktop; do ; \ + $(rm_link) $(DESKTOP_TARGET)/$$i ; \ + done +endif