This repository has been archived on 2026-01-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles-old/hdmi-plug.sh
T
2018-10-26 09:55:10 -06:00

12 lines
302 B
Bash
Executable File

#!/bin/bash
status=$(cat /sys/class/drm/card0-HDMI-A-1/status)
if [ $status = 'connected' ]; then
xrandr --output eDP-1 --auto --output HDMI-1 --auto --scale 2x2 --right-of eDP-1
twmnc -t 'display' -c 'HDMI plugged'
else
xrandr --output HDMI-1 --off
twmnc -t 'display' -c 'HDMI unplugged'
fi