fix logout script

pull/40/head
TomasM 2017-11-12 16:37:49 -05:00
parent 2421aba595
commit 855a64bfd5
1 changed files with 20 additions and 20 deletions

View File

@ -1,31 +1,31 @@
#!/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 \
--voidclickterminate --iconpadding 30 --textpadding 10 \
--paddingswap --leastmargin 10 --hidemissing --iconsize 128 \
--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)
xlunch --noprompt --input /dev/null --bc 111111ff &
# play shutdown sound
aplay $SND
fi
fi
if [ "$LINE" = "logout" ]; then
if [ "$COMMAND" = "logout" ]; then
killall Xorg
fi
fi
if [ "$LINE" = "restart" ]; then
if [ "$COMMAND" = "restart" ]; then
reboot
fi
fi
if [ "$LINE" = "shutdown" ]; then
if [ "$COMMAND" = "shutdown" ]; then
poweroff
fi
done
fi