diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-03-07 22:40:28 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-03-07 22:40:28 +0100 |
commit | 553530387aaf6a442a33eba3f7b43b8911fc4bb8 (patch) | |
tree | fd00a8322eea975b1633af9faf778432d5292673 /.config/leftwm/themes/basic_lemonbar/up | |
parent | 7eae457654052897a8d5ca55e5a8217d4ab9f78c (diff) |
Add new arch configs, messed up color theme
Diffstat (limited to '.config/leftwm/themes/basic_lemonbar/up')
-rwxr-xr-x | .config/leftwm/themes/basic_lemonbar/up | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.config/leftwm/themes/basic_lemonbar/up b/.config/leftwm/themes/basic_lemonbar/up new file mode 100755 index 0000000..c8f49d1 --- /dev/null +++ b/.config/leftwm/themes/basic_lemonbar/up @@ -0,0 +1,39 @@ +#!/bin/bash +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" + + +#down the last running theme +if [ -f "/tmp/leftwm-theme-down" ]; then + /tmp/leftwm-theme-down + rm /tmp/leftwm-theme-down +fi +ln -s $SCRIPTPATH/down /tmp/leftwm-theme-down + + +#boot compton or picom if it exists +if [ -x "$(command -v compton)" ]; then + compton &> /dev/null & +elif [ -x "$(command -v picom)" ]; then + picom &> /dev/null & +fi + +#set the theme.toml config +echo "LoadTheme $SCRIPTPATH/theme.toml" > $XDG_RUNTIME_DIR/leftwm/commands.pipe + + +#set background +if [ -x "$(command -v feh)" ]; then + feh --bg-scale $SCRIPTPATH/background.jpg +fi + + +#boot lemonbar and pipe the status of left into it +sizes=( $(leftwm-state -q -n -t $SCRIPTPATH/sizes.liquid | sed -r '/^\s*$/d') ) + +index=0 +for size in "${sizes[@]}" +do + leftwm-state -w $index -t $SCRIPTPATH/template.liquid | lemonbar -g $size -F#FFFFFFFF -B#AA222222& + let index=index+1 +done + |