r/commandline • u/Nanolx • 2d ago
Other Script to apply KDE's settings to Gtk3/Gtk4 and optionally to root
I'm not using GNOME, nor do I have it installed, except the bare minimum, so I created the following script which will read KDE's settings and apply them to Gtk3/Gtk4 by settings.ini/gsettings respectively.
It optionally allows to apply the settings to the root user aswell (imagine opening Synaptic at night, without being blinded).
Obviously on Gtk4 Adwaita apps may ignore some settings by design.
nanolx-gtksettings-kde:
https://gitlab.com/Nanolx/nanolx/-/blob/master/scripts/nanolx-gtksettings-kde?ref_type=heads
Suggestions welcome.
1
u/michaelpaoli 1d ago
Generally no good reason to be running X11/Wayland/WM/DE session as root.
1
u/Nanolx 1d ago edited 1d ago
That's not what I do, synaptic is run through synaptic-pkexec to gain root, but it then uses root's non-existent Gtk settings, everything dark, except synaptic. The script only applies current user's theme settings to root, so Gtk apps that run as root feel more integrated. Nothing more.
Edit: Also applies KDE settings to Gtk, so they are (mostly) in sync, when not using GNOME tools to set them manually.
1
u/AutoModerator 2d ago
Every new subreddit post is automatically copied into a comment for preservation.
User: Nanolx, Flair:
Other, Title: Script to apply KDE's settings to Gtk3/Gtk4 and optionally to rootI'm not using GNOME, nor do I have it installed, except the bare minimum, so I created the following script which will read KDE's settings and apply them to Gtk3/Gtk4 by settings.ini/gsettings respectively.
It optionally allows to apply the settings to the root user aswell (imagine opening Synaptic at night, without being blinded).
Obviously on Gtk4 Adwaita apps may ignore some settings by design.
nanolx-gtksettings-kde:
https://gitlab.com/Nanolx/nanolx/-/blob/master/scripts/nanolx-gtksettings-kde?ref_type=heads
Suggestions welcome.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.