-
Notifications
You must be signed in to change notification settings - Fork 0
/
wal-it
executable file
Β·81 lines (66 loc) Β· 1.99 KB
/
wal-it
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
#!/usr/bin/env bash
red="\e[31m"
grn="\e[32m"
ylw="\e[33m"
cyn="\e[36m"
blu="\e[34m"
prp="\e[35m"
dprp="\e[35;1m"
rst="\e[0m"
img=$1
backend=$2
light=$3
if test -z "${img}"
then
echo "Error: No argument provided. Please provide image file path."
exit 1
fi
if [ "$img" = "-h" ] || [ "$img" = "--help" ]
then
echo "Usage: wal-it <img_path> <backend> <light=light>
backend choices: wal, colorz
Pass 'light' as the 3rd argument for light background. Leave empty for default dark.
All arguments are mandatory."
exit 0
fi
# Setting up frequently used wallpapers
case $img in
"pinetrees")
img=$HOME/Pictures/Wallpapers/pinetrees.png
;;
"hydrangea")
img=$HOME/Pictures/Wallpapers/konohanakitan_hydrangea.jpg
;;
"oldbridge")
img=$HOME/Pictures/Wallpapers/old-bridge-intothedistance.jpg
;;
esac
/usr/bin/notify-send "Running: wal-it"
echo -e "${prp}Running: wal${rst}"
if [ "$light" = "light" ]
then
$HOME/.local/bin/wal -l -i "${img}" -g --backend $backend
elif [ "$light" != "" ] || [ "$light" = "dark" ]
then
$HOME/.local/bin/wal -i "${img}" -g --backend $backend
else
echo "pass 'light' for setting to light mode"
fi
echo -en "\n${prp}Running: wal-vis${rst}: "
$HOME/.bin/wal-vis
echo -en "${prp}Refreshing bspwm colors${rst}"
sh -c "$HOME/.config/bspwm/bspwm-colors.sh &"
echo ": Done!"
echo -en "${prp}Refreshing lemonbar${rst}"
sh -c "$HOME/.bin/refresh-indicators.sh"
echo ": Done!"
echo -e "\n${prp}Current colorscheme${rst}\n"
echo -e " ${red}βββββ ${grn}βββββ ${ylw}βββββ ${cyn}βββββ ${blu}βββββ ${prp}βββββ ${dprp}βββββ${rst}"
echo -e " ${red}βββββ ${grn}βββββ ${ylw}βββββ ${cyn}βββββ ${blu}βββββ ${prp}βββββ ${dprp}βββββ${rst}"
# if [ "$lock" = "lock" ]
# then
# echo "\nRunning: betterlockscreen -u"
# /usr/bin/betterlockscreen -u "${img}"
# fi
sleep 0.5
/usr/bin/notify-send "Completed: wal-it"