diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-08-25 12:10:04 -0400 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-08-29 21:41:34 -0700 |
| commit | feb41d8014e8cdd28836104d21931c64ba0391ae (patch) | |
| tree | 5a85ea8a79ae0771525f684a8029ab35379ce250 /config/hypr/scripts/DisableWaybarService.sh | |
| parent | aed052f87e2f7297c1934a18fbdd7ae8cd1926d9 (diff) | |
Fixed duplicate waybars on Debian Forkyu
Signed-off-by: Don Williams <don.e.williams@gmail.com>
On branch development
Your branch is up to date with 'origin/development'.
Changes to be committed:
modified: CHANGELOG.md
modified: config/hypr/configs/system_env.lua
modified: config/hypr/hyprlock-2k.conf
deleted: config/hypr/hyprlock.conf
modified: config/hypr/scripts/DisableWaybarService.sh
Diffstat (limited to 'config/hypr/scripts/DisableWaybarService.sh')
| -rwxr-xr-x | config/hypr/scripts/DisableWaybarService.sh | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/config/hypr/scripts/DisableWaybarService.sh b/config/hypr/scripts/DisableWaybarService.sh index 7750fe4a..e0df3fee 100755 --- a/config/hypr/scripts/DisableWaybarService.sh +++ b/config/hypr/scripts/DisableWaybarService.sh @@ -180,6 +180,10 @@ print_report() { perform_disable() { info "Disabling and stopping --user ${SERVICE_NAME}..." + if command -v sudo >/dev/null 2>&1; then + sudo systemctl --global disable "${SERVICE_NAME}" >/dev/null 2>&1 || true + fi + systemctl --user mask "${SERVICE_NAME}" >/dev/null 2>&1 || true if run_cmd systemctl --user disable --now "${SERVICE_NAME}"; then if $DRY_RUN; then OPERATION_RESULT="dry-run" @@ -197,26 +201,22 @@ perform_disable() { } perform_revert() { - info "Reverting --user ${SERVICE_NAME} (unmask + enable + start)..." - if ! run_cmd systemctl --user unmask "${SERVICE_NAME}"; then - OPERATION_RESULT="failed" - error "Failed to unmask --user ${SERVICE_NAME}." - return 1 - fi - if ! run_cmd systemctl --user enable --now "${SERVICE_NAME}"; then - OPERATION_RESULT="failed" - error "Failed to enable/start --user ${SERVICE_NAME}." - return 1 + info "Enabling and starting --user ${SERVICE_NAME}..." + systemctl --user unmask "${SERVICE_NAME}" >/dev/null 2>&1 || true + if run_cmd systemctl --user enable --now "${SERVICE_NAME}"; then + if $DRY_RUN; then + OPERATION_RESULT="dry-run" + warn "Dry-run complete. No changes were made." + else + OPERATION_RESULT="success" + ok "Enabled and started --user ${SERVICE_NAME}." + fi + return 0 fi - if $DRY_RUN; then - OPERATION_RESULT="dry-run" - warn "Dry-run complete. No changes were made." - else - OPERATION_RESULT="success" - ok "Reverted successfully. --user ${SERVICE_NAME} is enabled and started." - fi - return 0 + OPERATION_RESULT="failed" + error "Failed to enable --user ${SERVICE_NAME}." + return 1 } while [[ $# -gt 0 ]]; do |
