From 81fc788e911b841aa70260ed2a2ef125dc2607a9 Mon Sep 17 00:00:00 2001 From: casglistro Date: Thu, 18 Apr 2024 03:07:20 +0800 Subject: [PATCH] remove useless param --- .config/ags/modules/dock/dock.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.config/ags/modules/dock/dock.js b/.config/ags/modules/dock/dock.js index 65c733009..08254966b 100644 --- a/.config/ags/modules/dock/dock.js +++ b/.config/ags/modules/dock/dock.js @@ -117,15 +117,14 @@ const AppButton = ({ icon, ...rest }) => Widget.Revealer({ }) }); -const Taskbar = (monitor) => Widget.Box({ +const Taskbar = () => Widget.Box({ className: 'dock-apps', attribute: { - monitor: monitor, 'map': new Map(), 'clientSortFunc': (a, b) => { return a.attribute.workspace > b.attribute.workspace; }, - 'update': (box, monitor) => { + 'update': (box) => { for (let i = 0; i < Hyprland.clients.length; i++) { const client = Hyprland.clients[i]; if (client["pid"] == -1) return; @@ -152,7 +151,7 @@ const Taskbar = (monitor) => Widget.Box({ } box.children = Array.from(box.attribute.map.values()); }, - 'add': (box, address, monitor) => { + 'add': (box, address) => { if (!address) { // First active emit is undefined box.attribute.update(box); return; @@ -194,7 +193,7 @@ const Taskbar = (monitor) => Widget.Box({ }, }, setup: (self) => { - self.hook(Hyprland, (box, address) => box.attribute.add(box, address, self.monitor), 'client-added') + self.hook(Hyprland, (box, address) => box.attribute.add(box, address), 'client-added') .hook(Hyprland, (box, address) => box.attribute.remove(box, address, self.monitor), 'client-removed') Utils.timeout(100, () => self.attribute.update(self)); }, @@ -243,7 +242,7 @@ export default (monitor = 0) => { children: [ PinnedApps(), DockSeparator(), - Taskbar(monitor), + Taskbar(), PinButton(), ] })