Skip to content

🧹 Refactor duplicated systemd user service reversion logic#9

Merged
raythurman2386 merged 1 commit into
mainfrom
refactor-user-service-reversion-13706707406658816868
Mar 3, 2026
Merged

🧹 Refactor duplicated systemd user service reversion logic#9
raythurman2386 merged 1 commit into
mainfrom
refactor-user-service-reversion-13706707406658816868

Conversation

@raythurman2386

Copy link
Copy Markdown
Owner

This change addresses a code health issue in lib/functions.sh where the logic to revert systemd user services was duplicated across revert_swaybg, revert_waybar, and revert_mako.

Key changes:

  • Introduced remove_user_service in the "Service Management" section of lib/functions.sh.
  • Refactored revert_swaybg, revert_waybar, and revert_mako to use this new helper.
  • Added a defensive check for the existence of the service file before performing removal operations.
  • Maintained existing behavior of ignoring errors during service stop/disable and performing a daemon-reload.

Verification:

  • Ran bash -n lib/functions.sh to confirm syntax.
  • Ran bash validate.sh to ensure all core scripts and configurations are valid.
  • Visually inspected the refactored code for correctness.

PR created automatically by Jules for task 13706707406658816868 started by @raythurman2386

Consolidates duplicated logic for disabling, stopping, and removing
systemd user services into a single helper function. This improves
maintainability and ensures consistent cleanup for swaybg, waybar,
and mako services.

Co-authored-by: raythurman2386 <36676341+raythurman2386@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@raythurman2386 raythurman2386 merged commit 77d69fc into main Mar 3, 2026
2 checks passed
@raythurman2386 raythurman2386 deleted the refactor-user-service-reversion-13706707406658816868 branch March 3, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant