workaround for startup notifications by detecting open windows
parent
5c6d5d810b
commit
1a4fab456c
|
|
@ -10,12 +10,16 @@ xmodmap "/root/.Xmodmap"
|
||||||
# merge xresource settings
|
# merge xresource settings
|
||||||
xrdb -merge ~/.Xresources
|
xrdb -merge ~/.Xresources
|
||||||
|
|
||||||
# set background color
|
# set background color and big wait mouse cursor
|
||||||
xsetroot -solid '#000000' -cursor_name watch
|
xsetroot -solid '#000000'
|
||||||
|
xsetroot -xcf /usr/share/icons/breeze_cursors/cursors/watch 37
|
||||||
|
|
||||||
# preload compton and fluxbox to cache
|
# preload compton and fluxbox to cache
|
||||||
(compton --help; fluxbox --help) >/dev/null 2>/dev/null
|
(compton --help; fluxbox --help) >/dev/null 2>/dev/null
|
||||||
|
|
||||||
|
# preload wallpaper
|
||||||
|
cat /usr/share/wallpapers/wp.jpg > /dev/null 2>/dev/null
|
||||||
|
|
||||||
# Keep black screen for first two seconds while the sound plays.
|
# Keep black screen for first two seconds while the sound plays.
|
||||||
# This slows startup by 2 seconds, but it is nice effect.
|
# This slows startup by 2 seconds, but it is nice effect.
|
||||||
SND=/usr/share/sounds/startup.wav
|
SND=/usr/share/sounds/startup.wav
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ exec xlunch --input /etc/xlunch/entries.dsv \
|
||||||
--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 | while read LINE; do
|
||||||
|
|
||||||
|
fbstartupnotify
|
||||||
|
|
||||||
cmd="$(echo $LINE | sed -r "s/\\s.*//")"
|
cmd="$(echo $LINE | sed -r "s/\\s.*//")"
|
||||||
whi="$(which $cmd | head -n 1)"
|
whi="$(which $cmd | head -n 1)"
|
||||||
Xdep=$(ldd $whi | grep libX11)
|
Xdep=$(ldd $whi | grep libX11)
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,10 @@ exec xlunch --input /etc/xlunch/logout.dsv --noprompt \
|
||||||
|
|
||||||
SND=/usr/share/sounds/shutdown.wav
|
SND=/usr/share/sounds/shutdown.wav
|
||||||
|
|
||||||
|
# blackout desktop
|
||||||
feh --bg-scale /usr/share/icons/locolor/16x16/apps/black.png
|
feh --bg-scale /usr/share/icons/locolor/16x16/apps/black.png
|
||||||
|
|
||||||
|
# play logout song
|
||||||
if [ "$LINE" != "" -a -r $SND ]; then
|
if [ "$LINE" != "" -a -r $SND ]; then
|
||||||
aplay $SND &
|
aplay $SND &
|
||||||
sleep 1
|
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
|
||||||
Loading…
Reference in New Issue