-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathup
More file actions
executable file
·48 lines (41 loc) · 1.22 KB
/
up
File metadata and controls
executable file
·48 lines (41 loc) · 1.22 KB
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
39
40
41
42
43
44
45
46
47
48
#!/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
# Set Wallpaper
if [ -f ~/.fehbg ]; then
~/.fehbg
elif [ -x "$(command -v feh)" ]; then
feh --bg-scale $SCRIPTPATH/backgrounds/ign-whale-dark.png
fi
# Set Global Color Scheme
if [ -x "$(command -v wal)" ]; then
wal --theme base16-nord
fi
# Launch Keybindings Daemon
if [ -x "$(command -v sxhkd)" ]; then
sxhkd -c $SCRIPTPATH/sxhkdrc &
fi
# Start Network Manager Applet
if [ -x "$(command -v nm-applet)" ]; then
nm-applet &
fi
# Boot picom if it exists
if [ -x "$(command -v picom)" ]; then
picom --config "$SCRIPTPATH"/picom.conf &> /dev/null &
fi
#Set the theme.toml config
echo "LoadTheme $SCRIPTPATH/theme.toml" > $XDG_RUNTIME_DIR/leftwm/commands.pipe
#Start Polybar
index=0
monitors=($(polybar -m | sed s/:.*//))
leftwm-state -q -n -t "$SCRIPTPATH"/sizes.liquid | sed -r '/^\s*$/d' | while read -r width x y
do
barname="mainbar$index"
monitor=${monitors[index]} width=$(( width - 16 )) polybar -c "$SCRIPTPATH"/polybar.config $barname &> /dev/null &
let index=index+1
done