workaround for startup notifications by detecting open windows
This commit is contained in:
@@ -7,6 +7,8 @@ exec xlunch --input /etc/xlunch/entries.dsv \
|
||||
--highlight /usr/share/icons/hicolor/128x128/apps/xlunch_highlight.png \
|
||||
--outputonly | while read LINE; do
|
||||
|
||||
fbstartupnotify
|
||||
|
||||
cmd="$(echo $LINE | sed -r "s/\\s.*//")"
|
||||
whi="$(which $cmd | head -n 1)"
|
||||
Xdep=$(ldd $whi | grep libX11)
|
||||
|
||||
@@ -9,8 +9,10 @@ exec xlunch --input /etc/xlunch/logout.dsv --noprompt \
|
||||
|
||||
SND=/usr/share/sounds/shutdown.wav
|
||||
|
||||
# blackout desktop
|
||||
feh --bg-scale /usr/share/icons/locolor/16x16/apps/black.png
|
||||
|
||||
# play logout song
|
||||
if [ "$LINE" != "" -a -r $SND ]; then
|
||||
aplay $SND &
|
||||
sleep 1
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
CURSORSDIR=/usr/share/icons/breeze_cursors/cursors/
|
||||
SIZE=20
|
||||
|
||||
# Set cursor to wait. As soon as new window is detected, change cursor back
|
||||
xsetroot -xcf $CURSORSDIR/left_ptr_watch $SIZE
|
||||
export WINDOWS="$(wmctrl -l)"
|
||||
xsetroot -cursor_name left_ptr_watch
|
||||
|
||||
(
|
||||
until diff -u <(echo "$WINDOWS") <(wmctrl -l) | egrep -q "^[+]"; do
|
||||
sleep 0.1
|
||||
done
|
||||
set_cursor_normal
|
||||
xsetroot -xcf $CURSORSDIR/left_ptr $SIZE
|
||||
) &
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user