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