From 1ca280b6016f8f762411a44f53c44981bb9246c5 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 22 Jul 2024 16:53:31 +0200 Subject: .. 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 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'xorg-xrandr/resolution-changed') diff --git a/xorg-xrandr/resolution-changed b/xorg-xrandr/resolution-changed index e1457ce..4e8856f 100755 --- a/xorg-xrandr/resolution-changed +++ b/xorg-xrandr/resolution-changed @@ -1,15 +1,23 @@ #!/bin/dash reset_wallpaper_twice=0 +hostname="$(hostname | tr 'A-Z' 'a-z')" -if ! test "$(hostname | tr '[A-Z]' '[a-z]')" = zenith; then +if ! test "${hostname}" = zenith; then ## TODO how about the other east,north,hades,hyperion? # 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 - msd=/usr/lib/mate-settings-daemon/mate-settings-daemon - if ! test -x "$msd"; then + if test -x /usr/lib/mate-settings-daemon/mate-settings-daemon; then + msd=/usr/lib/mate-settings-daemon/mate-settings-daemon + elif test -x /usr/bin/mate-settings-daemon; then + msd=/usr/bin/mate-settings-daemon + elif test -x /usr/libexec/mate-settings-daemon; then + msd=/usr/libexec/mate-settings-daemon + elif test -x /usr/libexec/mate-settings-daemon/mate-settings-daemon; then + msd=/usr/libexec/mate-settings-daemon/mate-settings-daemon + else msd=mate-settings-daemon fi (exec $msd --replace &) || : -- cgit v1.2.3-70-g09d2