diff --git a/.config/hypr/keybinds/binds.conf b/.config/hypr/keybinds/binds.conf index 88cddeeb..94c3049d 100644 --- a/.config/hypr/keybinds/binds.conf +++ b/.config/hypr/keybinds/binds.conf @@ -10,6 +10,7 @@ bind=SUPER,A,togglefloating, bind=SUPER,P,pseudo, bind=SUPER,F,fullscreen,0 bind=SUPER,Z,exec,pypr zoom +bindr=SUPERSHIFT, Return, exec, ~/.config/hypr/scripts/quake ## Applications bind=SUPER,W,exec,librewolf # Numpad dot diff --git a/.config/hypr/scripts/quake b/.config/hypr/scripts/quake new file mode 100755 index 00000000..bdb0ff4f --- /dev/null +++ b/.config/hypr/scripts/quake @@ -0,0 +1,25 @@ +#!/bin/env bash + +WORKSPACE=$(hyprctl clients -j | jq -rec '.[] | select(.class == "quake") | .workspace .name') +TERM_CMD="kitty -1 --class quake -o background_opacity=0.90 -o hide_window_decorations=yes -o remember_window_size=no" + +if [ "$WORKSPACE" = "" ]; then + echo "start" + hyprctl dispatch -- exec "[float;size 1600 500;center] $TERM_CMD" +elif [ "$WORKSPACE" == "special:quake" ]; then + echo "show" + + hyprctl activewindow | head -n1 | cut -f2 -d ' ' >/tmp/hypr-quake-address + + hyprctl activewindow | rg "fullscreen: 1" && hyprctl dispatch fullscreen + + hyprctl dispatch movetoworkspacesilent "+0,^(quake)\$" + hyprctl dispatch focuswindow "^(quake)\$" + hyprctl dispatch bringactivetotop +else + echo "hide" + + hyprctl dispatch movetoworkspacesilent "special:quake,^(quake)\$" + hyprctl dispatch focuswindow "address:0x$(cat /tmp/hypr-quake-address)" + hyprctl dispatch bringactivetotop +fi diff --git a/.config/hypr/themes/luna/rules.conf b/.config/hypr/themes/luna/rules.conf index b6405602..7338a6b6 100644 --- a/.config/hypr/themes/luna/rules.conf +++ b/.config/hypr/themes/luna/rules.conf @@ -48,6 +48,7 @@ windowrule = float, nm-connection-editor ## Other windowrulev2 = center,class:^(kitty)$ +windowrulev2 = stayfocused,class:quake windowrulev2 = opacity 0.80, class:^(Rofi)$ windowrule = animation slide, Rofi windowrulev2 = animation windowsOut, 0, class:(wleave)