aboutsummaryrefslogtreecommitdiff
path: root/dwmbar
diff options
context:
space:
mode:
authorArchie Hilton (thytom) <archie.hilton1@gmail.com>2019-10-24 17:27:20 +0100
committerArchie Hilton (thytom) <archie.hilton1@gmail.com>2019-10-24 17:27:20 +0100
commit64300140a1a59b30dabc577eea7e26ffc8f3b4a8 (patch)
tree984a7711631281b9ae20a0da087322c3c038a062 /dwmbar
parentb4fb27fd60a64c608319c97826ec2f09f5c26732 (diff)
Restructuring
Moved bar.sh to /usr/share/dwmbar. Modules are now only in /usr/share/dwmbar. Custom modules folder is now in .config/dwmbar. This will allow for paralellised modules down the line.
Diffstat (limited to 'dwmbar')
-rwxr-xr-xdwmbar15
1 files changed, 5 insertions, 10 deletions
diff --git a/dwmbar b/dwmbar
index f0514c7..2536d13 100755
--- a/dwmbar
+++ b/dwmbar
@@ -19,14 +19,11 @@ VERSION="0.1"
DEFAULT_CONFIG_DIR="/usr/share/dwmbar"
DEFAULT_MODULES_DIR="$DEFAULT_CONFIG_DIR/modules"
-DEFAULT_RC_LOCATION="$DEFAULT_CONFIG_DIR/bar.sh"
+DEFAULT_BAR_LOCATION="$DEFAULT_CONFIG_DIR/bar.sh"
DEFAULT_CONFIG_LOCATION="$DEFAULT_CONFIG_DIR/config"
-RC_LOCATION="/home/$USER/.config/dwmbar/bar.sh"
CONFIG_DIR="/home/$USER/.config/dwmbar"
-MODULES_DIR="$CONFIG_DIR/modules"
-CUSTOM_DIR="$MODULES_DIR/custom"
-DWMBARRC="$CONFIG_DIR/bar.sh"
+CUSTOM_DIR="$CONFIG_DIR/custom"
CONFIG_FILE="$CONFIG_DIR/config"
CACHE_DIR="$CONFIG_DIR/.cache"
@@ -39,9 +36,7 @@ print_help(){
copy_usr_to_home(){
[[ ! -d $CONFIG_DIR ]] && cp -r /usr/share/dwmbar $CONFIG_DIR
- [[ ! -f $DWMBARRC ]] && cp /usr/share/dwmbar/bar.sh $DWMBARRC
[[ ! -f $CONFIG_FILE ]] && cp /usr/share/dwmbar/config $CONFIG_FILE
- [[ ! -d $MODULES_DIR ]] && cp /usr/share/dwmbar/modules $MODULES_DIR
[[ ! -d $CUSTOM_DIR ]] && mkdir $CUSTOM_DIR
[[ ! -d $CACHE_DIR ]] && mkdir $CACHE_DIR
}
@@ -57,8 +52,8 @@ check_files(){
exit 1
fi
- if [[ ! -f $DEFAULT_RC_LOCATION ]]; then
- echo "$DEFAULT_RC_LOCATION does not exist." > /dev/stderr
+ if [[ ! -f $DEFAULT_BAR_LOCATION ]]; then
+ echo "$DEFAULT_BAR_LOCATION does not exist." > /dev/stderr
exit 1
fi
@@ -80,5 +75,5 @@ done
check_files
while :; do
- xsetroot -name "$(exec $RC_LOCATION)"
+ xsetroot -name "$(exec $DEFAULT_BAR_LOCATION)"
done