From 6d1077a28b8d6f64ca72b9aa00f0b2cab97fb594 Mon Sep 17 00:00:00 2001 From: Tslil Clingman Date: Fri, 3 Jun 2016 18:28:04 +0200 Subject: A silly oversight --- sc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sc b/sc index a9e75f5..f64e118 100755 --- a/sc +++ b/sc @@ -1,5 +1,7 @@ #!/usr/bin/env sh # Quick hack to manage screen hotplugging + +reset_ratpoison="yes" case "$1" in "d") xrandr --nograb --output VGA1 --off --output LVDS1 --auto;; "r") xrandr --nograb --output VGA1 --auto --primary --output LVDS1 --off;; @@ -8,8 +10,10 @@ case "$1" in "s") xrandr --nograb --output LVDS1 --auto --below VGA1 --output VGA1 --auto;; "e") xrandr --nograb --output LVDS1 --auto --right-of VGA1 --output VGA1 --auto;; "w") xrandr --nograb --output LVDS1 --auto --left-of VGA1 --output VGA1 --auto;; - *) xrandr --nograb ;; + *) xrandr --nograb; reset_ratpoison="" ;; esac; -[ -n "$BACKGROUND_IMAGE" ] && feh --bg-scale "$BACKGROUND_IMAGE" -ratpoison -c restart +if [ -n "$reset_ratpoison" ]; then + [ -n "$BACKGROUND_IMAGE" ] && feh --bg-scale "$BACKGROUND_IMAGE" + ratpoison -c restart +fi; -- cgit v1.2.3