diff --git a/bin/omarchy-update b/bin/omarchy-update index c5b68b3..61cbf4b 100755 --- a/bin/omarchy-update +++ b/bin/omarchy-update @@ -3,11 +3,12 @@ # Exit immediately if a command exits with a non-zero status set -e -STATE_DIR="$HOME/.local/state/omarchy/migrations" - +clear +cat <~/.local/share/omarchy/logo.txt cd ~/.local/share/omarchy # Create the migrations state directory, we will store an empty file for each migration that has already been performed. +STATE_DIR="$HOME/.local/state/omarchy/migrations" mkdir -p "$STATE_DIR" # Get the latest while trying to preserve any modifications diff --git a/bin/omarchy-update-available b/bin/omarchy-update-available new file mode 100755 index 0000000..f319617 --- /dev/null +++ b/bin/omarchy-update-available @@ -0,0 +1,13 @@ +#!/bin/bash + +omarchy_path="$HOME/.local/share/omarchy" +latest_tag=$(git -C $omarchy_path ls-remote --tags origin | grep -v "{}" | awk '{print $2}' | sed 's#refs/tags/##' | sort -V | tail -n 1) +current_tag=$(git -C $omarchy_path describe --tags $(git -C $omarchy_path rev-list --tags --max-count=1)) + +if [[ "$current_tag" < "$latest_tag" ]]; then + echo "Omarchy update available ($latest_tag)" + exit 0 +else + echo "Omarchy is up to date ($current_tag)" + exit 1 +fi diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index dd92bf3..663a4a6 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -8,7 +8,8 @@ "hyprland/workspaces" ], "modules-center": [ - "clock" + "clock", + "custom/update" ], "modules-right": [ "group/tray-expander", @@ -42,6 +43,12 @@ "5": [] } }, + "custom/update": { + "format": "", + "exec": "~/.local/share/omarchy/bin/omarchy-update-available", + "on-click": "alacritty --class Omarchy --title Omarchy -e omarchy-update", + "interval": 3600 + }, "cpu": { "interval": 5, "format": "󰍛", diff --git a/default/hypr/windows.conf b/default/hypr/windows.conf index 9ead813..c9d6992 100644 --- a/default/hypr/windows.conf +++ b/default/hypr/windows.conf @@ -8,7 +8,7 @@ windowrule = tile, class:^(Chromium)$ windowrule = float, class:^(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|Omarchy|About)$ windowrule = center, class:^(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|Omarchy|About)$ windowrule = size 800 600, class:^(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|com.gabm.satty)$ -windowrule = size 590 450, class:Omarchy +windowrule = size 600 470, class:Omarchy windowrule = size 700 470 class:About # Float and center file pickers