From 168c0cd6863cf1483f039d9fd3c6bc42f7c52a5c Mon Sep 17 00:00:00 2001 From: Zacharias-Brohn Date: Mon, 16 Feb 2026 19:25:16 +0100 Subject: [PATCH] fix globalshortcut names --- Bar.qml | 41 +------------------ Daemons/NotifServer.qml | 4 +- Drawers/Interactions.qml | 10 +---- Helpers/AreaPicker.qml | 7 ++-- Helpers/Hypr.qml | 8 ++-- Modules/Bar/BarLoader.qml | 6 +-- Modules/Launcher.qml | 4 +- Modules/Lock/Lock.qml | 4 +- .../Sidebar/Utils/Cards/Toggles.qml | 6 +-- Modules/Osd/Content.qml | 4 +- 10 files changed, 21 insertions(+), 73 deletions(-) diff --git a/Bar.qml b/Bar.qml index d727e15..fd0bb93 100644 --- a/Bar.qml +++ b/Bar.qml @@ -2,11 +2,9 @@ pragma ComponentBehavior: Bound import QtQuick import QtQuick.Effects -import QtQuick.Layouts import Quickshell -import Quickshell.Io import Quickshell.Wayland -import Quickshell.Hyprland +import qs.Components import qs.Modules import qs.Modules.Bar import qs.Config @@ -80,9 +78,8 @@ Variants { } } - GlobalShortcut { + CustomShortcut { name: "toggle-nc" - appid: "zshell-nc" onPressed: { visibilities.sidebar = !visibilities.sidebar @@ -131,40 +128,6 @@ Variants { bar: barLoader anchors.fill: parent - // onContainsMouseChanged: { - // if ( !containsMouse ) { - // panels.popouts.hasCurrent = false; - // if ( !visibilities.sidebar && !visibilities.dashboard ) - // visibilities.bar = Config.autoHide ? false : true; - // } - // } - // - // onPositionChanged: event => { - // if ( Config.autoHide && !visibilities.bar ? mouseY < 4 : mouseY < backgroundRect.implicitHeight ) { - // visibilities.bar = true; - // barLoader.checkPopout(mouseX); - // } - // } - // - // onPressed: event => { - // var traywithinX = mouseX >= panels.popouts.x + 8 && mouseX < panels.popouts.x + panels.popouts.implicitWidth; - // var traywithinY = mouseY >= panels.popouts.y + exclusionZone.implicitHeight && mouseY < panels.popouts.y + exclusionZone.implicitHeight + panels.popouts.implicitHeight; - // var sidebarwithinX = mouseX >= bar.width - panels.sidebar.width - // var dashboardWithinX = mouseX <= panels.dashboard.width + panels.dashboard.x && mouseX >= panels.dashboard.x - // var dashboardWithinY = mouseY <= backgroundRect.implicitHeight + panels.dashboard.implicitHeight - // - // if ( panels.popouts.hasCurrent ) { - // if ( traywithinX && traywithinY ) { - // } else { - // panels.popouts.hasCurrent = false; - // } - // } else if ( visibilities.sidebar && !sidebarwithinX ) { - // visibilities.sidebar = false; - // } else if ( visibilities.dashboard && ( !dashboardWithinX || !dashboardWithinY )) { - // visibilities.dashboard = false; - // } - // } - Panels { id: panels screen: scope.modelData diff --git a/Daemons/NotifServer.qml b/Daemons/NotifServer.qml index f7a22f1..27c0987 100644 --- a/Daemons/NotifServer.qml +++ b/Daemons/NotifServer.qml @@ -7,6 +7,7 @@ import Quickshell.Services.Notifications import Quickshell.Hyprland import QtQuick import ZShell +import qs.Components import qs.Modules import qs.Helpers import qs.Paths @@ -103,9 +104,8 @@ Singleton { } } - GlobalShortcut { + CustomShortcut { name: "clearnotifs" - appid: "zshell-notif" description: "Clear all notifications" onPressed: { for (const notif of root.list.slice()) diff --git a/Drawers/Interactions.qml b/Drawers/Interactions.qml index 86eb411..6de38c4 100644 --- a/Drawers/Interactions.qml +++ b/Drawers/Interactions.qml @@ -71,18 +71,11 @@ CustomMouseArea { root.panels.osd.hovered = false; } - if (!dashboardShortcutActive) - visibilities.dashboard = false; - - // if (!utilitiesShortcutActive) - // visibilities.utilities = false; - if (!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1) { popouts.hasCurrent = false; - // bar.closeTray(); } - if (Config.autoHide) + if (Config.autoHide && !root.visibilities.sidebar && !root.visibilities.dashboard) root.visibilities.bar = false; } } @@ -200,7 +193,6 @@ CustomMouseArea { // } // Show popouts on hover - console.log(y) if (y < bar.implicitHeight) { bar.checkPopout(x); } diff --git a/Helpers/AreaPicker.qml b/Helpers/AreaPicker.qml index 16c48be..4b64d1e 100644 --- a/Helpers/AreaPicker.qml +++ b/Helpers/AreaPicker.qml @@ -5,6 +5,7 @@ import Quickshell.Wayland import Quickshell.Io import Quickshell.Hyprland import ZShell +import qs.Components Scope { LazyLoader { @@ -47,9 +48,8 @@ Scope { } } - GlobalShortcut { + CustomShortcut { name: "screenshot" - appid: "ZShell" onPressed: { root.freeze = false; root.closing = false; @@ -57,9 +57,8 @@ Scope { } } - GlobalShortcut { + CustomShortcut { name: "screenshotFreeze" - appid: "ZShell" onPressed: { root.freeze = true; root.closing = false; diff --git a/Helpers/Hypr.qml b/Helpers/Hypr.qml index 126173c..0cab428 100644 --- a/Helpers/Hypr.qml +++ b/Helpers/Hypr.qml @@ -6,6 +6,7 @@ import Quickshell import Quickshell.Hyprland import Quickshell.Io import QtQuick +import qs.Components Singleton { id: root @@ -52,7 +53,7 @@ Singleton { } function reloadDynamicConfs(): void { - extras.batchMessage(["keyword bindlni ,Caps_Lock,global,caelestia:refreshDevices", "keyword bindlni ,Num_Lock,global,caelestia:refreshDevices"]); + extras.batchMessage(["keyword bindlni ,Caps_Lock,global,zshell:refreshDevices", "keyword bindlni ,Num_Lock,global,zshell:refreshDevices"]); } Component.onCompleted: reloadDynamicConfs() @@ -114,7 +115,7 @@ Singleton { FileView { id: kbLayoutFile - path: Quickshell.env("CAELESTIA_XKB_RULES_PATH") || "/usr/share/X11/xkb/rules/base.lst" + path: Quickshell.env("ZSHELL_XKB_RULES_PATH") || "/usr/share/X11/xkb/rules/base.lst" onLoaded: { const layoutMatch = text().match(/! layout\n([\s\S]*?)\n\n/); if (layoutMatch) { @@ -152,9 +153,8 @@ Singleton { } } - GlobalShortcut { + CustomShortcut { name: "refreshDevices" - appid: "ZShell" onPressed: extras.refreshDevices() onReleased: extras.refreshDevices() } diff --git a/Modules/Bar/BarLoader.qml b/Modules/Bar/BarLoader.qml index 4a30ea5..282a9d1 100644 --- a/Modules/Bar/BarLoader.qml +++ b/Modules/Bar/BarLoader.qml @@ -4,11 +4,10 @@ import Quickshell import Quickshell.Hyprland import QtQuick import QtQuick.Layouts +import qs.Components import qs.Modules import qs.Config import qs.Helpers -import qs.Daemons -import qs.Modules.Polkit import qs.Modules.UPower import qs.Modules.Network @@ -75,9 +74,8 @@ RowLayout { } } - GlobalShortcut { + CustomShortcut { name: "toggle-overview" - appid: "zshell" onPressed: { Hyprland.refreshWorkspaces(); diff --git a/Modules/Launcher.qml b/Modules/Launcher.qml index b869e7f..35dfca3 100644 --- a/Modules/Launcher.qml +++ b/Modules/Launcher.qml @@ -3,6 +3,7 @@ import Quickshell.Wayland import Quickshell.Hyprland import QtQuick import QtQuick.Controls +import qs.Components import qs.Config import qs.Helpers import qs.Effects @@ -34,8 +35,7 @@ Scope { } } - GlobalShortcut { - appid: "z-cast" + CustomShortcut { name: "toggle-launcher" onPressed: { if ( !launcherWindow.visible ) { diff --git a/Modules/Lock/Lock.qml b/Modules/Lock/Lock.qml index ee9d599..0254d7f 100644 --- a/Modules/Lock/Lock.qml +++ b/Modules/Lock/Lock.qml @@ -5,6 +5,7 @@ import Quickshell.Wayland import Quickshell.Hyprland import QtQuick import QtQuick.Effects +import qs.Components import qs.Config Scope { @@ -45,10 +46,9 @@ Scope { lock: lock } - GlobalShortcut { + CustomShortcut { name: "lock" description: "Lock the current session" - appid: "zshell-lock" onPressed: { lock.locked = true; } diff --git a/Modules/Notifications/Sidebar/Utils/Cards/Toggles.qml b/Modules/Notifications/Sidebar/Utils/Cards/Toggles.qml index 3e7e983..1244c91 100644 --- a/Modules/Notifications/Sidebar/Utils/Cards/Toggles.qml +++ b/Modules/Notifications/Sidebar/Utils/Cards/Toggles.qml @@ -2,9 +2,6 @@ import qs.Components import qs.Config import qs.Modules import qs.Daemons -import Quickshell -import Quickshell.Bluetooth -import Quickshell.Hyprland import QtQuick import QtQuick.Layouts @@ -40,9 +37,8 @@ CustomRect { } } - GlobalShortcut { + CustomShortcut { name: "toggle-dnd" - appid: "zshell-nc" onPressed: { toggle.clicked(); diff --git a/Modules/Osd/Content.qml b/Modules/Osd/Content.qml index 2b5e619..39b019b 100644 --- a/Modules/Osd/Content.qml +++ b/Modules/Osd/Content.qml @@ -20,8 +20,8 @@ Item { required property bool sourceMuted required property real brightness - implicitWidth: layout.implicitWidth + Appearance.padding.large * 2 - implicitHeight: layout.implicitHeight + Appearance.padding.large * 2 + implicitWidth: layout.implicitWidth + Appearance.padding.small * 2 + implicitHeight: layout.implicitHeight + Appearance.padding.small * 2 ColumnLayout { id: layout