mirror of
https://github.com/basecamp/omarchy.git
synced 2025-08-03 07:19:22 +00:00
Show indicator if update is available (#456)
* Show indicator if update is available * Language
This commit is contained in:

committed by
GitHub

parent
63840c6e9a
commit
f729004306
@ -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
|
||||
|
13
bin/omarchy-update-available
Executable file
13
bin/omarchy-update-available
Executable file
@ -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
|
@ -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": "",
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user