feat: hidden mode
This commit is contained in:
parent
589aaaf95f
commit
608854ba03
4 changed files with 38 additions and 4 deletions
|
|
@ -123,6 +123,26 @@ Scope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CustomShortcut {
|
||||||
|
name: "hidden"
|
||||||
|
description: "Enable hidden mode"
|
||||||
|
onPressed: {
|
||||||
|
States.screens.forEach((uiState, _, _) => {
|
||||||
|
uiState.hidden = true;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CustomShortcut {
|
||||||
|
name: "hiddenoff"
|
||||||
|
description: "Disable hidden mode"
|
||||||
|
onPressed: {
|
||||||
|
States.screens.forEach((uiState, _, _) => {
|
||||||
|
uiState.hidden = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CustomShortcut {
|
CustomShortcut {
|
||||||
name: "session"
|
name: "session"
|
||||||
description: "Toggle session menu"
|
description: "Toggle session menu"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ Scope {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
|
property bool enabled: true
|
||||||
|
|
||||||
ExclusionZone {
|
ExclusionZone {
|
||||||
anchors.left: true
|
anchors.left: true
|
||||||
|
|
@ -16,7 +17,7 @@ Scope {
|
||||||
|
|
||||||
ExclusionZone {
|
ExclusionZone {
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
exclusiveZone: Config.bar.height
|
exclusiveZone: root.enabled ? Config.bar.height : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
ExclusionZone {
|
ExclusionZone {
|
||||||
|
|
@ -30,7 +31,8 @@ Scope {
|
||||||
component ExclusionZone: CustomWindow {
|
component ExclusionZone: CustomWindow {
|
||||||
screen: root.screen
|
screen: root.screen
|
||||||
name: "border-exclusion"
|
name: "border-exclusion"
|
||||||
exclusiveZone: Config.border.thickness
|
exclusionMode: root.enabled ? ExclusionMode.Normal : ExclusionMode.Ignore
|
||||||
|
exclusiveZone: root.enabled ? Config.border.thickness : undefined
|
||||||
mask: Region {}
|
mask: Region {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ Variants {
|
||||||
|
|
||||||
Exclusion {
|
Exclusion {
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
|
enabled: !uiState.uiState.hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomWindow {
|
CustomWindow {
|
||||||
|
|
@ -37,9 +38,13 @@ Variants {
|
||||||
// Exclusion
|
// Exclusion
|
||||||
|
|
||||||
exclusionMode: ExclusionMode.Ignore
|
exclusionMode: ExclusionMode.Ignore
|
||||||
mask: uiState.uiState.blockScreen ? exclusionBlock : exclusion
|
mask: uiState.uiState.hidden ? exclusionHidden : uiState.uiState.blockScreen ? exclusionBlock : exclusion
|
||||||
WlrLayershell.keyboardFocus: uiState.uiState.blockScreen ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: uiState.uiState.blockScreen ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
|
||||||
|
|
||||||
|
Region {
|
||||||
|
id: exclusionHidden
|
||||||
|
}
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
id: exclusionBlock
|
id: exclusionBlock
|
||||||
intersection: Intersection.Xor
|
intersection: Intersection.Xor
|
||||||
|
|
@ -78,7 +83,7 @@ Variants {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: Config.colors.overlay
|
color: Config.colors.overlay
|
||||||
opacity: uiState.uiState.blockScreen ? 0.5 : 0
|
opacity: uiState.uiState.blockScreen ? 0.5 : 0
|
||||||
visible: opacity > 0
|
visible: !uiState.uiState.hidden && opacity > 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
Anim {}
|
Anim {}
|
||||||
|
|
@ -90,6 +95,7 @@ Variants {
|
||||||
blurMax: 25
|
blurMax: 25
|
||||||
blurMultiplier: 0
|
blurMultiplier: 0
|
||||||
glowColor: Config.colors.highlight
|
glowColor: Config.colors.highlight
|
||||||
|
visible: !uiState.uiState.hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
Interactions {
|
Interactions {
|
||||||
|
|
@ -97,10 +103,12 @@ Variants {
|
||||||
bar: bar
|
bar: bar
|
||||||
panels: panels
|
panels: panels
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
|
visible: !uiState.uiState.hidden
|
||||||
|
|
||||||
Panels {
|
Panels {
|
||||||
id: panels
|
id: panels
|
||||||
|
|
||||||
|
visible: !uiState.uiState.hidden
|
||||||
uiState: uiState.uiState
|
uiState: uiState.uiState
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
bar: bar
|
bar: bar
|
||||||
|
|
@ -109,11 +117,13 @@ Variants {
|
||||||
|
|
||||||
Border {
|
Border {
|
||||||
id: border
|
id: border
|
||||||
|
visible: !uiState.uiState.hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
Bar {
|
Bar {
|
||||||
id: bar
|
id: bar
|
||||||
|
|
||||||
|
visible: !uiState.uiState.hidden
|
||||||
uiState: uiState.uiState
|
uiState: uiState.uiState
|
||||||
screen: scope.modelData
|
screen: scope.modelData
|
||||||
popouts: panels.popouts
|
popouts: panels.popouts
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ Scope {
|
||||||
property bool osd
|
property bool osd
|
||||||
property bool session
|
property bool session
|
||||||
|
|
||||||
|
// Special modes
|
||||||
|
property bool hidden
|
||||||
property bool blockScreen
|
property bool blockScreen
|
||||||
|
|
||||||
// Other state
|
// Other state
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue