From 1e0cba827b7baf3c385a46283f58bdb9cb842d9b Mon Sep 17 00:00:00 2001 From: bh Date: Sun, 8 Mar 2026 15:49:22 +0800 Subject: Add yakuake-style dropdown terminal on distro icon click --- hypr/.config/hypr/hyprland.conf | 5 +++++ quickshell/.config/quickshell/shell.qml | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/hypr/.config/hypr/hyprland.conf b/hypr/.config/hypr/hyprland.conf index bde17b2..dd08847 100644 --- a/hypr/.config/hypr/hyprland.conf +++ b/hypr/.config/hypr/hyprland.conf @@ -270,6 +270,11 @@ windowrule = match:class ^(Emacs)$, workspace 3 # Float windows with class "floating" windowrule = match:class ^(floating)$, float on +# Dropdown terminal (yakuake-style) +windowrule = match:class ^(quickshell-dropdown)$, float on +windowrule = match:class ^(quickshell-dropdown)$, size 100% 40% +windowrule = match:class ^(quickshell-dropdown)$, move 0 25 + # Workspace Names (Chinese characters from bspwm) exec-once = hyprctl dispatch renameworkspace "1 一" exec-once = hyprctl dispatch renameworkspace "2 二" diff --git a/quickshell/.config/quickshell/shell.qml b/quickshell/.config/quickshell/shell.qml index 110838d..bc2f230 100644 --- a/quickshell/.config/quickshell/shell.qml +++ b/quickshell/.config/quickshell/shell.qml @@ -68,6 +68,7 @@ PanelWindow { // Distro icon Rectangle { + id: distroModule color: root.bg2 Layout.fillHeight: true implicitWidth: distroIcon.implicitWidth + 16 @@ -80,6 +81,18 @@ PanelWindow { font.family: "Symbols Nerd Font" font.pixelSize: 14 } + + MouseArea { + anchors.fill: parent + onClicked: { + dropdownToggleProc.running = true + } + } + + Process { + id: dropdownToggleProc + command: ["sh", "-c", "if hyprctl clients -j | jq -e '.[] | select(.class==\"quickshell-dropdown\")' > /dev/null 2>&1; then pkill -f 'kitty --class quickshell-dropdown'; else kitty --class quickshell-dropdown --override font_size=8 -e sh -c 'fastfetch; echo; printf \"\\e[1;33mI USE ARCH BTW!!!!\\e[0m\\n\"; echo; exec $SHELL' & fi"] + } } // Powerline separator: bg2 -> bg1 -- cgit v1.2.3