hyprland-community / pyprland

Scratchpads & many goodies for Hyprland [maintainer=@fdev31]
MIT License
345 stars 15 forks source link

[BUG] [scratchpads] toggle not working on ubuntu 24 lts #133

Open AlexAuragan opened 1 month ago

AlexAuragan commented 1 month ago

Pyprland version 2.4.0 Describe the bug pypr toggle command is not working for me

Whether I use the shortcut defined in hyprland or use the command in the terminal, I get a notification saying that there are no full_address

Logs

2024-08-04 23:34:29,811 [ERROR] pypr :: This could be a bug in Pyprland, if you think so, report on https://github.com/fdev31/pyprland/issues :: command.py:185
Traceback (most recent call last):
  File "/var/cache/pypr/package.whl/pyprland/command.py", line 183, in _run_plugin_handler
    await getattr(plugin, full_name)(*params)
  File "/var/cache/pypr/package.whl/pyprland/plugins/scratchpads/__init__.py", line 464, in run_toggle
    await asyncio.gather(*(asyncio.create_task(t()) for t in tasks))
  File "/var/cache/pypr/package.whl/pyprland/plugins/scratchpads/__init__.py", line 558, in run_show
    assert scratch.full_address, "No address !"
           ^^^^^^^^^^^^^^^^^^^^
AssertionError: No address !

Configuration (provide following files/samples when relevant):

plugins = [ "scratchpads", "magnify", ]

[scratchpads.term] animation = "fromTop" command = "kitty --class kitty-dropterm" class = "kitty-dropterm" size = "75% 60%"


**Additional context**
I'm on Ubuntu LTS 24, I installed hyprland using the [JaKooLit script](https://github.com/JaKooLit/Debian-Hyprland/tree/Ubuntu-24.04-LTS). Some functionnalities were missing and that's how I found out about pypr, I then installed it with the get-pypt script.
fdev31 commented 4 weeks ago

Log errors via pypr --debug /tmp/pypr.log and copy the content here please.

AlexAuragan commented 3 weeks ago
2024-08-22 10:30:09,316 [DEBUG] pyprland :: event_focusedmon('HDMI-A-1,2',) :: command.py:177
2024-08-22 10:30:09,316 [DEBUG] pyprland :: active_monitor = HDMI-A-1 :: pyprland.py:86
2024-08-22 10:30:09,317 [DEBUG] pyprland :: event_activewindowv2('557064dbed40',) :: command.py:177
2024-08-22 10:30:09,317 [DEBUG] pyprland :: active_window = 0x557064dbed40 :: pyprland.py:76
2024-08-22 10:30:09,317 [DEBUG] scratchpads :: event_activewindowv2('557064dbed40',) :: command.py:177
2024-08-22 10:30:11,712 [DEBUG] scratchpads :: run_toggle('term',) :: command.py:177
2024-08-22 10:30:11,713 [DEBUG] scratchpads :: visibility_check: ('2', '') == ('2', 'HDMI-A-1') :: __init__.py:433
2024-08-22 10:30:11,713 [DEBUG] scratchpads :: term visibility: False and False :: __init__.py:459
2024-08-22 10:30:11,714 [INFO] scratchpads :: Showing term :: __init__.py:536
2024-08-22 10:30:11,730 [DEBUG] scratchpads :: keyword windowrule unset,^(kitty-dropterm)$ :: ipc.py:144
2024-08-22 10:30:11,734 [DEBUG] scratchpads :: clients :: ipc.py:101
2024-08-22 10:30:11,737 [ERROR] pypr :: scratchpads::run_toggle(('term',)) failed: :: command.py:188
Traceback (most recent call last):
  File "/var/cache/pypr/package.whl/pyprland/command.py", line 183, in _run_plugin_handler
    await getattr(plugin, full_name)(*params)
  File "/var/cache/pypr/package.whl/pyprland/plugins/scratchpads/__init__.py", line 464, in run_toggle
    await asyncio.gather(*(asyncio.create_task(t()) for t in tasks))
  File "/var/cache/pypr/package.whl/pyprland/plugins/scratchpads/__init__.py", line 551, in run_show
    await scratch.initialize(self)
  File "/var/cache/pypr/package.whl/pyprland/plugins/scratchpads/objects.py", line 91, in initialize
    await self.update_client_info()
  File "/var/cache/pypr/package.whl/pyprland/plugins/scratchpads/objects.py", line 159, in update_client_info
    raise KeyError(msg)
KeyError: 'Client window  not found'
2024-08-22 10:30:11,771 [DEBUG] ipc :: notify 0 5000 rgb(ff1010)  Pypr error scratchpads::run_toggle: 'Client window  not found' :: ipc.py:144
2024-08-22 10:30:13,651 [DEBUG] pyprland :: event_focusedmon('eDP-1,1',) :: command.py:177
2024-08-22 10:30:13,651 [DEBUG] pyprland :: active_monitor = eDP-1 :: pyprland.py:86
2024-08-22 10:30:13,652 [DEBUG] pyprland :: event_activewindowv2('557064233d00',) :: command.py:177
2024-08-22 10:30:13,652 [DEBUG] pyprland :: active_window = 0x557064233d00 :: pyprland.py:76
2024-08-22 10:30:13,652 [DEBUG] scratchpads :: event_activewindowv2('557064233d00',) :: command.py:177
2024-08-22 10:30:15,335 [DEBUG] pyprland :: event_activewindowv2('557064233d00',) :: command.py:177
2024-08-22 10:30:15,335 [DEBUG] pyprland :: active_window = 0x557064233d00 :: pyprland.py:76
2024-08-22 10:30:15,335 [DEBUG] scratchpads :: event_activewindowv2('557064233d00',) :: command.py:177
fdev31 commented 3 weeks ago

I need the full log file since you are not using the lazy mode. Also attach the output of hyprctl -j clients please.

You may also want try using one of those options to see if it improves something:

EDIT: Can you also tell me which Hyprland version is installed ? hyprctl -j version