Merge branch 'main' into feat/m3-revamp
This commit is contained in:
commit
1eac4e4bcb
3 changed files with 27 additions and 7 deletions
|
|
@ -61,11 +61,7 @@ StyledWindow {
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.session || panels.dashboard.needsKeyboard ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.session || panels.dashboard.needsKeyboard ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||||
|
|
||||||
mask: Regions {
|
mask: hasFullscreen ? emptyRegion : regions
|
||||||
bar: bar
|
|
||||||
panels: panels
|
|
||||||
win: root
|
|
||||||
}
|
|
||||||
|
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
anchors.bottom: true
|
anchors.bottom: true
|
||||||
|
|
@ -84,6 +80,18 @@ StyledWindow {
|
||||||
Anim {}
|
Anim {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Region {
|
||||||
|
id: emptyRegion
|
||||||
|
}
|
||||||
|
|
||||||
|
Regions {
|
||||||
|
id: regions
|
||||||
|
|
||||||
|
bar: bar
|
||||||
|
panels: panels
|
||||||
|
win: root
|
||||||
|
}
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
HyprlandFocusGrab {
|
||||||
id: focusGrab
|
id: focusGrab
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ class NotifsConfig : public ConfigObject {
|
||||||
CONFIG_GLOBAL_PROPERTY(bool, expire, true)
|
CONFIG_GLOBAL_PROPERTY(bool, expire, true)
|
||||||
CONFIG_GLOBAL_PROPERTY(QString, fullscreen, QStringLiteral("on"))
|
CONFIG_GLOBAL_PROPERTY(QString, fullscreen, QStringLiteral("on"))
|
||||||
CONFIG_GLOBAL_PROPERTY(int, defaultExpireTimeout, 5000)
|
CONFIG_GLOBAL_PROPERTY(int, defaultExpireTimeout, 5000)
|
||||||
|
CONFIG_GLOBAL_PROPERTY(int, fullscreenExpireTimeout, 2000)
|
||||||
CONFIG_PROPERTY(qreal, clearThreshold, 0.3)
|
CONFIG_PROPERTY(qreal, clearThreshold, 0.3)
|
||||||
CONFIG_PROPERTY(int, expandThreshold, 20)
|
CONFIG_PROPERTY(int, expandThreshold, 20)
|
||||||
CONFIG_GLOBAL_PROPERTY(bool, actionOnClick, false)
|
CONFIG_GLOBAL_PROPERTY(bool, actionOnClick, false)
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,22 @@ QtObject {
|
||||||
property bool hasActionIcons
|
property bool hasActionIcons
|
||||||
property list<var> actions
|
property list<var> actions
|
||||||
|
|
||||||
|
readonly property bool hasFullscreen: {
|
||||||
|
const monitor = Hypr.focusedMonitor;
|
||||||
|
const specialName = monitor?.lastIpcObject.specialWorkspace?.name;
|
||||||
|
if (specialName) {
|
||||||
|
const specialWs = Hypr.workspaces.values.find(ws => ws.name === specialName);
|
||||||
|
return specialWs?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false;
|
||||||
|
}
|
||||||
|
return monitor?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false;
|
||||||
|
}
|
||||||
|
|
||||||
readonly property Timer timer: Timer {
|
readonly property Timer timer: Timer {
|
||||||
running: true
|
running: true
|
||||||
interval: notif.expireTimeout > 0 ? notif.expireTimeout : GlobalConfig.notifs.defaultExpireTimeout
|
interval: notif.expireTimeout > 0 ? notif.expireTimeout : notif.hasFullscreen ? GlobalConfig.notifs.fullscreenExpireTimeout : GlobalConfig.notifs.defaultExpireTimeout
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (GlobalConfig.notifs.expire)
|
// Always expire if the active workspace has a fullscreen window
|
||||||
|
if (GlobalConfig.notifs.expire || notif.hasFullscreen)
|
||||||
notif.popup = false;
|
notif.popup = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue