From 3865dec90ecb10e07d6b4e37bdde78b69b743e2c Mon Sep 17 00:00:00 2001 From: yage Date: Tue, 30 Jul 2024 21:07:43 -0600 Subject: [PATCH] reflect new home monitor setup --- bin/altaria/1080p-beeg-game | 4 +++- bin/altaria/1080p-office-game | 10 ---------- bin/altaria/4k-beeg-game | 4 +++- bin/altaria/beeg-game | 2 ++ bin/altaria/default | 33 ++++++--------------------------- bin/altaria/office-game | 10 ---------- bin/altaria/smol-game | 5 ++++- bin/altaria/xorg.zsh | 10 +++------- 8 files changed, 21 insertions(+), 57 deletions(-) delete mode 100755 bin/altaria/1080p-office-game delete mode 100755 bin/altaria/office-game diff --git a/bin/altaria/1080p-beeg-game b/bin/altaria/1080p-beeg-game index 3a560a5..8d2d82f 100755 --- a/bin/altaria/1080p-beeg-game +++ b/bin/altaria/1080p-beeg-game @@ -1,10 +1,12 @@ #!/bin/zsh source ${0:a:h}/xorg.zsh +xrandr --output $XRANDR_OUTPUT__smol --off + XRANDR_SET \ --compositing disable \ --screen-blank disable \ --background link-vs-gdizz.jpg \ --sound-effect gamedock \ - ${XRANDR_ARGS__livingroom__1080p[@]} --pos 0x0 --primary \ + ${XRANDR_ARGS__livingroom__1080p[@]} --pos 0x0 --primary --rate 119.88 \ ; diff --git a/bin/altaria/1080p-office-game b/bin/altaria/1080p-office-game deleted file mode 100755 index 0c16735..0000000 --- a/bin/altaria/1080p-office-game +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/zsh -source ${0:a:h}/xorg.zsh - -XRANDR_SET \ - --compositing disable \ - --screen-blank disable \ - --background altaria.jpg \ - --sound-effect gamedock \ - ${XRANDR_ARGS__office__1080p[@]} --pos 0x0 --primary \ - ; diff --git a/bin/altaria/4k-beeg-game b/bin/altaria/4k-beeg-game index 7d2b87c..9ba1538 100755 --- a/bin/altaria/4k-beeg-game +++ b/bin/altaria/4k-beeg-game @@ -1,10 +1,12 @@ #!/bin/zsh source ${0:a:h}/xorg.zsh +xrandr --output $XRANDR_OUTPUT__smol --off + XRANDR_SET \ --compositing disable \ --screen-blank disable \ --background vegeta.jpg \ --sound-effect gamedock \ - ${XRANDR_ARGS__livingroom__2k[@]} --pos 0x0 --primary \ + ${XRANDR_ARGS__livingroom__4k[@]} --pos 0x0 --primary --rate 119.88 \ ; diff --git a/bin/altaria/beeg-game b/bin/altaria/beeg-game index a5fba3d..1a522f6 100755 --- a/bin/altaria/beeg-game +++ b/bin/altaria/beeg-game @@ -1,6 +1,8 @@ #!/bin/zsh source ${0:a:h}/xorg.zsh +xrandr --output $XRANDR_OUTPUT__smol --off + XRANDR_SET \ --compositing disable \ --screen-blank disable \ diff --git a/bin/altaria/default b/bin/altaria/default index c98b4f8..2a8f4c3 100755 --- a/bin/altaria/default +++ b/bin/altaria/default @@ -3,6 +3,12 @@ source ${0:a:h}/xorg.zsh case $MONITOR_CONFIGURATION in home ) + XRANDR_SET \ + --screen-blank disable \ + ${XRANDR_ARGS__smol__1080p[@]} --pos 0x0 --rate 120.00 --primary \ + ${XRANDR_ARGS__livingroom__4k[@]} --pos 0x0 --rate 120.00 \ + ; + ;; unknown ) echo 'unknown state; using default configuration to prevent monitor issues' @@ -13,30 +19,3 @@ case $MONITOR_CONFIGURATION in return 0 ;; esac - -USE_SMOL=false -xrandr -q | grep $XRANDR_OUTPUT__smol | grep -v 'disconnected' && { - xrandr -q | grep $XRANDR_OUTPUT__smol | grep -qv primary && { - USE_SMOL=true - } -} - -XRANDR_ARGS=() -case $USE_SMOL in - true ) - XRANDR_ARGS+=( - ${XRANDR_ARGS__smol__1080p[@]} --pos 0x0 --primary - ) - ;; - false ) - XRANDR_ARGS+=( - ${XRANDR_ARGS__office__4k[@]} --pos 0x0 --primary - ${XRANDR_ARGS__livingroom__4k[@]} --pos 0x0 - ) - ;; -esac - -XRANDR_SET \ - --screen-blank disable \ - ${XRANDR_ARGS[@]} \ - ; diff --git a/bin/altaria/office-game b/bin/altaria/office-game deleted file mode 100755 index 222919a..0000000 --- a/bin/altaria/office-game +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/zsh -source ${0:a:h}/xorg.zsh - -XRANDR_SET \ - --compositing disable \ - --screen-blank disable \ - --background captain-falcon.jpg \ - --sound-effect gamedock \ - ${XRANDR_ARGS__office__4k[@]} --pos 0x0 --primary \ - ; diff --git a/bin/altaria/smol-game b/bin/altaria/smol-game index 91adfb9..9816d1c 100755 --- a/bin/altaria/smol-game +++ b/bin/altaria/smol-game @@ -1,9 +1,12 @@ #!/bin/zsh source ${0:a:h}/xorg.zsh +xrandr --output $XRANDR_OUTPUT__livingroom --off + XRANDR_SET \ --compositing enable \ --screen-blank disable \ --sound-effect gamedock \ - ${XRANDR_ARGS__smol__1080p[@]} --pos 0x0 --primary \ + ${XRANDR_ARGS__smol__2k[@]} --pos 0x0 --rate 180.00 --primary \ ; + diff --git a/bin/altaria/xorg.zsh b/bin/altaria/xorg.zsh index c6eb43c..222b773 100644 --- a/bin/altaria/xorg.zsh +++ b/bin/altaria/xorg.zsh @@ -9,14 +9,9 @@ XRANDR_RESOLUTION__4k='3840x2160' XRANDR_RESOLUTION__2k='2560x1440' XRANDR_RESOLUTION__1080p='1920x1080' -XRANDR_OUTPUT__office='DP-0' XRANDR_OUTPUT__livingroom='HDMI-0' XRANDR_OUTPUT__smol='DP-4' -XRANDR_ARGS__office__4k=(--output $XRANDR_OUTPUT__office --mode $XRANDR_RESOLUTION__4k) -#XRANDR_ARGS__office__2k=() # not available on office monitor -XRANDR_ARGS__office__1080p=(--output $XRANDR_OUTPUT__office --mode $XRANDR_RESOLUTION__1080p) - XRANDR_ARGS__livingroom__4k=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__4k --rate 119.88) XRANDR_ARGS__livingroom__2k=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__2k) XRANDR_ARGS__livingroom__1080p=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__1080p) @@ -28,8 +23,8 @@ XRANDR_ARGS__smol__1080p=(--output $XRANDR_OUTPUT__smol --mode $XRANDR_RESOLUTIO MONITOR_CONFIGURATION=unknown : \ - && xrandr --query | grep -q "^$XRANDR_OUTPUT__office connected" \ && xrandr --query | grep -q "^$XRANDR_OUTPUT__livingroom connected" \ + && xrandr --query | grep -q "^$XRANDR_OUTPUT__smol connected" \ && MONITOR_CONFIGURATION=home \ ; @@ -74,7 +69,8 @@ XRANDR_SET() { ########################################## - scwrypts desktop xrandr disconnect all + # disabling for a moment since the latest X11/NVIDIA drivers are causing some issues after "disconnect all" + #scwrypts desktop xrandr disconnect all xrandr ${XRANDR_ARGS[@]}