port my terminal script to hyprland
This commit is contained in:
parent
557163352d
commit
c10597732c
2 changed files with 16 additions and 1 deletions
14
hypr/scripts/terminal.sh
Executable file
14
hypr/scripts/terminal.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
focused_workspace=$(hyprctl activeworkspace -j | jq '.id')
|
||||
|
||||
kitty_window_count=$(hyprctl clients -j | jq --argjson workspace "$focused_workspace" '[.[] |select(.workspace.id == $workspace and .class == "kitty")] |length')
|
||||
|
||||
next_session=$((focused_workspace * 10))
|
||||
|
||||
if [ "$kitty_window_count" -gt 0 ]
|
||||
then
|
||||
next_session=$((next_session + kitty_window_count))
|
||||
fi
|
||||
|
||||
kitty tmux new-session -A -s ${next_session}
|
Loading…
Add table
Add a link
Reference in a new issue