-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathup
executable file
·100 lines (75 loc) · 3.22 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env bash
export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
# [ COLOR SCHEME ] ###########################################################
# Available themes:
# - catppuccin
#
# NOTE:
# To avoid issues colors.sh will check the theme name provided below and try
# to fallback to the amber theme if what you provide is NULL or does not exist
# in the array on line 12.
source $SCRIPTPATH/scripts/colors.sh catppuccin
##############################################################################
# [ BASIC ] ##################################################################
# 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 the theme.toml config
echo "LoadTheme $SCRIPTPATH/theme.toml" > $XDG_RUNTIME_DIR/leftwm/commands.pipe
##############################################################################
# [ RUN STUFF ] ##############################################################
# keybindings daemon (if it exist)
if [ -x "$(command -v sxhkd)" ]; then
sxhkd -c $HOME/.config/leftwm/sxhkd/sxhkdrc &
fi
# apps
numlockx on &
# notifications
if [ -x "$(command -v dunst)" ]; then
pkill dunst
dunst -config $HOME/.config/leftwm/themes/current/conf/dunst.config &
fi
#/usr/lib/xfce4/notifyd/xfce4-notifyd &
# picom (if it exists)
if [ -x "$(command -v picom)" ]; then
picom --config $HOME/.config/leftwm/themes/current/conf/picom.config &> /dev/null &
fi
##############################################################################
# [ WALLPAPERS ] #############################################################
# - Comment/uncomment the option you prefer
# 1) START - set random wallpapers -----------------------------------------+
if [ -x "$(command -v feh)" ]; then
feh --randomize --bg-fill "$SCRIPTPATH"/wallpapers/*
fi
# END ----------------------------------------------------------------------+
# 2) START - set ONE wallpaper for all displays ----------------------------+
#if [ -x "$(command -v feh)" ]; then
# feh --bg-fill "$SCRIPTPATH"/wallpapers/atlas-ark-gruvbox-simple-lines.png
#fi
# END ----------------------------------------------------------------------+
# 3) START - set MULTIPLE wallpapers for all displays ----------------------+
# NOTE: the last image path DO NOT end with "\"
#if [ -x "$(command -v feh)" ]; then
# feh --bg-fill \
# "$SCRIPTPATH"/wallpapers/blue_unicat.png \
# "$SCRIPTPATH"/wallpapers/pink_unicat.png
#fi
# END ----------------------------------------------------------------------+
##############################################################################
# [ START STATUSBAR ] #########################################################
pkill polybar &
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"
monitor="$(polybar -m | awk -v i="$(( index + 1 ))" 'NR==i{print}' | sed s/:.*// | tr -d '\n')"
monitor=$monitor width=$(( width - 30 )) polybar -c "$SCRIPTPATH"/polybar.config $barname &
let index=index+1
done
;;
######################################################################