1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-27 21:47:46 +01:00

adding togglemonitor script

This commit is contained in:
tiynger 2019-10-28 00:55:13 +01:00
parent 1100e2801d
commit 5da8c7ec9d
2 changed files with 9 additions and 0 deletions

View File

@ -45,6 +45,8 @@ super + x
xournalpp
#super + shift + z taken by i3
super + F4
togglemonitor
super + F5
toggletouchpad
super + F6

7
.local/bin/tools/togglemonitor Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# toggle external monitor
intern=LVDS-1
extern=HDMI-1
(xrandr | grep "$extern disconnected") && exit
(xrandr --listactivemonitors | grep $extern) || (xrandr --output $extern --right-of $intern --auto & exit)
(xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off