1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-19 02:17:44 +01:00
dotfiles/.local/bin/tools/dwm/togglemonitor
TiynGER 81dcd6f453 qol changes
- minor changes to snippets
- minor changes to aliases
- switching from ycm to coc for nvim autocomplete
2020-10-30 08:12:56 +01:00

11 lines
360 B
Bash
Executable File

#!/bin/sh
# toggle external monitor
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
intern=LVDS1
extern=HDMI2
(xrandr | grep "$extern disconnected")
(xrandr --listactivemonitors | grep $extern) || ((xrandr --output $extern --right-of $intern --auto && setbg) & exit)
(xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off