mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2025-07-15 23:39:40 +03:00
Update hyprland config
This commit is contained in:
22
scripts/smart-exec
Executable file
22
scripts/smart-exec
Executable file
@ -0,0 +1,22 @@
|
||||
#!/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
|
Reference in New Issue
Block a user