Compare commits
No commits in common. "50b752553065354d730e11aa900f9ed8d340ce12" and "926e3739428884b3eaa4a625c210f5a5ef016650" have entirely different histories.
50b7525530
...
926e373942
@ -1,8 +1,6 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
source ${0:a:h}/xorg.zsh
|
source ${0:a:h}/xorg.zsh
|
||||||
|
|
||||||
xrandr --output $XRANDR_OUTPUT__smol --off
|
|
||||||
|
|
||||||
XRANDR_SET \
|
XRANDR_SET \
|
||||||
--compositing disable \
|
--compositing disable \
|
||||||
--screen-blank disable \
|
--screen-blank disable \
|
||||||
|
10
bin/altaria/1080p-office-game
Executable file
10
bin/altaria/1080p-office-game
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/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 \
|
||||||
|
;
|
@ -1,12 +1,10 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
source ${0:a:h}/xorg.zsh
|
source ${0:a:h}/xorg.zsh
|
||||||
|
|
||||||
xrandr --output $XRANDR_OUTPUT__smol --off
|
|
||||||
|
|
||||||
XRANDR_SET \
|
XRANDR_SET \
|
||||||
--compositing disable \
|
--compositing disable \
|
||||||
--screen-blank disable \
|
--screen-blank disable \
|
||||||
--background vegeta.jpg \
|
--background vegeta.jpg \
|
||||||
--sound-effect gamedock \
|
--sound-effect gamedock \
|
||||||
${XRANDR_ARGS__livingroom__4k[@]} --pos 0x0 --primary --rate 119.88 \
|
${XRANDR_ARGS__livingroom__2k[@]} --pos 0x0 --primary \
|
||||||
;
|
;
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
source ${0:a:h}/xorg.zsh
|
source ${0:a:h}/xorg.zsh
|
||||||
|
|
||||||
xrandr --output $XRANDR_OUTPUT__smol --off
|
|
||||||
|
|
||||||
XRANDR_SET \
|
XRANDR_SET \
|
||||||
--compositing disable \
|
--compositing disable \
|
||||||
--screen-blank disable \
|
--screen-blank disable \
|
||||||
--background roy-art.jpg \
|
--background roy-art.jpg \
|
||||||
--sound-effect gamedock \
|
--sound-effect gamedock \
|
||||||
${XRANDR_ARGS__livingroom__1440p[@]} --pos 0x0 --primary \
|
${XRANDR_ARGS__livingroom__2k[@]} --pos 0x0 --primary \
|
||||||
;
|
;
|
||||||
|
@ -3,12 +3,6 @@ source ${0:a:h}/xorg.zsh
|
|||||||
|
|
||||||
case $MONITOR_CONFIGURATION in
|
case $MONITOR_CONFIGURATION in
|
||||||
home )
|
home )
|
||||||
XRANDR_SET \
|
|
||||||
--screen-blank disable \
|
|
||||||
${XRANDR_ARGS__smol__1440p[@]} --pos 0x0 --primary --rate 120.00 \
|
|
||||||
${XRANDR_ARGS__livingroom__1440p[@]} --pos 0x0 \
|
|
||||||
;
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
unknown )
|
unknown )
|
||||||
echo 'unknown state; using default configuration to prevent monitor issues'
|
echo 'unknown state; using default configuration to prevent monitor issues'
|
||||||
@ -19,3 +13,30 @@ case $MONITOR_CONFIGURATION in
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
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[@]} \
|
||||||
|
;
|
||||||
|
10
bin/altaria/office-game
Executable file
10
bin/altaria/office-game
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/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 \
|
||||||
|
;
|
@ -1,12 +1,9 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
source ${0:a:h}/xorg.zsh
|
source ${0:a:h}/xorg.zsh
|
||||||
|
|
||||||
xrandr --output $XRANDR_OUTPUT__livingroom --off
|
|
||||||
|
|
||||||
XRANDR_SET \
|
XRANDR_SET \
|
||||||
--compositing enable \
|
--compositing enable \
|
||||||
--screen-blank disable \
|
--screen-blank disable \
|
||||||
--sound-effect gamedock \
|
--sound-effect gamedock \
|
||||||
${XRANDR_ARGS__smol__1440p[@]} --pos 0x0 --rate 180.00 --primary \
|
${XRANDR_ARGS__smol__1080p[@]} --pos 0x0 --primary \
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -6,17 +6,21 @@ export DISPLAY=:0
|
|||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
XRANDR_RESOLUTION__4k='3840x2160'
|
XRANDR_RESOLUTION__4k='3840x2160'
|
||||||
XRANDR_RESOLUTION__1440p='2560x1440'
|
XRANDR_RESOLUTION__2k='2560x1440'
|
||||||
XRANDR_RESOLUTION__1080p='1920x1080'
|
XRANDR_RESOLUTION__1080p='1920x1080'
|
||||||
|
|
||||||
|
XRANDR_OUTPUT__office='DP-0'
|
||||||
XRANDR_OUTPUT__livingroom='HDMI-0'
|
XRANDR_OUTPUT__livingroom='HDMI-0'
|
||||||
XRANDR_OUTPUT__smol='DP-4'
|
XRANDR_OUTPUT__smol='DP-4'
|
||||||
|
|
||||||
XRANDR_ARGS__livingroom__4k=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__4k --rate 119.88)
|
XRANDR_ARGS__office__4k=(--output $XRANDR_OUTPUT__office --mode $XRANDR_RESOLUTION__4k)
|
||||||
XRANDR_ARGS__livingroom__1440p=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__1440p)
|
#XRANDR_ARGS__office__2k=() # not available on office monitor
|
||||||
XRANDR_ARGS__livingroom__1080p=(--output $XRANDR_OUTPUT__livingroom --mode $XRANDR_RESOLUTION__1080p --rate 119.88)
|
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)
|
||||||
|
|
||||||
XRANDR_ARGS__smol__1440p=(--output $XRANDR_OUTPUT__smol --mode $XRANDR_RESOLUTION__1440p)
|
|
||||||
XRANDR_ARGS__smol__1080p=(--output $XRANDR_OUTPUT__smol --mode $XRANDR_RESOLUTION__1080p)
|
XRANDR_ARGS__smol__1080p=(--output $XRANDR_OUTPUT__smol --mode $XRANDR_RESOLUTION__1080p)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
@ -24,8 +28,8 @@ XRANDR_ARGS__smol__1080p=(--output $XRANDR_OUTPUT__smol --mode $XRANDR_RESOLUTIO
|
|||||||
MONITOR_CONFIGURATION=unknown
|
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__livingroom connected" \
|
||||||
&& xrandr --query | grep -q "^$XRANDR_OUTPUT__smol connected" \
|
|
||||||
&& MONITOR_CONFIGURATION=home \
|
&& MONITOR_CONFIGURATION=home \
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -70,8 +74,7 @@ XRANDR_SET() {
|
|||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
# disabling for a moment since the latest X11/NVIDIA drivers are causing some issues after "disconnect all"
|
scwrypts desktop xrandr disconnect all
|
||||||
#scwrypts desktop xrandr disconnect all
|
|
||||||
|
|
||||||
xrandr ${XRANDR_ARGS[@]}
|
xrandr ${XRANDR_ARGS[@]}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user