wmstartup: Make startup logging more clear, make script more readable
This commit is contained in:
parent
1b78111d21
commit
fd4ee878cc
@ -60,7 +60,7 @@ xrdbupdate
|
|||||||
## SERVICES AND DAEMONS
|
## SERVICES AND DAEMONS
|
||||||
# Kill everything
|
# Kill everything
|
||||||
printf "[INFO] Stopping existing services\n"
|
printf "[INFO] Stopping existing services\n"
|
||||||
services="plasmashell xembedsniproxy krunner xfdesktop polybar compton conky sxhkd dunst"
|
services="plasmashell xembedsniproxy krunner xfdesktop polybar compton conky sxhkd dunst xob"
|
||||||
for service in $services; do
|
for service in $services; do
|
||||||
printf " [INFO] Sending signal to all $service\n"
|
printf " [INFO] Sending signal to all $service\n"
|
||||||
killall $service
|
killall $service
|
||||||
@ -85,27 +85,62 @@ done
|
|||||||
# Start them back up
|
# Start them back up
|
||||||
printf "[INFO] Starting services\n"
|
printf "[INFO] Starting services\n"
|
||||||
# Start with key functionality
|
# Start with key functionality
|
||||||
|
# SXHKD
|
||||||
if pgrep bspwm > /dev/null 2>&1; then
|
if pgrep bspwm > /dev/null 2>&1; then
|
||||||
printf " [INFO] Found bspwm, starting sxhkd\n"
|
printf " [INFO] Found bspwm, starting sxhkd\n"
|
||||||
sxhkd &
|
sxhkd &
|
||||||
|
else
|
||||||
|
printf " [WARN] bspwm was started, but sxhkd wasn't! Session may be unusable!\n"
|
||||||
fi
|
fi
|
||||||
# Don't start the compositor in a VM
|
|
||||||
if [[ $(hostname) != "vm"* ]]; then
|
# Compton
|
||||||
|
if which compton > /dev/null 2>&1; then
|
||||||
|
# Don't start the compositor in a VM
|
||||||
|
if [[ $(hostname) != "vm"* ]]; then
|
||||||
printf " [INFO] Starting compton\n"
|
printf " [INFO] Starting compton\n"
|
||||||
compton &
|
compton &
|
||||||
else
|
else
|
||||||
printf " [INFO] In a VM, not starting compositor\n"
|
printf " [INFO] In a VM, not starting compositor\n"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
printf " [INFO] Could not find a compositor\n"
|
||||||
fi
|
fi
|
||||||
printf " [INFO] Starting polybar\n"
|
|
||||||
$HOME/.config/polybar/start.sh &
|
# Polybar
|
||||||
printf " [INFO] Starting dunst\n"
|
if which polybar > /dev/null 2>&1; then
|
||||||
dunst&
|
printf " [INFO] Starting polybar\n"
|
||||||
printf " [INFO] Starting conky\n"
|
$HOME/.config/polybar/start.sh &
|
||||||
# Use all the config files in its config directory
|
else
|
||||||
for file in $HOME/.config/conky/*.conf; do
|
printf " [INFO] Could not find a bar\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dunst
|
||||||
|
if which dunst > /dev/null 2>&1; then
|
||||||
|
printf " [INFO] Starting dunst\n"
|
||||||
|
dunst&
|
||||||
|
else
|
||||||
|
printf " [INFO] Could not find a notification daemon\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# XOB
|
||||||
|
if which xob > /dev/null 2>&1; then
|
||||||
|
printf " [INFO] Starting xob instances\n"
|
||||||
|
else
|
||||||
|
printf " [INFO] Could not find a bar overlay application\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Conky
|
||||||
|
if which conky > /dev/null 2>&1; then
|
||||||
|
printf " [INFO] Starting conky\n"
|
||||||
|
# Use all the config files in its config directory
|
||||||
|
for file in $HOME/.config/conky/*.conf; do
|
||||||
printf " [INFO] Found config file $file\n"
|
printf " [INFO] Found config file $file\n"
|
||||||
conky -c $file&
|
conky -c $file&
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
printf " [INFO] Could not find a desktop statistics application\n"
|
||||||
|
fi
|
||||||
|
|
||||||
# Wallpaper management
|
# Wallpaper management
|
||||||
printf "[INFO] Setting wallpaper\n"
|
printf "[INFO] Setting wallpaper\n"
|
||||||
if which xfdesktop > /dev/null 2>&1; then
|
if which xfdesktop > /dev/null 2>&1; then
|
||||||
@ -119,7 +154,8 @@ elif which xsetroot > /dev/null 2>&1; then
|
|||||||
printf " [INFO] Setting root window color\n"
|
printf " [INFO] Setting root window color\n"
|
||||||
xsetroot -solid "#282828"
|
xsetroot -solid "#282828"
|
||||||
else
|
else
|
||||||
printf " [WARN] Could not find any wallpaper manager\n"
|
printf " [WARN] Could not find a wallpaper manager\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "[INFO] Finished initialization\n"
|
printf "[INFO] Finished initialization\n"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user