From bdd8de05018e507f3f8fc002ef71c70127533fed Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 May 2026 09:40:36 +0200 Subject: [PATCH 1/6] Fix perms --- migrations/1777018591.sh | 0 test/omarchy-cli-test.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 migrations/1777018591.sh mode change 100755 => 100644 test/omarchy-cli-test.sh diff --git a/migrations/1777018591.sh b/migrations/1777018591.sh old mode 100755 new mode 100644 diff --git a/test/omarchy-cli-test.sh b/test/omarchy-cli-test.sh old mode 100755 new mode 100644 From 241145f85bf16d05f9c2a58079e30cd85d1bc56d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 May 2026 10:24:31 +0200 Subject: [PATCH 2/6] Simplify the audio input muting --- bin/omarchy-audio-input-mute | 22 ++++++++++---- bin/omarchy-audio-input-mute-thinkpad | 21 -------------- bin/omarchy-audio-input-mute-xps | 42 --------------------------- bin/omarchy-brightness-keyboard-mute | 14 +++++++++ 4 files changed, 30 insertions(+), 69 deletions(-) delete mode 100755 bin/omarchy-audio-input-mute-thinkpad delete mode 100755 bin/omarchy-audio-input-mute-xps create mode 100755 bin/omarchy-brightness-keyboard-mute diff --git a/bin/omarchy-audio-input-mute b/bin/omarchy-audio-input-mute index c0ab990c..19e12f23 100755 --- a/bin/omarchy-audio-input-mute +++ b/bin/omarchy-audio-input-mute @@ -1,11 +1,21 @@ #!/bin/bash -# omarchy:summary=Toggle microphone mute. Dell XPS and ThinkPad systems get special handling for the hardware LED. +# omarchy:summary=Toggle microphone mute. Drives the hardware mic-mute LED on laptops that expose one. -if omarchy-hw-match "XPS"; then - omarchy-audio-input-mute-xps -elif omarchy-hw-match "ThinkPad"; then - omarchy-audio-input-mute-thinkpad +wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null + +if pactl get-source-mute @DEFAULT_SOURCE@ | rg -q 'yes'; then + led=on + osd_message='Microphone muted' + osd_icon='microphone-sensitivity-muted-symbolic' else - omarchy-swayosd-client --input-volume mute-toggle + led=off + osd_message='Microphone on' + osd_icon='audio-input-microphone-symbolic' fi + +omarchy-brightness-keyboard-mute "$led" + +omarchy-swayosd-client \ + --custom-message "$osd_message" \ + --custom-icon "$osd_icon" diff --git a/bin/omarchy-audio-input-mute-thinkpad b/bin/omarchy-audio-input-mute-thinkpad deleted file mode 100755 index d06c4cf6..00000000 --- a/bin/omarchy-audio-input-mute-thinkpad +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Toggle microphone mute on ThinkPad systems. Uses wpctl for reliable toggling - -wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null - -if pactl get-source-mute @DEFAULT_SOURCE@ | grep -q 'yes'; then - osd_message='Microphone muted' - osd_icon='microphone-sensitivity-muted-symbolic' - led_value=1 -else - osd_message='Microphone on' - osd_icon='audio-input-microphone-symbolic' - led_value=0 -fi - -brightnessctl --device="platform::micmute" set "$led_value" >/dev/null 2>&1 || true - -omarchy-swayosd-client \ - --custom-message "$osd_message" \ - --custom-icon "$osd_icon" diff --git a/bin/omarchy-audio-input-mute-xps b/bin/omarchy-audio-input-mute-xps deleted file mode 100755 index 85d1cbb5..00000000 --- a/bin/omarchy-audio-input-mute-xps +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Toggle microphone mute on Dell XPS systems. Uses wpctl for reliable toggling - -wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null - -if pactl get-source-mute @DEFAULT_SOURCE@ | rg -q 'yes'; then - alsa_value='off,off' - osd_message='Microphone muted' - osd_icon='microphone-sensitivity-muted-symbolic' -else - alsa_value='on,on' - osd_message='Microphone on' - osd_icon='audio-input-microphone-symbolic' -fi - -if [[ -e /sys/class/leds/platform::micmute/brightness ]]; then - default_source=$(pactl get-default-source) - alsa_card=$(pactl -f json list sources | jq -r --arg source "$default_source" ' - .[] | select(.name == $source) | - .properties["alsa.card"] // .properties["api.alsa.card"] // .properties["api.alsa.pcm.card"] // empty - ' | head -1) - - if [[ -n $alsa_card ]]; then - cards=("$alsa_card") - else - mapfile -t cards < <(compgen -G '/proc/asound/card*' | rg -o 'card[0-9]+' | sed 's/card//' | sort -u) - fi - - for card in "${cards[@]}"; do - while IFS= read -r control; do - if [[ $control != *"Jack Microphone"* ]]; then - amixer -c "$card" cset "$control" "$alsa_value" >/dev/null 2>&1 || true - break 2 - fi - done < <(amixer -c "$card" controls 2>/dev/null | rg -o "name='[^']*Microphone Capture Switch'") - done -fi - -omarchy-swayosd-client \ - --custom-message "$osd_message" \ - --custom-icon "$osd_icon" diff --git a/bin/omarchy-brightness-keyboard-mute b/bin/omarchy-brightness-keyboard-mute new file mode 100755 index 00000000..65f73264 --- /dev/null +++ b/bin/omarchy-brightness-keyboard-mute @@ -0,0 +1,14 @@ +#!/bin/bash + +# omarchy:summary=Set the mic-mute indicator LED on laptops that expose a platform::micmute LED node. +# omarchy:args= + +if [[ -e /sys/class/leds/platform::micmute/brightness ]]; then + case "$1" in + on) value=1 ;; + off) value=0 ;; + *) echo "Usage: $(basename "$0") " >&2; exit 1 ;; + esac + + brightnessctl --device="platform::micmute" set "$value" >/dev/null 2>&1 || true +fi From 3d527643108d1a37edce265de7a3cdf2281093bd Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 May 2026 11:02:44 +0200 Subject: [PATCH 3/6] Prevent lid closing from giving a false positive notification Closes #5532, #5544 --- default/hypr/bindings/utilities.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default/hypr/bindings/utilities.conf b/default/hypr/bindings/utilities.conf index 09e2e4dd..97d9bcbd 100644 --- a/default/hypr/bindings/utilities.conf +++ b/default/hypr/bindings/utilities.conf @@ -31,7 +31,7 @@ bindd = SUPER CTRL, I, Toggle locking on idle, exec, omarchy-toggle-idle bindd = SUPER CTRL, N, Toggle nightlight, exec, omarchy-toggle-nightlight bindd = SUPER CTRL, Delete, Toggle laptop display, exec, omarchy-hyprland-monitor-internal toggle bindd = SUPER CTRL ALT, Delete, Toggle laptop display mirroring, exec, omarchy-hyprland-monitor-internal-mirror toggle -bindl = , switch:on:Lid Switch, exec, omarchy-hyprland-monitor-internal off +bindl = , switch:on:Lid Switch, exec, omarchy-hw-external-monitors && omarchy-hyprland-monitor-internal off bindl = , switch:off:Lid Switch, exec, omarchy-hyprland-monitor-internal on # Control Apple Display brightness From ddb8081eaae1570960fc63458428d036b366cdb8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 May 2026 11:20:22 +0200 Subject: [PATCH 4/6] Integrate Apple display brightness controls with the normal hotkeys And add Shift + Brightness to go min/max --- bin/omarchy-brightness-display | 5 ++++ bin/omarchy-brightness-display-apple | 27 ++++++++++++++++++---- bin/omarchy-hyprland-monitor-focused-apple | 5 ++++ default/hypr/bindings/media.conf | 2 ++ default/hypr/bindings/utilities.conf | 5 ---- 5 files changed, 35 insertions(+), 9 deletions(-) create mode 100755 bin/omarchy-hyprland-monitor-focused-apple diff --git a/bin/omarchy-brightness-display b/bin/omarchy-brightness-display index 7c421737..558a47de 100755 --- a/bin/omarchy-brightness-display +++ b/bin/omarchy-brightness-display @@ -5,6 +5,11 @@ step="${1:-+5%}" +if omarchy-hyprland-monitor-focused-apple; then + omarchy-brightness-display-apple "$step" + exit +fi + # Start with the first possible output, then refine to the most likely given an order heuristic. device="$(ls -1 /sys/class/backlight 2>/dev/null | head -n1)" for candidate in amdgpu_bl* intel_backlight acpi_video*; do diff --git a/bin/omarchy-brightness-display-apple b/bin/omarchy-brightness-display-apple index 71b297ea..28c9e2ea 100755 --- a/bin/omarchy-brightness-display-apple +++ b/bin/omarchy-brightness-display-apple @@ -1,13 +1,32 @@ #!/bin/bash # 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)" + echo "Adjust Apple Display brightness by passing +5%, 5%-, or 100%" else - device="$(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1)" - sudo asdcontrol "$device" -- "$1" >/dev/null + step="$1" + if [[ $step =~ ^([0-9]+)%-$ ]]; then + step="-${BASH_REMATCH[1]}%" + fi + + devices=() + for path in /dev/usb/hiddev* /dev/hiddev*; do + [[ -e $path ]] && devices+=("$path") + done + + if (( ${#devices[@]} == 0 )); then + echo "No Apple Display HID device found" + exit 1 + fi + + device="$(sudo asdcontrol --detect "${devices[@]}" | grep -E '^/dev/(usb/)?hiddev' | cut -d: -f1 | head -n1)" + if [[ -z $device ]]; then + echo "No Apple Display HID device found" + exit 1 + fi + + sudo asdcontrol "$device" -- "$step" >/dev/null value="$(sudo asdcontrol "$device" | awk -F= '/BRIGHTNESS=/{print $2+0}')" omarchy-swayosd-brightness "$(( value * 100 / 60000 ))" fi diff --git a/bin/omarchy-hyprland-monitor-focused-apple b/bin/omarchy-hyprland-monitor-focused-apple new file mode 100755 index 00000000..1593c828 --- /dev/null +++ b/bin/omarchy-hyprland-monitor-focused-apple @@ -0,0 +1,5 @@ +#!/bin/bash + +# omarchy:summary=Return success if the focused Hyprland monitor is an Apple display. + +hyprctl monitors -j | jq -e '.[] | select(.focused == true) | select(.make == "Apple Computer Inc" and (.model | test("StudioDisplay|ProDisplayXDR")))' >/dev/null diff --git a/default/hypr/bindings/media.conf b/default/hypr/bindings/media.conf index af1496de..d18f5aa5 100644 --- a/default/hypr/bindings/media.conf +++ b/default/hypr/bindings/media.conf @@ -5,6 +5,8 @@ bindeld = ,XF86AudioMute, Mute, exec, omarchy-swayosd-client --output-volume mut bindeld = ,XF86AudioMicMute, Mute microphone, exec, omarchy-audio-input-mute bindeld = ,XF86MonBrightnessUp, Brightness up, exec, omarchy-brightness-display +5% bindeld = ,XF86MonBrightnessDown, Brightness down, exec, omarchy-brightness-display 5%- +bindeld = SHIFT, XF86MonBrightnessUp, Brightness maximum, exec, omarchy-brightness-display 100% +bindeld = SHIFT, XF86MonBrightnessDown, Brightness minimum, exec, omarchy-brightness-display 1% bindeld = ,XF86KbdBrightnessUp, Keyboard brightness up, exec, omarchy-brightness-keyboard up bindeld = ,XF86KbdBrightnessDown, Keyboard brightness down, exec, omarchy-brightness-keyboard down bindld = ,XF86KbdLightOnOff, Keyboard backlight cycle, exec, omarchy-brightness-keyboard cycle diff --git a/default/hypr/bindings/utilities.conf b/default/hypr/bindings/utilities.conf index 97d9bcbd..bc912f0e 100644 --- a/default/hypr/bindings/utilities.conf +++ b/default/hypr/bindings/utilities.conf @@ -34,11 +34,6 @@ bindd = SUPER CTRL ALT, Delete, Toggle laptop display mirroring, exec, omarchy-h bindl = , switch:on:Lid Switch, exec, omarchy-hw-external-monitors && omarchy-hyprland-monitor-internal off bindl = , switch:off:Lid Switch, exec, omarchy-hyprland-monitor-internal on -# Control Apple Display brightness -bindd = CTRL, F1, Apple Display brightness down, exec, omarchy-brightness-display-apple -5000 -bindd = CTRL, F2, Apple Display brightness up, exec, omarchy-brightness-display-apple +5000 -bindd = SHIFT CTRL, F2, Apple Display full brightness, exec, omarchy-brightness-display-apple +60000 - # Captures bindd = , PRINT, Screenshot, exec, omarchy-capture-screenshot bindd = ALT, PRINT, Screenrecording, exec, omarchy-menu screenrecord From d80c98f02546bb78638c57db55eaf7e19a69f13c Mon Sep 17 00:00:00 2001 From: Luke Hsiao Date: Sat, 2 May 2026 03:36:06 -0600 Subject: [PATCH 5/6] Make color0 distinct from background/foreground and fix helix theme (#5538) * Make color0 distinct from background/foreground The majority of themes have color0 available as a subtle offset from the background. For flexoki-light, because color0 matched foreground, it wasn't subtle, and would cause invisible text when used as a background color (e.g., in text editor rulers). For vantablack, ethereal, hackerman, and white, color0 matched background and would cause invisible text when a theme wanted text to be de-emphasized. This patch makes it consistently a subtle offset from background. * Make helix selection theme colors more subtle Helix is more usable if the selection background is subtle. This is primarily because of [[1]], which makes a bright selection like we had before often make the foreground text unreadable in the picker preview. [1]: https://github.com/helix-editor/helix/issues/12405 --- default/themed/helix.toml.tpl | 7 +++---- themes/ethereal/colors.toml | 2 +- themes/flexoki-light/colors.toml | 2 +- themes/hackerman/colors.toml | 2 +- themes/vantablack/colors.toml | 2 +- themes/white/colors.toml | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/default/themed/helix.toml.tpl b/default/themed/helix.toml.tpl index 4cb2f91c..90ba441c 100644 --- a/default/themed/helix.toml.tpl +++ b/default/themed/helix.toml.tpl @@ -76,7 +76,7 @@ "ui.bufferline.active" = { fg = "foreground", bg = "background", underline = { color = "color5", style = "line" } } "ui.text" = "foreground" -"ui.text.focus" = { fg = "foreground", modifiers = ["bold"] } +"ui.text.focus" = { fg = "foreground", bg = "color0", modifiers = ["bold"] } "ui.text.inactive" = { fg = "color8" } "ui.text.directory" = { fg = "color4" } @@ -87,8 +87,7 @@ "ui.virtual.jump-label" = { fg = "color1", modifiers = ["bold"] } "ui.virtual.whitespace" = "color8" -"ui.selection" = { fg = "selection_foreground", bg = "selection_background" } -"ui.selection.primary" = { fg = "selection_foreground", bg = "selection_background" } +"ui.selection" = { bg = "color0" } "ui.cursor" = { fg = "background", bg = "cursor" } "ui.cursor.primary" = { fg = "background", bg = "cursor" } @@ -99,7 +98,7 @@ "ui.cursorline.primary" = { bg = "color0" } -"ui.highlight" = { fg = "selection_foreground", bg = "selection_background", modifiers = ["bold"] } +"ui.highlight" = { bg = "color0", modifiers = ["bold"] } "ui.menu" = { fg = "foreground", bg = "background" } "ui.menu.selected" = { fg = "background", bg = "foreground", modifiers = ["bold"] } diff --git a/themes/ethereal/colors.toml b/themes/ethereal/colors.toml index 75cedec8..dbce1ae4 100644 --- a/themes/ethereal/colors.toml +++ b/themes/ethereal/colors.toml @@ -5,7 +5,7 @@ background = "#060B1E" selection_foreground = "#060B1E" selection_background = "#ffcead" -color0 = "#060B1E" +color0 = "#3C486D" color1 = "#ED5B5A" color2 = "#92a593" color3 = "#E9BB4F" diff --git a/themes/flexoki-light/colors.toml b/themes/flexoki-light/colors.toml index 033c4d3a..1e3b8860 100644 --- a/themes/flexoki-light/colors.toml +++ b/themes/flexoki-light/colors.toml @@ -5,7 +5,7 @@ background = "#FFFCF0" selection_foreground = "#100F0F" selection_background = "#CECDC3" -color0 = "#100F0F" +color0 = "#DAD8CE" color1 = "#D14D41" color2 = "#879A39" color3 = "#D0A215" diff --git a/themes/hackerman/colors.toml b/themes/hackerman/colors.toml index 56aec2a9..517ff366 100644 --- a/themes/hackerman/colors.toml +++ b/themes/hackerman/colors.toml @@ -5,7 +5,7 @@ background = "#0B0C16" selection_foreground = "#0B0C16" selection_background = "#ddf7ff" -color0 = "#0B0C16" +color0 = "#3E4058" color1 = "#50f872" color2 = "#4fe88f" color3 = "#50f7d4" diff --git a/themes/vantablack/colors.toml b/themes/vantablack/colors.toml index e3b2267d..06addcc1 100644 --- a/themes/vantablack/colors.toml +++ b/themes/vantablack/colors.toml @@ -11,7 +11,7 @@ selection_foreground = "#000000" selection_background = "#ffffff" # Normal colors (ANSI 0-7) -color0 = "#000000" +color0 = "#404040" color1 = "#a4a4a4" color2 = "#b6b6b6" color3 = "#cecece" diff --git a/themes/white/colors.toml b/themes/white/colors.toml index de6cce97..e6e072ea 100644 --- a/themes/white/colors.toml +++ b/themes/white/colors.toml @@ -11,7 +11,7 @@ selection_foreground = "#ffffff" selection_background = "#1a1a1a" # Normal colors (ANSI 0-7) -color0 = "#ffffff" +color0 = "#c0c0c0" color1 = "#2a2a2a" color2 = "#3a3a3a" color3 = "#4a4a4a" From 62f69808525bc621cecde566509fe841edb5282c Mon Sep 17 00:00:00 2001 From: Mikko Nyman Date: Sat, 2 May 2026 12:47:02 +0300 Subject: [PATCH 6/6] Fix power profile auto-switching on USB-C only machines (#5444) * Fix power profile auto-switching on USB-C only machines * Small nits * Stick with single unit name --------- Co-authored-by: David Heinemeier Hansson --- bin/omarchy-powerprofiles-set | 26 +++++++++++++++++++++--- install/config/powerprofilesctl-rules.sh | 8 ++++++-- migrations/1777098818.sh | 3 +++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 migrations/1777098818.sh diff --git a/bin/omarchy-powerprofiles-set b/bin/omarchy-powerprofiles-set index a137c4d4..a7dd623d 100755 --- a/bin/omarchy-powerprofiles-set +++ b/bin/omarchy-powerprofiles-set @@ -1,11 +1,31 @@ #!/bin/bash # omarchy:summary=Set the power profile to the requested level, falling back to balanced -# omarchy:args= +# omarchy:args=[autodetect|ac|battery] + +action="${1-}" + +# Auto-detect when called with no argument: treat any Mains or USB +# power-supply device reporting online=1 as "on AC". This handles +# USB-C only laptops where the legacy AC device may not fire udev +# events, and also avoids false negatives from per-port USB-C devices +# that are present-but-empty (online=0) while another port supplies power. +if [[ -z $action || $action == "autodetect" ]]; then + action=battery + for ps in /sys/class/power_supply/*; do + [[ -r $ps/online && -r $ps/type ]] || continue + type=$(cat "$ps/type") + [[ $type == "Mains" || $type == "USB" ]] || continue + if [[ $(cat "$ps/online") == "1" ]]; then + action=ac + break + fi + done +fi mapfile -t profiles < <(powerprofilesctl list | awk '/^\s*[* ]\s*[a-zA-Z0-9\-]+:$/ { gsub(/^[*[:space:]]+|:$/,""); print }') -case "$1" in +case "$action" in ac) # Prefer performance, fall back to balanced if [[ " ${profiles[*]} " == *" performance "* ]]; then @@ -17,4 +37,4 @@ case "$1" in battery) powerprofilesctl set balanced ;; -esac +esac \ No newline at end of file diff --git a/install/config/powerprofilesctl-rules.sh b/install/config/powerprofilesctl-rules.sh index 9b5a71a6..01fa5da6 100644 --- a/install/config/powerprofilesctl-rules.sh +++ b/install/config/powerprofilesctl-rules.sh @@ -1,9 +1,13 @@ if omarchy-battery-present; then cat </dev/null sudo udevadm trigger --subsystem-match=power_supply 2>/dev/null fi diff --git a/migrations/1777098818.sh b/migrations/1777098818.sh new file mode 100644 index 00000000..a9de7e1b --- /dev/null +++ b/migrations/1777098818.sh @@ -0,0 +1,3 @@ +echo "Fix power profile auto-switching on USB-C only machines and ensure power-profiles-daemon is enabled" + +source "$OMARCHY_PATH/install/config/powerprofilesctl-rules.sh"