diff options
Diffstat (limited to 'zsh')
-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*) |