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

"python3" as app_id and no classes #372

Open
jordicunillerarivera opened this issue Oct 5, 2024 · 1 comment
Open

"python3" as app_id and no classes #372

jordicunillerarivera opened this issue Oct 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jordicunillerarivera
Copy link

jordicunillerarivera commented Oct 5, 2024

Describe the bug
Bauh has the default "python3" app_id and have no classes, so for custom configuration can cause problem with other apps that didnt change the app_id too.

I want that bauh start windowed in sway, this is made via title, app_id or class, bauh didnt has class, every pop up has a diferent title so I need a rule for popup and window, the only thing left is the app_id, but the app has the default python value.

The correct solution is making an apropiate app_id, and if you create classes too (one class for all the popups for exemple) you will nailed it.

Software Environment
bauh version: 0.10.7-1 & 0.10.8.RC-2
O.S: Arch Linux
Python version: Python 3.12.6
Installation method: yay, AUR repository

@vinifmor vinifmor added the enhancement New feature or request label Oct 10, 2024
@visW00tze
Copy link

Hello,

In my context (Gnome 47.1 with dash to dock extension, Wayland), i had a similar issue: in the dock the bauh icon was the standard unknown application cogwheel icon.
By inspecting the window with Looking Glass, one can see that the class was indeed "python3".

Simply modifying context.py new_qt_application and setting explicitly the application desktop filename seems to resolve my issue: Looking Glass shows now: bauh | wmclass: bauh | app: bauh.desktop.

The patch for that would be :

diff --git a/bauh/context.py b/bauh/context.py
index 5443c9a..b1dbf3f 100644
--- a/bauh/context.py
+++ b/bauh/context.py
@@ -21,6 +21,7 @@ def new_qt_application(app_config: dict, logger: Logger, quit_on_last_closed: bo
     app.setApplicationName(name if name else __app_name__)
     app.setApplicationVersion(__version__)
     app.setWindowIcon(util.get_default_icon()[1])
+    app.setDesktopFileName(__app_name__)
 
     if app_config['ui']['qt_style']:
         app.setStyle(str(app_config['ui']['qt_style']))

I am using __app_name__ assuming that if the app name changes, then the desktop filename would change as well.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants