aboutsummaryrefslogblamecommitdiffstats
path: root/xorg-xrandr/resolution-changed
blob: a53c7b6ee8122c4d08339b6a57bd280251934967 (plain) (tree)



















                                                                                                                    
#!/bin/dash

# Reset rat size in case DPI change modified scaling
xsetroot -cursor_name left_ptr || :

# Reset rat speed in case DPI changed
if test "${DESKTOP_SESSION}" = xmonad && test ! "${NO_MATE}" = y; then
	(exec mate-settings-daemon --replace &) || :
fi

# Reset background in case resolution change damaged it
for file in ~/.config/background.${SESSION_} \
            ~/.config/background.${SESSION} \
            ~/.config/background.${DESKTOP_SESSION} \
            ~/.config/background; do
	if test -r "$file"; then
		xwallpaper --zoom "$file"
		(sleep 2 ; xwallpaper --zoom "$file") & # Again, with delay, in case mate-settings-daemon changes it
	fi
done