🚀 perf(hypr): custom app launch script now executes the apps in the background

This commit is contained in:
Sergio Laín 2023-12-14 00:16:38 +01:00
parent ff5100414b
commit 1686fac9d5
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -12,73 +12,73 @@ source ~/.config/hypr/scripts/monitors
case $app in case $app in
"nemo") "nemo")
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
hyprctl dispatch exec [workspace 4] nemo hyprctl dispatch exec [workspace 4] nemo &
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
hyprctl dispatch exec [workspace 14] nemo hyprctl dispatch exec [workspace 14] nemo &
else else
nemo nemo &
fi fi
;; ;;
"obsidian") "obsidian")
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
hyprctl dispatch exec [workspace 10] obsidian hyprctl dispatch exec [workspace 10] obsidian &
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
hyprctl dispatch exec [workspace 20] obsidian hyprctl dispatch exec [workspace 20] obsidian &
elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then
hyprctl dispatch exec [workspace 30] obsidian hyprctl dispatch exec [workspace 30] obsidian &
else else
obsidian obsidian &
fi fi
;; ;;
"office") "office")
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
hyprctl dispatch exec [workspace 10] libreoffice hyprctl dispatch exec [workspace 10] libreoffice &
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
hyprctl dispatch exec [workspace 20] libreoffice hyprctl dispatch exec [workspace 20] libreoffice &
elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then
hyprctl dispatch exec [workspace 30] libreoffice hyprctl dispatch exec [workspace 30] libreoffice &
else else
libreoffice libreoffice &
fi fi
;; ;;
"kitty") "kitty")
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
hyprctl dispatch exec [workspace 3] kitty hyprctl dispatch exec [workspace 3] kitty &
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
hyprctl dispatch exec [workspace 13] kitty hyprctl dispatch exec [workspace 13] kitty &
elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then
hyprctl dispatch exec "[workspace 24] kitty --class center-float-large" hyprctl dispatch exec "[workspace 24] kitty --class center-float-large" &
else else
kitty kitty &
fi fi
;; ;;
"nvim") "nvim")
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
hyprctl dispatch exec [workspace 2] kitty nvim hyprctl dispatch exec [workspace 2] kitty nvim &
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
hyprctl dispatch exec [workspace 12] kitty nvim hyprctl dispatch exec [workspace 12] kitty nvim &
else else
kitty nvim kitty nvim &
fi fi
;; ;;
"neovide") "neovide")
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
hyprctl dispatch workspace 2 && neovide hyprctl dispatch workspace 2 && neovide &
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
hyprctl dispatch workspace 12 && neovide hyprctl dispatch workspace 12 && neovide &
else else
neovide neovide
fi fi
;; ;;
"librewolf") "librewolf")
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
hyprctl dispatch workspace 1 && librewolf # Had to to this because it didnt work the other way hyprctl dispatch workspace 1 && librewolf & # Had to to this because it didnt work the other way
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
hyprctl dispatch workspace 11 && librewolf hyprctl dispatch workspace 11 && librewolf &
elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then
hyprctl dispatch workspace 25 && librewolf hyprctl dispatch workspace 25 && librewolf &
else else
librewolf librewolf &
fi fi
;; ;;
*) ;; *) ;;