From 2a6d103df4dd35810f4d01451d9642a6be4372f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Wed, 8 Nov 2023 00:26:11 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(hypr):=20deleted=20quake,=20no?= =?UTF-8?q?w=20using=20scratchpads=20from=20pyprland?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/hypr/keybinds/binds.conf | 5 +++-- .config/hypr/pyprland.json | 15 ++++++++++++++- .config/hypr/scripts/quake | 25 ------------------------- .config/hypr/themes/luna/rules.conf | 23 ++++++++++++++++------- 4 files changed, 33 insertions(+), 35 deletions(-) delete mode 100755 .config/hypr/scripts/quake diff --git a/.config/hypr/keybinds/binds.conf b/.config/hypr/keybinds/binds.conf index 8660fe18..8844eb4b 100644 --- a/.config/hypr/keybinds/binds.conf +++ b/.config/hypr/keybinds/binds.conf @@ -10,20 +10,21 @@ 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 bind=SUPER,O,exec,~/.config/hypr/scripts/custom_app_launch obsidian bind=SUPERSHIFT,E,exec, ~/.config/hypr/scripts/custom_app_launch nemo bind=SUPER,RETURN,exec,kitty -bind=SUPER,E,exec,kitty --class center-float yazi # Launchers bind=SUPER, 23, exec, rofi -show drun -theme ~/.config/rofi/style.rasi # tab # Scratchpads bind=SUPER,V,exec,pypr toggle volume +bind=SUPER, 51, exec, pypr toggle terminal && hyprctl dispatch bringactivetotop ## Backslash +bind=SUPER, B, exec, pypr toggle btop && hyprctl dispatch bringactivetotop +bind=SUPER,E,exec,pypr toggle yazi && hyprctl dispatch bringactivetotop # Screenshotting bind=SHIFT,Insert,exec, hyprshot -m output -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png diff --git a/.config/hypr/pyprland.json b/.config/hypr/pyprland.json index d63c94f7..f2ccf443 100644 --- a/.config/hypr/pyprland.json +++ b/.config/hypr/pyprland.json @@ -1,6 +1,10 @@ { "pyprland": { - "plugins": ["scratchpads", "expose", "magnify"] + "plugins": [ + "scratchpads", + "expose", + "magnify" + ] }, "scratchpads": { "volume": { @@ -8,6 +12,15 @@ "unfocus": "hide", "animation": "fromLeft", "margin": 20 + }, + "terminal": { + "command": "kitty --class scratchpad" + }, + "yazi": { + "command": "kitty --class scratchpad yazi" + }, + "btop": { + "command": "kitty --class scratchpad btop" } } } diff --git a/.config/hypr/scripts/quake b/.config/hypr/scripts/quake deleted file mode 100755 index f4c0ded1..00000000 --- a/.config/hypr/scripts/quake +++ /dev/null @@ -1,25 +0,0 @@ -#!/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 650;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 75bff37e..b1c80f4a 100644 --- a/.config/hypr/themes/luna/rules.conf +++ b/.config/hypr/themes/luna/rules.conf @@ -25,10 +25,8 @@ windowrulev2 = workspace 8,class:^(Ryujinx)$ windowrulev2 = workspace 8,class:^(.*steam_app.*)$ windowrulev2 = workspace 5,class:^(photoshop.exe)$ windowrulev2 = workspace 5,class:^(pinta)$ -windowrule = workspace special silent,^(pavucontrol)$ ## Float -windowrule = float,^(pavucontrol)$ windowrule = float, xfce-polkit windowrule = float, galculator windowrule = float, wleave @@ -40,12 +38,10 @@ windowrule = float, nwg-look windowrule = float, nm-connection-editor ## Other -windowrulev2 = center,class:^(kitty)$ windowrulev2 = animation windowsOut, 0, class:(wleave) windowrule = float, keyb-kitty windowrule = center 1, keyb-kitty windowrule = size 35% 80%, keyb-kitty -windowrule = size 30% 85%,^(pavucontrol)$ windowrule = float, ^(yazi-geeqie)$ windowrule = size 80% 80%,^(yazi-geeqie)$ windowrule = center 1, ^(yazi-geeqie)$ @@ -55,6 +51,19 @@ windowrulev2 = nofocus,class:^(xwaylandvideobridge)$ windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ ## Base Rules -windowrule = float, ^(center-float)$ -windowrule = size 70% 70%, ^(center-float)$ -windowrule = center 1, ^(center-float)$ +$center-float = class:^(center-float)$ +windowrule = float, $center-float +windowrule = size 70% 70%, $center-float +windowrule = center 1, $center-float + +# Scratchpads +$scratchpad = class:^(scratchpad)$ +windowrulev2 = float,$scratchpad +windowrulev2 = size 70% 70%,$scratchpad +windowrulev2 = center 1,$scratchpad +windowrulev2 = workspace special silent,$scratchpad + +$pavu = class:^(pavucontrol)$ +windowrulev2 = workspace special silent,$pavu +windowrulev2 = float,$pavu +windowrulev2 = size 30% 85%,$pavu