74 lines
1.9 KiB
Bash
Executable file
74 lines
1.9 KiB
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
app=$1
|
|
|
|
if [ "$app" = "" ]; then
|
|
exit 1
|
|
fi
|
|
|
|
FOCUSED_MONITOR=$(~/.config/hypr/scripts/focused_monitor)
|
|
source ~/.config/hypr/scripts/monitors
|
|
|
|
case $app in
|
|
"nemo")
|
|
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
|
|
hyprctl dispatch exec [workspace 3] nemo &
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
|
|
hyprctl dispatch exec [workspace 12] nemo &
|
|
else
|
|
nemo &
|
|
fi
|
|
;;
|
|
"obsidian")
|
|
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
|
|
hyprctl dispatch exec [workspace 9] obsidian &
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
|
|
hyprctl dispatch exec [workspace 18] obsidian &
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then
|
|
hyprctl dispatch exec [workspace 27] obsidian &
|
|
else
|
|
obsidian &
|
|
fi
|
|
;;
|
|
"office")
|
|
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
|
|
hyprctl dispatch exec [workspace 9] libreoffice &
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
|
|
hyprctl dispatch exec [workspace 18] libreoffice &
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then
|
|
hyprctl dispatch exec [workspace 27] libreoffice &
|
|
else
|
|
libreoffice &
|
|
fi
|
|
;;
|
|
"nvim")
|
|
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
|
|
hyprctl dispatch exec [workspace 2] kitty nvim &
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
|
|
hyprctl dispatch exec [workspace 11] kitty nvim &
|
|
else
|
|
kitty nvim &
|
|
fi
|
|
;;
|
|
"codium")
|
|
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
|
|
hyprctl dispatch workspace 2 && codium &
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
|
|
hyprctl dispatch workspace 11 && codium &
|
|
else
|
|
codium
|
|
fi
|
|
;;
|
|
"browser")
|
|
if [ "$FOCUSED_MONITOR" = "$MONITOR1" ]; then
|
|
hyprctl dispatch workspace 1 && floorp & # Had to to this because it didnt work the other way
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR2" ]; then
|
|
hyprctl dispatch workspace 10 && floorp &
|
|
elif [ "$FOCUSED_MONITOR" = "$MONITOR3" ]; then
|
|
hyprctl dispatch workspace 23 && floorp &
|
|
else
|
|
librewolf &
|
|
fi
|
|
;;
|
|
*) ;;
|
|
esac
|