end-4 / dots-hyprland

Modern, feature-rich and accessible desktop configuration.
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
3.34k stars 218 forks source link

[Issue] Ags bar shown twice #393

Closed JarneDel closed 3 months ago

JarneDel commented 3 months ago

Ags bar is shown twice, with dual monitor setup

monitor=eDP-1,1920x1080@60,0x0,1 monitor=DP-1,1920x1080@60,1920x0,1

Hyprctl monitors

[{
    "id": 0,
    "name": "eDP-1",
    "description": "AU Optronics 0x683D",
    "make": "AU Optronics",
    "model": "0x683D",
    "serial": "",
    "width": 1920,
    "height": 1080,
    "refreshRate": 60.04900,
    "x": 0,
    "y": 0,
    "activeWorkspace": {
        "id": 4,
        "name": "4"
    },
    "specialWorkspace": {
        "id": 0,
        "name": ""
    },
    "reserved": [0, 80, 0, 0],
    "scale": 1.00,
    "transform": 0,
    "focused": false,
    "dpmsStatus": true,
    "vrr": false,
    "activelyTearing": false,
    "currentFormat": "XRGB8888",
    "availableModes": ["1920x1080@60.05Hz","1680x1050@60.05Hz","1280x1024@60.05Hz","1440x900@60.05Hz","1280x800@60.05Hz","1280x720@60.05Hz","1024x768@60.05Hz","800x600@60.05Hz","640x480@60.05Hz"]
},{
    "id": 1,
    "name": "HDMI-A-1",
    "description": "Lenovo Group Limited L24i-30 UPB4ANGW",
    "make": "Lenovo Group Limited",
    "model": "L24i-30",
    "serial": "UPB4ANGW",
    "width": 1920,
    "height": 1080,
    "refreshRate": 60.00000,
    "x": 1920,
    "y": 0,
    "activeWorkspace": {
        "id": 2,
        "name": "2"
    },
    "specialWorkspace": {
        "id": 0,
        "name": ""
    },
    "reserved": [0, 0, 0, 0],
    "scale": 1.00,
    "transform": 0,
    "focused": true,
    "dpmsStatus": true,
    "vrr": true,
    "activelyTearing": false,
    "currentFormat": "XRGB8888",
    "availableModes": ["1920x1080@60.00Hz","1920x1080@74.97Hz","1920x1080@72.01Hz","1920x1080@60.01Hz","1920x1080@60.00Hz","1920x1080@59.94Hz","1920x1080@50.03Hz","1920x1080@50.00Hz","1920x1080@48.02Hz","1680x1050@59.88Hz","1600x900@75.00Hz","1600x900@60.00Hz","1280x1024@75.03Hz","1280x1024@60.02Hz","1440x900@59.90Hz","1280x800@60.00Hz","1152x864@75.00Hz","1280x720@60.00Hz","1280x720@59.94Hz","1280x720@50.00Hz","1024x768@75.03Hz","1024x768@60.00Hz","800x600@75.00Hz","800x600@60.32Hz","720x576@50.00Hz","720x576@50.00Hz","720x480@60.00Hz","720x480@60.00Hz","720x480@59.94Hz","720x480@59.94Hz","640x480@75.00Hz","640x480@72.81Hz","640x480@60.00Hz","640x480@59.94Hz","640x480@59.94Hz","720x400@70.08Hz"]
}]

Ags log

(com.github.Aylur.ags:157205): Gtk-WARNING **: 19:32:14.019: Theme directory 256/applets of theme OneUI-dark has no size field

(com.github.Aylur.ags:157205): Gtk-WARNING **: 19:32:14.024: Theme directory 16@2x/emblems of theme OneUI-dark has no size field

(com.github.Aylur.ags:157205): Gtk-WARNING **: 19:32:14.026: Theme directory 22@2x/devices of theme OneUI-dark has no size field

(com.github.Aylur.ags:157205): Gtk-WARNING **: 19:32:14.026: Theme directory 22@2x/emblems of theme OneUI-dark has no size field

(com.github.Aylur.ags:157205): Gtk-WARNING **: 19:32:14.027: Theme directory 256@2x/applets of theme OneUI-dark has no size field

(com.github.Aylur.ags:157205): Gjs-WARNING **: 19:32:14.181: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

Gjs-Console-Message: 19:32:14.398: [LOG] Styles loaded

(com.github.Aylur.ags:157205): Gtk-WARNING **: 19:32:14.830: Attempting to add a widget with type Ags_Revealer to a container of type Ags_Box, but the widget is already inside a container of type Ags_Box, please remove the widget from its existing container first.

(com.github.Aylur.ags:157205): Gjs-Console-WARNING **: 19:32:14.923: Error: can't assign "[object instance wrapper GIName:GdkPixbuf.Pixbuf jsobj@0x15297601f0 native@0x5f82eeb82140]" as icon, it is not a file nor a named icon
set icon@resource:///com/github/Aylur/ags/widgets/icon.js:40:30
_handleParamProp@resource:///com/github/Aylur/ags/widgets/widget.js:124:13
Icon@resource:///com/github/Aylur/ags/widgets/icon.js:23:14
Icon@resource:///com/github/Aylur/ags/widget.js:26:32
SysTrayItem@file:///home/jarne/.config/ags/modules/bar/normal/tray.js:8:12
Tray/setup/<@file:///home/jarne/.config/ags/modules/bar/normal/tray.js:25:50
hook/<@resource:///com/github/Aylur/ags/widgets/widget.js:43:25
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

(com.github.Aylur.ags:157205): Gjs-Console-WARNING **: 19:32:14.926: Error: can't assign "[object instance wrapper GIName:GdkPixbuf.Pixbuf jsobj@0x1529760920 native@0x5f82edde7d40]" as icon, it is not a file nor a named icon
set icon@resource:///com/github/Aylur/ags/widgets/icon.js:40:30
_handleParamProp@resource:///com/github/Aylur/ags/widgets/widget.js:124:13
Icon@resource:///com/github/Aylur/ags/widgets/icon.js:23:14
Icon@resource:///com/github/Aylur/ags/widget.js:26:32
SysTrayItem@file:///home/jarne/.config/ags/modules/bar/normal/tray.js:8:12
Tray/setup/<@file:///home/jarne/.config/ags/modules/bar/normal/tray.js:25:50
hook/<@resource:///com/github/Aylur/ags/widgets/widget.js:43:25
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

(com.github.Aylur.ags:157205): Gjs-Console-WARNING **: 19:32:14.928: Error: can't assign "[object instance wrapper GIName:GdkPixbuf.Pixbuf jsobj@0x15297631c8 native@0x5f82eeb81120]" as icon, it is not a file nor a named icon
set icon@resource:///com/github/Aylur/ags/widgets/icon.js:40:30
_handleParamProp@resource:///com/github/Aylur/ags/widgets/widget.js:124:13
Icon@resource:///com/github/Aylur/ags/widgets/icon.js:23:14
Icon@resource:///com/github/Aylur/ags/widget.js:26:32
SysTrayItem@file:///home/jarne/.config/ags/modules/bar/normal/tray.js:8:12
Tray/setup/<@file:///home/jarne/.config/ags/modules/bar/normal/tray.js:25:50
hook/<@resource:///com/github/Aylur/ags/widgets/widget.js:43:25
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

(com.github.Aylur.ags:157205): Gjs-Console-WARNING **: 19:32:14.929: Error: can't assign "[object instance wrapper GIName:GdkPixbuf.Pixbuf jsobj@0x15297638f8 native@0x5f82efafdf70]" as icon, it is not a file nor a named icon
set icon@resource:///com/github/Aylur/ags/widgets/icon.js:40:30
_handleParamProp@resource:///com/github/Aylur/ags/widgets/widget.js:124:13
Icon@resource:///com/github/Aylur/ags/widgets/icon.js:23:14
Icon@resource:///com/github/Aylur/ags/widget.js:26:32
SysTrayItem@file:///home/jarne/.config/ags/modules/bar/normal/tray.js:8:12
Tray/setup/<@file:///home/jarne/.config/ags/modules/bar/normal/tray.js:25:50
hook/<@resource:///com/github/Aylur/ags/widgets/widget.js:43:25
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
JarneDel commented 3 months ago

I've found the issue, its in ~/.config/ags/config.js replacing forMonitorsAsync with forMonitors fixes the issue.

end-4 commented 3 months ago

oops forgot to pass the monitor id to the widget