fix globalshortcut names

This commit is contained in:
Zacharias-Brohn
2026-02-16 19:25:16 +01:00
parent ded3ab06df
commit 168c0cd686
10 changed files with 21 additions and 73 deletions
+2 -39
View File
@@ -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
+2 -2
View File
@@ -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())
+1 -9
View File
@@ -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);
}
+3 -4
View File
@@ -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;
+4 -4
View File
@@ -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()
}
+2 -4
View File
@@ -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();
+2 -2
View File
@@ -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 ) {
+2 -2
View File
@@ -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;
}
@@ -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();
+2 -2
View File
@@ -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