mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Add omarchy CLI (#5477)
* Add omarchy CLI * Remove outdated or internal * Add bash completions for command * Add omarchy command documentation * Add missing docs * Correct to what's now right * Fix tests --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
co-authored by
David Heinemeier Hansson
parent
cdb9694360
commit
d2a4cc0c4d
Executable
+1032
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
[[ -r $ac/online && $(cat "$ac/online") == "1" ]] && exit 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
omarchy-audio-input-mute-xps
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle microphone mute on ThinkPad systems. Uses wpctl for reliable toggling
|
||||
# and syncs the platform::micmute LED via brightnessctl.
|
||||
# omarchy:summary=Toggle microphone mute on ThinkPad systems. Uses wpctl for reliable toggling
|
||||
|
||||
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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.
|
||||
# omarchy:summary=Toggle microphone mute on Dell XPS systems. Uses wpctl for reliable toggling
|
||||
|
||||
wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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_count=$(echo "$sinks" | jq '. | length')
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Returns the battery full capacity in Wh (rounded to whole number).
|
||||
# Used by omarchy-battery-status for displaying battery capacity.
|
||||
# omarchy:summary=Returns the battery full capacity in Wh (rounded to whole number).
|
||||
|
||||
battery_info=$(upower -i $(upower -e | grep BAT))
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
NOTIFICATION_FLAG="/run/user/$UID/omarchy_battery_notified"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Returns true if a battery is present on the system.
|
||||
# Used by the battery monitor and other battery-related checks.
|
||||
# omarchy:summary=Returns true if a battery is present on the system.
|
||||
|
||||
for bat in /sys/class/power_supply/BAT*; do
|
||||
[[ -r $bat/present ]] &&
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Returns the battery percentage remaining as an integer.
|
||||
# Used by the battery monitor and the Ctrl + Shift + Super + B hotkey.
|
||||
# omarchy:summary=Returns the battery percentage remaining as an integer.
|
||||
|
||||
upower -i $(upower -e | grep BAT) | awk '/percentage/ {
|
||||
print int($2)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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))
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Returns a formatted battery status string with percentage and power draw/charge.
|
||||
# Used by the battery notification hotkey (Ctrl + Shift + Super + B).
|
||||
# omarchy:summary=Returns a formatted battery status string with percentage and power draw/charge.
|
||||
|
||||
battery_info=$(upower -i $(upower -e | grep BAT))
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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
|
||||
echo "Usage: omarchy-branch-set [master|rc|dev]"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Adjust brightness on the most likely display device.
|
||||
# Usage: omarchy-brightness-display <step>
|
||||
# omarchy:summary=Adjust brightness on the most likely display device.
|
||||
# omarchy:args=<step>
|
||||
|
||||
step="${1:-+5%}"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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
|
||||
echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Adjust keyboard backlight brightness using available steps.
|
||||
# Usage: omarchy-brightness-keyboard <up|down|cycle>
|
||||
# omarchy:summary=Adjust keyboard backlight brightness using available steps.
|
||||
# omarchy:args=<up|down|cycle>
|
||||
|
||||
direction="${1:-up}"
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start and stop a screenrecording, which will be saved to ~/Videos by default.
|
||||
# Alternative location can be set via OMARCHY_SCREENRECORD_DIR or XDG_VIDEOS_DIR ENVs.
|
||||
# Resolution is capped to 4K for monitors above 4K, native otherwise.
|
||||
# Override via --resolution= (e.g. --resolution=1920x1080, --resolution=0x0 for native).
|
||||
# omarchy:summary=Start or stop screen recording
|
||||
# omarchy:group=capture
|
||||
# omarchy:args=[--with-desktop-audio] [--with-microphone-audio] [--with-webcam] [--webcam-device=<device>] [--resolution=<size>] [--stop-recording]
|
||||
# omarchy:examples=omarchy screenrecord | omarchy capture screenrecord --with-desktop-audio
|
||||
# omarchy:aliases=omarchy screenrecord
|
||||
|
||||
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
|
||||
OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}"
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Take a screenshot of the whole screen, a specific window, or a user-drawn region.
|
||||
# Saves to ~/Pictures by default, but that can be changed via OMARCHY_SCREENSHOT_DIR or XDG_PICTURES_DIR ENVs.
|
||||
# Editor defaults to Satty but can be changed via --editor=<name> or OMARCHY_SCREENSHOT_EDITOR env
|
||||
# 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
|
||||
|
||||
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
|
||||
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"
|
||||
|
||||
+3
-12
@@ -1,17 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set the Omarchy channel, which dictates what git branch and package repository is used.
|
||||
#
|
||||
# Stable uses the master branch, which only sees updates on official releases, and
|
||||
# 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.
|
||||
# omarchy:summary=Set the Omarchy channel, which dictates what git branch and package repository is used.
|
||||
# omarchy:args=<stable|rc|edge|dev>
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
if (($# == 0)); then
|
||||
echo "Usage: omarchy-channel-set [stable|rc|edge|dev]"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
if ! command -v "$cmd" &>/dev/null; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
command -v "$cmd" &>/dev/null || exit 1
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Returns the current working directory of the active terminal window,
|
||||
# so a new terminal window can be started in the same directory.
|
||||
# omarchy:summary=Print the current working directory of the active terminal window
|
||||
|
||||
# Go from current active terminal to its child shell process and run cwd there
|
||||
terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}')
|
||||
shell_pid=$(pgrep -P "$terminal_pid" | tail -n1)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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:summary=Add or remove an EFI boot entry for the Omarchy UKI, allowing the system to boot directly
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
if [[ ! -d /sys/firmware/efi ]]; then
|
||||
echo "Error: System is not booted in UEFI mode" >&2
|
||||
|
||||
+4
-1
@@ -1,6 +1,9 @@
|
||||
#!/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
|
||||
PRINT_ONLY=false
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Creates a new Omarchy migration named after the unix timestamp of the last commit.
|
||||
# Only intended for Omarchy developers.
|
||||
# omarchy:summary=Creates a new Omarchy migration named after the unix timestamp of the last commit.
|
||||
|
||||
cd ~/.local/share/omarchy
|
||||
migration_file="$HOME/.local/share/omarchy/migrations/$(git log -1 --format=%cd --date=unix).sh"
|
||||
|
||||
Executable
+111
@@ -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
|
||||
Executable
+86
@@ -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
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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
|
||||
echo "Usage: omarchy-drive-info [/dev/drive]"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
drives=$(lsblk -dpno NAME | grep -E '/dev/(sd|hd|vd|nvme|mmcblk|xv)')
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Returns the name of the current monospace font being used by extracting it from the Waybar stylesheet.
|
||||
# This can be changed using omarchy-font-set.
|
||||
# omarchy:summary=Show current monospace font
|
||||
# omarchy:examples=omarchy font current
|
||||
|
||||
grep -oP 'font-family:\s*["'\'']?\K[^;"'\'']+' ~/.config/waybar/style.css | head -n1
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/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
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set the system-wide monospace font that should be used by the terminal, hyprlock, waybar, swayosd, etc.
|
||||
# The font name must be one of the ones returned by omarchy-font-list.
|
||||
# omarchy:summary=Set the system monospace font
|
||||
# omarchy:args=<font-name>
|
||||
# omarchy:examples=omarchy font list | omarchy font set "CaskaydiaMono Nerd Font"
|
||||
|
||||
font_name="$1"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# omarchy:summary=Run the Synaptics touchpad haptic feedback daemon
|
||||
|
||||
"""Haptic feedback daemon for Synaptics touchpads with Manual Trigger.
|
||||
|
||||
Monitors touchpad button press events and sends haptic pulses via HID
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if hibernation is supported
|
||||
# omarchy:summary=Check if hibernation is supported
|
||||
|
||||
if [[ ! -f /sys/power/image_size ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Removes hibernation setup: disables swap, removes swapfile, removes fstab entry,
|
||||
# removes resume hook, and removes suspend-then-hibernate configuration.
|
||||
# omarchy:summary=Remove hibernation setup including swap and boot resume settings
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/omarchy_resume.conf"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab,
|
||||
# adds a resume hook to mkinitcpio, and configures suspend-then-hibernate.
|
||||
# omarchy:summary=Set up hibernation with swap and boot resume configuration
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
if [[ ! -f /sys/power/image_size ]]; then
|
||||
echo -e "Hibernation is not supported on your system" >&2
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
#!/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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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." ]] &&
|
||||
grep -q "ROG" /sys/class/dmi/id/product_family 2>/dev/null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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-intel-ptl \
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Returns true when an external monitor is physically connected.
|
||||
# Uses kernel DRM state so the result is independent of Hyprland's startup timing.
|
||||
# omarchy:summary=Returns true when an external monitor is physically connected.
|
||||
|
||||
for status in /sys/class/drm/card*-*/status; do
|
||||
[[ "$status" == *-eDP-*/status ]] && continue
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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" ]] &&
|
||||
omarchy-hw-match "Laptop 16"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# supergfxctl is authoritative: in Integrated mode the dGPU is unbound and
|
||||
# hidden from lspci, so the controller count would undercount on those systems.
|
||||
# omarchy:summary=Detect whether the system has an active hybrid GPU configuration
|
||||
|
||||
if command -v supergfxctl &>/dev/null; then
|
||||
supergfxctl -s 2>/dev/null | grep -qw Hybrid
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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" ]]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Match against the computer's DMI product name or product family (case-insensitive).
|
||||
# Usage: omarchy-hw-match "XPS" or omarchy-hw-match "ThinkPad"
|
||||
# omarchy:summary=Match against the computer's DMI product name or product family (case-insensitive).
|
||||
# omarchy:args=<pattern>
|
||||
|
||||
grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null ||
|
||||
grep -qi "$1" /sys/class/dmi/id/product_family 2>/dev/null
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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.
|
||||
# omarchy:summary=Clear the internal-monitor-disable toggle if no external display is connected.
|
||||
|
||||
TOGGLE="$HOME/.local/state/omarchy/toggles/hypr/internal-monitor-disable.conf"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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" ]] &&
|
||||
omarchy-hw-match "Surface"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/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')
|
||||
[[ -n $device ]] && echo "$device"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/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')
|
||||
[[ -n $device ]] && echo "$device"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Detect whether Vulkan is available.
|
||||
# omarchy:summary=Detect whether Vulkan is available.
|
||||
|
||||
[[ -d /usr/share/vulkan/icd.d ]] &&
|
||||
find /usr/share/vulkan/icd.d -maxdepth 1 -name "*.json" -print -quit | grep -q .
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Enable, disable, toggle, or recover the internal laptop display
|
||||
# omarchy:args=<on|off|toggle|recover>
|
||||
|
||||
TOGGLE="internal-monitor-disable"
|
||||
TOGGLE_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.conf"
|
||||
MIRROR_TOGGLE="internal-monitor-mirror"
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/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_FLAG="$HOME/.local/state/omarchy/toggles/hypr/$TOGGLE.conf"
|
||||
DISABLE_TOGGLE="internal-monitor-disable"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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)')
|
||||
ACTIVE_MONITOR=$(echo "$MONITOR_INFO" | jq -r '.name')
|
||||
CURRENT_SCALE=$(echo "$MONITOR_INFO" | jq -r '.scale')
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Listen on Hyprland's event socket and recover monitor toggles whenever a
|
||||
# monitor is removed.
|
||||
# omarchy:summary=Watch Hyprland monitor events and recover monitor toggles when a monitor is removed
|
||||
|
||||
SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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=""
|
||||
DISABLED_NOTIFICATION=""
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/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" ]]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/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" ]]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Close all open windows
|
||||
# omarchy:summary=Close all open windows
|
||||
|
||||
hyprctl clients -j | \
|
||||
jq -r ".[].address" | \
|
||||
xargs -I{} hyprctl dispatch closewindow address:{}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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
|
||||
|
||||
@@ -1,19 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle to pop-out a tile to stay fixed on a display basis.
|
||||
|
||||
# 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.
|
||||
# omarchy:summary=Toggle to pop-out a tile to stay fixed on a display basis.
|
||||
# omarchy:args=[width height x y]
|
||||
|
||||
width=${1:-1300}
|
||||
height=${2:-900}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle single-window square aspect ratio.
|
||||
# omarchy:summary=Toggle single-window square aspect ratio.
|
||||
|
||||
omarchy-hyprland-toggle \
|
||||
--enabled-notification " Enable single-window square aspect ratio" \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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')
|
||||
CURRENT_LAYOUT=$(hyprctl activeworkspace -j | jq -r '.tiledLayout')
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Allow Chromium to sign in to Google accounts by adding the correct
|
||||
# oauth client id and secret to ~/.config/chromium-flags.conf.
|
||||
# omarchy:summary=Allow Chromium to sign in to Google accounts by adding the required OAuth credentials
|
||||
|
||||
if [[ -f ~/.config/chromium-flags.conf ]]; then
|
||||
CONF=~/.config/chromium-flags.conf
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/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
|
||||
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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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:summary=Install one of the supported databases in a Docker container with the suitable development options.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB" "MSSQL")
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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..."
|
||||
omarchy-pkg-add dropbox dropbox-cli libappindicator-gtk3 python-gpgme nautilus-dropbox
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install and launch Geforce Now.
|
||||
# omarchy:summary=Install and launch Geforce Now.
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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..."
|
||||
omarchy-pkg-aur-add nordvpn-bin
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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..."
|
||||
omarchy-pkg-add once-bin
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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..."
|
||||
omarchy-pkg-add tailscale
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/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
|
||||
echo "Usage: omarchy-install-terminal [alacritty|ghostty|kitty]"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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..."
|
||||
omarchy-pkg-add visual-studio-code-bin
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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'"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Launch the Omarchy bluetooth controls TUI (provided by bluetui).
|
||||
# Also attempts to unblock bluetooth service if rfkill had blocked it.
|
||||
# omarchy:summary=Launch the Omarchy bluetooth controls TUI (provided by bluetui).
|
||||
|
||||
rfkill unblock bluetooth
|
||||
exec omarchy-launch-or-focus-tui bluetui
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Launch the default browser as determined by xdg-settings.
|
||||
# Automatically converts --private into the correct flag for the given browser.
|
||||
# omarchy:summary=Launch the default browser as determined by xdg-settings.
|
||||
# omarchy:args=[url]
|
||||
|
||||
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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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:summary=Launch the default editor as determined by $EDITOR (set via ~/.config/uwsm/default) (or nvim if missing).
|
||||
# omarchy:args=<path>
|
||||
|
||||
omarchy-cmd-present "$EDITOR" || EDITOR=nvim
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/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.
|
||||
# Used by actions such as Update System.
|
||||
# omarchy:summary=Launch a floating terminal with the Omarchy presentation wrapper
|
||||
# omarchy:args=<command>
|
||||
|
||||
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"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Launch or focus on a given command identified by the passed in window-pattern.
|
||||
# Use by some default bindings, like the one for Spotify, to ensure there is only one instance of the application open.
|
||||
# omarchy:summary=Launch an app or focus an existing window matching a pattern
|
||||
# omarchy:args=<window-pattern> <launch-command>
|
||||
|
||||
if (($# == 0)); then
|
||||
echo "Usage: omarchy-launch-or-focus [window-pattern] [launch-command]"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Launch or focus on a given TUI identified by the passed in as the command.
|
||||
# Use by commands like omarchy-launch-wifi to ensure there is only one wifi configuration screen open.
|
||||
# omarchy:summary=Launch a TUI or focus an existing terminal window for it
|
||||
# omarchy:args=<command> [args...]
|
||||
|
||||
APP_ID="org.omarchy.$(basename "$1")"
|
||||
LAUNCH_COMMAND="omarchy-launch-tui $@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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:summary=Launch or focus on a given web app identified by the window-pattern.
|
||||
# omarchy:args=<window-pattern> <url-and-flags...>
|
||||
|
||||
if (($# == 0)); then
|
||||
echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]"
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/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
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/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}"
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/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
|
||||
setsid uwsm-app -- elephant &
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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)
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Launch the Omarchy wifi controls (provided by the Impala TUI).
|
||||
# Attempts to unblock the wifi service first in case it should be been blocked.
|
||||
# omarchy:summary=Launch the Omarchy wifi controls (provided by the Impala TUI).
|
||||
|
||||
rfkill unblock wifi
|
||||
omarchy-launch-or-focus-tui impala
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
BACK_TO_EXIT=false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/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
|
||||
echo "Usage: omarchy-menu-share [clipboard|file|folder]"
|
||||
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
#!/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"
|
||||
mkdir -p "$STATE_DIR"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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
|
||||
echo "Usage: omarchy-notification-dismiss <summary>"
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install an npx wrapper for a given npm package.
|
||||
# Usage: omarchy-npx-install <package> [command-name]
|
||||
#
|
||||
# If command-name is omitted, it defaults to the package name.
|
||||
# Example: omarchy-npx-install opencode-ai opencode
|
||||
# omarchy:summary=Install an npx wrapper for a given npm package.
|
||||
# omarchy:args=<package> [command-name]
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: omarchy-npx-install <package> [command-name]"
|
||||
|
||||
+6
-1
@@ -1,6 +1,11 @@
|
||||
#!/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
|
||||
sudo pacman -S --noconfirm --needed "$@" || exit 1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user