updated i3 executables

This commit is contained in:
Wryn (yage) Wagner 2022-08-09 22:26:39 -06:00
parent ae9317ebf9
commit e67881b7ed
3 changed files with 45 additions and 6 deletions

View File

@ -22,20 +22,26 @@ which $APPLICATION >/dev/null 2>&1 \
CLIENT_CLASS="${@:2}" CLIENT_CLASS="${@:2}"
[ ! $CLIENT_CLASS ] && CLIENT_CLASS="$APPLICATION" [ ! $CLIENT_CLASS ] && CLIENT_CLASS="$APPLICATION"
ALWAYS_LAUNCH=0
RESIZE=1
XFFSET=0.0 XFFSET=0.0
YFFSET=0.0 YFFSET=0.0
FACTOR=0.8 FACTOR=0.8
xrandr | grep primary | awk '{print $4;}' | grep -q '^3840' \ xrandr | grep primary | awk '{print $4;}' | grep -q '^3840' \
&& FACTOR=0.5 && FACTOR=0.5
case $APPLICATION in case $APPLICATION in
pavucontrol ) FACTOR=0.4 YFFSET=200 ;; pavucontrol ) FACTOR=0.4 YFFSET=200 ;;
discord ) ALWAYS_LAUNCH=1 ;;
android-messages-desktop ) ALWAYS_LAUNCH=1 ;;
scrcpy ) RESIZE=0 ;;
esac esac
LAUNCH_APP=0 LAUNCH_APP=0
xdotool search --class "$CLIENT_CLASS" || LAUNCH_APP=1 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 ]] && { [[ $LAUNCH_APP -eq 1 ]] && {
i3-msg "exec --no-startup-id $APPLICATION;" 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] 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] scratchpad show"
i3-msg "[class=$CLIENT_CLASS] move position center" i3-msg "[class=$CLIENT_CLASS] move position center"

22
bin/xorg/altaria/gamedock Executable file
View File

@ -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'

View File

@ -1,13 +1,24 @@
#!/bin/zsh #!/bin/zsh
source ${0:a:h}/common source ${0:a:h}/common
xrandr --output HDMI-0 --mode 3840x2160; sleep 1
xrandr \ xrandr \
--output DP-0 \ --output DP-0 \
--primary \
--mode 3840x2160 \ --mode 3840x2160 \
--rotate normal \ --rotate normal \
--pos 0x0 \ --pos 0x0 \
--output DP-2 \
--primary \
--mode 4096x2160 \
--rotate normal \
--left-of DP-0 \
; ;
(pkill compton; sleep 1; compton;) &
$DOTWRYN/bin/set-background random $DOTWRYN/bin/set-background random
PLAY_SFX login PLAY_SFX login
xset dpms 0 0 0 && xset s noblank && xset s off \
&& notify-send 'DPMS' 'disabled screen blank'