-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Refactor DBus plugin and its child plugins #290
base: beta
Are you sure you want to change the base?
Conversation
By the way, is it possible to push the linter/formater rules to the repo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function does nothing if the root logger already has handlers configured, unless the keyword argument force is set to True.
Refer to logging doc, the basicConfig()
is called after addHandler
so it doesn't work. Can we only add the notification handler if __debug__
is false?
508a323
to
b915055
Compare
We are using flake8 with default configurations. Do you want to change something? |
Can't we just add the handlers after the config? |
yes that's ok, but when debugging we maybe don't need the notification? |
My flake8 complains a lot like line length and sort order. And I should manually turn off my formatter(black) in case it makes a lot of changes across code files. It's not a big problem but if we use the same formatter life will be easier😃 |
I'd like to keep it in, just to keep the variances between developer version and normal user version low. Also, it might help if something goes wrong at an unexpected time. |
I see. I don't use any automatic formatter, but I also have many warnings from flake8 as I don't regularly run it (which I probably should). So yeah, please push it! Maybe in a different PR though, with all files formatted. |
Surprised to know even wallpaper has its portal. I will change my code to use it. |
I only found xdg-portal-gtk impl this interface: https://github.com/flatpak/xdg-desktop-portal-gtk/blob/main/src/wallpaper.c , but can't find it on DBus session bus. Also I don't see any similar/related code for xdg-portal-kde. But they have |
Have you tried to use I prefer to use the dbus over the command line, as I hope that we can get rid of the command line completely and can remove the flatpak permission at some point. |
It seems like |
There is a variant class in qts dbus lib |
emmm, I don't know how to get this(I change /org/gnome/desktop/background/picture-options in dconf-editor and below is from dbus-monitor):
And unluckily: https://forum.qt.io/topic/140253/uint-argument-in-dbus-call-with-python/ . It seems if there is a method need uint as arguments , then we can't call it unless involve in another dependency like https://pypi.org/project/uint |
Seems like I already had that problem somewhere, as I have created that post 😆 Either way, in that case, I would prefer to stick to the old implementation using the dbus of the KDE wallpaper plugin. |
I didn't find out until you said it lol😂 |
Still working on adding some tests and cleaning my code |
# send signal to read new config | ||
subprocess.run(['killall', '-HUP', 'xsettingsd']) | ||
|
||
# change dconf db. since dconf sending data as GVariant, use gsettings instead | ||
subprocess.run(['gsettings', 'set', 'org.gnome.desktop.interface', 'gtk-theme', f'{theme}']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't get rid of external command here. But since they are fallback method, can we avoid running them when under flatpak build? (Not read #185 yet, is there an easy way to detect that?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think I got it. Waiting for that PR to be merged
Add dconf/gsettings as fallback method
This reverts commit fee0c2e.
ac93250
to
60bd132
Compare
Today I discover that I should edit katerc manully to make konsole profile within has correct color scheme... |
Working on the following:
qdbus6
as binary name but some distros are not.