Created
March 21, 2011 20:22
-
-
Save josephwegner/880144 to your computer and use it in GitHub Desktop.
Switches between gnome-panel configurations for variable monitor configurations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main() { | |
NR_OF_MONITORS=$(xrandr | grep -v disconnected | grep -c connected) | |
if [ $NR_OF_MONITORS = 1 ]; then | |
oneMon | |
fi | |
if [ $NR_OF_MONITORS = 2 ]; then | |
twoMon | |
fi | |
} | |
oneMon() { | |
echo "One Monitor" | |
gconftool-2 --load $HOME/def_panels/one.xml | |
} | |
twoMon() { | |
echo "Two Monitors" | |
xrandr --addmode VGA1 1600x900 | |
xrandr --output VGA1 --mode 1600x900 --rate 60 | |
gconftool-2 --load $HOME/def_panels/two.xml | |
} | |
Main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment