Simple dconf theme switcher designed for evolution-desktop
Go to file
scriptod 94015a33cb Refactor theme switcher to use GSubprocess and streamline GSettings usage
I've replaced the system() calls with GSubprocess to improve security and control, using GSubprocess is more secure because it avoids shell interpolation risks that can occur with system() calls. This <------ means there's less chance of injection attacks where arbitrary commands could be executed. It also gives us better control over the execution environment, including file descriptor inheritance and signal handling, making it a more robust solution for managing child processes

I've added error handling for subprocess calls to ensure we get clear feedback if there are issues starting or stopping the wf-panel process, this is the (the) way, if a subprocess fails to launch or if there's a problem sending it signals, we'll know exactly what went wrong.

By combining the theme switching into a single function, I've reduced code duplication his makes the "codebase" cleaner and easier to maintain since any changes to theme switching only need to be made in one place.

I've eliminated redundant GSettings object creation by reusing the same GSettings objects where possible, which makes the code more efficient.

Darling, lastly I ensured that unused parameters in signal handler functions are explicitly cast to (void) to avoid compiler warnings about unused parameters, this clearly keeps the code tidy and warning-free beautiful.
2024-01-13 09:50:40 +00:00
LICENSE Initial commit 2023-07-24 23:52:00 +00:00
Makefile Whopps 2023-07-25 00:54:12 +01:00
README.md Update README.md 2023-12-20 11:10:02 +00:00
evolution-theme-switcher.desktop Init 2023-07-25 00:50:55 +01:00
themeswitcher.c Refactor theme switcher to use GSubprocess and streamline GSettings usage 2024-01-13 09:50:40 +00:00

README.md

dconf-theme-switcher

A simple light/dark theme switcher for most DEs using dconf