Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Workspaces missing after reboot #185

Closed
LDAP opened this issue Aug 25, 2024 · 19 comments
Closed

[BUG] Workspaces missing after reboot #185

LDAP opened this issue Aug 25, 2024 · 19 comments
Labels
bug Something isn't working High Priority

Comments

@LDAP
Copy link
Contributor

LDAP commented Aug 25, 2024

Describe the bug
The Workspace module is missing workspaces (currently 1 and 2 out of 10). The workspaces exist, I can switch to them using keybinds.

To Reproduce
Not quite sure. It might be related to Aylur/ags#540 since I have a workspace rule for full-screen workspaces. However, it did work with the exact same config with a freshly installed Hyprpanel.

Expected behavior
All workspaces should be visible

Screenshots
image

Desktop (please complete the following information):

  • Distribution: Arch Linux
  • Window Manager/Desktop Environment: Hyprland 0.42

Additional context

@Jas-SinghFSU
Copy link
Owner

What if you unchecked "Monitor Specific" in the workspace settings?

@LDAP
Copy link
Contributor Author

LDAP commented Aug 25, 2024

That works! But it breaks again if I enable the switch.

I never used another monitor on this Laptop it's always the builtin screen (eDP).

@Jas-SinghFSU
Copy link
Owner

Could you give me your hyprctl workspacerules?

@LDAP
Copy link
Contributor Author

LDAP commented Aug 25, 2024

Here you go:

Workspace rule f[0]:
	monitor: <unset>
	default: <unset>
	persistent: <unset>
	gapsIn: <unset>
	gapsOut: 0 0 0 0
	borderSize: 0
	border: <unset>
	rounding: false
	decorate: <unset>
	shadow: <unset>

Workspace rule f[1]:
	monitor: <unset>
	default: <unset>
	persistent: <unset>
	gapsIn: <unset>
	gapsOut: 0 0 0 0
	borderSize: 0
	border: <unset>
	rounding: false
	decorate: <unset>
	shadow: <unset>

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

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

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

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

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

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

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

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

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

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

@Jas-SinghFSU
Copy link
Owner

@LDAP Could you try with the new workspaces update?? It didn't specifically target this issue but it might help since a lot of improvements were made to the module. Also could you share with me the workspace rules in your hyprland.conf so I can assign them to my system to test with please? TY <3

@LDAP
Copy link
Contributor Author

LDAP commented Aug 26, 2024

I tested the update, but it doesn't fix it :(
The hide unoccupied feature doesn't work either.

In my hyprland.conf I have:

workspace=f[0],rounding:false,bordersize:0,gapsout:0
workspace=f[1],rounding:false,bordersize:0,gapsout:0

and for the monitors I have this python script which I run whenever the monitors change:

#!/bin/env python3

import json
import subprocess
from typing import Any, List

hyprctl_output = subprocess.check_output(["hyprctl", "monitors", "-j"])
monitors: List[Any] = json.loads(hyprctl_output)

monitors.sort(key=lambda x: x["x"])


def split(a, n):
    k, m = divmod(len(a), n)
    return (a[i * k + min(i, m) : (i + 1) * k + min(i + 1, m)] for i in range(n))


workspaces = list(range(1, 10 + 1))
split_workspaces = list(split(workspaces, len(monitors)))

for i, monitor in enumerate(monitors):
    # Pin workspaces
    workspaces = split_workspaces[i]
    for j, workspace in enumerate(workspaces):
        subprocess.check_call(
            [
                "hyprctl",
                "keyword",
                "workspace",
                f"{str(workspace)},monitor:{str(monitor['name'])}{',default:true' if j == 0 else ''}",
            ]
        )
        subprocess.check_call(
            [
                "hyprctl",
                "dispatch",
                "moveworkspacetomonitor",
                f"{str(workspace)} {str(monitor['id'])}",
            ]
        )

# Switch to default workspace
subprocess.check_call(
    [
        "hyprctl",
        "dispatch",
        "workspace",
        str(1),
    ]
)

@Jas-SinghFSU
Copy link
Owner

Thanks I'll take a look.

As for the Hide Unoccupied, you have to lower the Total Workspaces number. Otherwise it will always show that many. If you want to hide ALL unoccupied you can make that 0.

@LDAP
Copy link
Contributor Author

LDAP commented Aug 26, 2024

As for the Hide Unoccupied, you have to lower the Total Workspaces number. Otherwise it will always show that many. If you want to hide ALL unoccupied you can make that 0.

Something is still off. When I set it to 0 and monitor specific is disabled, it shows 8 workspaces. If monitor specific is on, all workspaces are gone.
Also, I think the current workspace should be displayed even if it is unoccupied, that does not seem to work.

@Jas-SinghFSU
Copy link
Owner

I can't seem to replicate it. Could you give me your complete workspace rules for all your workspaces when you get a chance please? Along with a snapshot of your workspace settings please.

@LDAP
Copy link
Contributor Author

LDAP commented Aug 29, 2024

hypr.zip

This is my complete hyprland (0.42) config :)

@Jas-SinghFSU Jas-SinghFSU added bug Something isn't working High Priority labels Sep 11, 2024
@Jas-SinghFSU
Copy link
Owner

@LDAP Could you git pull and see if this issue still persists for you? There were a lot of updates and I can't seem to replicate it using your python script to get the workspaces in a similar configuration.

@LDAP
Copy link
Contributor Author

LDAP commented Sep 12, 2024

With hyprland 0.42 the issue still persists (though now only workspace 1 seems to be missing?).

@LDAP
Copy link
Contributor Author

LDAP commented Sep 12, 2024

Same with 0.43, with Monitor specific enabled and hide unoccupied disabled I get 2-10 and the other way around I get 1-8.

@cfleslie
Copy link

I believe I am getting a similar bug.

I have two monitors with workspaces 1-5 on one and 6-10 on the other.

When "Monitor Specific" is enabled the listed workspaces are [2 3 4 5 6] and [1 7 8 9 10] on the bar. They also go to that workspace when the buttons are used.

Could this be a bug with the indexing when monitor specific is enabled?

@Jas-SinghFSU
Copy link
Owner

@cfleslie could you share your complete workspace hyprland config please?
Along with:

hyprctl workspacerules
hyprctl monitors

I want to replicate this issue so I can find the culprit but I'm having no luck.

@cfleslie
Copy link

@Jas-SinghFSU Sure thing.

hyprland.conf

# ================= #
# Monitors
# ================= #

monitor=DP-1,     2560x1440@170.0  ,0x0    ,1
monitor=HDMI-A-1, 1920x1080@75.0 ,-1920x180 ,1
 
# ================= #
# Workspaces
# ================= #
workspace = 1, monitor:HDMI-A-1, default:true, persistent:true
workspace = 2, monitor:HDMI-A-1, default:true, persistent:true
workspace = 3, monitor:HDMI-A-1, default:true, persistent:true
workspace = 4, monitor:HDMI-A-1, default:true, persistent:true
workspace = 5, monitor:HDMI-A-1, default:true, persistent:true

workspace = 6, monitor:DP-1, default:true, persistent:true
workspace = 7, monitor:DP-1, default:true, persistent:true
workspace = 8, monitor:DP-1, default:true, persistent:true
workspace = 9, monitor:DP-1, default:true, persistent:true
workspace = 10, monitor:DP-1, default:true, persistent:true

hyprctl workspacerules

Workspace rule 1:
	monitor: HDMI-A-1
	default: true
	persistent: true
	gapsIn: <unset>
	gapsOut: <unset>
	borderSize: <unset>
	border: <unset>
	rounding: <unset>
	decorate: <unset>
	shadow: <unset>

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

Workspace rule 3:
	monitor: HDMI-A-1
	default: true
	persistent: true
	gapsIn: <unset>
	gapsOut: <unset>
	borderSize: <unset>
	border: <unset>
	rounding: <unset>
	decorate: <unset>
	shadow: <unset>

Workspace rule 4:
	monitor: HDMI-A-1
	default: true
	persistent: true
	gapsIn: <unset>
	gapsOut: <unset>
	borderSize: <unset>
	border: <unset>
	rounding: <unset>
	decorate: <unset>
	shadow: <unset>

Workspace rule 5:
	monitor: HDMI-A-1
	default: true
	persistent: true
	gapsIn: <unset>
	gapsOut: <unset>
	borderSize: <unset>
	border: <unset>
	rounding: <unset>
	decorate: <unset>
	shadow: <unset>

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

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

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

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

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


hyprctl monitors

Monitor HDMI-A-1 (ID 0):
	1920x1080@74.97300 at -1920x180
	description: ViewSonic Corporation VA2405-FHD W2Q203604709
	make: ViewSonic Corporation
	model: VA2405-FHD
	serial: W2Q203604709
	active workspace: 3 (3)
	special workspace: 0 ()
	reserved: 0 31 0 0
	scale: 1.00
	transform: 0
	focused: no
	dpmsStatus: 1
	vrr: 0
	activelyTearing: false
	disabled: false
	currentFormat: A XRGB8888 H XRGB8888
	availableModes: 1920x1080@60.00Hz 1920x1080@74.97Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1600x1200@60.00Hz 1680x1050@59.95Hz 1400x1050@59.98Hz 1600x900@60.00Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@59.89Hz 1280x960@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1440x576@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 640x480@59.93Hz 

Monitor DP-1 (ID 1):
	2560x1440@169.83099 at 0x0
	description: GIGA-BYTE TECHNOLOGY CO. LTD. M27Q 20120B000001
	make: GIGA-BYTE TECHNOLOGY CO., LTD.
	model: M27Q
	serial: 20120B000001
	active workspace: 6 (6)
	special workspace: 0 ()
	reserved: 0 31 0 0
	scale: 1.00
	transform: 0
	focused: yes
	dpmsStatus: 1
	vrr: 1
	activelyTearing: false
	disabled: false
	currentFormat: A XRGB8888 H XRGB8888
	availableModes: 2560x1440@59.95Hz 2560x1440@169.83Hz 2560x1440@164.80Hz 2560x1440@143.86Hz 2560x1440@119.88Hz 1920x1080@143.85Hz 1920x1080@119.88Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1680x1050@59.95Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@59.89Hz 1280x720@119.88Hz 1280x720@59.94Hz 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 

@Jas-SinghFSU
Copy link
Owner

Can we close this due to your MR?

@LDAP
Copy link
Contributor Author

LDAP commented Oct 8, 2024

I think so, I had other issues but I think they are not related to hyprpanel but rather to hyprland.

@cfleslie
Copy link

cfleslie commented Oct 9, 2024

Working well for me now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working High Priority
Projects
None yet
Development

No branches or pull requests

3 participants