Remove waybar; relocate bar helper scripts into the shell tree

omarchy-shell's bar plugin replaces waybar on every default path, so the
waybar package, configs, indicator scripts, and toggle/restart/refresh
binaries all go away in this commit.

The four small helper scripts that Bar.qml shells out to (weather.sh and
indicators/*.sh) move with the shell rather than disappear \u2014 they live
at default/quickshell/omarchy-shell/scripts/ now, alongside the rest of
the shell code.

Companion script changes:
  - omarchy-shell-ipc gains --if-running so fire-and-forget refresh
    callers (toggle-idle, toggle-notification-silencing,
    update-available-reset, capture-screenrecording) don't accidentally
    spawn the shell when it isn't already up.
  - omarchy-theme-set, omarchy-tz-select, omarchy-voxtype-{install,model},
    omarchy-toggle-nightlight, omarchy-voxtype-config drop their waybar
    branches and comments.
  - omarchy-voxtype-status's summary stops claiming it's a Waybar helper.
  - omarchy-base.packages drops waybar; install/packaging/fonts.sh's
    comment points at the new bar consumer.
  - SKILL.md / AGENTS.md / omarchy-menu.jsonc lose their waybar entries.
  - test/omarchy-cli-test.sh substitutes a remaining toggle command.
This commit is contained in:
Ryan Hughes
2026-05-14 16:33:20 -04:00
parent 020cb537c7
commit 2ca15dc767
29 changed files with 71 additions and 537 deletions
+1 -3
View File
@@ -250,9 +250,7 @@ stop_screenrecording() {
}
toggle_screenrecording_indicator() {
pkill -RTMIN+8 waybar
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
quickshell ipc -p "$OMARCHY_PATH/default/quickshell/omarchy-shell" call bar refreshScreenRecording >/dev/null 2>&1 || true
omarchy-shell-ipc --if-running bar refreshScreenRecording >/dev/null 2>&1 || true
}
screenrecording_active() {
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
# omarchy:summary=Reset Waybar config to Omarchy defaults
# omarchy:examples=omarchy refresh waybar
WAYBAR_CONFIG="$HOME/.config/waybar/config.jsonc"
position=$(sed -nE 's/.*"position"[[:space:]]*:[[:space:]]*"(top|bottom|left|right)".*/\1/p' "$WAYBAR_CONFIG" 2>/dev/null | head -n 1)
height=$(sed -nE 's/.*"height"[[:space:]]*:[[:space:]]*([0-9]+).*/\1/p' "$WAYBAR_CONFIG" 2>/dev/null | head -n 1)
width=$(sed -nE 's/.*"width"[[:space:]]*:[[:space:]]*([0-9]+).*/\1/p' "$WAYBAR_CONFIG" 2>/dev/null | head -n 1)
omarchy-refresh-config waybar/config.jsonc
omarchy-refresh-config waybar/style.css
[[ -n $position ]] && sed -i -E "s/(\"position\"[[:space:]]*:[[:space:]]*\")[a-z]+(\")/\\1${position}\\2/" "$WAYBAR_CONFIG"
[[ -n $height ]] && sed -i -E "s/(\"height\"[[:space:]]*:[[:space:]]*)[0-9]+/\\1${height}/" "$WAYBAR_CONFIG"
[[ -n $width ]] && sed -i -E "s/(\"width\"[[:space:]]*:[[:space:]]*)[0-9]+/\\1${width}/" "$WAYBAR_CONFIG"
omarchy-restart-waybar
-7
View File
@@ -1,7 +0,0 @@
#!/bin/bash
# omarchy:summary=Restart Waybar
# omarchy:examples=omarchy restart waybar
pkill -9 -x waybar
setsid uwsm-app -- waybar >/dev/null 2>&1 &
+35 -18
View File
@@ -5,9 +5,11 @@
if [[ $# -eq 0 || $1 == "-h" || $1 == "--help" ]]; then
cat <<USAGE
Usage: omarchy-shell-ipc <target> <method> [args...]
Usage: omarchy-shell-ipc [--if-running] <target> <method> [args...]
Starts omarchy-shell if not running, then forwards a quickshell ipc call.
Forwards a quickshell ipc call to omarchy-shell. Starts the shell if it
isn't already running, unless --if-running is passed (in which case the
call is silently skipped when no shell instance exists).
Examples:
omarchy-shell-ipc shell ping
@@ -16,30 +18,45 @@ Examples:
omarchy-shell-ipc shell listPlugins
omarchy-shell-ipc shell listShellConfig
omarchy-shell-ipc shell rescanPlugins
omarchy-shell-ipc --if-running bar refreshIndicators
omarchy-shell-ipc image-selector ping
omarchy-shell-ipc image-selector cancel ""
USAGE
exit 0
fi
if_running=0
if [[ $1 == "--if-running" ]]; then
if_running=1
shift
fi
OMARCHY_PATH="${OMARCHY_PATH:-$HOME/.local/share/omarchy}"
SHELL_DIR="$OMARCHY_PATH/default/quickshell/omarchy-shell"
# Serialize concurrent invocations so two CLI callers don't both spawn the shell
# when no instance is running yet.
lockfile="${XDG_RUNTIME_DIR:-/tmp}/omarchy-shell-ipc.lock"
{
flock 9
if ! quickshell list -p "$SHELL_DIR" 2>/dev/null | grep -q '^Instance '; then
# 9<&- so the spawned shell does not inherit (and keep) the lock fd; the
# spawned process is long-lived and would otherwise hold the lock for the
# remainder of the session, deadlocking every subsequent helper invocation.
setsid uwsm-app -- env OMARCHY_PATH="$OMARCHY_PATH" quickshell -p "$SHELL_DIR" >/dev/null 2>&1 9<&- &
for _ in 1 2 3 4 5 6 7 8 9 10; do
sleep 0.2
quickshell list -p "$SHELL_DIR" 2>/dev/null | grep -q '^Instance ' && break
done
fi
} 9>"$lockfile"
shell_running() {
quickshell list -p "$SHELL_DIR" 2>/dev/null | grep -q '^Instance '
}
if (( if_running )); then
shell_running || exit 0
else
# Serialize concurrent invocations so two CLI callers don't both spawn the shell
# when no instance is running yet.
lockfile="${XDG_RUNTIME_DIR:-/tmp}/omarchy-shell-ipc.lock"
{
flock 9
if ! shell_running; then
# 9<&- so the spawned shell does not inherit (and keep) the lock fd; the
# spawned process is long-lived and would otherwise hold the lock for the
# remainder of the session, deadlocking every subsequent helper invocation.
setsid uwsm-app -- env OMARCHY_PATH="$OMARCHY_PATH" quickshell -p "$SHELL_DIR" >/dev/null 2>&1 9<&- &
for _ in 1 2 3 4 5 6 7 8 9 10; do
sleep 0.2
shell_running && break
done
fi
} 9>"$lockfile"
fi
exec quickshell ipc -p "$SHELL_DIR" call "$@"
-29
View File
@@ -1,29 +0,0 @@
#!/bin/bash
# omarchy:summary=Set Waybar position
# omarchy:args=<top|bottom|left|right>
# omarchy:examples=omarchy-style-waybar-position top | omarchy style waybar-position bottom
set -e
WAYBAR_CONFIG="$HOME/.config/waybar/config.jsonc"
position=$1
if [[ ! $position =~ ^(top|bottom|left|right)$ ]]; then
echo "Usage: omarchy-style-waybar-position top|bottom|left|right" >&2
exit 1
fi
if [[ $position == "left" || $position == "right" ]]; then
height=0
width=28
else
height=26
width=0
fi
sed -i -E "s/(\"position\"[[:space:]]*:[[:space:]]*\")[a-z]+(\")/\\1${position}\\2/" "$WAYBAR_CONFIG"
sed -i -E "s/(\"height\"[[:space:]]*:[[:space:]]*)[0-9]+/\\1${height}/; s/(\"width\"[[:space:]]*:[[:space:]]*)[0-9]+/\\1${width}/" "$WAYBAR_CONFIG"
omarchy-restart-waybar
-3
View File
@@ -50,9 +50,6 @@ if [[ $OMARCHY_THEME_SKIP_BACKGROUND != "1" ]]; then
fi
# Restart components to apply new theme
if pgrep -x waybar >/dev/null; then
omarchy-restart-waybar
fi
omarchy-restart-swayosd
omarchy-restart-terminal
omarchy-restart-hyprctl
+1 -3
View File
@@ -10,6 +10,4 @@ else
notify-send -a omarchy-action -u low "󱫖 Now locking computer when idle"
fi
pkill -RTMIN+9 waybar
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
quickshell ipc -p "$OMARCHY_PATH/default/quickshell/omarchy-shell" call bar refreshIndicators >/dev/null 2>&1 || true
omarchy-shell-ipc --if-running bar refreshIndicators >/dev/null 2>&1 || true
-8
View File
@@ -15,18 +15,10 @@ fi
# Query the current temperature
CURRENT_TEMP=$(hyprctl hyprsunset temperature 2>/dev/null | grep -oE '[0-9]+')
restart_nightlighted_waybar() {
if grep -q "custom/nightlight" ~/.config/waybar/config.jsonc; then
omarchy-restart-waybar # restart waybar in case user has waybar module for hyprsunset
fi
}
if [[ $CURRENT_TEMP == $OFF_TEMP ]]; then
hyprctl hyprsunset temperature $ON_TEMP
notify-send -a omarchy-action -u low " Nightlight screen temperature"
restart_nightlighted_waybar
else
hyprctl hyprsunset temperature $OFF_TEMP
notify-send -a omarchy-action -u low " Daylight screen temperature"
restart_nightlighted_waybar
fi
+1 -2
View File
@@ -9,5 +9,4 @@ on) omarchy-notification-send "Silenced notifications" -g 󰂛 -e ;;
off) omarchy-notification-send "Enabled notifications" -g 󰂚 -e ;;
esac
pkill -RTMIN+10 waybar 2>/dev/null || true
omarchy-shell-ipc bar refreshIndicators >/dev/null 2>&1 || true
omarchy-shell-ipc --if-running bar refreshIndicators >/dev/null 2>&1 || true
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# omarchy:summary=Toggle Waybar visibility
# omarchy:examples=omarchy toggle waybar
omarchy-toggle waybar-off
if pgrep -x waybar >/dev/null; then
pkill -x waybar
else
uwsm-app -- waybar >/dev/null 2>&1 &
fi
-1
View File
@@ -6,4 +6,3 @@
timezone=$(timedatectl list-timezones | gum filter --height 20 --header "Set timezone") || exit 1
sudo timedatectl set-timezone "$timezone"
echo "Timezone is now set to $timezone"
omarchy-restart-waybar
+1 -3
View File
@@ -2,7 +2,5 @@
# omarchy:summary=Ensure the status bar icon offering the available update is removed
pkill -RTMIN+7 waybar
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
quickshell ipc -p "$OMARCHY_PATH/default/quickshell/omarchy-shell" call bar refreshUpdate >/dev/null 2>&1 || true
omarchy-shell-ipc --if-running bar refreshUpdate >/dev/null 2>&1 || true
exit 0
-2
View File
@@ -4,6 +4,4 @@
set -e
# Used by Voxtype waybar module to open config on right click
exec omarchy-launch-editor ~/.config/voxtype/config.toml
-3
View File
@@ -20,9 +20,6 @@ if gum confirm "Install Voxtype + AI model (~150MB) to enable dictation?"; then
fi
voxtype setup systemd
if pgrep -x waybar >/dev/null; then
omarchy-restart-waybar
fi
omarchy-restart-quickshell
notify-send -a omarchy-action " Voxtype Dictation Ready" "Hold F9 to dictate (or toggle with Super + Ctrl + X)." -t 10000
fi
-3
View File
@@ -5,7 +5,4 @@
set -e
omarchy-launch-floating-terminal-with-presentation "voxtype setup model"
if pgrep -x waybar >/dev/null; then
omarchy-restart-waybar
fi
omarchy-restart-quickshell
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# omarchy:summary=Clean up the voxtype --follow child when Waybar reloads
# omarchy:summary=Stream voxtype --follow status as bar-friendly JSON
if omarchy-cmd-present voxtype; then
coproc VOXTYPE_STATUS { voxtype status --follow --extended --format json; }