diff options
author | Stefan Ritter <xeno@thehappy.de> | 2010-12-28 17:50:35 +0100 |
---|---|---|
committer | Stefan Ritter <xeno@thehappy.de> | 2010-12-28 17:50:35 +0100 |
commit | 2b5ffad2c3b4b5fe2a330f63d06d56e5cde6d9f2 (patch) | |
tree | 64569e0c2c6a10981b2369536a1ccf402a69de6c | |
parent | cd0869586452a5f0918158c16d1616140579e618 (diff) |
Add automon function for my own purposes
Diffstat (limited to '')
-rw-r--r-- | zsh/zshrc | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -114,6 +114,15 @@ md() { cd $1 } +automon() { + vga=$(xrandr -q | while read line; do if [[ $line =~ ^VGA1.*$ ]] { echo $line | cut -d " " -f 2 }; done) + if [[ $vga = "disconnected" ]] { + xrandr --output LVDS1 --auto --output VGA1 --off + } else { + xrandr --output LVDS1 --off --output VGA1 --auto + } +} + case $TERM in rxvt*) |