blob: f64e118f1697b469bf87a753cc1a12f0b488855f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/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;;
"c") xrandr --nograb --output VGA1 --auto --output LVDS1 --auto;;
"n") xrandr --nograb --output LVDS1 --auto --above VGA1 --output VGA1 --auto;;
"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; reset_ratpoison="" ;;
esac;
if [ -n "$reset_ratpoison" ]; then
[ -n "$BACKGROUND_IMAGE" ] && feh --bg-scale "$BACKGROUND_IMAGE"
ratpoison -c restart
fi;
|