parent
e2fb8270b1
commit
b2b862135a
2 changed files with 18 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ Scope {
|
|||
id: root
|
||||
|
||||
property bool launcherInterrupted
|
||||
readonly property bool hasFullscreen: Hypr.focusedWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2) ?? false
|
||||
|
||||
CustomShortcut {
|
||||
name: "controlCenter"
|
||||
|
|
@ -19,6 +20,8 @@ Scope {
|
|||
name: "showall"
|
||||
description: "Toggle launcher, dashboard and osd"
|
||||
onPressed: {
|
||||
if (root.hasFullscreen)
|
||||
return;
|
||||
const v = Visibilities.getForActive();
|
||||
v.launcher = v.dashboard = v.osd = v.utilities = !(v.launcher || v.dashboard || v.osd || v.utilities);
|
||||
}
|
||||
|
|
@ -28,6 +31,8 @@ Scope {
|
|||
name: "dashboard"
|
||||
description: "Toggle dashboard"
|
||||
onPressed: {
|
||||
if (root.hasFullscreen)
|
||||
return;
|
||||
const visibilities = Visibilities.getForActive();
|
||||
visibilities.dashboard = !visibilities.dashboard;
|
||||
}
|
||||
|
|
@ -37,6 +42,8 @@ Scope {
|
|||
name: "session"
|
||||
description: "Toggle session menu"
|
||||
onPressed: {
|
||||
if (root.hasFullscreen)
|
||||
return;
|
||||
const visibilities = Visibilities.getForActive();
|
||||
visibilities.session = !visibilities.session;
|
||||
}
|
||||
|
|
@ -47,7 +54,7 @@ Scope {
|
|||
description: "Toggle launcher"
|
||||
onPressed: root.launcherInterrupted = false
|
||||
onReleased: {
|
||||
if (!root.launcherInterrupted) {
|
||||
if (!root.launcherInterrupted && !root.hasFullscreen) {
|
||||
const visibilities = Visibilities.getForActive();
|
||||
visibilities.launcher = !visibilities.launcher;
|
||||
}
|
||||
|
|
@ -66,6 +73,8 @@ Scope {
|
|||
|
||||
function toggle(drawer: string): void {
|
||||
if (list().split("\n").includes(drawer)) {
|
||||
if (root.hasFullscreen && ["launcher", "session", "dashboard"].includes(drawer))
|
||||
return;
|
||||
const visibilities = Visibilities.getForActive();
|
||||
visibilities[drawer] = !visibilities[drawer];
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,14 @@ Variants {
|
|||
StyledWindow {
|
||||
id: win
|
||||
|
||||
readonly property bool hasFullscreen: Hypr.monitorFor(screen)?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2) ?? false
|
||||
|
||||
onHasFullscreenChanged: {
|
||||
visibilities.launcher = false;
|
||||
visibilities.session = false;
|
||||
visibilities.dashboard = false;
|
||||
}
|
||||
|
||||
screen: scope.modelData
|
||||
name: "drawers"
|
||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue