-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathup
executable file
·30 lines (24 loc) · 798 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
#!/bin/sh
export SCRIPTPATH
SCRIPTPATH="$( cd "$(dirname "$0")" || exit; 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 picom
picom > /dev/null &
# Set the theme.toml config
leftwm command "LoadTheme $SCRIPTPATH/theme.ron"
# Set background
feh --bg-fill "$SCRIPTPATH"/background.jpg
dunst &
index=0
leftwm-state -q -n -t "$SCRIPTPATH"/sizes.liquid | sed -r '/^\s*$/d' | while read -r width
do
barname="mainbar$index"
monitor="$(polybar -m | tac | awk -v i="$(( index + 1 ))" 'NR==i{print}' | sed s/:.*// | tr -d '\n')"
monitor=$monitor width=$(( width - 16 )) polybar -c "$SCRIPTPATH"/polybar.config $barname &
index=$((index+1))
done