this post was submitted on 07 Mar 2024
10 points (100.0% liked)

Linux Questions

1074 readers
1 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 1 year ago
MODERATORS
 

Title. Plasma 6 just dropped on my arch-based distro, and it came with an option for a colorblindness correction filter:

Neat little tool that my Protanope ass was very excited about, and it works.

The thing is.

Some time ago Windows also introduced one of those, and in Windows, you can turn it on and off with a key-combination shortcut. I use that a lot on Windows, to keep the filter off and turn it on just when it is necessary (look, every person experiences colorblindness differently, and on my end, these filters while useful for certain kinds of work, are very ugly most other times)

Now, I already know I can set a key-combination shortcut to a terminal command on plasma. Easy peasy.

But for me to do that on plasma I'd need to have a way to switch the effect on and off from the terminal.

I know that I can do systemsettings kcm_kwin_effects to launch the configs app straight into the relevant tab. But now I'm wondering if I could make that even more automatic, maybe using the --args thing, which apparently is literally meant for sending commands directly to the configuration module. But then I wouldn't know what the command is.

you are viewing a single comment's thread
view the rest of the comments
[–] possiblylinux127@lemmy.zip 5 points 8 months ago (1 children)

I think the tool you are looking for is kwriteconfig. I am not sure how to use it but it seems like it can do what you want.

[–] VinesNFluff@pawb.social 2 points 8 months ago* (last edited 8 months ago) (1 children)

Thanks to your hint I did some tinkering.

Made a backup of my kwinrc file, enabled the effect plugin, checked the diff between the backup and the now-changed-by-the-settings-gui file -- And indeed there it was, a line saying colorblindnesscorrectionEnabled=true in there.

However:

  • kwriteconfig seemingly doesn't work like I thought it did, as just doing kwriteconfig6 colorblindesscorrectionEnabled false does nothing -- This, I imagine, is just me not knowing how to work the command itself.

But ALSO!

  • Manually editing the rc file to remove/change that line in a text editor did not remove the effect, HOWEVER, upon opening the settings gui app, the checkbox for the plugin was unchecked (requiring me to check and uncheck and apply to disable it proper) -- Which tells me that "editing the file might work but I'd have to run some command to reload the configs and make it go through" -- I did however try qdbus org.kde.KWin /KWin reconfigure (after searching "how to reload kde configs from terminal") and it did nothing, so that is NOT the command I need.

Overall promising discoveries, hoping someone can see this and give me the clue I need to make it work.

EDIT: I FOUND IT!

[–] possiblylinux127@lemmy.zip 2 points 8 months ago (1 children)

Well good luck finding an answer. Just remember to keep this post updated.

[–] VinesNFluff@pawb.social 2 points 8 months ago

Just did, posted a comment explaining it, will update the main post to mark it solved