mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-11-24 17:39:37 +01:00
23 lines
509 B
Bash
Executable File
23 lines
509 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get the currently focused workspace
|
|
current_workspace=$(hyprctl monitors -j | jq '.[] | .activeWorkspace.id' )
|
|
|
|
# Define preferred apps based on workspace
|
|
case $current_workspace in
|
|
1) app="kitty --single-instance";;
|
|
2) app="default";;
|
|
3) app="thunderbird";;
|
|
4) app="firefox";;
|
|
5) app="default";;
|
|
esac
|
|
|
|
|
|
|
|
if [[ "$app" == "default" ]]; then
|
|
hyprctl dispatch exec "wofi --show drun --normal-window"
|
|
else
|
|
notify-send -t 500 "opening $app"
|
|
hyprctl dispatch exec "$app"
|
|
fi
|