mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Notifications: minor ram optimization by avoiding loader on inactive monitors.
This commit is contained in:
@@ -17,17 +17,23 @@ if command -v notify-send >/dev/null 2>&1; then
|
||||
# 1) Themed icon name
|
||||
notify-send -i dialog-information "Icon name test" "Should resolve from theme (dialog-information)"
|
||||
|
||||
sleep 1
|
||||
|
||||
# 2) Absolute path if a sample image exists
|
||||
SAMPLE_IMG="/usr/share/pixmaps/steam.png"
|
||||
if [ -f "$SAMPLE_IMG" ]; then
|
||||
notify-send -i "$SAMPLE_IMG" "Absolute path test" "Should show the provided image path"
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
|
||||
# 3) file:// URL form
|
||||
if [ -f "$SAMPLE_IMG" ]; then
|
||||
notify-send -i "file://$SAMPLE_IMG" "file:// URL test" "Should display after stripping scheme"
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "Icon/image tests sent!"
|
||||
fi
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ import qs.Widgets
|
||||
|
||||
// Simple notification popup - displays multiple notifications
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
// If no notification display activated in settings, then show them all
|
||||
model: Quickshell.screens.filter(screen => (Settings.data.osd.monitors.includes(screen.name) || (Settings.data.osd.monitors.length === 0)))
|
||||
|
||||
delegate: Loader {
|
||||
id: root
|
||||
@@ -21,8 +22,7 @@ Variants {
|
||||
// Access the notification model from the service - UPDATED NAME
|
||||
property ListModel notificationModel: NotificationService.activeList
|
||||
|
||||
// If no notification display activated in settings, then show them all
|
||||
active: modelData && (Settings.data.notifications.monitors.includes(modelData.name) || (Settings.data.notifications.monitors.length === 0))
|
||||
active: true
|
||||
|
||||
Connections {
|
||||
target: ScalingService
|
||||
@@ -236,7 +236,7 @@ Variants {
|
||||
// Animation behaviors
|
||||
Behavior on scale {
|
||||
NumberAnimation {
|
||||
duration: Style.animationSlow
|
||||
duration: Style.animationNormal
|
||||
easing.type: Easing.OutExpo
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user