From 3a094b01d79aad2b391803da8dd7df68cf753905 Mon Sep 17 00:00:00 2001 From: Moeta Yuko Date: Wed, 31 Jul 2024 23:41:50 +0800 Subject: [PATCH 1/5] tray: filter out empty tray items For unknown reason, an unknown program (even invisible in D-Spy) occasionally populates an empty tray item of the following properties: TrayItem { "category": null, "id": null, "title": null, "status": null, "window-id": null, "is-menu": null, "tooltip-markup": "", "icon": "image-missing" } Add a null check for the item id to workaround the issue. --- .config/ags/modules/bar/normal/tray.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/ags/modules/bar/normal/tray.js b/.config/ags/modules/bar/normal/tray.js index 727c28bb..d568bc76 100644 --- a/.config/ags/modules/bar/normal/tray.js +++ b/.config/ags/modules/bar/normal/tray.js @@ -3,15 +3,15 @@ import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js'; const { Box, Icon, Button, Revealer } = Widget; const { Gravity } = imports.gi.Gdk; -const SysTrayItem = (item) => Button({ +const SysTrayItem = (item) => item.id !== null ? Button({ className: 'bar-systray-item', - child: Icon({hpack: 'center'}).bind('icon', item, 'icon'), + child: Icon({ hpack: 'center' }).bind('icon', item, 'icon'), setup: (self) => self .hook(item, (self) => self.tooltipMarkup = item['tooltip-markup']) , onPrimaryClick: (_, event) => item.activate(event), onSecondaryClick: (btn, event) => item.menu.popup_at_widget(btn, Gravity.SOUTH, Gravity.NORTH, null), -}); +}) : null; export const Tray = (props = {}) => { const trayContent = Box({ From 560d107bafd222e3b0e0754943df5feb3577cde8 Mon Sep 17 00:00:00 2001 From: Moeta Yuko Date: Thu, 1 Aug 2024 11:45:56 +0800 Subject: [PATCH 2/5] ags: remove timeout source after notification dismissed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following log spam: (com.github.Aylur.ags:2273075): Gjs-CRITICAL **: 11:15:29.279: Object .Ags_Label (0x5f2be6736120), has been already disposed — impossible to get any property from it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs. == Stack trace for context 0x5f2be48b33d0 == #0 7ffcd01459e0 b resource:///com/github/Aylur/ags/widgets/label.js:39 (1dcdaf08bb00 @ 10) #1 5f2be497b5e0 i file:///home/foobar/.config/ags/modules/.commonwidgets/notification.js:253 (1dcdaf0b72e0 @ 10) #2 5f2be497b560 i resource:///com/github/Aylur/ags/utils/timeout.js:14 (1f5daab1150 @ 6) #3 5f2be497b498 i resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266 (1f5daa7d560 @ 139) (com.github.Aylur.ags:2273075): Gjs-CRITICAL **: 11:15:29.279: Object .Ags_Label (0x5f2be6736120), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs. == Stack trace for context 0x5f2be48b33d0 == #0 7ffcd01459e0 b resource:///com/github/Aylur/ags/widgets/label.js:51 (1dcdaf08bb00 @ 190) #1 5f2be497b5e0 i file:///home/foobar/.config/ags/modules/.commonwidgets/notification.js:253 (1dcdaf0b72e0 @ 10) #2 5f2be497b560 i resource:///com/github/Aylur/ags/utils/timeout.js:14 (1f5daab1150 @ 6) #3 5f2be497b498 i resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266 (1f5daa7d560 @ 139) --- .config/ags/modules/.commonwidgets/notification.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/ags/modules/.commonwidgets/notification.js b/.config/ags/modules/.commonwidgets/notification.js index 121df0b0..57840ff7 100644 --- a/.config/ags/modules/.commonwidgets/notification.js +++ b/.config/ags/modules/.commonwidgets/notification.js @@ -250,8 +250,12 @@ export default ({ className: 'txt-smaller txt-semibold', label: initTimeString, setup: initTimeString == 'Now' ? (self) => { - Utils.timeout(60000, () => self.label = getFriendlyNotifTimeString(notifObject.time)) - } : () => {}, + let id = Utils.timeout(60000, () => { + self.label = getFriendlyNotifTimeString(notifObject.time); + id = null; + }); + self.connect('destroy', () => { if (id) GLib.source_remove(id) }); + } : () => { }, }); const notifText = Box({ valign: Gtk.Align.CENTER, From 231dfc81c0b967d0b7a6e2ea235a12b47b656161 Mon Sep 17 00:00:00 2001 From: Moeta Yuko Date: Thu, 1 Aug 2024 22:03:17 +0800 Subject: [PATCH 3/5] ags: move datetime polling to Variable Fixes #713 --- .config/ags/modules/bar/normal/system.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.config/ags/modules/bar/normal/system.js b/.config/ags/modules/bar/normal/system.js index 7e952124..5afc19e4 100644 --- a/.config/ags/modules/bar/normal/system.js +++ b/.config/ags/modules/bar/normal/system.js @@ -28,16 +28,27 @@ const BatBatteryProgress = () => { }) } +const time = Variable('', { + poll: [ + userOptions.time.interval, + () => GLib.DateTime.new_now_local().format(userOptions.time.format), + ], +}) + +const date = Variable('', { + poll: [ + userOptions.time.dateInterval, + () => GLib.DateTime.new_now_local().format(userOptions.time.dateFormatLong), + ], +}) + const BarClock = () => Widget.Box({ vpack: 'center', className: 'spacing-h-4 bar-clock-box', children: [ Widget.Label({ className: 'bar-time', - label: GLib.DateTime.new_now_local().format(userOptions.time.format), - setup: (self) => self.poll(userOptions.time.interval, label => { - label.label = GLib.DateTime.new_now_local().format(userOptions.time.format); - }), + label: time.bind(), }), Widget.Label({ className: 'txt-norm txt-onLayer1', @@ -45,10 +56,7 @@ const BarClock = () => Widget.Box({ }), Widget.Label({ className: 'txt-smallie bar-date', - label: GLib.DateTime.new_now_local().format(userOptions.time.dateFormatLong), - setup: (self) => self.poll(userOptions.time.dateInterval, (label) => { - label.label = GLib.DateTime.new_now_local().format(userOptions.time.dateFormatLong); - }), + label: date.bind(), }), ], }); From 97d279d9395aab75cd54036ca8e7c294517a58ba Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:12:58 +0700 Subject: [PATCH 4/5] easyeffects service --- .config/hypr/hyprland/execs.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/hypr/hyprland/execs.conf b/.config/hypr/hyprland/execs.conf index 840754e9..8a9b4c01 100644 --- a/.config/hypr/hyprland/execs.conf +++ b/.config/hypr/hyprland/execs.conf @@ -14,6 +14,9 @@ exec-once = dbus-update-activation-environment --all exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Some fix idk exec-once = hyprpm reload +# Audio +exec-once = easyeffects --gapplication-service + # Clipboard: history # exec-once = wl-paste --watch cliphist store & exec-once = wl-paste --type text --watch cliphist store From 494982cc9cb93ff8b348564261e78acb4d9be84f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:13:30 +0700 Subject: [PATCH 5/5] fix broken fakefullscreen (fixes #719) --- .config/hypr/hyprland/keybinds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/hypr/hyprland/keybinds.conf b/.config/hypr/hyprland/keybinds.conf index 5912f7f0..2fe92bc9 100644 --- a/.config/hypr/hyprland/keybinds.conf +++ b/.config/hypr/hyprland/keybinds.conf @@ -72,7 +72,7 @@ binde = Super, Semicolon, splitratio, -0.1 # [hidden] binde = Super, Apostrophe, splitratio, +0.1 # [hidden] # Positioning mode bind = Super+Alt, Space, togglefloating, -bind = Super+Alt, F, fakefullscreen, +bind = Super+Alt, F, fullscreenstate, 0 3 # Toggle fake fullscreen bind = Super, F, fullscreen, 0 bind = Super, D, fullscreen, 1