Consistency

This commit is contained in:
David Heinemeier Hansson
2026-05-21 19:30:30 +02:00
parent 486c73e6df
commit fed2298235
14 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ if [[ $shell_output == "true" ]]; then
start=$(cat /sys/class/power_supply/BAT*/charge_control_start_threshold 2>/dev/null | head -1)
if [[ -n $end ]]; then
if [[ -n $start && $start != "$end" ]]; then
if [[ -n $start && $start != $end ]]; then
printf 'threshold\t%s-%s%%\n' "$start" "$end"
else
printf 'threshold\t%s%%\n' "$end"
+1 -1
View File
@@ -10,7 +10,7 @@
# `cursor-surface`, `slider`, `toggle`, `dropdown`, etc. Unknown names
# are ignored and the gallery opens at its normal default position.
if [[ $# -gt 0 && -n $1 ]]; then
if (( $# > 0 )) && [[ -n $1 ]]; then
section="$1"
payload=$(printf '{"section":"%s"}' "${section//\"/}")
else
+2 -2
View File
@@ -3,7 +3,7 @@
# omarchy:summary=Returns true when an external monitor is physically connected.
for status in /sys/class/drm/card*-*/status; do
[[ "$status" == *-eDP-*/status ]] && continue
[[ "$(<"$status")" == "connected" ]] && exit 0
[[ $status == *-eDP-*/status ]] && continue
[[ $(< $status) == "connected" ]] && exit 0
done
exit 1
+1 -1
View File
@@ -37,7 +37,7 @@ export PROTONPATH=GE-Proton
export GAMEID=umu-battlenet
export PROTON_VERB=run
if [[ -f "$LAUNCHER" ]]; then
if [[ -f $LAUNCHER ]]; then
echo "Battle.net is already installed at $PREFIX."
launched_installer=0
else
+1 -1
View File
@@ -25,4 +25,4 @@ elif omarchy-hw-nvidia-without-gsp; then
PACKAGES+=(lib32-nvidia-580xx-utils)
fi
[[ ${#PACKAGES[@]} -gt 0 ]] && omarchy-pkg-add "${PACKAGES[@]}"
(( ${#PACKAGES[@]} > 0 )) && omarchy-pkg-add "${PACKAGES[@]}"
+1 -1
View File
@@ -32,7 +32,7 @@ EOF
esac
done
if [[ ! -f "$LAUNCHER" ]]; then
if [[ ! -f $LAUNCHER ]]; then
echo "Battle.net is not installed. Run omarchy-install-gaming-battlenet first." >&2
exit 1
fi
+2 -2
View File
@@ -17,7 +17,7 @@ usage() {
echo "Usage: omarchy-menu-images [--selected <image>] [--print-name] [--show-labels] [--filterable] [--lazy-thumbnails] [--preload] [--cache-only] <image-dir>..."
}
while [[ $# -gt 0 ]]; do
while (( $# > 0 )); do
case "$1" in
--selected)
if (( $# < 2 )); then
@@ -199,7 +199,7 @@ elif [[ $rows_cache_hit != true ]]; then
for image in "${image_files[@]}"; do
thumbnail=$(thumbnail_for "$image")
[[ -n $thumbnail ]] || continue
if [[ $lazy_thumbnails == true && $cache_only != true && $thumbnail == "$image" ]]; then
if [[ $lazy_thumbnails == true && $cache_only != true && $thumbnail == $image ]]; then
rows_cacheable=false
fi
+1 -1
View File
@@ -7,7 +7,7 @@
# Render a Plymouth login-screen preview PNG by compositing the staged omarchy
# theme assets (recolored with the given text color) onto the background.
if [[ $# -ne 4 ]]; then
if (( $# != 4 )); then
echo "Usage: omarchy-plymouth-preview <background-hex> <text-hex> <path-to-logo.png> <output-path>" >&2
exit 1
fi
+1 -1
View File
@@ -10,7 +10,7 @@
# rebuilds the initramfs. Also syncs the SDDM login screen (the post-logout
# screen) with the same colors and logo so boot/login stay visually unified.
if [[ $# -ne 3 ]]; then
if (( $# != 3 )); then
echo "Usage: omarchy-plymouth-set <background-hex> <text-hex> <path-to-logo.png>" >&2
exit 1
fi
+1 -1
View File
@@ -7,7 +7,7 @@
# Resolve a theme by name and apply its unlock.png + colors.toml as the
# Plymouth boot screen via omarchy-plymouth-set.
if [[ $# -ne 1 ]]; then
if (( $# != 1 )); then
echo "Usage: omarchy-plymouth-set-by-theme <theme-name>" >&2
exit 1
fi
+1 -1
View File
@@ -9,7 +9,7 @@ set_fallback_default_browser() {
local current_browser
current_browser=$(xdg-settings get default-web-browser)
if [[ $current_browser != "$1" ]]; then
if [[ $current_browser != $1 ]]; then
return
fi
+2 -2
View File
@@ -10,7 +10,7 @@ if [[ ${1:-} == "-q" ]]; then
shift
fi
if [[ $# -eq 0 || $1 == "-h" || $1 == "--help" ]]; then
if (( $# == 0 )) || [[ $1 == "-h" || $1 == "--help" ]]; then
cat <<USAGE
Usage: omarchy-shell [-q] <target> <method> [args...]
@@ -45,7 +45,7 @@ fi
SHELL_QML="$OMARCHY_PATH/shell/shell.qml"
if [[ $1 == "shell" && ( $2 == "summon" || $2 == "toggle" ) && $# -eq 3 ]]; then
if [[ $1 == "shell" && ( $2 == "summon" || $2 == "toggle" ) ]] && (( $# == 3 )); then
set -- "$1" "$2" "$3" "{}"
fi
+1 -1
View File
@@ -12,7 +12,7 @@ fi
BACKGROUND="$(realpath "$1")"
CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background"
if [[ ! -f "$BACKGROUND" ]]; then
if [[ ! -f $BACKGROUND ]]; then
echo "File does not exist: $BACKGROUND" >&2
exit 1
fi
+1 -1
View File
@@ -136,7 +136,7 @@ main() {
case "$1" in
--path)
shift
[[ $# -gt 0 ]] || { echo "Missing value for --path" >&2; return 2; }
(( $# > 0 )) || { echo "Missing value for --path" >&2; return 2; }
search_path="$1"
;;
--help | -h)