fix logout script
parent
2421aba595
commit
855a64bfd5
|
|
@ -1,31 +1,31 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
exec xlunch --input /etc/xlunch/logout.dsv --noprompt --center --columns 3 --rows 1 \
|
COMMAND=$(
|
||||||
|
xlunch --input /etc/xlunch/logout.dsv --noprompt --center --columns 3 --rows 1 \
|
||||||
--background /usr/share/wallpapers/slax_wallpaper.jpg --font DejaVuSans/11 \
|
--background /usr/share/wallpapers/slax_wallpaper.jpg --font DejaVuSans/11 \
|
||||||
--voidclickterminate --iconpadding 30 --textpadding 10 \
|
--voidclickterminate --iconpadding 30 --textpadding 10 \
|
||||||
--paddingswap --leastmargin 10 --hidemissing --iconsize 128 \
|
--paddingswap --leastmargin 10 --hidemissing --iconsize 128 \
|
||||||
--highlight /usr/share/icons/hicolor/128x128/apps/xlunch_highlight.png \
|
--highlight /usr/share/icons/hicolor/128x128/apps/xlunch_highlight.png \
|
||||||
--outputonly | while read LINE; do
|
--outputonly
|
||||||
|
)
|
||||||
|
|
||||||
SND=/usr/share/sounds/shutdown.wav
|
SND=/usr/share/sounds/shutdown.wav
|
||||||
|
|
||||||
if [ "$LINE" != "" -a -r $SND ]; then
|
if [ "$COMMAND" != "" -a -r $SND ]; then
|
||||||
# blank desktop with smooth effect (if compton still running)
|
# blank desktop with smooth effect (if compton still running)
|
||||||
xlunch --noprompt --input /dev/null --bc 111111ff &
|
xlunch --noprompt --input /dev/null --bc 111111ff &
|
||||||
# play shutdown sound
|
# play shutdown sound
|
||||||
aplay $SND
|
aplay $SND
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$LINE" = "logout" ]; then
|
if [ "$COMMAND" = "logout" ]; then
|
||||||
killall Xorg
|
killall Xorg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$LINE" = "restart" ]; then
|
if [ "$COMMAND" = "restart" ]; then
|
||||||
reboot
|
reboot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$LINE" = "shutdown" ]; then
|
if [ "$COMMAND" = "shutdown" ]; then
|
||||||
poweroff
|
poweroff
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue