From a66e8ebebd1dc4d86173fb3b046879dd5242ae45 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 10 Sep 2025 16:00:14 +0200 Subject: [PATCH] Stop restarting waybar entirely on updates This had problems and like this we also won't have an ugly flash --- bin/omarchy-update | 2 +- bin/omarchy-update-available-reset | 4 ++++ config/waybar/config.jsonc | 1 + migrations/1757512135.sh | 5 +++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 bin/omarchy-update-available-reset create mode 100644 migrations/1757512135.sh diff --git a/bin/omarchy-update b/bin/omarchy-update index 9cf8d51..7926013 100755 --- a/bin/omarchy-update +++ b/bin/omarchy-update @@ -7,4 +7,4 @@ omarchy-update-git omarchy-migrate omarchy-update-system-pkgs omarchy-update-restart -omarchy-restart-waybar # removes update-available icon +omarchy-update-available-reset diff --git a/bin/omarchy-update-available-reset b/bin/omarchy-update-available-reset new file mode 100755 index 0000000..09396f9 --- /dev/null +++ b/bin/omarchy-update-available-reset @@ -0,0 +1,4 @@ +#!/bin/bash + +# Ensure Waybar icon offering the available update is removed +pkill -RTMIN+7 waybar diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index f93a161..8bc4e12 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -48,6 +48,7 @@ "exec": "omarchy-update-available", "on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update", "tooltip-format": "Omarchy update available", + "signal": 7, "interval": 3600 }, diff --git a/migrations/1757512135.sh b/migrations/1757512135.sh new file mode 100644 index 0000000..a7314f6 --- /dev/null +++ b/migrations/1757512135.sh @@ -0,0 +1,5 @@ +echo "Make it possible to remove update-available icon with signal in Waybar" + +if ! grep -q '"signal": 7' ~/.config/waybar/config.jsonc; then + sed -i '/"tooltip-format": "Omarchy update available",/a\ "signal": 7,' ~/.config/waybar/config.jsonc +fi