Group all the omarchy-bar bins together
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# omarchy:summary=Set bar position
|
||||
# omarchy:args=<top|bottom|left|right>
|
||||
# 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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"},
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user