port my terminal script to hyprland
This commit is contained in:
parent
557163352d
commit
c10597732c
2 changed files with 16 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
monitor=,preferred,auto,1
|
monitor=,preferred,auto,1
|
||||||
$terminal = kitty
|
$terminal = ~/.dotfiles/hypr/scripts/terminal.sh
|
||||||
$fileManager = thunar
|
$fileManager = thunar
|
||||||
$menu = rofi -show run
|
$menu = rofi -show run
|
||||||
$clipboard = rofi -show clipboard -show-icons
|
$clipboard = rofi -show clipboard -show-icons
|
||||||
|
@ -145,6 +145,7 @@ bind = , print, exec, bash -c "grim -g '$(slurp)' - | wl-copy"
|
||||||
bind = $altMod, F, exec, $fileManager
|
bind = $altMod, F, exec, $fileManager
|
||||||
bind = $altMod, B, exec, librewolf
|
bind = $altMod, B, exec, librewolf
|
||||||
bind = $mainMod, P, exec, bitwarden
|
bind = $mainMod, P, exec, bitwarden
|
||||||
|
bind = $altMod, A, exec, anki
|
||||||
|
|
||||||
# Move focus with mainMod + arrow keys
|
# Move focus with mainMod + arrow keys
|
||||||
bind = $mainMod, H, movefocus, l
|
bind = $mainMod, H, movefocus, l
|
||||||
|
|
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
Reference in a new issue