Jas-SinghFSU / HyprPanel

A Bar/Panel for Hyprland with extensive customizability.
MIT License
920 stars 65 forks source link

Left elements of panel not showing up on vertical + ultrawide monitor setup #51

Closed smathles closed 3 months ago

smathles commented 3 months ago

On my pc with a vertical monitor to the left of an ultrawide monitor, the left elements of hyprpanel do not show up "dashboard","workspaces","windowtitle".

This is with vanilla, completely unedited monitor configurations (ie, I haven't removed the left elements, they're definitely there in the config but not being displayed.

image Sorry for the image taken on my potato, I still haven't debugged grimblast yet on this computer. Hopefully you get the idea.

Arch linux, hyprpanel commit 089395207ccf5ddb70faa008850bb6134a95447f.

My monitor setup in hyprland.conf is:

monitor=DP-2, 2560x1080, 1080x+400, 1
monitor=DP-1, 1920x1080, 0x0, 1, transform, 1

And output of hyprctl monitors is:

❯ hyprctl monitors
Monitor DP-1 (ID 0):
    1920x1080@60.00000 at 0x0
    description: Samsung Electric Company C27FG70 HTHJ200453
    make: Samsung Electric Company
    model: C27FG70
    serial: HTHJ200453
    active workspace: 2 (2)
    special workspace: 0 ()
    reserved: 0 45 0 0
    scale: 1.00
    transform: 1
    focused: no
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB8888
    availableModes: 1920x1080@120.00Hz 1920x1080@119.88Hz 1920x1080@100.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1680x1050@59.95Hz 1600x900@60.00Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@59.89Hz 1280x800@59.81Hz 1152x864@75.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1024x768@75.03Hz 1024x768@70.07Hz 1024x768@60.00Hz 800x600@75.00Hz 800x600@72.19Hz 800x600@60.32Hz 800x600@56.25Hz 720x576@50.00Hz 720x480@59.94Hz 640x480@75.00Hz 640x480@72.81Hz 640x480@59.94Hz

Monitor DP-2 (ID 1):
    2560x1080@60.00000 at 1080x400
    description: Dell Inc. DELL U2917W 1YG1V74H307L
    make: Dell Inc.
    model: DELL U2917W
    serial: 1YG1V74H307L
    active workspace: 3 (3)
    special workspace: 0 ()
    reserved: 0 45 0 0
    scale: 1.00
    transform: 0
    focused: yes
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB8888
    availableModes: 2560x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1920x1080@23.98Hz 1680x1050@59.95Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1280x800@59.81Hz 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 720x480@59.94Hz 640x480@75.00Hz 640x480@59.94Hz 640x480@59.93Hz
Jas-SinghFSU commented 3 months ago

Could you provide me the bar.layouts property in your /tmp/ags/hyprpanel/config.json please? Please refrain from providing the entire file as it contains your weather API key as well.

smathles commented 3 months ago

Looks as expected, the "left" property still has stuff over monitors 0, 1, and 2. Honestly I've got no idea why this is happening, it's quite strange behaviour.

  "bar.layouts": {
    "0": {
      "left": [
        "dashboard",
        "workspaces",
        "windowtitle"
      ],
      "middle": [
        "media"
      ],
      "right": [
        "volume",
        "network",
        "bluetooth",
        "battery",
        "systray",
        "clock",
        "notifications"
      ]
    },
    "1": {
      "left": [
        "dashboard",
        "workspaces",
        "windowtitle"
      ],
      "middle": [
        "media"
      ],
      "right": [
        "volume",
        "network",
        "bluetooth",
        "battery",
        "systray",
        "clock",
        "notifications"
      ]
    },
    "2": {
      "left": [
        "dashboard",
        "workspaces",
        "windowtitle"
      ],
      "middle": [
        "media"
      ],
      "right": [
        "volume",
        "clock",
        "notifications"
      ]
    }
  },
smathles commented 3 months ago

I suspected this issue may have been something to do with multi-monitor interfacing in hyprland itself. However, after disconnecting my vertical monitor, rewriting the hyprland.conf appropriately and logging out and in again, the left panel elements are still missing (same /tmp/ags/hyprpanel/config.json as above).

Guess it's an issue with ultrawide monitors then? :man_shrugging:

Jas-SinghFSU commented 3 months ago

Yea that looks normal... how about your ~/.cache/ags/hyprpanel/options.json layout? Could you also try going to settings > configuration > bar and then increasing the outer spacing to a value like 20em? Does that bring them back in?

Jas-SinghFSU commented 3 months ago

I use an ultrawide as well (38in) but no issues so this is definitely odd.

smathles commented 3 months ago
❯ cat options.json       
{
  "bar.layouts": {
    "0": {
      "left": [
        "dashboard",
        "workspaces",
        "windowtitle"
      ],
      "middle": [
        "media"
      ],
      "right": [
        "volume",
        "network",
        "bluetooth",
        "battery",
        "systray",
        "clock",
        "notifications"
      ]
    },
    "1": {
      "left": [
        "dashboard",
        "workspaces",
        "windowtitle"
      ],
      "middle": [
        "media"
      ],
      "right": [
        "volume",
        "network",
        "bluetooth",
        "battery",
        "systray",
        "clock",
        "notifications"
      ]
    }
  },
  "menus.dashboard.shortcuts.left.shortcut1.tooltip": "Firefox",
  "menus.dashboard.shortcuts.left.shortcut1.command": "firefox",
  "menus.dashboard.shortcuts.left.shortcut3.command": "vesktop",
  "menus.dashboard.shortcuts.left.shortcut3.tooltip": "Vesktop"
}%         
smathles commented 3 months ago

And increasing the outer spacing seems to have no affect, the right hand side bar entries are nearly touching the media applet in the middle, yet still no left hand entries for the ultrawide (all fine on the vertical monitor).

Jas-SinghFSU commented 3 months ago

Are you getting anything in the logs? Could you also do a full PC restart and see if it has any effect?

Jas-SinghFSU commented 3 months ago

Next up I would try to configure each module in the left side one at a time to see if any one them render individually. This could identify if there's some issue with either the dashboard, workspace or window title module.

smathles commented 3 months ago

Which logs would you like? I always get a few error logs when I exec ags from in a terminal.

Else, journalctl logs seem like they don't have much useful.

❯ journalctl --since "1 day ago" | grep ags  
Jul 31 16:39:19 PengWing kernel: ahci 0000:02:00.1: flags: 64bit ncq sntf stag pm led clo only pmp pio slum part sxs deso sadm sds apst 
Jul 31 16:39:24 PengWing (systemd)[841]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 16:40:18 PengWing (systemd)[912]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[smathles] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 16:42:37 PengWing (systemd)[2207]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 16:43:41 PengWing sudo[3078]: smathles : TTY=pts/0 ; PWD=/home/smathles/.config/ags ; USER=root ; COMMAND=/usr/bin/micro README.md assets config.js directoryMonitorService.ts globals.ts lib main.ts modules options.ts scss services tsconfig.json types widget
Jul 31 16:50:23 PengWing (systemd)[7483]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 16:53:49 PengWing (systemd)[9647]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 18:29:07 PengWing kernel: ahci 0000:02:00.1: flags: 64bit ncq sntf stag pm led clo only pmp pio slum part sxs deso sadm sds apst 
Jul 31 18:29:11 PengWing (systemd)[835]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 18:29:19 PengWing (systemd)[889]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[smathles] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 18:34:33 PengWing (systemd)[4850]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 18:35:57 PengWing sudo[5670]: smathles : TTY=pts/0 ; PWD=/tmp/ags/hyprpanel ; USER=root ; COMMAND=/usr/bin/micro config.json
Jul 31 18:37:53 PengWing (systemd)[7103]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 18:42:01 PengWing (systemd)[9186]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 18:45:38 PengWing (systemd)[11655]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 18:47:09 PengWing (systemd)[12393]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 18:50:48 PengWing (systemd)[14396]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 19:10:14 PengWing kernel: ahci 0000:02:00.1: flags: 64bit ncq sntf stag pm led clo only pmp pio slum part sxs deso sadm sds apst 
Jul 31 19:10:19 PengWing (systemd)[821]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 19:10:25 PengWing (systemd)[877]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[smathles] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 19:17:00 PengWing (systemd)[3444]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[sddm] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 19:17:13 PengWing (systemd)[3516]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[smathles] ruser=[<unknown>] rhost=[<unknown>]
Jul 31 19:25:00 PengWing sudo[9151]: smathles : TTY=pts/0 ; PWD=/home/smathles ; USER=root ; COMMAND=/usr/bin/journalctl -u ags
smathles commented 3 months ago

And if I exec ags in a terminal:

❯ ags

(com.github.Aylur.ags:11010): Gjs-Console-CRITICAL **: 19:28:25.253: Could not find monitor with id: 2

(com.github.Aylur.ags:11010): Gjs-Console-WARNING **: 19:28:25.289: Error: can't assign "/home/jaskir/Pictures/Icons/900-900-max_catppuccin-mocha_hald8_GaussianRBF_lum1_shape96_near16.png" as icon, it is not a file nor a named icon
set icon@resource:///com/github/Aylur/ags/widgets/icon.js:45:30
bind/callback<@resource:///com/github/Aylur/ags/widgets/widget.js:53:30
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:11010): Gjs-CRITICAL **: 19:28:25.433: JS ERROR: TypeError: wsRules[currentMonitorName] is undefined
getWorkspacesForMonitor@file:///tmp/ags/hyprpanel/main.js:1138:5
Workspaces/<.component<.children</<@file:///tmp/ags/hyprpanel/main.js:1227:18
Workspaces/<.component<.children<@file:///tmp/ags/hyprpanel/main.js:1222:41
update@resource:///com/github/Aylur/ags/utils/binding.js:4:28
merge@resource:///com/github/Aylur/ags/utils/binding.js:5:34
Workspaces@file:///tmp/ags/hyprpanel/main.js:1221:23
workspaces@file:///tmp/ags/hyprpanel/main.js:1780:39
Bar/setup/</self2.children<@file:///tmp/ags/hyprpanel/main.js:1809:120
Bar/setup/<@file:///tmp/ags/hyprpanel/main.js:1809:100
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:11010): Gjs-Console-WARNING **: 19:28:26.049: Failed to parse weather data: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

(com.github.Aylur.ags:11010): Gjs-CRITICAL **: 19:28:35.431: Attempting to call back into JSAPI during the sweeping phase of GC. This is most likely caused by not destroying a Clutter actor or Gtk+ widget with ::destroy signals connected, but can also be caused by using the destroy(), dispose(), or remove() vfuncs. Because it would crash the application, it has been blocked and the JS callback not invoked.
The offending signal was destroy on Ags_Box 0x5a20f40ccb60.
== Stack trace for context 0x5a20f2e92860 ==
#0   5a20f2f5e2e8 i   resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266 (3d39a6e7d560 @ 139)

Usually the last 2 messages will then continuously generate (haven't bothered debugging weather or removing monitor 2 yet).

Jas-SinghFSU commented 3 months ago

Just the ags terminal logs from startup should suffice.

Jas-SinghFSU commented 3 months ago

Oof, could you remove the worspace module from your widescreen and see if it renders?

smathles commented 3 months ago

Oh dang, yes it does now.

I confess I'm still tinkering with how many workspaces to have per monitor (currently have 2 for vertical monitor, the rest on the ultrawide).

Jas-SinghFSU commented 3 months ago

Yea, in the meantime you can disable the option to turn on monitor specific workspaces. That way you can add workspaces back. I'll try to get a fix tomorrow.

Jas-SinghFSU commented 3 months ago

Could you run hyprctl workspacerules and share the output please?

smathles commented 3 months ago

Might not be necessary to patch in a fix, I just found a silly issue with my hyprland config that could have been the problem.

I had:

# Workspaces
workspace = 1, monitor:DP-3
workspace = 2, monitor:DP-1

And stuff doesn't work, 2 workspaces on the vertical monitor (DP-1), because DP-3 doesn't exist oof. changing DP-3 to DP-2 makes the number of workspaces on the vertical monitor go back to 1 (like I wanted it to be) and ags works just fine on the widescreen now (DP-2).

Solved, but just for curiosity's sake:

❯ hyprctl workspacerules
Workspace rule 1:
    monitor: DP-2
    default: <unset>
    persistent: <unset>
    gapsIn: <unset>
    gapsOut: <unset>
    borderSize: <unset>
    border: <unset>
    rounding: <unset>
    decorate: <unset>
    shadow: <unset>

Workspace rule 2:
    monitor: DP-1
    default: <unset>
    persistent: <unset>
    gapsIn: <unset>
    gapsOut: <unset>
    borderSize: <unset>
    border: <unset>
    rounding: <unset>
    decorate: <unset>
    shadow: <unset>

Sorry for the run-around, I guess I know now haha

Jas-SinghFSU commented 3 months ago

Oh nice :). I'll be reworking the workspaces module to be more clean and handle edgecases better anyways (maintaining the same features of course). Building on top of the current implementation is getting annoying.