summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbh <qn+git@epicurus.dev>2026-03-08 15:49:22 +0800
committerbh <qn+git@epicurus.dev>2026-03-08 15:49:22 +0800
commit1e0cba827b7baf3c385a46283f58bdb9cb842d9b (patch)
treeb758d52a9e9a0558b1175ed5122ef5c2060967cf
parent60fd0b55a7961ab8121604ff9aee92b85aa636d8 (diff)
Add yakuake-style dropdown terminal on distro icon click
-rw-r--r--hypr/.config/hypr/hyprland.conf5
-rw-r--r--quickshell/.config/quickshell/shell.qml13
2 files changed, 18 insertions, 0 deletions
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