fix globalshortcut names
This commit is contained in:
@@ -2,11 +2,9 @@ pragma ComponentBehavior: Bound
|
|||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import QtQuick.Layouts
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import Quickshell.Hyprland
|
import qs.Components
|
||||||
import qs.Modules
|
import qs.Modules
|
||||||
import qs.Modules.Bar
|
import qs.Modules.Bar
|
||||||
import qs.Config
|
import qs.Config
|
||||||
@@ -80,9 +78,8 @@ Variants {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
name: "toggle-nc"
|
name: "toggle-nc"
|
||||||
appid: "zshell-nc"
|
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
visibilities.sidebar = !visibilities.sidebar
|
visibilities.sidebar = !visibilities.sidebar
|
||||||
@@ -131,40 +128,6 @@ Variants {
|
|||||||
bar: barLoader
|
bar: barLoader
|
||||||
anchors.fill: parent
|
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 {
|
Panels {
|
||||||
id: panels
|
id: panels
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import Quickshell.Services.Notifications
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import ZShell
|
import ZShell
|
||||||
|
import qs.Components
|
||||||
import qs.Modules
|
import qs.Modules
|
||||||
import qs.Helpers
|
import qs.Helpers
|
||||||
import qs.Paths
|
import qs.Paths
|
||||||
@@ -103,9 +104,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
name: "clearnotifs"
|
name: "clearnotifs"
|
||||||
appid: "zshell-notif"
|
|
||||||
description: "Clear all notifications"
|
description: "Clear all notifications"
|
||||||
onPressed: {
|
onPressed: {
|
||||||
for (const notif of root.list.slice())
|
for (const notif of root.list.slice())
|
||||||
|
|||||||
@@ -71,18 +71,11 @@ CustomMouseArea {
|
|||||||
root.panels.osd.hovered = false;
|
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) {
|
if (!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1) {
|
||||||
popouts.hasCurrent = false;
|
popouts.hasCurrent = false;
|
||||||
// bar.closeTray();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.autoHide)
|
if (Config.autoHide && !root.visibilities.sidebar && !root.visibilities.dashboard)
|
||||||
root.visibilities.bar = false;
|
root.visibilities.bar = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,7 +193,6 @@ CustomMouseArea {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// Show popouts on hover
|
// Show popouts on hover
|
||||||
console.log(y)
|
|
||||||
if (y < bar.implicitHeight) {
|
if (y < bar.implicitHeight) {
|
||||||
bar.checkPopout(x);
|
bar.checkPopout(x);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import Quickshell.Wayland
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import ZShell
|
import ZShell
|
||||||
|
import qs.Components
|
||||||
|
|
||||||
Scope {
|
Scope {
|
||||||
LazyLoader {
|
LazyLoader {
|
||||||
@@ -47,9 +48,8 @@ Scope {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
name: "screenshot"
|
name: "screenshot"
|
||||||
appid: "ZShell"
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
root.freeze = false;
|
root.freeze = false;
|
||||||
root.closing = false;
|
root.closing = false;
|
||||||
@@ -57,9 +57,8 @@ Scope {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
name: "screenshotFreeze"
|
name: "screenshotFreeze"
|
||||||
appid: "ZShell"
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
root.freeze = true;
|
root.freeze = true;
|
||||||
root.closing = false;
|
root.closing = false;
|
||||||
|
|||||||
+4
-4
@@ -6,6 +6,7 @@ import Quickshell
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import qs.Components
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
@@ -52,7 +53,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function reloadDynamicConfs(): void {
|
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()
|
Component.onCompleted: reloadDynamicConfs()
|
||||||
@@ -114,7 +115,7 @@ Singleton {
|
|||||||
FileView {
|
FileView {
|
||||||
id: kbLayoutFile
|
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: {
|
onLoaded: {
|
||||||
const layoutMatch = text().match(/! layout\n([\s\S]*?)\n\n/);
|
const layoutMatch = text().match(/! layout\n([\s\S]*?)\n\n/);
|
||||||
if (layoutMatch) {
|
if (layoutMatch) {
|
||||||
@@ -152,9 +153,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
name: "refreshDevices"
|
name: "refreshDevices"
|
||||||
appid: "ZShell"
|
|
||||||
onPressed: extras.refreshDevices()
|
onPressed: extras.refreshDevices()
|
||||||
onReleased: extras.refreshDevices()
|
onReleased: extras.refreshDevices()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ import Quickshell
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import qs.Components
|
||||||
import qs.Modules
|
import qs.Modules
|
||||||
import qs.Config
|
import qs.Config
|
||||||
import qs.Helpers
|
import qs.Helpers
|
||||||
import qs.Daemons
|
|
||||||
import qs.Modules.Polkit
|
|
||||||
import qs.Modules.UPower
|
import qs.Modules.UPower
|
||||||
import qs.Modules.Network
|
import qs.Modules.Network
|
||||||
|
|
||||||
@@ -75,9 +74,8 @@ RowLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
name: "toggle-overview"
|
name: "toggle-overview"
|
||||||
appid: "zshell"
|
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
Hyprland.refreshWorkspaces();
|
Hyprland.refreshWorkspaces();
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import Quickshell.Wayland
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import qs.Components
|
||||||
import qs.Config
|
import qs.Config
|
||||||
import qs.Helpers
|
import qs.Helpers
|
||||||
import qs.Effects
|
import qs.Effects
|
||||||
@@ -34,8 +35,7 @@ Scope {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
appid: "z-cast"
|
|
||||||
name: "toggle-launcher"
|
name: "toggle-launcher"
|
||||||
onPressed: {
|
onPressed: {
|
||||||
if ( !launcherWindow.visible ) {
|
if ( !launcherWindow.visible ) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import Quickshell.Wayland
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
|
import qs.Components
|
||||||
import qs.Config
|
import qs.Config
|
||||||
|
|
||||||
Scope {
|
Scope {
|
||||||
@@ -45,10 +46,9 @@ Scope {
|
|||||||
lock: lock
|
lock: lock
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
name: "lock"
|
name: "lock"
|
||||||
description: "Lock the current session"
|
description: "Lock the current session"
|
||||||
appid: "zshell-lock"
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
lock.locked = true;
|
lock.locked = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ import qs.Components
|
|||||||
import qs.Config
|
import qs.Config
|
||||||
import qs.Modules
|
import qs.Modules
|
||||||
import qs.Daemons
|
import qs.Daemons
|
||||||
import Quickshell
|
|
||||||
import Quickshell.Bluetooth
|
|
||||||
import Quickshell.Hyprland
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
@@ -40,9 +37,8 @@ CustomRect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalShortcut {
|
CustomShortcut {
|
||||||
name: "toggle-dnd"
|
name: "toggle-dnd"
|
||||||
appid: "zshell-nc"
|
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
toggle.clicked();
|
toggle.clicked();
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ Item {
|
|||||||
required property bool sourceMuted
|
required property bool sourceMuted
|
||||||
required property real brightness
|
required property real brightness
|
||||||
|
|
||||||
implicitWidth: layout.implicitWidth + Appearance.padding.large * 2
|
implicitWidth: layout.implicitWidth + Appearance.padding.small * 2
|
||||||
implicitHeight: layout.implicitHeight + Appearance.padding.large * 2
|
implicitHeight: layout.implicitHeight + Appearance.padding.small * 2
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: layout
|
id: layout
|
||||||
|
|||||||
Reference in New Issue
Block a user