diff --git a/bin/xorg/butterfree/common b/bin/xorg/butterfree/common index 84e60dc..6d576cc 100644 --- a/bin/xorg/butterfree/common +++ b/bin/xorg/butterfree/common @@ -11,21 +11,36 @@ GET_PRIMARY_MONITOR() { PRIMARY_MONITOR=$(GET_PRIMARY_MONITOR) -GET_DEFAULT_EXTERNAL_MONITOR() { +GET_ALL_EXTERNAL_MONITORS() { xrandr \ | grep ' connect' \ | awk '{print $1;}' \ | grep -v "$NATIVE_MONITOR" \ - | head -n 1 + 2>/dev/null +} +GET_DEFAULT_EXTERNAL_MONITOR() { + GET_ALL_EXTERNAL_MONITORS | head -n 1 } EXTERNAL_MONITOR=$(GET_DEFAULT_EXTERNAL_MONITOR) DISCONNECT_OTHER() { local SFX="$1" - for D in $(xrandr --listmonitors | sed '1d' | awk '{print $NF;}' | grep -v "^$(GET_PRIMARY_MONITOR)$") + local INACTIVE_MONITORS=$(\ + xrandr --listmonitors \ + | sed '1d' | awk '{print $NF;}' \ + | grep -v "^$(GET_PRIMARY_MONITOR)$" + ) + + for ACTIVE_MONITOR in ${@:2} do - xrandr --output $D --off + INACTIVE_MONITORS=$(echo $INACTIVE_MONITORS | grep -v "^$ACTIVE_MONITOR$") + done + + local MONITOR + for MONITOR in $INACTIVE_MONITORS + do + xrandr --output $MONITOR --off done sleep 1 diff --git a/bin/xorg/butterfree/hdmidock b/bin/xorg/butterfree/hdmidock index f1270f9..c966091 100755 --- a/bin/xorg/butterfree/hdmidock +++ b/bin/xorg/butterfree/hdmidock @@ -8,7 +8,7 @@ source ${0:a:h}/common xrandr \ --output $EXTERNAL_MONITOR \ --primary \ - --auto \ + --mode 1920x1080 \ --rotate normal \ --pos 0x0 \ && DISCONNECT_OTHER login \ diff --git a/bin/xorg/butterfree/workdock b/bin/xorg/butterfree/workdock new file mode 100755 index 0000000..5dc1d12 --- /dev/null +++ b/bin/xorg/butterfree/workdock @@ -0,0 +1,24 @@ +#!/bin/zsh +source ${0:a:h}/common +LEFT=$(GET_ALL_EXTERNAL_MONITORS | grep 'DP.-1') +RIGHT=$(GET_ALL_EXTERNAL_MONITORS | grep 'DP.-2') + +[ $LEFT ] && [ $RIGHT ] || { + NOTIFY "Unable to detect work monitors; are you connected?" + return +} + +xrandr \ + --output $RIGHT \ + --primary \ + --mode 1920x1080 \ + --scale 1.25x1.25 \ + --rotate normal \ + --pos 2400x0 \ + --output $LEFT \ + --mode 1920x1080 \ + --scale 1.25x1.25 \ + --rotate normal \ + --pos 0x0 \ + && DISCONNECT_OTHER login $LEFT \ + || NOTIFY "Unable to connect '$EXTERNAL_MONITOR' to 1920x1080" diff --git a/colorschemes/kitty.alternate b/colorschemes/kitty.alternate index 546e976..4031128 120000 --- a/colorschemes/kitty.alternate +++ b/colorschemes/kitty.alternate @@ -1 +1 @@ -/home/w0ryn/.wryn/colorschemes/valentines.conf \ No newline at end of file +/home/w0ryn/.wryn/colorschemes/st-patricks.conf \ No newline at end of file diff --git a/colorschemes/st-patricks.conf b/colorschemes/st-patricks.conf index d6f9b9b..584ece5 100644 --- a/colorschemes/st-patricks.conf +++ b/colorschemes/st-patricks.conf @@ -1,5 +1,5 @@ background #050500 -foreground #3D7D58 +foreground #DDFDA8 cursor #AAFF00 selection_background #FFFF00 selection_foreground #000000