updated i3 executables
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user