diff options
author | Archie Hilton (thytom) <archie.hilton1@gmail.com> | 2019-10-22 23:02:57 +0100 |
---|---|---|
committer | Archie Hilton (thytom) <archie.hilton1@gmail.com> | 2019-10-22 23:02:57 +0100 |
commit | 6de7a8e0a7b2f19d4430b9e23584e6cda7933908 (patch) | |
tree | 48e9fd411392ca1a9d73595950c5da49cacb21d1 /dwmbar | |
parent | 16ea007427e44244dea7a01c69c55db99884832e (diff) |
Made the install script actually work.
It installs dwmbar to /usr/bin and skeleton stuff to /usr/share/dwmbar
Diffstat (limited to 'dwmbar')
-rwxr-xr-x | dwmbar | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -2,17 +2,26 @@ VERSION="0.0.1" RC_LOCATION="/home/$USER/.config/dwmbar/dwmbarrc" - -if [[ -f $DEFAULT_RC_LOCATION ]]; then - >&2 echo "No dwmbarrc found." - exit 1 -fi +CONFIG_DIR="/home/$USER/.config/dwmbar" +MODULES_DIR="$CONFIG_DIR/modules" +CUSTOM_DIR="$MODULES_DIR/custom" +DWMBARRC="$CONFIG_DIR/dwmbarrc" +CACHE_DIR="$CONFIG_DIR/.cache" print_help(){ -echo "dwmbar $VERSION" + echo "dwmbar $VERSION" +} +install_files(){ + [[ ! -d $CONFIG_DIR ]] && cp -r /usr/share/dwmbar $CONFIG_DIR + [[ ! -f $DWMBARRC ]] && cp /usr/share/dwmbar/dwmbarrc $DWMBARRC + [[ ! -d $MODULES_DIR ]] && cp /usr/share/dwmbar/modules $MODULES_DIR + [[ ! -d $CUSTOM_DIR ]] && mkdir $CUSTOM_DIR + [[ ! -d $CACHE_DIR ]] && mkdir $CACHE_DIR } +install_files + while :; do xsetroot -name "$(exec $RC_LOCATION)" done |