Added management of icon and gtk theme.

This commit is contained in:
James Patrick 2020-04-25 20:58:10 -04:00
parent 81030a0f84
commit d2b60a2fd2
1 changed files with 50 additions and 0 deletions

View File

@ -4,6 +4,9 @@ SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include ../lib/shared.mk
TARGET := $(XDG_DIR)/sway
PATH_ICON_BOSTON := "$$HOME/.icons/Boston"
PATH_GTK_ANT_NEBULA := "$$HOME/.theme/Ant-Nebula"
install: | init update
init:
@ -12,6 +15,31 @@ init:
else
$(report) header "Setting up sway"
$(mk_link) $(SRC) $(TARGET)
$(MAKE) -C $(SRC) init_icons
$(MAKE) -C $(SRC) init_theme
fi
init_icons:
if [ ! -e $(PATH_ICON_BOSTON) ] ; then
git clone "https://github.com/heychrisd/Boston-Icons" $(PATH_ICON_BOSTON)
; $(report) "Installed Boston icons."
else
$(report) debug "$(PATH_ICON_BOSTON) already exists. Skipping"
fi
init_theme:
if [ ! -e $(PATH_GTK_ANT_NEBULA) ] ; then
git clone "https://github.com/EliverLara/Ant-Nebula" $(PATH_GTK_ANT_NEBULA)
; $(report) "Installed Ant Nebula GTK."
else
$(report) debug "$(PATH_GTK_ANT_NEBULA) already exists. Skipping"
fi
if (( $$+commands[gsettings] )) ; then
gsettings set org.gnome.desktop.interface gtk-theme "Ant-Nebula" \
&& gsettings set org.gnome.desktop.wm.preferences theme "Ant-Nebula" \
; $(report) "Set theme in gnome"
else
$(report) debug "gsettings not installed. Skipping"
fi
update:
@ -20,8 +48,30 @@ update:
else
$(report) header "Reloading sway"
swaymsg reload ; $(report) "sway reload"
$(MAKE) -C $(SRC) update_icons
$(MAKE) -C $(SRC) update_theme
fi
update_icons:
if [ ! -e $(PATH_ICON_BOSTON) ] ; then
cd $(PATH_ICON_BOSTON)
git pull ; $(report) "Updated Boston icons."
fi
update_theme:
if [ ! -e $(PATH_GTK_ANT_NEBULA) ] ; then
cd $(PATH_GTK_ANT_NEBULA)
git pull ; $(report) "Updated Ant Nebula GTK."
fi
remove:
$(report) header "Removing sway"
$(rm_link) $(TARGET)
if [ -e $(PATH_ICON_BOSTON) ] ; then
rm -rf $(PATH_ICON_BOSTON) \
; $(report) "Removed $(PATH_ICON_BOSTON)"
fi
if [ -e $(PATH_GTK_ANT_NEBULA) ] ; then
rm -rf $(PATH_GTK_ANT_NEBULA) \
; $(report) "Removed $(PATH_GTK_ANT_NEBULA)"
fi