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.