From 0da83ba4604b0f1eec95dd8eec76d8329e82ed4d Mon Sep 17 00:00:00 2001 From: electricsteve <96793824+electricsteve@users.noreply.github.com> Date: Sat, 9 May 2026 19:10:43 +0200 Subject: [PATCH 1/2] feat: notification on specific monitor --- .../quickshell/ii/modules/common/Config.qml | 4 +++ .../notificationPopup/NotificationPopup.qml | 2 +- .../ii/modules/settings/InterfaceConfig.qml | 25 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index cf8fc2032..5fcd1bbd4 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -399,6 +399,10 @@ Singleton { property JsonObject notifications: JsonObject { property int timeout: 7000 + property JsonObject monitor: JsonObject { + property bool enable: false + property string name: "" // Name of the monitor to show notifications on, like "eDP-1". Find out with 'hyprctl monitors' command + } } property JsonObject osd: JsonObject { diff --git a/dots/.config/quickshell/ii/modules/ii/notificationPopup/NotificationPopup.qml b/dots/.config/quickshell/ii/modules/ii/notificationPopup/NotificationPopup.qml index 6ce998146..8d48b5e56 100644 --- a/dots/.config/quickshell/ii/modules/ii/notificationPopup/NotificationPopup.qml +++ b/dots/.config/quickshell/ii/modules/ii/notificationPopup/NotificationPopup.qml @@ -14,7 +14,7 @@ Scope { PanelWindow { id: root visible: (Notifications.popupList.length > 0) && !GlobalStates.screenLocked - screen: Quickshell.screens.find(s => s.name === Hyprland.focusedMonitor?.name) ?? null + screen: Quickshell.screens.find(s => Config.options.notifications.monitor.enable ? s.name === Config.options.notifications.monitor.name : s.name === Hyprland.focusedMonitor?.name) ?? null WlrLayershell.namespace: "quickshell:notificationPopup" WlrLayershell.layer: WlrLayer.Overlay diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index f94f1e811..f888f7de4 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -265,6 +265,31 @@ ContentPage { Config.options.notifications.timeout = value; } } + + ConfigSwitch { + buttonIcon: "monitor" + text: Translation.tr("Show on specific monitor") + checked: Config.options.notifications.monitor.enable + onCheckedChanged: { + Config.options.notifications.monitor.enable = checked; + } + StyledToolTip { + text: Translation.tr("If you have multiple monitors and want notifications to only show on one of them, enable this and enter the monitor name below (e.g., eDP-1)") + } + } + + ConfigRow { + enabled: Config.options.notifications.monitor.enable + MaterialTextArea { + Layout.fillWidth: true + placeholderText: Translation.tr("Monitor name to show notifications on (e.g., eDP-1)") + text: Config.options.notifications.monitor.name + wrapMode: TextEdit.Wrap + onTextChanged: { + Config.options.notifications.monitor.name = text; + } + } + } } ContentSection { From 9e1568fcdcee5004a80ad3e9d56f7fa076b05e9b Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 13 May 2026 20:01:21 +0200 Subject: [PATCH 2/2] qs: rename config option notifications.monitor to notifications.forceMonitor --- .../ii/notificationPopup/NotificationPopup.qml | 2 +- .../ii/modules/settings/InterfaceConfig.qml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/ii/notificationPopup/NotificationPopup.qml b/dots/.config/quickshell/ii/modules/ii/notificationPopup/NotificationPopup.qml index 8d48b5e56..669e3971e 100644 --- a/dots/.config/quickshell/ii/modules/ii/notificationPopup/NotificationPopup.qml +++ b/dots/.config/quickshell/ii/modules/ii/notificationPopup/NotificationPopup.qml @@ -14,7 +14,7 @@ Scope { PanelWindow { id: root visible: (Notifications.popupList.length > 0) && !GlobalStates.screenLocked - screen: Quickshell.screens.find(s => Config.options.notifications.monitor.enable ? s.name === Config.options.notifications.monitor.name : s.name === Hyprland.focusedMonitor?.name) ?? null + screen: Quickshell.screens.find(s => Config.options.notifications.forceMonitor.enable ? s.name === Config.options.notifications.forceMonitor.name : s.name === Hyprland.focusedMonitor?.name) ?? null WlrLayershell.namespace: "quickshell:notificationPopup" WlrLayershell.layer: WlrLayer.Overlay diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index f888f7de4..de544ed82 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -268,10 +268,10 @@ ContentPage { ConfigSwitch { buttonIcon: "monitor" - text: Translation.tr("Show on specific monitor") - checked: Config.options.notifications.monitor.enable + text: Translation.tr("Force specific monitor") + checked: Config.options.notifications.forceMonitor.enable onCheckedChanged: { - Config.options.notifications.monitor.enable = checked; + Config.options.notifications.forceMonitor.enable = checked; } StyledToolTip { text: Translation.tr("If you have multiple monitors and want notifications to only show on one of them, enable this and enter the monitor name below (e.g., eDP-1)") @@ -279,14 +279,14 @@ ContentPage { } ConfigRow { - enabled: Config.options.notifications.monitor.enable + enabled: Config.options.notifications.forceMonitor.enable MaterialTextArea { Layout.fillWidth: true placeholderText: Translation.tr("Monitor name to show notifications on (e.g., eDP-1)") - text: Config.options.notifications.monitor.name + text: Config.options.notifications.forceMonitor.name wrapMode: TextEdit.Wrap onTextChanged: { - Config.options.notifications.monitor.name = text; + Config.options.notifications.forceMonitor.name = text; } } }