'Is it possible to configure kde plasma settings from the command line?

I want to be able to control the kde plasma system settings from a shell script. I recently switched from Cinnamon and I had a shell script set to a key-bind that would change the value of the lid-close-battery-action to different values using gsettings. The problem now is that I can't find anything like that on kde-plasma.I found something called kwriteconfig but I found it pretty confusing, and if that is the way to go I would really appreciate some explanation.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source