From aabae6fffe133a8d41439bae1401f15cfa520783 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 8 Jul 2026 11:49:56 -0700 Subject: [PATCH] Group all the omarchy-bar bins together --- bin/{omarchy-style-bar-position => omarchy-bar-position} | 4 ++-- ...marchy-shell-bar-text-color => omarchy-bar-text-color} | 0 default/hypr/bindings/utilities.lua | 8 ++++---- default/omarchy/omarchy-menu.jsonc | 8 ++++---- shell/plugins/bar/Bar.qml | 2 +- shell/plugins/bar/README.md | 2 +- test/shell.d/bar-text-color-test.sh | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) rename bin/{omarchy-style-bar-position => omarchy-bar-position} (85%) rename bin/{omarchy-shell-bar-text-color => omarchy-bar-text-color} (100%) diff --git a/bin/omarchy-style-bar-position b/bin/omarchy-bar-position similarity index 85% rename from bin/omarchy-style-bar-position rename to bin/omarchy-bar-position index e1e28a1b..1717db19 100755 --- a/bin/omarchy-style-bar-position +++ b/bin/omarchy-bar-position @@ -2,7 +2,7 @@ # omarchy:summary=Set bar position # omarchy:args= -# omarchy:examples=omarchy-style-bar-position top | omarchy style bar position bottom +# omarchy:examples=omarchy-bar-position top | omarchy bar position bottom set -e @@ -11,7 +11,7 @@ DEFAULTS_FILE="$OMARCHY_PATH/config/omarchy/shell.json" position=$1 if [[ ! $position =~ ^(top|bottom|left|right)$ ]]; then - echo "Usage: omarchy-style-bar-position top|bottom|left|right" >&2 + echo "Usage: omarchy-bar-position top|bottom|left|right" >&2 exit 1 fi diff --git a/bin/omarchy-shell-bar-text-color b/bin/omarchy-bar-text-color similarity index 100% rename from bin/omarchy-shell-bar-text-color rename to bin/omarchy-bar-text-color diff --git a/default/hypr/bindings/utilities.lua b/default/hypr/bindings/utilities.lua index 0d73b0bb..dc4f5b0c 100644 --- a/default/hypr/bindings/utilities.lua +++ b/default/hypr/bindings/utilities.lua @@ -12,10 +12,10 @@ o.bind("SUPER + ALT + K", "Show Tmux key bindings", "omarchy-menu-tmux-keybindin o.bind("XF86Calculator", "Calculator", "gnome-calculator") o.bind_toggle("SUPER + SHIFT + SPACE", "Toggle top bar", "bar") -o.bind("SUPER + SHIFT + CTRL + UP", "Move bar to top", "omarchy-style-bar-position top") -o.bind("SUPER + SHIFT + CTRL + DOWN", "Move bar to bottom", "omarchy-style-bar-position bottom") -o.bind("SUPER + SHIFT + CTRL + LEFT", "Move bar to left", "omarchy-style-bar-position left") -o.bind("SUPER + SHIFT + CTRL + RIGHT", "Move bar to right", "omarchy-style-bar-position right") +o.bind("SUPER + SHIFT + CTRL + UP", "Move bar to top", "omarchy-bar-position top") +o.bind("SUPER + SHIFT + CTRL + DOWN", "Move bar to bottom", "omarchy-bar-position bottom") +o.bind("SUPER + SHIFT + CTRL + LEFT", "Move bar to left", "omarchy-bar-position left") +o.bind("SUPER + SHIFT + CTRL + RIGHT", "Move bar to right", "omarchy-bar-position right") o.bind("SUPER + CTRL + SPACE", "Background switcher", "omarchy-menu toggle background") o.bind("SUPER + SHIFT + CTRL + SPACE", "Theme menu", "omarchy-menu toggle theme") o.bind("SUPER + BACKSPACE", "Toggle window transparency", "omarchy-hyprland-window-transparency-toggle") diff --git a/default/omarchy/omarchy-menu.jsonc b/default/omarchy/omarchy-menu.jsonc index 36804fac..6ee4d493 100644 --- a/default/omarchy/omarchy-menu.jsonc +++ b/default/omarchy/omarchy-menu.jsonc @@ -95,10 +95,10 @@ "style.screensaver": {"icon":"󱄄","label":"Screensaver","keywords":"branding"}, "style.about": {"icon":"","label":"About","keywords":"branding"}, "style.install": {"icon":"󰉉","label":"Install","keywords":"theme background font"}, - "style.bar.top": {"icon":"󰁝","label":"Top","keywords":"position","action":"omarchy-style-bar-position top"}, - "style.bar.bottom": {"icon":"󰁅","label":"Bottom","keywords":"position","action":"omarchy-style-bar-position bottom"}, - "style.bar.left": {"icon":"󰁍","label":"Left","keywords":"position","action":"omarchy-style-bar-position left"}, - "style.bar.right": {"icon":"󰁔","label":"Right","keywords":"position","action":"omarchy-style-bar-position right"}, + "style.bar.top": {"icon":"󰁝","label":"Top","keywords":"position","action":"omarchy-bar-position top"}, + "style.bar.bottom": {"icon":"󰁅","label":"Bottom","keywords":"position","action":"omarchy-bar-position bottom"}, + "style.bar.left": {"icon":"󰁍","label":"Left","keywords":"position","action":"omarchy-bar-position left"}, + "style.bar.right": {"icon":"󰁔","label":"Right","keywords":"position","action":"omarchy-bar-position right"}, "style.about.text": {"icon":"","label":"Edit Text","keywords":"branding","action":"omarchy-branding-about text"}, "style.about.image": {"icon":"","label":"Set From Image","keywords":"branding","action":"omarchy-branding-about image"}, "style.about.default": {"icon":"","label":"Restore Default","keywords":"branding","action":"omarchy-branding-about reset"}, diff --git a/shell/plugins/bar/Bar.qml b/shell/plugins/bar/Bar.qml index f63d96db..2ab914b9 100644 --- a/shell/plugins/bar/Bar.qml +++ b/shell/plugins/bar/Bar.qml @@ -660,7 +660,7 @@ Item { if (!requestedTransparent || transparentForegroundProc.running) return transparentForegroundProc.command = [ - "omarchy-shell-bar-text-color", + "omarchy-bar-text-color", root.position, String(root.barSize), colorHex(root.themeForeground), diff --git a/shell/plugins/bar/README.md b/shell/plugins/bar/README.md index ed006da0..723f5ee7 100644 --- a/shell/plugins/bar/README.md +++ b/shell/plugins/bar/README.md @@ -10,7 +10,7 @@ the shell for its whole session. - `widgets/` holds simple first-party bar widgets with sibling manifests. - Feature plugins such as `../panels/audio/`, `../panels/network/`, `../panels/power/`, and `../model-usage/` provide richer popup bar plugins. - The bar receives its config from the host shell as a `barConfig` property; the host loads it from `~/.config/omarchy/shell.json` (or `config/omarchy/shell.json` when the user has no file). -- `omarchy-style-bar-position` updates only the user shell.json file. +- `omarchy-bar-position` updates only the user shell.json file. ## Customizing diff --git a/test/shell.d/bar-text-color-test.sh b/test/shell.d/bar-text-color-test.sh index 14770a99..b7626c2b 100755 --- a/test/shell.d/bar-text-color-test.sh +++ b/test/shell.d/bar-text-color-test.sh @@ -17,14 +17,14 @@ dark_top="$TMPDIR/dark-top.png" magick -size 100x100 xc:'#202020' -fill '#f5f5f5' -draw 'rectangle 0,0 99,19' "$light_top" magick -size 100x100 xc:'#f5f5f5' -fill '#202020' -draw 'rectangle 0,0 99,19' "$dark_top" -result=$(HOME="$TMPDIR" omarchy-shell-bar-text-color top 20 '#ffffff' '#101010' --background "$light_top" --screen 100x100) +result=$(HOME="$TMPDIR" omarchy-bar-text-color top 20 '#ffffff' '#101010' --background "$light_top" --screen 100x100) [[ $result == "#101010" ]] || fail "transparent bar text switches to background color on light wallpaper" "expected #101010, got $result" pass "transparent bar text switches to background color on light wallpaper" -result=$(HOME="$TMPDIR" omarchy-shell-bar-text-color top 20 '#ffffff' '#101010' --background "$dark_top" --screen 100x100) +result=$(HOME="$TMPDIR" omarchy-bar-text-color top 20 '#ffffff' '#101010' --background "$dark_top" --screen 100x100) [[ $result == "#ffffff" ]] || fail "transparent bar text keeps text color on dark wallpaper" "expected #ffffff, got $result" pass "transparent bar text keeps text color on dark wallpaper" -result=$(HOME="$TMPDIR" omarchy-shell-bar-text-color top 20 '#ffffff' '#101010' --background "$TMPDIR/missing.png" --screen 100x100) +result=$(HOME="$TMPDIR" omarchy-bar-text-color top 20 '#ffffff' '#101010' --background "$TMPDIR/missing.png" --screen 100x100) [[ $result == "#ffffff" ]] || fail "transparent bar text falls back to text color when sampling fails" "expected #ffffff, got $result" pass "transparent bar text falls back to text color when sampling fails"