sxmo, plugins: restart Conky on time/timezone/wallpaper/logout and shorten # Input mode hints
This commit is contained in:
@@ -80,25 +80,41 @@ else
|
||||
xset s off s noblank s 0 0 -dpms >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
xrdb -merge "$HOME/.Xresources" >/dev/null 2>&1 || true
|
||||
WP_FILE="/usr/share/wallpapers/bananarchy.png"
|
||||
if [ -f "$XDG_CONFIG_HOME/sxmo/wallpaper" ]; then
|
||||
custom_wp="$(head -n 1 "$XDG_CONFIG_HOME/sxmo/wallpaper" 2>/dev/null)"
|
||||
[ -n "$custom_wp" ] && [ -f "$custom_wp" ] && WP_FILE="$custom_wp"
|
||||
fi
|
||||
WP_FLAG="--bg-fill"
|
||||
if [ -f "$XDG_CONFIG_HOME/sxmo/wallpaper_mode" ]; then
|
||||
wp_mode="$(head -n 1 "$XDG_CONFIG_HOME/sxmo/wallpaper_mode" 2>/dev/null)"
|
||||
case "$wp_mode" in
|
||||
scale|--bg-scale) WP_FLAG="--bg-scale" ;;
|
||||
max|--bg-max) WP_FLAG="--bg-max" ;;
|
||||
center|--bg-center) WP_FLAG="--bg-center" ;;
|
||||
tile|--bg-tile) WP_FLAG="--bg-tile" ;;
|
||||
*) WP_FLAG="--bg-fill" ;;
|
||||
esac
|
||||
fi
|
||||
feh --no-fehbg "$WP_FLAG" "$WP_FILE" >/dev/null 2>&1 </dev/null &
|
||||
pidof -s conky >/dev/null 2>&1 || CONKY_DPY=:0 conky -c /home/user/.config/sxmo/conky.conf -d >/dev/null 2>&1 </dev/null || true
|
||||
pkill -9 -x conky >/dev/null 2>&1 || true
|
||||
rm -rf /tmp/sxmo_conky_time_state /tmp/sxmo_conky_restart.lock
|
||||
(DISPLAY=:0 CONKY_DPY=:0 setsid conky -c /home/user/.config/sxmo/conky.conf >/dev/null 2>&1 </dev/null &)
|
||||
pidof -s fcitx5 >/dev/null 2>&1 || fcitx5 -d >/tmp/fcitx5.log 2>&1 </dev/null &
|
||||
sxmo_hook_start.sh >/tmp/sxmo_hook_start.log 2>&1 </dev/null &
|
||||
exec dwm >/tmp/dwm.log 2>&1
|
||||
|
||||
first_iter=1
|
||||
while :; do
|
||||
xrdb -merge "$HOME/.Xresources" >/dev/null 2>&1 || true
|
||||
WP_FILE="/usr/share/wallpapers/bananarchy.png"
|
||||
if [ -f "$XDG_CONFIG_HOME/sxmo/wallpaper" ]; then
|
||||
custom_wp="$(head -n 1 "$XDG_CONFIG_HOME/sxmo/wallpaper" 2>/dev/null)"
|
||||
[ -n "$custom_wp" ] && [ -f "$custom_wp" ] && WP_FILE="$custom_wp"
|
||||
fi
|
||||
WP_FLAG="--bg-fill"
|
||||
if [ -f "$XDG_CONFIG_HOME/sxmo/wallpaper_mode" ]; then
|
||||
wp_mode="$(head -n 1 "$XDG_CONFIG_HOME/sxmo/wallpaper_mode" 2>/dev/null)"
|
||||
case "$wp_mode" in
|
||||
scale|--bg-scale) WP_FLAG="--bg-scale" ;;
|
||||
max|--bg-max) WP_FLAG="--bg-max" ;;
|
||||
center|--bg-center) WP_FLAG="--bg-center" ;;
|
||||
tile|--bg-tile) WP_FLAG="--bg-tile" ;;
|
||||
*) WP_FLAG="--bg-fill" ;;
|
||||
esac
|
||||
fi
|
||||
feh --no-fehbg "$WP_FLAG" "$WP_FILE" >/dev/null 2>&1 </dev/null &
|
||||
if [ "$first_iter" = "0" ]; then
|
||||
pkill -x conky >/dev/null 2>&1 || true
|
||||
sleep 0.05
|
||||
pkill -9 -x conky >/dev/null 2>&1 || true
|
||||
rm -rf /tmp/sxmo_conky_time_state /tmp/sxmo_conky_restart.lock
|
||||
(DISPLAY=:0 CONKY_DPY=:0 setsid conky -c /home/user/.config/sxmo/conky.conf >/dev/null 2>&1 </dev/null &)
|
||||
pidof -s fcitx5 >/dev/null 2>&1 || fcitx5 -d >/tmp/fcitx5.log 2>&1 </dev/null &
|
||||
fi
|
||||
first_iter=0
|
||||
dwm >/tmp/dwm.log 2>&1 || true
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user