Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
51403ec
Silence pgrep in font-set's terminal checks (#15820)
omarchybot Oct 29, 2026
7388fe2
Answer the webcam menu guard from udev instead of opening cameras (#1…
omarchybot Oct 29, 2026
9389dce
Keep the keyboard backlight level when the lock blanks again before a…
omarchybot Oct 29, 2026
9ac9d13
Keep bar icons level, centered, and at full size (#17003)
dhh Oct 29, 2026
63dc6db
Fix slider knob stopping short of the track end (#9345)
erikrjohansson Oct 29, 2026
ddb626b
fix: collapse dropdown toggle on second click (#6725)
felixzsh Oct 29, 2026
fe1233d
Measure hidden Buttons at their full width again (#15786)
dmkenney Oct 29, 2026
08bdc5f
Include popup padding in dropdown height (#13916)
sprajs Oct 29, 2026
535f0d5
Keep one pending-migrations reminder instead of one per login (#16981)
emirb Oct 29, 2026
322dbc7
Seed the Quake console from workspace.created instead of on_created_e…
dhh Oct 30, 2026
a0c895d
Install and remove Dropbox's libappindicator under its current name (…
omarchybot Oct 31, 2026
04476a1
Ignore vendor hotkey keyboard devices (#9129)
yashranaway Oct 31, 2026
0a01d1d
Float Inkscape's file choosers (#15792)
omarchybot Oct 31, 2026
5837e1b
Hide Hibernate when the kernel will not accept the request (#7779)
omarchybot Oct 31, 2026
a7d4c4e
Announce no saved recording when stop knows of none (#15073)
omarchybot Oct 31, 2026
aabaf21
Stop reloading a local plugin on its own Python bytecode writes (#15093)
omarchybot Oct 31, 2026
25d33c3
Keep bar tooltips hidden until their surface has the output's scale (…
omarchybot Oct 31, 2026
893c95b
Don't call a battery draining on AC at 100% fully charged (#16278)
omarchybot Oct 31, 2026
2646b60
Focus multi-word senders' windows from a notification click (#16380)
omarchybot Oct 31, 2026
5ee3eda
Notice images overwritten in place in the image picker cache (#15079)
omarchybot Oct 31, 2026
b344c0f
Reset night light to the identity matrix when turning it off (#14489)
omarchybot Oct 31, 2026
e134d02
Read CPU usage from top in the C locale (#15109)
omarchybot Oct 31, 2026
9efd95f
Remember a DDC display whose brightness cannot be read (#14525)
omarchybot Oct 31, 2026
6b3feb4
Stop the Dropbox status poll from voiding the pending login link (#15…
omarchybot Oct 31, 2026
2f8dc90
Open a new terminal in HOME when the focused window is not a terminal…
omarchybot Oct 31, 2026
826c1bb
Center a popped-out window again when it moves to another monitor (#1…
omarchybot Oct 31, 2026
623b094
Keep the media widget on a paused track when an idle player holds a s…
omarchybot Oct 31, 2026
d9f23fa
Let the Bitwarden extension popout keep the size it asks for (#14514)
omarchybot Oct 31, 2026
c5dd3e8
Keep the screenshot picker from unbinding the user's own keys (#15126)
omarchybot Oct 31, 2026
b16876e
Stop Dropbox relative time showing "0y ago" for 360-364 days (#14183)
manuaudio Oct 31, 2026
575f91f
Refuse --reauth without an account instead of adding one (#14100)
manuaudio Oct 31, 2026
396d95a
Preserve terminal font size when changing font family (#6958)
sbalbalosa Oct 31, 2026
95ab979
Leave a dangling shared symlink alone when setting up an agent accoun…
manuaudio Oct 31, 2026
3c176a0
Paint dark symbolic tray icons in the bar foreground (#14661)
omarchybot Oct 31, 2026
8ddd93d
Cycle backwards through every window with Alt + Shift + Tab (#8576)
omarchybot Oct 31, 2026
cb57d22
Keep a legacy Windows VM password with $$ working after the Quattro m…
omarchybot Oct 31, 2026
f8c5ee0
Use the latin1 console keymaps for German and French in the setup for…
omarchybot Oct 31, 2026
bd09fea
Count Codex sessions compressed to .jsonl.zst in the Agents panel (#1…
omarchybot Oct 31, 2026
0b15a4d
Restore the gvfs FUSE gateway after resume (#14496)
omarchybot Oct 31, 2026
209a60d
Keep UPower's battery rate when sysfs has no live reading (#17265)
dhh Nov 1, 2026
0a4f8c2
Keep GB10 CPU cores out of deep idle states (#17264)
dhh Nov 1, 2026
00e4a12
Keep the lock usable after an NVIDIA suspend's VT switch (#17277)
dhh Nov 1, 2026
f1ebf60
Release a stuck trackpad button from Update > Hardware > Trackpad (#1…
dhh Nov 1, 2026
e67532f
Reset only the touchpad in omarchy-restart-trackpad (#17284)
dhh Nov 1, 2026
8bb77e4
Apply the dropdown test's border cases to the real palette
dhh Nov 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/omarchy-agent-account-add
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ while [[ ${1:-} == --* ]]; do
--events) events=true ;;
--reauth)
reauth="${2:-}"
if [[ -z $reauth || $reauth == --* ]]; then
echo "Usage: omarchy-agent-account-add --reauth <account> [claude|codex|grok]" >&2
exit 1
fi
shift
;;
*) break ;;
Expand Down
19 changes: 16 additions & 3 deletions bin/omarchy-agent-account-state
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,16 @@ def link_shared(provider: str, home: Path) -> None:
home.mkdir(parents=True, exist_ok=True)
os.chmod(home, 0o700)
for name in spec["shared_dirs"]:
(primary / name).mkdir(parents=True, exist_ok=True)
shared = primary / name
# A dangling symlink is the person's own setup, such as a dotfiles link
# whose target hasn't synced yet, so leave it for its target to appear.
# mkdir would fail on it. A link to a file or a loop still fails here.
if shared.is_symlink() and not shared.exists():
try:
shared.resolve(strict=True)
except FileNotFoundError:
continue
shared.mkdir(parents=True, exist_ok=True)
for name in spec["shared_dirs"] + spec["shared_files"]:
target = home / name
if target.exists() or target.is_symlink():
Expand Down Expand Up @@ -350,8 +359,12 @@ def begin(provider: str, label: str = "", owner: int = 0) -> Path:
pending.mkdir(parents=True, exist_ok=True)
os.chmod(pending.parent, 0o700)
home = Path(tempfile.mkdtemp(prefix="login-", dir=str(pending)))
link_shared(provider, home)
write_receipt(home, {"label": label, "owner": owner, "started": process_start(owner) if owner else ""})
try:
link_shared(provider, home)
write_receipt(home, {"label": label, "owner": owner, "started": process_start(owner) if owner else ""})
except Exception:
shutil.rmtree(home, ignore_errors=True)
raise
return home


Expand Down
29 changes: 20 additions & 9 deletions bin/omarchy-battery-status
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,23 @@ power_rate_raw=$(awk '/energy-rate/ { print $2; exit }' <<<"$battery_info")
native_path=$(awk '/native-path/ { print $2; exit }' <<<"$battery_info")
battery_path="$power_supply_path/$native_path"

# A sysfs reading as a number, or nothing. Firmware that doesn't know the
# present rate leaves current_now in place but fails every read of it (ENODEV),
# so a readable file is no promise of a value.
read_sysfs_number() {
local value
{ value=$(<"$1"); } 2>/dev/null || return 1
[[ $value =~ ^-?[0-9]+$ ]] || return 1
echo "$value"
}

# UPower's energy-rate can lag the kernel telemetry by tens of seconds. Use
# the instantaneous sysfs reading when available so the open panel stays live.
if [[ -r $battery_path/power_now ]]; then
power_rate_raw=$(awk -v microwatts="$(<"$battery_path/power_now")" 'BEGIN { print microwatts / 1000000 }')
elif [[ -r $battery_path/current_now && -r $battery_path/voltage_now ]]; then
power_rate_raw=$(awk \
-v microamps="$(<"$battery_path/current_now")" \
-v microvolts="$(<"$battery_path/voltage_now")" \
'BEGIN { print microamps * microvolts / 1000000000000 }')
# the instantaneous sysfs reading when there is one so the open panel stays
# live; without one, UPower's rate, worked out from the falling charge, stands.
if microwatts=$(read_sysfs_number "$battery_path/power_now"); then
power_rate_raw=$(awk -v microwatts="$microwatts" 'BEGIN { print microwatts / 1000000 }')
elif microamps=$(read_sysfs_number "$battery_path/current_now") && microvolts=$(read_sysfs_number "$battery_path/voltage_now"); then
power_rate_raw=$(awk -v microamps="$microamps" -v microvolts="$microvolts" 'BEGIN { print microamps * microvolts / 1000000000000 }')
fi

# Some kernels sign power_now by direction (negative while discharging on
Expand Down Expand Up @@ -172,7 +180,10 @@ battery_full=false
if [[ $state == "fully-charged" ]]; then
battery_full=true
elif [[ $ac_online == "true" ]] && (( percentage >= 100 )); then
battery_full=true
# A load bigger than the adapter drains a battery that still reads 100%.
if [[ $state != "discharging" || $charge_idle == "true" ]]; then
battery_full=true
fi
fi

parts=("$(omarchy-i18n battery.statusLabel "$percentage")")
Expand Down
13 changes: 12 additions & 1 deletion bin/omarchy-brightness-display-ddc
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,23 @@ read_vcp() {

read_brightness() {
local bus=""
local cached_bus=""
local cached_maximum=""
local now=0
local values=""

if [[ -r $cache_file ]]; then
read -r cached_bus cached_maximum _ <"$cache_file" || true
fi

bus="$(find_bus)" || return 1
values="$(read_vcp "$bus")" || {
rm -f "$cache_file"
# Only a successful read caches the maximum. A bus that answered before is detected again next call; any other is left alone for a while.
if [[ $cached_bus =~ ^[0-9]+$ && $cached_maximum =~ ^[0-9]+$ ]]; then
rm -f "$cache_file"
else
cache_unavailable
fi
return 1
}

Expand Down
26 changes: 24 additions & 2 deletions bin/omarchy-brightness-keyboard
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,33 @@ if [[ -z $device ]]; then
exit 1
fi

# The level from before the first "off" since the last "restore", so the lock
# blanking again after a resume cannot save its own 0 over it.
saved="${XDG_RUNTIME_DIR:-/tmp}/omarchy-brightness-keyboard-$device"

if [[ $direction == "off" || $direction == "restore" ]]; then
# The lock runs blank and wake as separate processes that can overlap.
exec {lock_fd}>"$saved.lock" || exit 1
flock "$lock_fd" || exit 1
fi

if [[ $direction == "off" ]]; then
brightnessctl -sd "$device" set 0 >/dev/null
if [[ ! -s $saved ]]; then
level="$(brightnessctl -d "$device" get)"
if [[ $level =~ ^[0-9]+$ ]] && ! echo "$level" >"$saved"; then
rm -f "$saved"
fi
fi
# Never blank a level there is no record of to restore.
[[ -s $saved ]] && brightnessctl -d "$device" set 0 >/dev/null
exit 0
elif [[ $direction == "restore" ]]; then
brightnessctl -rd "$device" >/dev/null
if [[ -f $saved ]]; then
level="$(<"$saved")"
if [[ ! $level =~ ^[0-9]+$ ]] || brightnessctl -d "$device" set "$level" >/dev/null; then
rm -f "$saved"
fi
fi
exit 0
fi

Expand Down
3 changes: 3 additions & 0 deletions bin/omarchy-capture-screenrecording
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ stop_screenrecording() {
if omarchy-capture-screenrecording-process "${RECORDER[@]}"; then
omarchy-capture-screenrecording-process "${RECORDER[@]}" --signal KILL
omarchy-notification-send -u critical -t 5000 "$(omarchy-i18n capture.recordingError)" "$(omarchy-i18n capture.recordingKilled)"
elif [[ ! -f $(cat "$RECORDING_FILE" 2>/dev/null) ]]; then
# No recording to finalize or show, as when stopping a recorder this script did not start.
:
else
local filename=$(cat "$RECORDING_FILE" 2>/dev/null)
local preview="$RUNTIME_DIR/omarchy-screenrecord-preview-$$.png"
Expand Down
13 changes: 9 additions & 4 deletions bin/omarchy-cmd-terminal-cwd
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ else
done
done

if [[ -n $shell_pid ]]; then
cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)
shell=$(readlink -f "/proc/$shell_pid/exe" 2>/dev/null)
grep -Fqsx "$shell" /etc/shells || cwd=""
# A terminal's shell leads its own session on the terminal's pty. A shell any other app
# spawned, like a browser's download helper, does not, so that app gets a terminal in HOME.
if [[ -n $shell_pid ]] && read -r stat 2>/dev/null <"/proc/$shell_pid/stat"; then
read -r _ _ _ session tty_nr _ <<<"${stat##*) }"
if (( session == shell_pid && tty_nr != 0 )); then
cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)
shell=$(readlink -f "/proc/$shell_pid/exe" 2>/dev/null)
grep -Fqsx "$shell" /etc/shells || cwd=""
fi
fi
fi

Expand Down
11 changes: 8 additions & 3 deletions bin/omarchy-font-set
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ if [[ -f ~/.config/ghostty/config ]]; then
fi

if [[ -f ~/.config/foot/foot.ini ]]; then
sed -i "s/^font=.*/font=$font_name:size=9/g" ~/.config/foot/foot.ini
# Preserve the primary font's size, not a fallback's; Omarchy ships 9 when none is present.
foot_size="$(sed -n 's/^font=[^,]*:size=\([0-9.]\+\).*/\1/p' ~/.config/foot/foot.ini | head -1)"
if [[ -z $foot_size ]]; then
foot_size=9
fi
sed -i "s/^font=.*/font=$font_name:size=$foot_size/g" ~/.config/foot/foot.ini
fi

# fontconfig is the canonical source of truth — the omarchy shell, Qt apps,
Expand All @@ -73,11 +78,11 @@ XML

omarchy-restart-shell

if pgrep -x ghostty; then
if pgrep -x ghostty >/dev/null; then
omarchy-notification-send -g  "$(omarchy-i18n font.restartToSeeChange Ghostty)"
fi

if pgrep -x foot; then
if pgrep -x foot >/dev/null; then
omarchy-notification-send -g  "$(omarchy-i18n font.restartToSeeChange Foot)"
fi

Expand Down
26 changes: 22 additions & 4 deletions bin/omarchy-hibernation-available
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,35 @@

# omarchy:summary=Check if hibernation is supported

if [[ ! -f /sys/power/image_size ]]; then
SYS_POWER_PATH="${OMARCHY_SYS_POWER_PATH:-/sys/power}"
SWAPS_PATH="${OMARCHY_SWAPS_PATH:-/proc/swaps}"
RESUME_CONF_PATH="${OMARCHY_RESUME_CONF_PATH:-/etc/mkinitcpio.conf.d/omarchy_resume.conf}"

if [[ ! -r $SYS_POWER_PATH/state || ! -r $SYS_POWER_PATH/image_size ]]; then
exit 1
fi

# The kernel drops "disk" from the sleep states whenever it will refuse the
# request outright: lockdown, nohibernate, secretmem or an active CXL device.
SLEEP_STATES=" $(<"$SYS_POWER_PATH/state") "

if [[ $SLEEP_STATES != *" disk "* ]]; then
exit 1
fi

# Sum all swap sizes (excluding zram)
SWAPSIZE_KB=$(awk '!/Filename|zram/ {sum += $3} END {print sum+0}' /proc/swaps)
SWAPSIZE_KB=$(awk '!/Filename|zram/ {sum += $3} END {print sum+0}' "$SWAPS_PATH")
SWAPSIZE=$(( 1024 * ${SWAPSIZE_KB:-0} ))

HIBERNATION_IMAGE_SIZE=$(cat /sys/power/image_size)
HIBERNATION_IMAGE_SIZE=$(<"$SYS_POWER_PATH/image_size")

# A size that did not read is worth zero to the comparison below, and any swap
# at all beats zero.
if [[ ! $HIBERNATION_IMAGE_SIZE =~ ^[0-9]+$ ]]; then
exit 1
fi

if (( SWAPSIZE > HIBERNATION_IMAGE_SIZE )) && [[ -f /etc/mkinitcpio.conf.d/omarchy_resume.conf ]]; then
if (( SWAPSIZE > HIBERNATION_IMAGE_SIZE )) && [[ -f $RESUME_CONF_PATH ]]; then
exit 0
else
exit 1
Expand Down
38 changes: 38 additions & 0 deletions bin/omarchy-hw-webcam
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,42 @@

# omarchy:summary=Check whether a webcam is available

# The menu asks this on every open. Read the capture capability udev already
# recorded for each video node rather than opening the nodes with v4l2-ctl, which
# powers up every camera on the bus just to answer a menu guard. Without a recorded
# capture node (no udev database, as in a container) it falls back to asking them.
v4l_class_path="${OMARCHY_V4L_CLASS_PATH:-/sys/class/video4linux}"
udev_data_path="${OMARCHY_UDEV_DATA_PATH:-/run/udev/data}"
dev_path="${OMARCHY_DEV_PATH:-/dev}"

shopt -s nullglob
nodes=("$v4l_class_path"/video*)
shopt -u nullglob

((${#nodes[@]})) || exit 1

udev_capabilities() {
local line

while IFS= read -r line; do
if [[ $line == E:ID_V4L_CAPABILITIES=* ]]; then
printf '%s\n' "${line#E:ID_V4L_CAPABILITIES=}"
return
fi
done <"$1"
}

# udev records a node once, so a virtual camera (v4l2loopback, with no parent device),
# whose capabilities follow its producer, is left to the live query below.
for node in "${nodes[@]}"; do
[[ -e $node/device && -r $node/dev ]] || continue
# The picker lists only nodes it can open read-write, so a camera this user
# cannot open is no answer.
device="$dev_path/${node##*/}"
[[ -r $device && -w $device ]] || continue
data="$udev_data_path/c$(<"$node/dev")"
[[ -r $data && $(udev_capabilities "$data") == *:capture:* ]] && exit 0
done

# No capture node recorded: ask the devices.
[[ -n $(omarchy-capture-webcam-list) ]]
2 changes: 1 addition & 1 deletion bin/omarchy-install-service-dropbox
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# omarchy:requires-sudo=true

echo "Installing all dependencies..."
omarchy-pkg-add dropbox dropbox-cli libappindicator-gtk3 python-gpgme nautilus-dropbox
omarchy-pkg-add dropbox dropbox-cli libappindicator python-gpgme nautilus-dropbox

echo "Adding Dropbox to the bar..."
omarchy-plugin-enable omarchy.dropbox
Expand Down
10 changes: 6 additions & 4 deletions bin/omarchy-menu-images
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,15 @@ rows_cache_file="$cache_dir/$cache_key.rows"
rows_signature_file="$cache_dir/$cache_key.signature"
rows_fast_signature_file="$cache_dir/$cache_key.fast-signature"
rows_signature="v4"$'\n'
rows_fast_signature="v3"$'\n'
rows_fast_signature="v4"$'\n'
rows_cacheable=true
rows_cache_hit=false
image_files=()

# Each file's size and mtime, not just the directory's: overwriting an image in
# place leaves the directory untouched. One find per directory keeps it cheap.
for dir in "${image_dirs[@]}"; do
[[ -d $dir ]] && rows_fast_signature+="$dir:$(stat -Lc '%Y' "$dir")"$'\n'
[[ -d $dir ]] && rows_fast_signature+="$dir"$'\n'"$(find -L "$dir" -maxdepth 1 -type f -printf '%f:%s:%T@\n' 2>/dev/null)"$'\n'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Image previews stay stale

The overwrite fix still misses an image replaced with another of the same size within one second. The new fast signature sees fractional modification times, but rows_signature and thumbnail_for() still use %s:%Y, which keeps only whole seconds. The picker reuses the old rows and thumbnail, then saves the new fast signature, so reopening it does not refresh the preview.

Use the same timestamp precision throughout the cache keys and cover a same-size overwrite.

done

if [[ -f $rows_cache_file && -f $rows_fast_signature_file ]] && cmp -s "$rows_fast_signature_file" <(printf '%s' "$rows_fast_signature"); then
Expand Down Expand Up @@ -313,8 +315,8 @@ elif [[ $rows_cache_hit != true ]]; then
for image in "${image_files[@]}"; do
thumbnail=$(thumbnail_for "$image")
[[ -n $thumbnail ]] || continue
# Cached rows are trusted on the directory's mtime alone, which a file
# repaired in place never changes. Leave them uncached instead.
# A failed video has no row. Leave the rows uncached so every open checks
# it again; a repaired file gets a new thumbnail key and is retried.
if [[ $thumbnail == *.failed ]]; then
rows_cacheable=false
continue
Expand Down
5 changes: 4 additions & 1 deletion bin/omarchy-migrate-notify
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ fi

# The shell keeps the click command with the toast, so this oneshot can hand the
# invitation over and exit instead of staying activated until it is answered.
omarchy-notification-send -u critical -g  "$(omarchy-i18n migrate.pending)" "$message" \
# Transient, because this runs at every login while migrations are pending:
# restoring the last login's reminder next to the new one would stack a copy
# per login.
omarchy-notification-send -u critical --transient -g  "$(omarchy-i18n migrate.pending)" "$message" \
--exec omarchy-launch-floating-terminal-with-presentation omarchy-migrate && exit 0

# Reached when the notification could not be handed off, so fall back to telling
Expand Down
Loading
Loading