Add script to switch screens

This commit is contained in:
LordMathis 2018-09-15 17:24:15 +02:00
parent ed1d1cf189
commit b2314f6581
2 changed files with 12 additions and 0 deletions

View File

@ -157,6 +157,9 @@ exec --no-startup-id $HOME/bin/startconky.sh
# Redshift
exec --no-startup-id redshift || redshift -l 48.15:17.10
# Switch display output
exec --no-startup-id $HOME/bin/switch_monitors.sh
# Launch Nemo
bindsym $mod+n exec nemo

9
bin/switch_monitors.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
intern=eDP-1
extern=HDMI-1
if xrandr | grep "$extern disconnected"; then
xrandr --output "$extern" --off --output "$intern" --auto
else
xrandr --output "$intern" --off --output "$extern" --auto
fi