mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 19:14:39 +02:00
[bin/mon-toggle] fixing xrandr not using sleep
This commit is contained in:
parent
b771f758e9
commit
bea5fdb8a5
1 changed files with 9 additions and 4 deletions
|
@ -1,4 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
xrandr 1> /dev/null
|
intern=LVDS1
|
||||||
sleep 2
|
extern=VGA1
|
||||||
xrandr --output VGA1 --auto --pos 1600x0 --output LVDS1 --auto --pos 0x150 --primary --output HDMI1 --auto --output DP1 --auto
|
|
||||||
|
if xrandr | grep "$extern disconnected"; then
|
||||||
|
xrandr --output "$extern" --off --output "$intern" --auto
|
||||||
|
else
|
||||||
|
xrandr --output "$intern" --auto --pos 0x150 --output "$extern" --auto --pos 1600x0 --primary --output HDMI1 --auto --output DP1 --auto
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue