From e67881b7edbff95817e37de7c767e4c1b907e2b9 Mon Sep 17 00:00:00 2001 From: yage Date: Tue, 9 Aug 2022 22:26:39 -0600 Subject: [PATCH] updated i3 executables --- bin/i3/launch-or-show | 10 ++++++++-- bin/xorg/altaria/gamedock | 22 ++++++++++++++++++++++ bin/xorg/altaria/hdmi4k | 19 +++++++++++++++---- 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100755 bin/xorg/altaria/gamedock diff --git a/bin/i3/launch-or-show b/bin/i3/launch-or-show index 91ec366..a8dd68e 100755 --- a/bin/i3/launch-or-show +++ b/bin/i3/launch-or-show @@ -22,20 +22,26 @@ which $APPLICATION >/dev/null 2>&1 \ CLIENT_CLASS="${@:2}" [ ! $CLIENT_CLASS ] && CLIENT_CLASS="$APPLICATION" +ALWAYS_LAUNCH=0 +RESIZE=1 XFFSET=0.0 YFFSET=0.0 FACTOR=0.8 xrandr | grep primary | awk '{print $4;}' | grep -q '^3840' \ && FACTOR=0.5 + case $APPLICATION in pavucontrol ) FACTOR=0.4 YFFSET=200 ;; + discord ) ALWAYS_LAUNCH=1 ;; + android-messages-desktop ) ALWAYS_LAUNCH=1 ;; + scrcpy ) RESIZE=0 ;; esac LAUNCH_APP=0 xdotool search --class "$CLIENT_CLASS" || LAUNCH_APP=1 -[[ $CLIENT_CLASS =~ discord ]] && LAUNCH_APP=1 +[[ $ALWAYS_LAUNCH -eq 1 ]] && LAUNCH_APP=1 [[ $LAUNCH_APP -eq 1 ]] && { i3-msg "exec --no-startup-id $APPLICATION;" @@ -51,6 +57,6 @@ WINDOW_SIZE=$(\ ) i3-msg "[class=$CLIENT_CLASS] move scratchpad" -i3-msg "[class=$CLIENT_CLASS] resize set $WINDOW_SIZE" +[[ $RESIZE -eq 1 ]] && i3-msg "[class=$CLIENT_CLASS] resize set $WINDOW_SIZE" i3-msg "[class=$CLIENT_CLASS] scratchpad show" i3-msg "[class=$CLIENT_CLASS] move position center" diff --git a/bin/xorg/altaria/gamedock b/bin/xorg/altaria/gamedock new file mode 100755 index 0000000..f537375 --- /dev/null +++ b/bin/xorg/altaria/gamedock @@ -0,0 +1,22 @@ +#!/bin/zsh +source ${0:a:h}/common + +xrandr --output HDMI-0 --mode 3840x2160; sleep 1 + +xrandr \ + --output DP-0 \ + --off \ + --output DP-2 \ + --primary \ + --mode 3840x2160 \ + --rotate normal \ + ; + +sleep 2; +xrandr --output DP-2 --mode 3840x2160 --rate 120; + +$DOTWRYN/bin/set-background random +PLAY_SFX login + +xset dpms 0 0 0 && xset s noblank && xset s off \ + && notify-send 'DPMS' 'disabled screen blank' diff --git a/bin/xorg/altaria/hdmi4k b/bin/xorg/altaria/hdmi4k index 393ff02..c15eb8f 100755 --- a/bin/xorg/altaria/hdmi4k +++ b/bin/xorg/altaria/hdmi4k @@ -1,13 +1,24 @@ #!/bin/zsh source ${0:a:h}/common +xrandr --output HDMI-0 --mode 3840x2160; sleep 1 + xrandr \ --output DP-0 \ - --primary \ - --mode 3840x2160 \ - --rotate normal \ - --pos 0x0 \ + --mode 3840x2160 \ + --rotate normal \ + --pos 0x0 \ + --output DP-2 \ + --primary \ + --mode 4096x2160 \ + --rotate normal \ + --left-of DP-0 \ ; +(pkill compton; sleep 1; compton;) & + $DOTWRYN/bin/set-background random PLAY_SFX login + +xset dpms 0 0 0 && xset s noblank && xset s off \ + && notify-send 'DPMS' 'disabled screen blank'