Compare commits

...
12 Commits
Author SHA1 Message Date
David Heinemeier Hansson b0ab9782d6 Completion should not include --help 2026-05-01 18:03:12 +02:00
David Heinemeier Hansson f02305ecd8 This was actually correct using an alias 2026-05-01 18:01:41 +02:00
David Heinemeier Hansson 4a12b41893 Hide individual omarchy-* binaries from initial-word command completion
The unified `omarchy` dispatcher is the user-facing entry point
2026-05-01 17:59:17 +02:00
David Heinemeier Hansson c9ff10b4fd Update to use the new single command cli 2026-05-01 17:47:10 +02:00
David Heinemeier Hansson 0f8eb3a6e6 Fix tests 2026-05-01 17:39:59 +02:00
David Heinemeier Hansson f2c1339641 Correct to what's now right 2026-05-01 17:38:20 +02:00
David Heinemeier Hansson a2e83a784e Add missing docs 2026-05-01 17:33:36 +02:00
David Heinemeier Hansson 0d4a076a10 Add omarchy command documentation 2026-05-01 17:31:25 +02:00
David Heinemeier Hansson ee6fbda428 Add bash completions for command 2026-05-01 17:25:23 +02:00
David Heinemeier Hansson d84d2fe11d Remove outdated or internal 2026-05-01 17:23:58 +02:00
David Heinemeier Hansson bc512b437f Merge remote-tracking branch 'origin/dev' into omarchy-cli
# Conflicts:
#	bin/omarchy-hyprland-monitor-watch
#	bin/omarchy-plymouth-reset
#	bin/omarchy-sudo-passwordless
2026-05-01 17:07:09 +02:00
Ryan Hughes 4375782b7a Add omarchy CLI 2026-04-28 12:03:46 -04:00
243 changed files with 2105 additions and 354 deletions
Executable
+1032
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns true if AC power is connected. # omarchy:summary=Returns true if AC power is connected.
for ac in /sys/class/power_supply/AC* /sys/class/power_supply/ADP*; do for ac in /sys/class/power_supply/AC* /sys/class/power_supply/ADP*; do
[[ -r $ac/online && $(cat "$ac/online") == "1" ]] && exit 0 [[ -r $ac/online && $(cat "$ac/online") == "1" ]] && exit 0
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Toggle microphone mute. Dell XPS and ThinkPad systems get special handling for the hardware LED. # omarchy:summary=Toggle microphone mute. Dell XPS and ThinkPad systems get special handling for the hardware LED.
if omarchy-hw-match "XPS"; then if omarchy-hw-match "XPS"; then
omarchy-audio-input-mute-xps omarchy-audio-input-mute-xps
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Toggle microphone mute on ThinkPad systems. Uses wpctl for reliable toggling # omarchy:summary=Toggle microphone mute on ThinkPad systems. Uses wpctl for reliable toggling
# and syncs the platform::micmute LED via brightnessctl.
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Toggle microphone mute on Dell XPS systems. Uses wpctl for reliable toggling # omarchy:summary=Toggle microphone mute on Dell XPS systems. Uses wpctl for reliable toggling
# and syncs the ALSA capture switch so the hardware mic mute LED follows state.
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute. # omarchy:summary=Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute.
sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]') sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]')
sinks_count=$(echo "$sinks" | jq '. | length') sinks_count=$(echo "$sinks" | jq '. | length')
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns the battery full capacity in Wh (rounded to whole number). # omarchy:summary=Returns the battery full capacity in Wh (rounded to whole number).
# Used by omarchy-battery-status for displaying battery capacity.
battery_info=$(upower -i $(upower -e | grep BAT)) battery_info=$(upower -i $(upower -e | grep BAT))
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Designed to be run by systemd timer every 30 seconds and alerts if battery is low # omarchy:summary=Designed to be run by systemd timer every 30 seconds and alerts if battery is low
BATTERY_THRESHOLD=10 BATTERY_THRESHOLD=10
NOTIFICATION_FLAG="/run/user/$UID/omarchy_battery_notified" NOTIFICATION_FLAG="/run/user/$UID/omarchy_battery_notified"
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns true if a battery is present on the system. # omarchy:summary=Returns true if a battery is present on the system.
# Used by the battery monitor and other battery-related checks.
for bat in /sys/class/power_supply/BAT*; do for bat in /sys/class/power_supply/BAT*; do
[[ -r $bat/present ]] && [[ -r $bat/present ]] &&
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns the battery percentage remaining as an integer. # omarchy:summary=Returns the battery percentage remaining as an integer.
# Used by the battery monitor and the Ctrl + Shift + Super + B hotkey.
upower -i $(upower -e | grep BAT) | awk '/percentage/ { upower -i $(upower -e | grep BAT) | awk '/percentage/ {
print int($2) print int($2)
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns the battery time remaining (to empty or full) in a compact format. # omarchy:summary=Returns the battery time remaining (to empty or full) in a compact format.
battery_info=$(upower -i $(upower -e | grep BAT)) battery_info=$(upower -i $(upower -e | grep BAT))
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns a formatted battery status string with percentage and power draw/charge. # omarchy:summary=Returns a formatted battery status string with percentage and power draw/charge.
# Used by the battery notification hotkey (Ctrl + Shift + Super + B).
battery_info=$(upower -i $(upower -e | grep BAT)) battery_info=$(upower -i $(upower -e | grep BAT))
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Set the branch for Omarchy's git repository. # omarchy:summary=Set the branch for Omarchy's git repository.
# omarchy:args=<master|rc|dev>
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-branch-set [master|rc|dev]" echo "Usage: omarchy-branch-set [master|rc|dev]"
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Adjust brightness on the most likely display device. # omarchy:summary=Adjust brightness on the most likely display device.
# Usage: omarchy-brightness-display <step> # omarchy:args=<step>
step="${1:-+5%}" step="${1:-+5%}"
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Adjust the brightness on Apple Studio Displays and Apple XDR Displays using asdcontrol. # omarchy:summary=Adjust the brightness on Apple Studio Displays and Apple XDR Displays using asdcontrol.
# omarchy:requires-sudo=true
if (( $# == 0 )); then if (( $# == 0 )); then
echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)" echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)"
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Adjust keyboard backlight brightness using available steps. # omarchy:summary=Adjust keyboard backlight brightness using available steps.
# Usage: omarchy-brightness-keyboard <up|down|cycle> # omarchy:args=<up|down|cycle>
direction="${1:-up}" direction="${1:-up}"
+5 -4
View File
@@ -1,9 +1,10 @@
#!/bin/bash #!/bin/bash
# Start and stop a screenrecording, which will be saved to ~/Videos by default. # omarchy:summary=Start or stop screen recording
# Alternative location can be set via OMARCHY_SCREENRECORD_DIR or XDG_VIDEOS_DIR ENVs. # omarchy:group=capture
# Resolution is capped to 4K for monitors above 4K, native otherwise. # omarchy:args=[--with-desktop-audio] [--with-microphone-audio] [--with-webcam] [--webcam-device=<device>] [--resolution=<size>] [--stop-recording]
# Override via --resolution= (e.g. --resolution=1920x1080, --resolution=0x0 for native). # omarchy:examples=omarchy screenrecord | omarchy capture screenrecord --with-desktop-audio
# omarchy:aliases=omarchy screenrecord
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs [[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}" OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}"
+5 -3
View File
@@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
# Take a screenshot of the whole screen, a specific window, or a user-drawn region. # omarchy:summary=Take a screenshot
# Saves to ~/Pictures by default, but that can be changed via OMARCHY_SCREENSHOT_DIR or XDG_PICTURES_DIR ENVs. # omarchy:group=capture
# Editor defaults to Satty but can be changed via --editor=<name> or OMARCHY_SCREENSHOT_EDITOR env # omarchy:args=[smart|region|windows|fullscreen] [slurp|copy] [--editor=<name>]
# omarchy:examples=omarchy screenshot | omarchy capture screenshot region
# omarchy:aliases=omarchy screenshot
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs [[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}" OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"
+3 -12
View File
@@ -1,17 +1,8 @@
#!/bin/bash #!/bin/bash
# Set the Omarchy channel, which dictates what git branch and package repository is used. # omarchy:summary=Set the Omarchy channel, which dictates what git branch and package repository is used.
# # omarchy:args=<stable|rc|edge|dev>
# Stable uses the master branch, which only sees updates on official releases, and # omarchy:requires-sudo=true
# the stable package repository, which typically lags the edge by a month to ensure
# better compatibility.
#
# Edge tracks the latest package repository, but still relies on the master branch,
# so new packages which require config changes may cause conflicts or errors.
#
# Dev tracks the active development dev branch, which may include partial or broken updates,
# as well as the latest package repository. This should only be used by Omarchy developers
# and people with a lot of experience managing Linux systems.
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-channel-set [stable|rc|edge|dev]" echo "Usage: omarchy-channel-set [stable|rc|edge|dev]"
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns true if any of the commands passed in as arguments are missing on the system. # omarchy:summary=Check whether any required commands are missing
for cmd in "$@"; do for cmd in "$@"; do
if ! command -v "$cmd" &>/dev/null; then if ! command -v "$cmd" &>/dev/null; then
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns true if all the commands passed in as arguments exit on the system. # omarchy:summary=Check whether all required commands are available
for cmd in "$@"; do for cmd in "$@"; do
command -v "$cmd" &>/dev/null || exit 1 command -v "$cmd" &>/dev/null || exit 1
+1 -3
View File
@@ -1,9 +1,7 @@
#!/bin/bash #!/bin/bash
# Returns the current working directory of the active terminal window, # omarchy:summary=Print the current working directory of the active terminal window
# so a new terminal window can be started in the same directory.
# Go from current active terminal to its child shell process and run cwd there
terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}') terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}')
shell_pid=$(pgrep -P "$terminal_pid" | tail -n1) shell_pid=$(pgrep -P "$terminal_pid" | tail -n1)
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Add or remove an EFI boot entry for the Omarchy UKI, allowing the system to boot directly # omarchy:summary=Add or remove an EFI boot entry for the Omarchy UKI, allowing the system to boot directly
# without a bootloader like Limine. Requires UEFI firmware and a built UKI. # omarchy:requires-sudo=true
if [[ ! -d /sys/firmware/efi ]]; then if [[ ! -d /sys/firmware/efi ]]; then
echo "Error: System is not booted in UEFI mode" >&2 echo "Error: System is not booted in UEFI mode" >&2
+4 -1
View File
@@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
# Return exhaustive debugging information about the system to help diagnose problems. # omarchy:summary=Print debugging information
# omarchy:args=[--no-sudo] [--print]
# omarchy:examples=omarchy debug --print --no-sudo
# omarchy:requires-sudo=true
NO_SUDO=false NO_SUDO=false
PRINT_ONLY=false PRINT_ONLY=false
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Creates a new Omarchy migration named after the unix timestamp of the last commit. # omarchy:summary=Creates a new Omarchy migration named after the unix timestamp of the last commit.
# Only intended for Omarchy developers.
cd ~/.local/share/omarchy cd ~/.local/share/omarchy
migration_file="$HOME/.local/share/omarchy/migrations/$(git log -1 --format=%cd --date=unix).sh" migration_file="$HOME/.local/share/omarchy/migrations/$(git log -1 --format=%cd --date=unix).sh"
+111
View File
@@ -0,0 +1,111 @@
#!/bin/bash
# omarchy:summary=Measure Omarchy CLI response times
# omarchy:args=[--repeat=<count>]
# omarchy:examples=omarchy dev benchmark | omarchy dev benchmark --repeat=10
set -euo pipefail
OMARCHY_BIN_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
CLI="$OMARCHY_BIN_DIR/omarchy"
REPEAT=5
show_help() {
cat <<'EOF'
Usage:
omarchy dev benchmark [--repeat=<count>]
Measure response times for common Omarchy CLI surfaces.
Options:
--repeat=<count> Number of times to run each case (default: 5)
EOF
}
now_us() {
local now="${EPOCHREALTIME/./}"
printf '%s' "$now"
}
format_ms() {
local us="$1"
printf '%d.%03d' "$(( us / 1000 ))" "$(( us % 1000 ))"
}
run_case() {
local label="$1"
shift
local total_us=0
local min_us=0
local max_us=0
local elapsed_us=0
local start_us=0
local end_us=0
local status=0
for (( i = 1; i <= REPEAT; i++ )); do
start_us=$(now_us)
if "$@" >/dev/null; then
status=0
else
status=$?
fi
end_us=$(now_us)
if (( status != 0 )); then
printf '%-34s failed (exit %d)\n' "$label" "$status"
return "$status"
fi
elapsed_us=$(( end_us - start_us ))
total_us=$(( total_us + elapsed_us ))
if (( i == 1 || elapsed_us < min_us )); then
min_us=$elapsed_us
fi
if (( elapsed_us > max_us )); then
max_us=$elapsed_us
fi
done
printf '%-34s avg %8s ms min %8s ms max %8s ms\n' \
"$label" \
"$(format_ms "$(( total_us / REPEAT ))")" \
"$(format_ms "$min_us")" \
"$(format_ms "$max_us")"
}
while (( $# > 0 )); do
case "$1" in
--repeat=*)
REPEAT="${1#*=}"
;;
--help | -h)
show_help
exit 0
;;
*)
echo "Unknown option: $1" >&2
show_help >&2
exit 2
;;
esac
shift
done
if [[ ! $REPEAT =~ ^[0-9]+$ ]] || (( REPEAT < 1 )); then
echo "--repeat must be a positive integer" >&2
exit 2
fi
printf 'Omarchy CLI benchmark (%d runs each)\n\n' "$REPEAT"
run_case "omarchy" "$CLI"
run_case "omarchy --help" "$CLI" --help
run_case "omarchy commands" "$CLI" commands
run_case "omarchy commands --json" "$CLI" commands --json
run_case "omarchy commands --all --json" "$CLI" commands --all --json
run_case "omarchy theme set --help" "$CLI" theme set --help
run_case "omarchy screenshot --help" "$CLI" screenshot --help
run_case "omarchy restart --help" "$CLI" restart --help
run_case "omarchy theme current" "$CLI" theme current
+86
View File
@@ -0,0 +1,86 @@
#!/bin/bash
# omarchy:summary=Show Omarchy bin metadata fields and defaults
# omarchy:args=[--json]
set -euo pipefail
show_json() {
jq -n '{
ok: true,
defaults: {
group: "first filename segment after omarchy-",
name: "remaining filename segments with dashes converted to spaces",
route: "omarchy <group> <name>",
binary: "filename",
requires_sudo: false
},
fields: [
{name: "summary", required: true, type: "string", note: "One-line human and agent-facing description."},
{name: "group", required: false, type: "string", note: "Only set when the route group should differ from the filename-derived group."},
{name: "name", required: false, type: "string", note: "Only set when the route name should differ from the filename-derived name. May be empty for root commands."},
{name: "args", required: false, type: "string", note: "Only set when the command accepts arguments."},
{name: "examples", required: false, type: "string", note: "Pipe-separated examples."},
{name: "aliases", required: false, type: "string", note: "Pipe-separated alternate routes, e.g. omarchy screenshot."},
{name: "requires-sudo", required: false, type: "true", default: false, note: "Only include when true."}
]
}'
}
show_help() {
cat <<'EOF'
Omarchy bin metadata
Metadata lives in the top comment block of each executable bin/omarchy-* file.
Keep it slim: define only fields that are required or override defaults.
Required:
# omarchy:summary=<one-line description>
Inferred defaults:
group first filename segment after omarchy-
name remaining filename segments, with dashes converted to spaces
route omarchy <group> <name>
binary filename
requires-sudo false
Optional fields:
# omarchy:group=<group> route override only
# omarchy:name=<name> route override only; may be empty
# omarchy:args=<args> only if the command accepts args
# omarchy:examples=<cmd> | <cmd> pipe-separated examples
# omarchy:aliases=<route> | <route> pipe-separated alternate routes
# omarchy:requires-sudo=true only when true
Do not define:
binary inferred from filename
usage derived from route + args
false flags or empty args
Examples:
# omarchy:summary=Restart Walker and related user services
# omarchy:summary=Take a screenshot
# omarchy:group=capture
# omarchy:args=[smart|region|windows|fullscreen] [slurp|copy] [--editor=<name>]
# omarchy:examples=omarchy screenshot | omarchy capture screenshot region
# omarchy:aliases=omarchy screenshot
EOF
}
case "${1:-}" in
--json)
show_json
;;
--help | -h)
show_help
;;
"")
show_help
;;
*)
echo "Unknown option: $1" >&2
show_help >&2
exit 2
;;
esac
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Returns drive information about a given volumne, like /dev/nvme0, which is used by omarchy-drive-select. # omarchy:summary=Print drive information such as size, model, and mount details
# omarchy:args=<drive>
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-drive-info [/dev/drive]" echo "Usage: omarchy-drive-info [/dev/drive]"
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Select a drive from a list with info that includes space and brand. Used by omarchy-drive-set-password. # omarchy:summary=Select a drive from a list with info that includes space and brand. Used by omarchy-drive-set-password.
if (($# == 0)); then if (($# == 0)); then
drives=$(lsblk -dpno NAME | grep -E '/dev/(sd|hd|vd|nvme|mmcblk|xv)') drives=$(lsblk -dpno NAME | grep -E '/dev/(sd|hd|vd|nvme|mmcblk|xv)')
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Set a new encryption password for a drive selected. # omarchy:summary=Set a new encryption password for a drive selected.
# omarchy:requires-sudo=true
encrypted_drives=$(blkid -t TYPE=crypto_LUKS -o device) encrypted_drives=$(blkid -t TYPE=crypto_LUKS -o device)
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Finish the installation of Omarchy with items that can only be done after logging in. # omarchy:summary=Finish the installation of Omarchy with items that can only be done after logging in.
# omarchy:requires-sudo=true
set -e set -e
+2 -2
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns the name of the current monospace font being used by extracting it from the Waybar stylesheet. # omarchy:summary=Show current monospace font
# This can be changed using omarchy-font-set. # omarchy:examples=omarchy font current
grep -oP 'font-family:\s*["'\'']?\K[^;"'\'']+' ~/.config/waybar/style.css | head -n1 grep -oP 'font-family:\s*["'\'']?\K[^;"'\'']+' ~/.config/waybar/style.css | head -n1
+2 -1
View File
@@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns a list of all the monospace fonts available on the system that can be set using omarchy-font-set. # omarchy:summary=List available monospace fonts
# omarchy:examples=omarchy font list | omarchy font set "CaskaydiaMono Nerd Font"
fc-list :spacing=100 -f "%{family[0]}\n" | grep -v -i -E 'emoji|signwriting|omarchy' | sort -u fc-list :spacing=100 -f "%{family[0]}\n" | grep -v -i -E 'emoji|signwriting|omarchy' | sort -u
+3 -2
View File
@@ -1,7 +1,8 @@
#!/bin/bash #!/bin/bash
# Set the system-wide monospace font that should be used by the terminal, hyprlock, waybar, swayosd, etc. # omarchy:summary=Set the system monospace font
# The font name must be one of the ones returned by omarchy-font-list. # omarchy:args=<font-name>
# omarchy:examples=omarchy font list | omarchy font set "CaskaydiaMono Nerd Font"
font_name="$1" font_name="$1"
+2
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# omarchy:summary=Run the Synaptics touchpad haptic feedback daemon
"""Haptic feedback daemon for Synaptics touchpads with Manual Trigger. """Haptic feedback daemon for Synaptics touchpads with Manual Trigger.
Monitors touchpad button press events and sends haptic pulses via HID Monitors touchpad button press events and sends haptic pulses via HID
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Check if hibernation is supported # omarchy:summary=Check if hibernation is supported
if [[ ! -f /sys/power/image_size ]]; then if [[ ! -f /sys/power/image_size ]]; then
exit 1 exit 1
fi fi
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Removes hibernation setup: disables swap, removes swapfile, removes fstab entry, # omarchy:summary=Remove hibernation setup including swap and boot resume settings
# removes resume hook, and removes suspend-then-hibernate configuration. # omarchy:requires-sudo=true
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/omarchy_resume.conf" MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/omarchy_resume.conf"
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab, # omarchy:summary=Set up hibernation with swap and boot resume configuration
# adds a resume hook to mkinitcpio, and configures suspend-then-hibernate. # omarchy:requires-sudo=true
if [[ ! -f /sys/power/image_size ]]; then if [[ ! -f /sys/power/image_size ]]; then
echo -e "Hibernation is not supported on your system" >&2 echo -e "Hibernation is not supported on your system" >&2
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Run a named hook, like post-update (available in ~/.config/omarchy/hooks/post-update). # omarchy:summary=Run a named hook, like post-update (available in ~/.config/omarchy/hooks/post-update).
# omarchy:args=[name] [args...]
set -e set -e
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Detect ASUS ExpertBook B9406 series laptops on Intel Panther Lake. # omarchy:summary=Detect ASUS ExpertBook B9406 series laptops on Intel Panther Lake.
omarchy-hw-match "B9406" && omarchy-hw-intel-ptl omarchy-hw-match "B9406" && omarchy-hw-intel-ptl
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Detect whether the computer is an Asus ROG machine. # omarchy:summary=Detect whether the computer is an Asus ROG machine.
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "ASUSTeK COMPUTER INC." ]] && [[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "ASUSTeK COMPUTER INC." ]] &&
grep -q "ROG" /sys/class/dmi/id/product_family 2>/dev/null grep -q "ROG" /sys/class/dmi/id/product_family 2>/dev/null
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Match Dell XPS systems with LG OLED panel on Intel Panther Lake (Xe3) GPU. # omarchy:summary=Match Dell XPS systems with LG OLED panel on Intel Panther Lake (Xe3) GPU.
omarchy-hw-match "XPS" \ omarchy-hw-match "XPS" \
&& omarchy-hw-intel-ptl \ && omarchy-hw-intel-ptl \
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Returns true when an external monitor is physically connected. # omarchy:summary=Returns true when an external monitor is physically connected.
# Uses kernel DRM state so the result is independent of Hyprland's startup timing.
for status in /sys/class/drm/card*-*/status; do for status in /sys/class/drm/card*-*/status; do
[[ "$status" == *-eDP-*/status ]] && continue [[ "$status" == *-eDP-*/status ]] && continue
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Detect whether the computer is a Framework Laptop 16. # omarchy:summary=Detect whether the computer is a Framework Laptop 16.
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Framework" ]] && [[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Framework" ]] &&
omarchy-hw-match "Laptop 16" omarchy-hw-match "Laptop 16"
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# supergfxctl is authoritative: in Integrated mode the dGPU is unbound and # omarchy:summary=Detect whether the system has an active hybrid GPU configuration
# hidden from lspci, so the controller count would undercount on those systems.
if command -v supergfxctl &>/dev/null; then if command -v supergfxctl &>/dev/null; then
supergfxctl -s 2>/dev/null | grep -qw Hybrid supergfxctl -s 2>/dev/null | grep -qw Hybrid
else else
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Detect whether the computer has an Intel CPU. # omarchy:summary=Detect whether the computer has an Intel CPU.
[[ $(grep -m1 "vendor_id" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ') == "GenuineIntel" ]] [[ $(grep -m1 "vendor_id" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ') == "GenuineIntel" ]]
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Detect whether the computer has an Intel Panther Lake GPU. # omarchy:summary=Detect whether the computer has an Intel Panther Lake GPU.
lspci | grep -iE 'vga|3d|display' | grep -qi 'panther lake' lspci | grep -iE 'vga|3d|display' | grep -qi 'panther lake'
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Match against the computer's DMI product name or product family (case-insensitive). # omarchy:summary=Match against the computer's DMI product name or product family (case-insensitive).
# Usage: omarchy-hw-match "XPS" or omarchy-hw-match "ThinkPad" # omarchy:args=<pattern>
grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null || grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null ||
grep -qi "$1" /sys/class/dmi/id/product_family 2>/dev/null grep -qi "$1" /sys/class/dmi/id/product_family 2>/dev/null
+1 -3
View File
@@ -1,8 +1,6 @@
#!/bin/bash #!/bin/bash
# Clear the internal-monitor-disable toggle if no external display is connected. # omarchy:summary=Clear the internal-monitor-disable toggle if no external display is connected.
# Runs before the graphical session so Hyprland doesn't block on having no output
# to render to when the user rebooted with the external unplugged.
TOGGLE="$HOME/.local/state/omarchy/toggles/hypr/internal-monitor-disable.conf" TOGGLE="$HOME/.local/state/omarchy/toggles/hypr/internal-monitor-disable.conf"
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Detect whether the computer is a Microsoft Surface device. # omarchy:summary=Detect whether the computer is a Microsoft Surface device.
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Microsoft Corporation" ]] && [[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Microsoft Corporation" ]] &&
omarchy-hw-match "Surface" omarchy-hw-match "Surface"
+2
View File
@@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
# omarchy:summary=Print the detected Hyprland touchpad or trackpad device name
device=$(hyprctl devices -j | jq -r '[.mice[] | .name | select(test("touchpad|trackpad"; "i"))] | first // empty') device=$(hyprctl devices -j | jq -r '[.mice[] | .name | select(test("touchpad|trackpad"; "i"))] | first // empty')
[[ -n $device ]] && echo "$device" [[ -n $device ]] && echo "$device"
+2
View File
@@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
# omarchy:summary=Print the detected Hyprland touchscreen or tablet device name
device=$(hyprctl devices -j | jq -r '[.touch[]?.name, .tablets[]?.name] | first // empty') device=$(hyprctl devices -j | jq -r '[.touch[]?.name, .tablets[]?.name] | first // empty')
[[ -n $device ]] && echo "$device" [[ -n $device ]] && echo "$device"
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Detect whether Vulkan is available. # omarchy:summary=Detect whether Vulkan is available.
[[ -d /usr/share/vulkan/icd.d ]] && [[ -d /usr/share/vulkan/icd.d ]] &&
find /usr/share/vulkan/icd.d -maxdepth 1 -name "*.json" -print -quit | grep -q . find /usr/share/vulkan/icd.d -maxdepth 1 -name "*.json" -print -quit | grep -q .
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Toggles transparency for the currently focused window. # omarchy:summary=Toggles transparency for the currently focused window.
hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r '.address')" opaque toggle hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r '.address')" opaque toggle
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Print the name of the currently focused Hyprland monitor. # omarchy:summary=Print the name of the currently focused Hyprland monitor.
hyprctl monitors -j | jq -r '.[] | select(.focused == true).name' hyprctl monitors -j | jq -r '.[] | select(.focused == true).name'
+3
View File
@@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
# omarchy:summary=Enable, disable, toggle, or recover the internal laptop display
# omarchy:args=<on|off|toggle|recover>
TOGGLE="internal-monitor-disable" TOGGLE="internal-monitor-disable"
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.conf" TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.conf"
MIRROR_TOGGLE="internal-monitor-mirror" MIRROR_TOGGLE="internal-monitor-mirror"
@@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
# omarchy:summary=Enable, disable, toggle, or recover mirroring the internal display to an external monitor
# omarchy:args=<on|off|toggle|recover>
TOGGLE="internal-monitor-mirror" TOGGLE="internal-monitor-mirror"
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.conf" TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.conf"
DISABLE_TOGGLE="internal-monitor-disable" DISABLE_TOGGLE="internal-monitor-disable"
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Get the active monitor (the one with the cursor) # omarchy:summary=Cycle scaling for the focused Hyprland monitor
MONITOR_INFO=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true)') MONITOR_INFO=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true)')
ACTIVE_MONITOR=$(echo "$MONITOR_INFO" | jq -r '.name') ACTIVE_MONITOR=$(echo "$MONITOR_INFO" | jq -r '.name')
CURRENT_SCALE=$(echo "$MONITOR_INFO" | jq -r '.scale') CURRENT_SCALE=$(echo "$MONITOR_INFO" | jq -r '.scale')
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Listen on Hyprland's event socket and recover monitor toggles whenever a # omarchy:summary=Watch Hyprland monitor events and recover monitor toggles when a monitor is removed
# monitor is removed.
SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Toggle permanent Hyprland flags by copying them into a directory that's sourced entirely. # omarchy:summary=Toggle permanent Hyprland flags by copying them into a directory that's sourced entirely.
# omarchy:args=[--enabled-notification <text>] [--disabled-notification <text>] <flag-name>
ENABLED_NOTIFICATION="" ENABLED_NOTIFICATION=""
DISABLED_NOTIFICATION="" DISABLED_NOTIFICATION=""
+2 -1
View File
@@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
# Check if a Hyprland toggle is currently disabled (missing). # omarchy:summary=Check if a Hyprland toggle is currently disabled (missing).
# omarchy:args=<flag-name>
[[ ! -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]] [[ ! -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]]
+2 -1
View File
@@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
# Check if a Hyprland toggle is currently enabled. # omarchy:summary=Check if a Hyprland toggle is currently enabled.
# omarchy:args=<flag-name>
[[ -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]] [[ -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]]
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Close all open windows # omarchy:summary=Close all open windows
hyprctl clients -j | \ hyprctl clients -j | \
jq -r ".[].address" | \ jq -r ".[].address" | \
xargs -I{} hyprctl dispatch closewindow address:{} xargs -I{} hyprctl dispatch closewindow address:{}
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Toggles the window gaps globally between no gaps and the default. # omarchy:summary=Toggles the window gaps globally between no gaps and the default.
omarchy-hyprland-toggle window-no-gaps omarchy-hyprland-toggle window-no-gaps
+2 -14
View File
@@ -1,19 +1,7 @@
#!/bin/bash #!/bin/bash
# Toggle to pop-out a tile to stay fixed on a display basis. # omarchy:summary=Toggle to pop-out a tile to stay fixed on a display basis.
# omarchy:args=[width height x y]
# Usage:
# omarchy-hyprland-window-pop [width height [x y]]
#
# Arguments:
# width Optional. Width of the floating window. Default: 1300
# height Optional. Height of the floating window. Default: 900
# x Optional. X position of the window. Must provide both X and Y to take effect.
# y Optional. Y position of the window. Must provide both X and Y to take effect.
#
# Behavior:
# - If the window is already pinned, it will be unpinned and removed from the pop layer.
# - If the window is not pinned, it will be floated, resized, moved/centered, pinned, brought to top, and popped.
width=${1:-1300} width=${1:-1300}
height=${2:-900} height=${2:-900}
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Toggle single-window square aspect ratio. # omarchy:summary=Toggle single-window square aspect ratio.
omarchy-hyprland-toggle \ omarchy-hyprland-toggle \
--enabled-notification " Enable single-window square aspect ratio" \ --enabled-notification " Enable single-window square aspect ratio" \
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Toggle the layout on the current active workspace between dwindle and scrolling # omarchy:summary=Toggle the layout on the current active workspace between dwindle and scrolling
ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq -r '.id') ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq -r '.id')
CURRENT_LAYOUT=$(hyprctl activeworkspace -j | jq -r '.tiledLayout') CURRENT_LAYOUT=$(hyprctl activeworkspace -j | jq -r '.tiledLayout')
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Allow Chromium to sign in to Google accounts by adding the correct # omarchy:summary=Allow Chromium to sign in to Google accounts by adding the required OAuth credentials
# oauth client id and secret to ~/.config/chromium-flags.conf.
if [[ -f ~/.config/chromium-flags.conf ]]; then if [[ -f ~/.config/chromium-flags.conf ]]; then
CONF=~/.config/chromium-flags.conf CONF=~/.config/chromium-flags.conf
+5 -1
View File
@@ -1,6 +1,10 @@
#!/bin/bash #!/bin/bash
# Install one of the supported development environments. Usually called via Install > Development > * in the Omarchy Menu. # omarchy:summary=Install a supported development environment
# omarchy:name=dev-env
# omarchy:args=<ruby|node|bun|deno|go|laravel|symfony|php|python|elixir|phoenix|rust|java|zig|ocaml|dotnet|clojure|scala>
# omarchy:examples=omarchy install dev-env ruby | omarchy install dev-env node
# omarchy:requires-sudo=true
if [[ -z $1 ]]; then if [[ -z $1 ]]; then
echo "Usage: omarchy-install-dev-env <ruby|node|bun|deno|go|laravel|symfony|php|python|elixir|phoenix|rust|java|zig|ocaml|dotnet|clojure|scala>" >&2 echo "Usage: omarchy-install-dev-env <ruby|node|bun|deno|go|laravel|symfony|php|python|elixir|phoenix|rust|java|zig|ocaml|dotnet|clojure|scala>" >&2
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Install one of the supported databases in a Docker container with the suitable development options. # omarchy:summary=Install one of the supported databases in a Docker container with the suitable development options.
# Usually called via Install > Development > Docker DB from the Omarchy Menu. # omarchy:requires-sudo=true
options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB" "MSSQL") options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB" "MSSQL")
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Install and start the Dropbox service. Must then be authenticated via the web. # omarchy:summary=Install and start the Dropbox service. Must then be authenticated via the web.
echo "Installing all dependencies..." echo "Installing all dependencies..."
omarchy-pkg-add dropbox dropbox-cli libappindicator-gtk3 python-gpgme nautilus-dropbox omarchy-pkg-add dropbox dropbox-cli libappindicator-gtk3 python-gpgme nautilus-dropbox
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Install and launch Geforce Now. # omarchy:summary=Install and launch Geforce Now.
set -e set -e
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Install the NordVPN service with optional GUI. # omarchy:summary=Install the NordVPN service with optional GUI.
# omarchy:requires-sudo=true
echo "Installing NordVPN..." echo "Installing NordVPN..."
omarchy-pkg-aur-add nordvpn-bin omarchy-pkg-aur-add nordvpn-bin
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Install the ONCE service, enable its background service, and launch the TUI. # omarchy:summary=Install the ONCE service, enable its background service, and launch the TUI.
# omarchy:requires-sudo=true
echo "Installing ONCE..." echo "Installing ONCE..."
omarchy-pkg-add once-bin omarchy-pkg-add once-bin
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Install and launch Steam after first letting the user pick the correct grahics card drivers. # omarchy:summary=Install Steam and graphics drivers selected for this system
# omarchy:requires-sudo=true
set -e set -e
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Install the Tailscale mesh VPN service and a web app for the Tailscale Admin Console. # omarchy:summary=Install the Tailscale mesh VPN service and a web app for the Tailscale Admin Console.
# omarchy:requires-sudo=true
echo -e "\nInstalling Tailscale..." echo -e "\nInstalling Tailscale..."
omarchy-pkg-add tailscale omarchy-pkg-add tailscale
+3 -1
View File
@@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
# Install one of the approved terminals and set it as the default for Omarchy (Super + Return etc). # omarchy:summary=Install one of the approved terminals and set it as the default for Omarchy (Super + Return etc).
# omarchy:args=<alacritty|ghostty|kitty>
# omarchy:requires-sudo=true
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-install-terminal [alacritty|ghostty|kitty]" echo "Usage: omarchy-install-terminal [alacritty|ghostty|kitty]"
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Install VSCode and configure it to use the gnome-libsecret password store, not to update automatically, and to use the current Omarchy theme. # omarchy:summary=Install VS Code and configure Omarchy defaults for secrets, updates, and theme
echo "Installing VSCode..." echo "Installing VSCode..."
omarchy-pkg-add visual-studio-code-bin omarchy-pkg-add visual-studio-code-bin
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Install support for using Xbox controllers with Steam/RetroArch/etc. # omarchy:summary=Install support for using Xbox controllers with Steam/RetroArch/etc.
# omarchy:requires-sudo=true
set -e set -e
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Launch the fastfetch TUI that gives information about the current system. # omarchy:summary=Launch the fastfetch TUI that gives information about the current system.
exec omarchy-launch-or-focus-tui "bash -c 'fastfetch; read -n 1 -s'" exec omarchy-launch-or-focus-tui "bash -c 'fastfetch; read -n 1 -s'"
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Launch the Omarchy audio controls TUI (provided by wiremix). # omarchy:summary=Launch the Omarchy audio controls TUI (provided by wiremix).
omarchy-launch-or-focus-tui wiremix omarchy-launch-or-focus-tui wiremix
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Launch the Omarchy bluetooth controls TUI (provided by bluetui). # omarchy:summary=Launch the Omarchy bluetooth controls TUI (provided by bluetui).
# Also attempts to unblock bluetooth service if rfkill had blocked it.
rfkill unblock bluetooth rfkill unblock bluetooth
exec omarchy-launch-or-focus-tui bluetui exec omarchy-launch-or-focus-tui bluetui
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch the default browser as determined by xdg-settings. # omarchy:summary=Launch the default browser as determined by xdg-settings.
# Automatically converts --private into the correct flag for the given browser. # omarchy:args=[url]
default_browser=$(xdg-settings get default-web-browser) default_browser=$(xdg-settings get default-web-browser)
browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$default_browser 2>/dev/null | head -1) browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$default_browser 2>/dev/null | head -1)
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch the default editor as determined by $EDITOR (set via ~/.config/uwsm/default) (or nvim if missing). # omarchy:summary=Launch the default editor as determined by $EDITOR (set via ~/.config/uwsm/default) (or nvim if missing).
# Starts suitable editors in a terminal window and otherwise as a regular application. # omarchy:args=<path>
omarchy-cmd-present "$EDITOR" || EDITOR=nvim omarchy-cmd-present "$EDITOR" || EDITOR=nvim
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch a floating terminal with the Omarchy logo presentation, then execute the command passed in, and finally end with the omarchy-show-done presentation. # omarchy:summary=Launch a floating terminal with the Omarchy presentation wrapper
# Used by actions such as Update System. # omarchy:args=<command>
cmd="$*" cmd="$*"
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c "omarchy-show-logo; $cmd; if (( \$? != 130 )); then omarchy-show-done; fi" exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c "omarchy-show-logo; $cmd; if (( \$? != 130 )); then omarchy-show-done; fi"
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch or focus on a given command identified by the passed in window-pattern. # omarchy:summary=Launch an app or focus an existing window matching a pattern
# Use by some default bindings, like the one for Spotify, to ensure there is only one instance of the application open. # omarchy:args=<window-pattern> <launch-command>
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-launch-or-focus [window-pattern] [launch-command]" echo "Usage: omarchy-launch-or-focus [window-pattern] [launch-command]"
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch or focus on a given TUI identified by the passed in as the command. # omarchy:summary=Launch a TUI or focus an existing terminal window for it
# Use by commands like omarchy-launch-wifi to ensure there is only one wifi configuration screen open. # omarchy:args=<command> [args...]
APP_ID="org.omarchy.$(basename "$1")" APP_ID="org.omarchy.$(basename "$1")"
LAUNCH_COMMAND="omarchy-launch-tui $@" LAUNCH_COMMAND="omarchy-launch-tui $@"
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch or focus on a given web app identified by the window-pattern. # omarchy:summary=Launch or focus on a given web app identified by the window-pattern.
# Use by some default bindings, like the one for WhatsApp, to ensure there is only one instance of the application open. # omarchy:args=<window-pattern> <url-and-flags...>
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]" echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]"
+1 -2
View File
@@ -1,8 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch the Omarchy screensaver in the default terminal on the system with the correct font configuration. # omarchy:summary=Launch the Omarchy screensaver in the default terminal on the system with the correct font configuration.
# Exit early if we don't have the tte show
if ! command -v tte &>/dev/null; then if ! command -v tte &>/dev/null; then
exit 1 exit 1
fi fi
+2 -1
View File
@@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
# Launch the TUI command passed in as an argument in the default terminal with an org.omarchy.COMMAND app id for styling. # omarchy:summary=Launch a TUI command in the default terminal with Omarchy styling
# omarchy:args=<command> [args...]
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.$(basename $1) -e "$1" "${@:2}" exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.$(basename $1) -e "$1" "${@:2}"
+1 -2
View File
@@ -1,8 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch the Walker application launcher while ensuring that it's data provider (called elephant) is running first. # omarchy:summary=Launch Walker and ensure its Elephant data provider is running
# Ensure elephant is running before launching walker
if ! pgrep -x elephant > /dev/null; then if ! pgrep -x elephant > /dev/null; then
setsid uwsm-app -- elephant & setsid uwsm-app -- elephant &
fi fi
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Launch the passed in URL as a web app in the default browser (or chromium if the default doesn't support --app). # omarchy:summary=Launch a URL as a web app in the default supported browser
# omarchy:args=<url>
browser=$(xdg-settings get default-web-browser) browser=$(xdg-settings get default-web-browser)
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Launch the Omarchy wifi controls (provided by the Impala TUI). # omarchy:summary=Launch the Omarchy wifi controls (provided by the Impala TUI).
# Attempts to unblock the wifi service first in case it should be been blocked.
rfkill unblock wifi rfkill unblock wifi
omarchy-launch-or-focus-tui impala omarchy-launch-or-focus-tui impala
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Launch the Omarchy Menu or takes a parameter to jump straight to a submenu. # omarchy:summary=Launch the Omarchy Menu or takes a parameter to jump straight to a submenu.
# Set to true when going directly to a submenu, so we can exit directly # Set to true when going directly to a submenu, so we can exit directly
BACK_TO_EXIT=false BACK_TO_EXIT=false
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# Display Hyprland keybindings defined in your configuration using walker for an interactive search menu. # omarchy:summary=Display Hyprland keybindings defined in your configuration using walker for an interactive search menu.
declare -A KEYCODE_SYM_MAP declare -A KEYCODE_SYM_MAP
+5 -1
View File
@@ -1,6 +1,10 @@
#!/bin/bash #!/bin/bash
# Share clipboard, file, or folder using LocalSend. Bound to Super + Ctrl + S by default. # omarchy:summary=Share clipboard, files, or folders with LocalSend
# omarchy:group=share
# omarchy:name=
# omarchy:args=<clipboard|file|folder> [path...]
# omarchy:examples=omarchy share clipboard | omarchy share file ~/Downloads/example.txt
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-menu-share [clipboard|file|folder]" echo "Usage: omarchy-menu-share [clipboard|file|folder]"
+1 -2
View File
@@ -1,8 +1,7 @@
#!/bin/bash #!/bin/bash
# Run all pending migrations to bring the system in line with the installed version. # omarchy:summary=Run all pending migrations to bring the system in line with the installed version.
# Where we store an empty file for each migration that has already been performed.
STATE_DIR="$HOME/.local/state/omarchy/migrations" STATE_DIR="$HOME/.local/state/omarchy/migrations"
mkdir -p "$STATE_DIR" mkdir -p "$STATE_DIR"
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# Dismiss a mako notification on the basis of its summary. Used by the first-run notifications to dismiss them after clicking for action. # omarchy:summary=Dismiss a mako notification on the basis of its summary. Used by the first-run notifications to dismiss them after clicking for action.
# omarchy:args=<summary>
if (($# == 0)); then if (($# == 0)); then
echo "Usage: omarchy-notification-dismiss <summary>" echo "Usage: omarchy-notification-dismiss <summary>"
+2 -5
View File
@@ -1,10 +1,7 @@
#!/bin/bash #!/bin/bash
# Install an npx wrapper for a given npm package. # omarchy:summary=Install an npx wrapper for a given npm package.
# Usage: omarchy-npx-install <package> [command-name] # omarchy:args=<package> [command-name]
#
# If command-name is omitted, it defaults to the package name.
# Example: omarchy-npx-install opencode-ai opencode
if [[ -z $1 ]]; then if [[ -z $1 ]]; then
echo "Usage: omarchy-npx-install <package> [command-name]" echo "Usage: omarchy-npx-install <package> [command-name]"
+6 -1
View File
@@ -1,6 +1,11 @@
#!/bin/bash #!/bin/bash
# Add the named packages to the system if they're missing. Returns false if it couldn't be done. # omarchy:summary=Install Arch packages if they are missing
# omarchy:group=install
# omarchy:name=package
# omarchy:args=<packages...>
# omarchy:examples=omarchy install package jq ripgrep
# omarchy:requires-sudo=true
if omarchy-pkg-missing "$@"; then if omarchy-pkg-missing "$@"; then
sudo pacman -S --noconfirm --needed "$@" || exit 1 sudo pacman -S --noconfirm --needed "$@" || exit 1

Some files were not shown because too many files have changed in this diff Show More