Ax-Shell icon indicating copy to clipboard operation
Ax-Shell copied to clipboard

UTF-8 french locale error

Open mathieuarthur opened this issue 1 year ago • 4 comments

Hi !

I discover a bug that is really annoying.

If you have a windows title that use accent like "é" so the workspace take the name of the windows ax-shell become buggy af.

overview.py seems to use those workspace title and so we can't use overview anymore, also the notch at the top will not autohide in fullscren with this bug

I succeed to make this bug by having vlc opened on a workspace and a file with a "é" playing inside.

It would be cool to fix utf-8 encoding for french people !

edit: it seems that the notch issue not auto hidding is not related to this, I switched vlc language to english with english name file and do not have the overview bug on this particular setup but notch do not auto hide, even if I fullscreen firefox for example, if vlc is started notch will not autohide

mathieuarthur avatar Oct 17 '25 01:10 mathieuarthur

Huh, this is weird. In Spanish we also use é and this hasn't happened to me. Let me test. Regarding auto-hide, it is working on my end:

https://github.com/user-attachments/assets/c7b76f71-823c-4e2c-814d-a866753c8949

And now that I'm testing, Ax-Shell just works. I don't get any errors. Quite interesting:

Image Image

Do you get any logs I could use?

Axenide avatar Oct 18 '25 00:10 Axenide

Yes here is the log when I try to open it while I already run vlc with utf issue

[kaworu@nerv Ax-Shell]$ python main.py &
[1] 6341
[kaworu@nerv Ax-Shell]$ Ax-Shell: Including monitor 'eDP-1' (selected)
2025-10-18 03:08:21.867 | WARNING  | widgets.wayland:do_handle_post_show_request:314 - [WaylandWindow] showing an empty window is not recommended, some compositors might freak out.
2025-10-18 03:08:21.867 | WARNING  | widgets.wayland:do_handle_post_show_request:314 - [WaylandWindow] showing an empty window is not recommended, some compositors might freak out.
2025-10-18 03:08:22.616 | DEBUG    | fabric.core.widgets.wm:layout_changed:273 - [Language] Keyboard: power-button, Language: French, Match: True
2025-10-18 03:08:22.616 | DEBUG    | fabric.hyprland.widgets:do_initialize:226 - [Language] found language: French for keyboard power-button
2025-10-18 03:08:22.616 | INFO     | fabric.hyprland.widgets:do_initialize:236 - [Language] Set language: French for keyboard: .*
2025-10-18 03:08:22.616 | INFO     | fabric.hyprland.widgets:on_ready:195 - [Language] Connected to the hyprland socket
2025-10-18 03:08:22.626 | INFO     | services.brightness:__init__:71 - Brightness service initialized for device: intel_backlight
2025-10-18 03:08:22.699 | WARNING  | widgets.wayland:do_handle_post_show_request:314 - [WaylandWindow] showing an empty window is not recommended, some compositors might freak out.
2025-10-18 03:08:22.699 | WARNING  | widgets.wayland:do_handle_post_show_request:314 - [WaylandWindow] showing an empty window is not recommended, some compositors might freak out.
False

(main.py:6341): Gtk-CRITICAL **: 03:08:23.178: gtk_box_pack: assertion '_gtk_widget_get_parent (child) == NULL' failed

(main.py:6341): Gtk-CRITICAL **: 03:08:23.181: gtk_box_pack: assertion '_gtk_widget_get_parent (child) == NULL' failed

(main.py:6341): Gtk-CRITICAL **: 03:08:23.185: gtk_box_pack: assertion '_gtk_widget_get_parent (child) == NULL' failed
Traceback (most recent call last):
  File "/home/kaworu/.config/Ax-Shell/main.py", line 109, in <module>
    notch = Notch(monitor_id=monitor_id)
  File "/home/kaworu/.config/Ax-Shell/modules/notch.py", line 168, in __init__
    self.overview = Overview(monitor_id=monitor_id)
                    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kaworu/.config/Ax-Shell/modules/overview.py", line 255, in __init__
    self.update()
    ~~~~~~~~~~~^^
  File "/home/kaworu/.config/Ax-Shell/modules/overview.py", line 394, in update
    for client in json.loads(connection.send_command("j/clients").reply.decode()):
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 2257: invalid continuation byte

Also feel free to watch my record showing how to reproduce !

https://github.com/user-attachments/assets/832b5271-2b94-4bc6-85a6-63520a05da80

mathieuarthur avatar Oct 18 '25 01:10 mathieuarthur

For some reason I can't reproduce this, but I'll check if I can do anything to fix it. Also, just a heads up, but it seems like you have dunst as your notification daemon (or is it mako? I don't remember). That will take priority and not let Ax-Shell show notifications. I recommend you either kill it or remove it, so you can benefit from the notification history. :)

Axenide avatar Oct 19 '25 12:10 Axenide

Yeah I know for Dunst, I was trying to figure something out with it lmao but yeah if we can find a fix for this bug I would be glad.

Honestly I looked like 1h into overview.py module and tried many fixes but couldn't find the solution tbh

I tried this on line 394 of overview.py but didn't seems to help (yes I know it is just a workaround and not a real fix but heh)

f"/dispatch movetoworkspacesilent {workspace_id},address:{data.get_data().decode('utf-8', errors='replace')}"

mathieuarthur avatar Oct 20 '25 01:10 mathieuarthur