Merge pull request #434 from basecamp/dev

Omarchy v1.9.0
This commit is contained in:
David Heinemeier Hansson
2025-08-02 22:36:29 +02:00
committed by GitHub
37 changed files with 226 additions and 83 deletions

View File

@ -1,10 +1,20 @@
#!/bin/bash
trap "exit" SIGINT
if command -v tte &>/dev/null; then
while true; do
effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | sort -u | shuf -n1)
tte -i ~/.local/share/omarchy/logo.txt \
--frame-rate 240 --canvas-width 0 --canvas-height $(($(tput lines) - 2)) --anchor-canvas c --anchor-text c \
"$effect" &
while pgrep tte >/dev/null; do
if read -n 1 -t 0.01; then
pkill tte 2>/dev/null
exit 0
fi
done
done
else
gum spin --title "Can't find tte. Try: pip install terminaltexteffects" -- sleep 2
fi
while true; do
effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | sort -u | shuf -n1)
tte -i ~/.local/share/omarchy/logo.txt \
--frame-rate 240 --canvas-width 0 --canvas-height 0 --anchor-canvas c --anchor-text c \
"$effect"
done

View File

@ -1,5 +1,5 @@
#!/bin/bash
pkill -f "alacritty --class Screensaver" ||
pgrep -f "alacritty --class Screensaver" ||
alacritty --class Screensaver --title Screensaver -o 'colors.primary.background="#000000"' \
-e ~/.local/share/omarchy/bin/omarchy-cmd-screensaver
-o 'colors.cursor.cursor="#000000"' -e ~/.local/share/omarchy/bin/omarchy-cmd-screensaver

View File

@ -2,15 +2,17 @@
show_power_menu() {
# The first characters are invisible sort keys.
local menu_options="\u200B Lock
\u200C󰤄 Suspend
\u200D Relaunch
\u2060󰜉 Restart
\u2063󰐥 Shutdown"
local menu_options=" Lock
󱄄 Save
󰤄 Suspend
 Relaunch
󰜉 Restart
󰐥 Shutdown"
local selection=$(echo -e "$menu_options" | walker --dmenu --theme dmenu_150)
case "$selection" in
*Lock*) hyprlock ;;
*Save*) ~/.local/share/omarchy/bin/omarchy-launch-screensaver ;;
*Suspend*) systemctl suspend ;;
*Relaunch*) uwsm stop ;;
*Restart*) systemctl reboot ;;

26
bin/omarchy-migrate Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# 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"
# Run any pending migrations
cd ~/.local/share/omarchy
for file in migrations/*.sh; do
filename=$(basename "$file")
migrate_at="${filename%.sh}"
# Migration already applied, to re-run it simply delete the state file and try again
[ -e "${STATE_DIR}/$filename" ] && continue
echo -e "\e[32m\nRunning migration (${filename%.sh})\e[0m"
source $file
touch "${STATE_DIR}/$filename"
done
# Back to where we came from
cd - >/dev/null

View File

@ -4,7 +4,7 @@
config_file=$1
if [[ -z "$config_file" ]]; then
cat << USAGE
cat <<USAGE
Usage: $0 [config_file]
Must provide a file path from the .config directory to be refreshed.
@ -16,15 +16,20 @@ USAGE
fi
# Backup the destination file (with timestamp) to avoid clobbering (Ex: hyprlock.conf.bak.1753817951)
backup_file="${HOME}/.config/${config_file}.bak.$(date +%s)"
cp -f "${HOME}/.config/${config_file}" "$backup_file" 2>/dev/null
user_config_file="${HOME}/.config/$config_file"
default_config_file="${HOME}/.local/share/omarchy/config/$config_file"
backup_config_file="$user_config_file.bak.$(date +%s)"
# Deploy the source file
cp -f "${HOME}/.local/share/omarchy/config/${config_file}" "${HOME}/.config/${config_file}" 2>/dev/null
# Create preliminary backup
cp -f "$user_config_file" "$backup_config_file" 2>/dev/null
# Replace config with new default
cp -f "$default_config_file" "$user_config_file" 2>/dev/null
# Compare and delete/inform accordingly
if cmp -s "${HOME}/.config/${config_file}" "$backup_file"; then
rm $backup_file
if cmp -s "$user_config_file" "$backup_config_file"; then
rm "$backup_config_file"
else
echo -e "\e[31mExisting "${HOME}/.config/${config_file}" replaced with new Omarchy default, but ${backup_file} file was made.\e[0m"
echo -e "\e[31mReplaced $user_config_file with new Omarchy default.\nSaved backup as ${backup_config_file}.\n\n\e[32mChanges:\e[0m"
diff "$user_config_file" "$backup_config_file"
fi

6
bin/omarchy-refresh-hypridle Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
omarchy-refresh-config hypr/hypridle.conf
pkill -x hypridle
uwsm app -- hypridle >/dev/null 2>&1 &

View File

@ -4,4 +4,4 @@ omarchy-refresh-config waybar/config.jsonc
omarchy-refresh-config waybar/style.css
# Restart waybar
pkill -SIGUSR2 waybar
omarchy-restart-waybar

4
bin/omarchy-restart-waybar Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
killall waybar || true
setsid uwsm app -- waybar &>/dev/null &

View File

@ -32,12 +32,19 @@ else
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
fi
# Change gnome icon theme color
if [[ -f ~/.config/omarchy/current/theme/icons.theme ]]; then
gsettings set org.gnome.desktop.interface icon-theme "$(<~/.config/omarchy/current/theme/icons.theme)"
else
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
fi
# Trigger alacritty config reload
touch "$HOME/.config/alacritty/alacritty.toml"
# Restart components to apply new theme
pkill -SIGUSR2 btop
pkill -SIGUSR2 waybar
"$HOME/.local/share/omarchy/bin/omarchy-restart-waybar"
pkill swayosd-server
setsid uwsm app -- swayosd-server &>/dev/null &
makoctl reload

View File

@ -3,34 +3,23 @@
# Exit immediately if a command exits with a non-zero status
set -e
STATE_DIR="$HOME/.local/state/omarchy/migrations"
cd ~/.local/share/omarchy
# Create the migrations state directory, we will store an empty file for each migration that has already been performed.
mkdir -p "$STATE_DIR"
# Show logo
clear
cat <~/.local/share/omarchy/logo.txt
# Get the latest while trying to preserve any modifications
git pull --autostash
git diff --check || git reset --merge
omarchy_path=~/.local/share/omarchy
git -C $omarchy_path pull --autostash
git -C $omarchy_path diff --check || git -C $omarchy_path reset --merge
# Run any pending migrations
for file in migrations/*.sh; do
filename=$(basename "$file")
migrate_at="${filename%.sh}"
# Migration already applied, to re-run it simply delete the state file and try again
[ -e "${STATE_DIR}/$filename" ] && continue
echo -e "\e[32m\nRunning migration (${filename%.sh})\e[0m"
source $file
touch "${STATE_DIR}/$filename"
done
# Run migrations
"$HOME/.local/share/omarchy/bin/omarchy-migrate"
# Update system packages
echo -e "\e[32m\nUpdate system packages\e[0m"
yay -Syu --noconfirm
# Back to where we came from
cd - >/dev/null
# Offer to reboot if the kernel has been changed
if [ "$(uname -r | sed 's/-arch/\.arch/')" != "$(pacman -Q linux | awk '{print $2}')" ]; then
gum confirm "Linux kernel has been updated. Reboot?" && sudo reboot now
fi

13
bin/omarchy-update-available Executable file
View 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

View File

@ -1,8 +1,14 @@
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
on_unlock_cmd = pkill -SIGUSR2 waybar # prevent stacking of waybar when waking
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
on_lock_cmd = pkill -f "alacritty --class Screensaver" # avoid running screensaver when locked
on_unlock_cmd = omarchy-restart-waybar # prevent stacking of waybar when waking
}
listener {
timeout = 60 # 1min
on-timeout = omarchy-launch-screensaver # start screensaver
}
listener {

View File

@ -213,7 +213,7 @@ concurrency = 8
show_icon_when_single = true
preview_images = true
hidden = false
prefix = '.'
prefix = "."
[builtins.runner]
eager_loading = true

View File

@ -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": "󰍛",

View File

@ -26,6 +26,10 @@
min-width: 9px;
}
#workspaces button.empty {
opacity: 0.5;
}
#tray,
#cpu,
#battery,

View File

@ -1,3 +1,4 @@
# Editor used by CLI
export EDITOR="nvim"
export SUDO_EDITOR="$EDITOR"
export BAT_THEME=ansi

View File

@ -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

View File

@ -5,8 +5,8 @@ Window.SetBackgroundBottomColor(0.101, 0.105, 0.149);
logo.image = Image("logo.png");
logo.sprite = Sprite(logo.image);
logo.sprite.SetX (Window.GetX() + Window.GetWidth() / 2 - logo.image.GetWidth() / 2);
logo.sprite.SetY (Window.GetY() + Window.GetHeight() / 2 - logo.image.GetHeight() / 2);
logo.sprite.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2);
logo.sprite.SetY (Window.GetHeight() / 2 - logo.image.GetHeight() / 2);
logo.sprite.SetOpacity (1);
# Use these to adjust the progress bar timing
@ -119,7 +119,7 @@ entry.image = Image("entry.png");
bullet.image = Image("bullet.png");
entry.sprite = Sprite(entry.image);
entry.x = Window.GetX() + Window.GetWidth()/2 - entry.image.GetWidth() / 2;
entry.x = Window.GetWidth()/2 - entry.image.GetWidth() / 2;
entry.y = logo.sprite.GetY() + logo.image.GetHeight() + 40;
entry.sprite.SetPosition(entry.x, entry.y, 10001);
entry.sprite.SetOpacity(0);
@ -171,8 +171,13 @@ fun display_password_callback (prompt, bullets)
for (index = 0; bullet.sprites[index]; index++)
bullet.sprites[index].SetOpacity(0);
# Create and show bullets for current password
for (index = 0; index < bullets; index++)
# Create and show bullets for current password (max 21)
max_bullets = 21;
bullets_to_show = bullets;
if (bullets_to_show > max_bullets)
bullets_to_show = max_bullets;
for (index = 0; index < bullets_to_show; index++)
{
if (!bullet.sprites[index])
{
@ -195,7 +200,7 @@ Plymouth.SetDisplayPasswordFunction(display_password_callback);
progress_box.image = Image("progress_box.png");
progress_box.sprite = Sprite(progress_box.image);
progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2;
progress_box.x = Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2;
progress_box.y = entry.y + entry.image.GetHeight() / 2 - progress_box.image.GetHeight() / 2;
progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0);
progress_box.sprite.SetOpacity(0);
@ -204,7 +209,7 @@ progress_bar.original_image = Image("progress_bar.png");
progress_bar.sprite = Sprite();
progress_bar.image = progress_bar.original_image.Scale(1, progress_bar.original_image.GetHeight());
progress_bar.x = Window.GetX() + Window.GetWidth() / 2 - progress_bar.original_image.GetWidth() / 2;
progress_bar.x = Window.GetWidth() / 2 - progress_bar.original_image.GetWidth() / 2;
progress_bar.y = progress_box.y + (progress_box.image.GetHeight() - progress_bar.original_image.GetHeight()) / 2;
progress_bar.sprite.SetPosition(progress_bar.x, progress_bar.y, 1);
progress_bar.sprite.SetOpacity(0);

View File

@ -10,8 +10,14 @@ if ! yay -Q gnome-themes-extra &>/dev/null; then
yay -S --noconfirm gnome-themes-extra # Adds Adwaita-dark theme
fi
# Allow icons to match the theme
if ! yay -! yaru-icon-theme &>/dev/null; then
yay -S --noconfirm yaru-icon-theme
fi
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
# Setup theme links
mkdir -p ~/.config/omarchy/themes

View File

@ -2,5 +2,5 @@ echo "Fixing persistent workspaces in waybar config"
if [[ -f ~/.config/waybar/config ]]; then
sed -i 's/"persistent_workspaces":/"persistent-workspaces":/' ~/.config/waybar/config
pkill -SIGUSR2 waybar
omarchy-restart-waybar
fi

View File

@ -1,4 +1,4 @@
echo "Update Walker config to include . as the leader key for the finder"
if ! grep -q 'prefix = "."' ~/.config/walker/config.toml; then
if ! grep -q 'prefix = "\."' ~/.config/walker/config.toml; then
omarchy-refresh-walker
fi

9
migrations/1754047941.sh Normal file
View File

@ -0,0 +1,9 @@
echo "Add icon theme coloring"
if ! yay -! yaru-icon-theme &>/dev/null; then
yay -S --noconfirm yaru-icon-theme
if [[ -f ~/.config/omarchy/current/theme/icons.theme ]]; then
gsettings set org.gnome.desktop.interface icon-theme "$(<~/.config/omarchy/current/theme/icons.theme)"
fi
fi

2
migrations/1754108993.sh Normal file
View File

@ -0,0 +1,2 @@
echo "Fix Plymouth login positioning in multi-monitor setups + limit password from overflowing"
omarchy-refresh-plymouth

10
migrations/1754113760.sh Normal file
View File

@ -0,0 +1,10 @@
echo "Change reload Waybar on unlock command to prevent stacking"
if ! grep -q 'on_unlock_cmd *= *omarchy-restart-waybar' ~/.config/hypr/hypridle.conf; then
sed -i \
'/^ on_unlock_cmd = pkill -SIGUSR2 waybar[[:space:]]*# prevent stacking of waybar when waking$/c\
on_unlock_cmd = omarchy-restart-waybar # prevent stacking of waybar when waking' \
~/.config/hypr/hypridle.conf
omarchy-restart-waybar
fi

6
migrations/1754133148.sh Normal file
View File

@ -0,0 +1,6 @@
echo "Update Waybar CSS to dim unused workspaces"
if ! grep -q "#workspaces button\.empty" ~/.config/waybar/style.css; then
omarchy-refresh-config waybar/style.css
omarchy-restart-waybar
fi

6
migrations/1754136581.sh Normal file
View File

@ -0,0 +1,6 @@
echo "Start screensaver automatically after 1 minute and stop before locking"
if ! grep -q "omarchy-launch-screensaver" ~/.config/hypr/hypridle.conf; then
omarchy-refresh-hypridle
omarchy-refresh-hyprlock
fi

View File

@ -0,0 +1 @@
Yaru-blue

View File

@ -0,0 +1 @@
Yaru-purple

View File

@ -0,0 +1 @@
Yaru-sage

View File

@ -0,0 +1 @@
Yaru-olive

View File

@ -0,0 +1 @@
Yaru-blue

View File

@ -0,0 +1 @@
Yaru-red

1
themes/nord/icons.theme Normal file
View File

@ -0,0 +1 @@
Yaru-blue

View File

@ -0,0 +1 @@
Yaru-yellow

View File

@ -1,22 +1,31 @@
return {
{
"gthelding/monokai-pro.nvim",
config = function()
require("monokai-pro").setup({
filter = "ristretto",
override = function()
return {
NonText = { fg = "#948a8b" },
}
end,
})
vim.cmd([[colorscheme monokai-pro]])
end,
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "monokai-pro",
},
},
{
"gthelding/monokai-pro.nvim",
config = function()
require("monokai-pro").setup({
filter = "ristretto",
override = function()
return {
NonText = { fg = "#948a8b" },
MiniIconsGrey = { fg = "#948a8b" },
MiniIconsRed = { fg = "#fd6883" },
MiniIconsBlue = { fg = "#85dacc" },
MiniIconsGreen = { fg = "#adda78" },
MiniIconsYellow = { fg = "#f9cc6c" },
MiniIconsOrange = { fg = "#f38d70" },
MiniIconsPurple = { fg = "#a8a9eb" },
MiniIconsAzure = { fg = "#a8a9eb" },
MiniIconsCyan = { fg = "#85dacc" }, -- same value as MiniIconsBlue for consistency
}
end,
})
vim.cmd([[colorscheme monokai-pro]])
end,
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "monokai-pro",
},
},
}

View File

@ -0,0 +1 @@
Yaru-blue

View File

@ -0,0 +1 @@
Yaru-magenta