From 0f1df0db903ba576fd17b08197d3066af7a61e5f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Nov 2023 23:23:40 +0100 Subject: A lot of changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- xorg-xrandr/resolution-changed | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 xorg-xrandr/resolution-changed (limited to 'xorg-xrandr/resolution-changed') diff --git a/xorg-xrandr/resolution-changed b/xorg-xrandr/resolution-changed new file mode 100755 index 0000000..a53c7b6 --- /dev/null +++ b/xorg-xrandr/resolution-changed @@ -0,0 +1,20 @@ +#!/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 -- cgit v1.2.3-70-g09d2