From c045b7a17e3a286dd10a9c840d2c258322f36275 Mon Sep 17 00:00:00 2001 From: Wryn Wagner Date: Fri, 5 Feb 2021 15:51:13 -0700 Subject: [PATCH] Added script to facilitate connection to tv for gaming purposes --- config/xserver/screenlayout/tvdock.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 config/xserver/screenlayout/tvdock.sh diff --git a/config/xserver/screenlayout/tvdock.sh b/config/xserver/screenlayout/tvdock.sh new file mode 100755 index 0000000..5b66a28 --- /dev/null +++ b/config/xserver/screenlayout/tvdock.sh @@ -0,0 +1,20 @@ +#!/bin/sh +NATIVE_MONITOR='eDP1'; +TV_DISPLAY=$(xrandr | grep ' connect' | awk '{print $1;}' | grep -v "$NATIVE_MONITOR" | head -n 1); + +[ -z $TV_DISPLAY ] && return; # no external monitor connected; do nothing + +xrandr\ + --output "$TV_DISPLAY" --primary\ + --rotate normal\ + --pos 0x0\ + --mode 1920x1080\ + ; + +for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$TV_DISPLAY"); do + xrandr --output $display --off; +done; + +feh --bg-fill --randomize $HOME/.config/wryn/wallpaper; + +[ -f $HOME/.config/wryn/sfx ] && $HOME/.config/wryn/sfx gamedock