fix bar paths

This commit is contained in:
Daniel Flanagan 2016-07-29 11:20:11 -05:00
parent 8252169862
commit 3aa79de68b
9 changed files with 13 additions and 30 deletions

View file

@ -1,13 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash" source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
# export BAR_LOG="$PWD/bar.log" # export BAR_LOG="$PWD/bar.log"
# echo -e "BEGIN BAR LOG\n" > "$BAR_LOG" # echo -e "BEGIN BAR LOG\n" > "$BAR_LOG"
reload_colors() { reload_colors() {
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$BAR_PATH/colors.bash"
} }
# trap reload_colors SIGUSR1 # trap reload_colors SIGUSR1
@ -27,12 +26,12 @@ register_bar_module() {
MODULE_INIT[$1]=$4 MODULE_INIT[$1]=$4
${MODULE_INIT[$1]} & ${MODULE_INIT[$1]} &
PID=$! PID=$!
echo $PID > "$DOTFILES_PATH/wm/extras/bar/modules/$3.pid" echo $PID > "$BAR_PATH/modules/$3.pid"
# echo -e "Registered Bar Module: $1 $2 $3 $4 with PID $PID" >> "$BAR_LOG" # echo -e "Registered Bar Module: $1 $2 $3 $4 with PID $PID" >> "$BAR_LOG"
} }
export -f register_bar_module export -f register_bar_module
for f in "$DOTFILES_PATH/wm/extras/bar/modules/"*-bm.bash; do for f in "$BAR_PATH/modules/"*-bm.bash; do
source "$f" source "$f"
done done

View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash" source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$BAR_PATH/colors.bash"
source "$DOTFILES_PATH/wm/extras/bar/modules/module.bash" source "$BAR_PATH/modules/module.bash"
PRIORITY=25000 PRIORITY=25000

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash" source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$BAR_PATH/colors.bash"
PRIORITY=38000 PRIORITY=38000

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash" source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$BAR_PATH/colors.bash"
PRIORITY=35000 PRIORITY=35000

View file

@ -1,17 +0,0 @@
#!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
reserve_bar_module_pid() {
FILE="$DOTFILES_PATH/wm/extras/bar/modules/$1.bm.pid"
if [[ -f "$FILE" ]]; then
return 1
else
echo "Starting bar module $1 witrh PID $!"
$2 &
return 0
fi
}

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash" source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$BAR_PATH/colors.bash"
PRIORITY=12000 PRIORITY=12000

View file

@ -10,7 +10,7 @@ function killbar() {
else else
bspc config -m $(bspc query -M | head -n 1) bottom_padding "0" bspc config -m $(bspc query -M | head -n 1) bottom_padding "0"
fi fi
for f in $(ls "$DOTFILES_PATH"/wm/extras/bar/modules/*.pid 2>/dev/null); do for f in $(ls "$BAR_PATH"/modules/*.pid 2>/dev/null); do
# echo "KILLING MODULE PROCESS $f WITH PID $(cat "$f")" # echo "KILLING MODULE PROCESS $f WITH PID $(cat "$f")"
# kill -SIGTERM $(cat "$f") # kill -SIGTERM $(cat "$f")
rm "$f" rm "$f"
@ -42,7 +42,7 @@ else
BAR_B="-b" BAR_B="-b"
fi fi
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$BAR_PATH/colors.bash"
cat "$BAR_FIFO" | "$DOTFILES_PATH/wm/extras/bar/formatter.bash" | \ cat "$BAR_FIFO" | "$BAR_PATH/formatter.bash" | \
lemonbar $BAR_B -g "$WIDTH"x"$BAR_HEIGHT"+"$BAR_MARGIN"+"$POS_Y" -u "$BAR_BORDER_WIDTH" -f "$BAR_FONT_FAMILY" -F "$COLOR_FOREGROUND" -B"$COLOR_BACKGROUND" -n "$BAR_WID" lemonbar $BAR_B -g "$WIDTH"x"$BAR_HEIGHT"+"$BAR_MARGIN"+"$POS_Y" -u "$BAR_BORDER_WIDTH" -f "$BAR_FONT_FAMILY" -F "$COLOR_FOREGROUND" -B"$COLOR_BACKGROUND" -n "$BAR_WID"

2
env/x/xinitrc vendored
View file

@ -17,7 +17,7 @@ xset s off &
# start the bar if we want it # start the bar if we want it
if [ "$BAR_ON_XINIT" -eq 1 ]; then if [ "$BAR_ON_XINIT" -eq 1 ]; then
"$DOTFILES_PATH/wm/extras/bar/start.bash" & "$BAR_PATH/start.bash" &
fi fi
# fire up wm # fire up wm

View file

@ -41,4 +41,5 @@ if [ -a "$HOME/.bashrc_env" ]; then
fi fi
# various paths that are used in the dotfiles # various paths that are used in the dotfiles
BAR_PATH="$DOTFILES_PATH/env/wm/extras/bar"