-
Notifications
You must be signed in to change notification settings - Fork 1
/
up
executable file
·39 lines (30 loc) · 984 Bytes
/
up
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
export 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 --config "$SCRIPTPATH"/compton.conf &> /dev/null &
elif [ -x "$(command -v picom)" ]; then
picom &> /dev/null &
fi
#set the theme.toml config
leftwm-command "LoadTheme $SCRIPTPATH/theme.ron"
#set background
if [ -x "$(command -v feh)" ]; then
feh --bg-scale "$SCRIPTPATH"/background.jpg
fi
polybar -v
index=0
monitor="$(polybar -m | grep +0+0 | sed s/:.*// | tac)"
leftwm-state -q -n -t "$SCRIPTPATH"/sizes.liquid | sed -r '/^\s*$/d' | while read -r width x y
do
barname="mainbar$index"
echo $barname
monitor=$monitor offsetx=$x width=$width polybar -c "$SCRIPTPATH"/polybar.config $barname &> /dev/null &
let index=index+1
done