218
submitted 4 months ago by e8d79@discuss.tchncs.de to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] palordrolap@kbin.social 6 points 4 months ago

The gsettings command can change things on the fly in the dconf, assuming that's where the setting actually resides. It's a pain to do, but that means it's possible to write a script that makes the necessary change(s) and that can then be assigned to a keyboard combo.

For example, I have one that toggles a Cinnamon panel between the top and the bottom of its screen (I won't get into why) and currently have it bound to Ctrl-Alt-Space.

It's currently a hack that uses a couple of hardcoded values that I pulled from the dconf by observing what it was set to with the panel in each location. If it finds the first value it changes it to the second, and vice versa.

(In the unlikely event I come to change the layout to something it doesn't recognise, it bails out, doing nothing.)

Anyway, you could probably do something similar to toggle the dark/light mode.

[-] MonkderDritte@feddit.de 5 points 4 months ago* (last edited 4 months ago)

gsettings didn't work in my case. Which is why i guess it's libadwaita. Btw, i'm on XFCE.

edit: though, toggling light/dark via gsettings might work.

editedit: it didn't. But GTK_THEME= did. Which is kinda troublesome still, since you can't switch session variable content for the current session. Needs a wrapper script now.

this post was submitted on 03 May 2024
218 points (99.1% liked)

Linux

47343 readers
1370 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS