knoebber / toggle_display

~/bin/toggle-display Commits Diff Raw
#!/bin/bash

# xrandr | grep " connected"

# toggle primary display on my laptop; useful for plugging external monitor into i3.
if [ "$1" == "off" ]; then
   xrandr --output eDP-1 --off
else
   xrandr --output eDP-1 --auto
fi