Merge branch 'dev' into rc

This commit is contained in:
David Heinemeier Hansson
2026-04-29 15:49:48 +02:00
32 changed files with 275 additions and 35 deletions
+1
View File
@@ -12,6 +12,7 @@
All commands start with `omarchy-`. Prefixes indicate purpose:
- `cmd-` - check if commands exist, misc utility commands
- `capture-` - screenshots, screen recordings, and other capture tools
- `pkg-` - package management helpers
- `hw-` - hardware detection (return exit codes for use in conditionals)
- `refresh-` - copy default config to user's `~/.config/`
@@ -3,9 +3,9 @@
# Toggle microphone mute. Dell XPS and ThinkPad systems get special handling for the hardware LED.
if omarchy-hw-match "XPS"; then
omarchy-cmd-mic-mute-xps
omarchy-audio-input-mute-xps
elif omarchy-hw-match "ThinkPad"; then
omarchy-cmd-mic-mute-thinkpad
omarchy-audio-input-mute-thinkpad
else
omarchy-swayosd-client --input-volume mute-toggle
fi
+3 -3
View File
@@ -29,21 +29,21 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
hyprctl dispatch exec -- \
alacritty --class=org.omarchy.screensaver \
--config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml \
-e omarchy-cmd-screensaver
-e omarchy-screensaver
;;
*ghostty*)
hyprctl dispatch exec -- \
ghostty --class=org.omarchy.screensaver \
--config-file=~/.local/share/omarchy/default/ghostty/screensaver \
--font-size=18 \
-e omarchy-cmd-screensaver
-e omarchy-screensaver
;;
*kitty*)
hyprctl dispatch exec -- \
kitty --class=org.omarchy.screensaver \
--override font_size=18 \
--override window_padding_width=0 \
-e omarchy-cmd-screensaver
-e omarchy-screensaver
;;
*)
notify-send -u low "✋ Screensaver only runs in Alacritty, Ghostty, or Kitty"
+12 -11
View File
@@ -106,7 +106,7 @@ show_trigger_menu() {
show_capture_menu() {
case $(menu "Capture" " Screenshot\n Screenrecord\n󰃉 Color") in
*Screenshot*) omarchy-cmd-screenshot ;;
*Screenshot*) omarchy-capture-screenshot ;;
*Screenrecord*) show_screenrecord_menu ;;
*Color*) pkill hyprpicker || hyprpicker -a ;;
*) back_to show_trigger_menu ;;
@@ -141,18 +141,18 @@ show_webcam_select_menu() {
}
show_screenrecord_menu() {
omarchy-cmd-screenrecord --stop-recording && exit 0
omarchy-capture-screencording --stop-recording && exit 0
case $(menu "Screenrecord" " With no audio\n With desktop audio\n With desktop + microphone audio\n With desktop + microphone audio + webcam") in
*"With no audio") omarchy-cmd-screenrecord ;;
*"With desktop audio") omarchy-cmd-screenrecord --with-desktop-audio ;;
*"With desktop + microphone audio") omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio ;;
*"With no audio") omarchy-capture-screencording ;;
*"With desktop audio") omarchy-capture-screencording --with-desktop-audio ;;
*"With desktop + microphone audio") omarchy-capture-screencording --with-desktop-audio --with-microphone-audio ;;
*"With desktop + microphone audio + webcam")
local device=$(show_webcam_select_menu) || {
back_to show_capture_menu
return
}
omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio --with-webcam --webcam-device="$device"
omarchy-capture-screencording --with-desktop-audio --with-microphone-audio --with-webcam --webcam-device="$device"
;;
*) back_to show_capture_menu ;;
esac
@@ -160,15 +160,15 @@ show_screenrecord_menu() {
show_share_menu() {
case $(menu "Share" " Clipboard\n File \n Folder") in
*Clipboard*) omarchy-cmd-share clipboard ;;
*File*) terminal bash -c "omarchy-cmd-share file" ;;
*Folder*) terminal bash -c "omarchy-cmd-share folder" ;;
*Clipboard*) omarchy-menu-share clipboard ;;
*File*) terminal bash -c "omarchy-menu-share file" ;;
*Folder*) terminal bash -c "omarchy-menu-share folder" ;;
*) back_to show_trigger_menu ;;
esac
}
show_toggle_menu() {
local options="󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Monitor Scaling\n Direct Boot"
local options="󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Monitor Scaling\n Direct Boot\n󰟵 Passwordless Sudo"
case $(menu "Toggle" "$options") in
*Screensaver*) omarchy-toggle-screensaver ;;
@@ -180,6 +180,7 @@ show_toggle_menu() {
*Gaps*) omarchy-hyprland-window-gaps-toggle ;;
*Scaling*) omarchy-hyprland-monitor-scaling-cycle ;;
*"Direct Boot"*) present_terminal omarchy-config-direct-boot ;;
*"Passwordless Sudo"*) present_terminal omarchy-sudo-passwordless ;;
*) back_to show_trigger_menu ;;
esac
}
@@ -599,7 +600,7 @@ show_system_menu() {
case $(menu "System" "$options") in
*Screensaver*) omarchy-launch-screensaver force ;;
*Lock*) omarchy-lock-screen ;;
*Lock*) omarchy-system-lock ;;
*Suspend*) systemctl suspend ;;
*Hibernate*) systemctl hibernate ;;
*Logout*) omarchy-system-logout ;;
@@ -3,7 +3,7 @@
# Share clipboard, file, or folder using LocalSend. Bound to Super + Ctrl + S by default.
if (($# == 0)); then
echo "Usage: omarchy-cmd-share [clipboard|file|folder]"
echo "Usage: omarchy-menu-share [clipboard|file|folder]"
exit 1
fi
@@ -1,7 +1,7 @@
#!/bin/bash
# Toggle passwordless sudo for the current user.
# Usage: omarchy-sudo-passwordless-toggle [MINUTES]
# Usage: omarchy-sudo-passwordless [MINUTES]
# First run: enables passwordless sudo for 15 minutes (after confirmation).
# Second run: disables it early.
@@ -10,10 +10,12 @@ TIMER_NAME="omarchy-nopasswd-expire-${USER}"
MINUTES=${1:-15}
if [[ $1 && ! $1 =~ ^[0-9]+$ ]]; then
echo "Usage: omarchy-sudo-passwordless-toggle [MINUTES]" >&2
echo "Usage: omarchy-sudo-passwordless [MINUTES]" >&2
exit 1
fi
echo "Toggle passwordless sudo..."
# Safety: if the file exists but the timer doesn't (e.g. after reboot), clean up
if sudo test -f "$NOPASSWD_FILE" && ! systemctl is-active "${TIMER_NAME}.timer" &>/dev/null; then
sudo rm "$NOPASSWD_FILE"
@@ -33,7 +35,7 @@ if sudo test -f "$NOPASSWD_FILE"; then
fi
else
echo ""
echo "⚠️WARNING: This will allow ANY process running as your user to"
echo "⚠️ WARNING: This will allow ANY process running as your user to"
echo "execute ANY command as root WITHOUT a password for ${MINUTES} minutes."
echo ""
echo "This is useful for AI agents that need to run sudo commands,"
@@ -52,7 +54,7 @@ else
echo ""
echo "Passwordless sudo has been ENABLED. It will automatically disable in ${MINUTES} minutes."
echo "Note: if you restart before then, run omarchy-sudo-passwordless-toggle again to disable it."
echo "Note: if you restart before then, run omarchy-sudo-passwordless again to disable it."
else
echo "Aborted. No changes made."
fi
+207
View File
@@ -0,0 +1,207 @@
#!/bin/bash
set -e
THEME_SOURCE="${1:-}"
COLORS_OUTPUT="$THEME_SOURCE/colors.toml"
ALACRITTY_FILE="$THEME_SOURCE/alacritty.toml"
if [[ -z $THEME_SOURCE ]]; then
echo "Usage: omarchy-theme-colors-from-alacritty <theme-dir>" >&2
exit 1
fi
# Skip if colors.toml already exists in source theme
if [[ -f $COLORS_OUTPUT ]]; then
exit 0
fi
# Skip if no alacritty.toml to extract from
if [[ ! -f $ALACRITTY_FILE ]]; then
exit 0
fi
normalize_hex() {
local color="$1"
[[ -z $color ]] && return
color="${color#0x}"
color="${color#\#}"
if [[ $color =~ ^[0-9a-fA-F]{6}$ ]]; then
printf "#%s\n" "${color,,}"
fi
}
extract_color_in_section() {
local section="$1"
local key="$2"
local color_hex=""
color_hex=$(awk -v section="$section" -v key="$key" '
function trim(value) {
gsub(/^[ \t]+|[ \t]+$/, "", value)
return value
}
function strip_comment(value, i, ch, out, in_single, in_double, prev) {
out = ""
in_single = 0
in_double = 0
prev = ""
for (i = 1; i <= length(value); i++) {
ch = substr(value, i, 1)
if (ch == "\"" && !in_single && prev != "\\") {
in_double = !in_double
} else if (ch == "'\''" && !in_double) {
in_single = !in_single
}
if (ch == "#" && !in_single && !in_double) {
break
}
out = out ch
prev = ch
}
gsub(/[ \t]+$/, "", out)
return out
}
/^[ \t]*\[/ {
in_section = ($0 ~ "^[ \\t]*\\[" section "\\][ \\t]*$")
next
}
in_section {
line = $0
line = strip_comment(line)
split_pos = index(line, "=")
if (split_pos == 0) {
next
}
current_key = trim(substr(line, 1, split_pos - 1))
current_value = trim(substr(line, split_pos + 1))
if (current_key == key) {
gsub(/["'\''#]/, "", current_value)
sub(/^0[xX]/, "", current_value)
if (current_value ~ /^[0-9A-Fa-f]{6}$/) {
print current_value
exit
}
}
}
' "$ALACRITTY_FILE")
if [[ -n $color_hex && $color_hex =~ ^[0-9a-fA-F]{6}$ ]]; then
normalize_hex "$color_hex"
fi
return 0
}
names=(black red green yellow blue magenta cyan white)
# Extract normal colors (color0-7)
for i in {0..7}; do
name="${names[$i]}"
val=$(extract_color_in_section "colors.normal" "$name")
if [[ -z $val ]]; then
val=$(extract_color_in_section "colors" "normal.$name")
fi
printf -v "color$i" "%s" "$val"
done
# Validate we have all normal colors (required)
for c in color0 color1 color2 color3 color4 color5 color6 color7; do
if [[ -z ${!c} ]]; then
echo "Warning: Cannot extract all normal colors from $ALACRITTY_FILE, skipping generation" >&2
exit 0
fi
done
# Extract bright colors (color8-15)
for i in {0..7}; do
normal="color$i"
bright="color$((i + 8))"
name="${names[$i]}"
val=$(extract_color_in_section "colors.bright" "$name")
if [[ -z $val ]]; then
val=$(extract_color_in_section "colors" "bright.$name")
fi
printf -v "$bright" "%s" "${val:-${!normal}}"
done
# Extract primary colors
background=$(extract_color_in_section "colors.primary" "background")
foreground=$(extract_color_in_section "colors.primary" "foreground")
if [[ -z $background ]]; then
background=$(extract_color_in_section "colors" "primary.background")
fi
if [[ -z $foreground ]]; then
foreground=$(extract_color_in_section "colors" "primary.foreground")
fi
# Extract cursor color (from [colors.cursor] section)
cursor=$(extract_color_in_section "colors.cursor" "cursor")
if [[ -z $cursor ]]; then
cursor=$(extract_color_in_section "colors" "cursor.cursor")
fi
# Extract selection colors
selection_background=$(extract_color_in_section "colors.selection" "background")
if [[ -z $selection_background ]]; then
selection_background=$(extract_color_in_section "colors" "selection.background")
fi
selection_foreground=$(extract_color_in_section "colors.selection" "text")
if [[ -z $selection_foreground ]]; then
selection_foreground=$(extract_color_in_section "colors" "selection.text")
fi
# Apply defaults
background=${background:-$color0}
foreground=${foreground:-$color7}
cursor=${cursor:-$foreground}
selection_background=${selection_background:-$foreground}
selection_foreground=${selection_foreground:-$background}
accent=$color4
mkdir -p "$THEME_SOURCE"
cat > "$COLORS_OUTPUT" <<EOF
accent = "$accent"
cursor = "$cursor"
foreground = "$foreground"
background = "$background"
selection_foreground = "$selection_foreground"
selection_background = "$selection_background"
color0 = "$color0"
color1 = "$color1"
color2 = "$color2"
color3 = "$color3"
color4 = "$color4"
color5 = "$color5"
color6 = "$color6"
color7 = "$color7"
color8 = "$color8"
color9 = "$color9"
color10 = "$color10"
color11 = "$color11"
color12 = "$color12"
color13 = "$color13"
color14 = "$color14"
color15 = "$color15"
EOF
+5
View File
@@ -25,6 +25,11 @@ mkdir -p "$NEXT_THEME_PATH"
cp -r "$OMARCHY_THEMES_PATH/$THEME_NAME/"* "$NEXT_THEME_PATH/" 2>/dev/null
cp -r "$USER_THEMES_PATH/$THEME_NAME/"* "$NEXT_THEME_PATH/" 2>/dev/null
# Generate colors.toml from alacritty.toml if theme is missing colors.toml
if [[ ! -f $NEXT_THEME_PATH/colors.toml && -f $NEXT_THEME_PATH/alacritty.toml ]]; then
omarchy-theme-colors-from-alacritty "$NEXT_THEME_PATH"
fi
# Generate dynamic configs
omarchy-theme-set-templates
+1 -1
View File
@@ -34,6 +34,6 @@ bindd = SUPER SHIFT ALT, X, X Post, exec, omarchy-launch-webapp "https://x.com/c
# bindd = SUPER, SPACE, Omarchy menu, exec, omarchy-menu
# Logitech MX Keys
# bind = SUPER SHIFT, S, exec, omarchy-cmd-screenshot # Print Screen Button
# bind = SUPER SHIFT, S, exec, omarchy-capture-screenshot # Print Screen Button
# bind = SUPER, H, exec, voxtype record toggle # Dictation Button
# bind = SUPER, PERIOD, exec, omarchy-launch-walker -m symbols # Emoji Button
+1 -1
View File
@@ -1,5 +1,5 @@
general {
lock_cmd = omarchy-lock-screen # lock screen and 1password
lock_cmd = omarchy-system-lock # lock screen and 1password
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = sleep 1 && hyprctl dispatch dpms on # delay for PAM readiness, then turn on display.
inhibit_sleep = 3 # wait until screen is locked
+2 -2
View File
@@ -19,8 +19,8 @@ input {
# Increase sensitivity for mouse/trackpad (default: 0)
# sensitivity = 0.35
# Turn off mouse acceleration (default: false)
# force_no_accel = true
# Turn off mouse acceleration (default: adaptive)
# accel_profile = flat
touchpad {
# Use natural (inverse) scrolling
+1 -1
View File
@@ -7,7 +7,7 @@
#
# show_system_menu() {
# case $(menu "System" " Lock\n󰐥 Shutdown") in
# *Lock*) omarchy-lock-screen ;;
# *Lock*) omarchy-system-lock ;;
# *Shutdown*) omarchy-system-shutdown ;;
# *) back_to show_main_menu ;;
# esac
+1 -1
View File
@@ -138,7 +138,7 @@
"on-scroll-right": ""
},
"custom/screenrecording-indicator": {
"on-click": "omarchy-cmd-screenrecord",
"on-click": "omarchy-capture-screencording",
"exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh",
"signal": 8,
"return-type": "json"
+1 -1
View File
@@ -5,7 +5,7 @@ exec-once = uwsm-app -- fcitx5 --disable notificationitem
exec-once = uwsm-app -- swaybg -i ~/.config/omarchy/current/background -m fill
exec-once = uwsm-app -- swayosd-server
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = omarchy-cmd-first-run
exec-once = omarchy-first-run
exec-once = omarchy-powerprofiles-init
exec-once = uwsm-app -- omarchy-hyprland-monitor-watch
+2 -2
View File
@@ -2,7 +2,7 @@
bindeld = ,XF86AudioRaiseVolume, Volume up, exec, omarchy-swayosd-client --output-volume raise
bindeld = ,XF86AudioLowerVolume, Volume down, exec, omarchy-swayosd-client --output-volume lower
bindeld = ,XF86AudioMute, Mute, exec, omarchy-swayosd-client --output-volume mute-toggle
bindeld = ,XF86AudioMicMute, Mute microphone, exec, omarchy-cmd-mic-mute
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 = ,XF86KbdBrightnessUp, Keyboard brightness up, exec, omarchy-brightness-keyboard up
@@ -25,4 +25,4 @@ bindld = , XF86AudioPlay, Play, exec, omarchy-swayosd-client --playerctl play-pa
bindld = , XF86AudioPrev, Previous track, exec, omarchy-swayosd-client --playerctl previous
# Switch audio output with Super + Mute
bindld = SUPER, XF86AudioMute, Switch audio output, exec, omarchy-cmd-audio-switch
bindld = SUPER, XF86AudioMute, Switch audio output, exec, omarchy-audio-ouput-switch
+2 -2
View File
@@ -39,7 +39,7 @@ bindd = CTRL, F2, Apple Display brightness up, exec, omarchy-brightness-display-
bindd = SHIFT CTRL, F2, Apple Display full brightness, exec, omarchy-brightness-display-apple +60000
# Captures
bindd = , PRINT, Screenshot, exec, omarchy-cmd-screenshot
bindd = , PRINT, Screenshot, exec, omarchy-capture-screenshot
bindd = ALT, PRINT, Screenrecording, exec, omarchy-menu screenrecord
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a
@@ -64,4 +64,4 @@ bindd = SUPER CTRL, Z, Zoom in, exec, hyprctl keyword cursor:zoom_factor $(hyprc
bindd = SUPER CTRL ALT, Z, Reset zoom, exec, hyprctl keyword cursor:zoom_factor 1
# Lock system
bindd = SUPER CTRL, L, Lock system, exec, omarchy-lock-screen
bindd = SUPER CTRL, L, Lock system, exec, omarchy-system-lock
+2 -2
View File
@@ -108,7 +108,7 @@ cat $(which omarchy-theme-set)
| `omarchy-theme-*` | Theme management | `omarchy-theme-set <name>` |
| `omarchy-install-*` | Install optional software | `omarchy-install-docker-dbs` |
| `omarchy-launch-*` | Launch apps | `omarchy-launch-browser` |
| `omarchy-cmd-*` | System commands | `omarchy-cmd-screenshot` |
| `omarchy-capture-*` | Screenshots and recordings | `omarchy-capture-screenshot` |
| `omarchy-pkg-*` | Package management | `omarchy-pkg-install <pkg>` |
| `omarchy-setup-*` | Initial setup tasks | `omarchy-setup-fingerprint` |
| `omarchy-update-*` | System updates | `omarchy-update` |
@@ -308,7 +308,7 @@ omarchy-font-set <name> # Change font
omarchy-update # Full system update
omarchy-version # Show Omarchy version
omarchy-debug --no-sudo --print # Debug info (ALWAYS use these flags)
omarchy-lock-screen # Lock screen
omarchy-system-lock # Lock screen
omarchy-system-shutdown # Shutdown
omarchy-system-reboot # Reboot
```
+1
View File
@@ -8,6 +8,7 @@ sudo ufw allow 53317/tcp
# Allow Docker containers to use DNS on host
sudo ufw allow in proto udp from 172.16.0.0/12 to 172.17.0.1 port 53 comment 'allow-docker-dns'
sudo ufw allow in proto udp from 192.168.0.0/16 to 172.17.0.1 port 53 comment 'allow-docker-dns'
# Turn on the firewall
sudo ufw --force enable
+1
View File
@@ -24,6 +24,7 @@ cups-pdf
docker
docker-buildx
docker-compose
dosfstools
dotnet-runtime-9.0
dust
evince
+1 -1
View File
@@ -11,7 +11,7 @@ fi
echo "Copy hooks examples"
cp -r $OMARCHY_PATH/config/omarchy/* $HOME/.config/omarchy/
echo "Add packages for updated omarchy-cmd-screenshot"
echo "Add packages for updated omarchy-capture-screenshot"
omarchy-pkg-add grim slurp
echo "Add nfs support by default to Nautilus"
+3
View File
@@ -0,0 +1,3 @@
echo "Install dosfstools for FAT filesystem utilities like fsck.fat and mkfs.fat"
omarchy-pkg-add dosfstools
+5
View File
@@ -0,0 +1,5 @@
echo "Allow Docker DNS from Docker's 192.168 address pool"
if omarchy-cmd-present ufw && sudo ufw status | grep -q "Status: active"; then
sudo ufw allow in proto udp from 192.168.0.0/16 to 172.17.0.1 port 53 comment 'allow-docker-dns'
fi
+8
View File
@@ -0,0 +1,8 @@
echo "Update Waybar screen recording command"
WAYBAR_CONFIG="$HOME/.config/waybar/config.jsonc"
if [[ -f $WAYBAR_CONFIG ]] && grep -q 'omarchy-cmd-screenrecord' "$WAYBAR_CONFIG"; then
sed -i 's/omarchy-cmd-screenrecord/omarchy-capture-screencording/g' "$WAYBAR_CONFIG"
omarchy-restart-waybar
fi
+6
View File
@@ -0,0 +1,6 @@
echo "Rename lock screen command in Hypridle config"
if grep -q 'omarchy-lock-screen' ~/.config/hypr/hypridle.conf; then
sed -i 's/omarchy-lock-screen/omarchy-system-lock/g' ~/.config/hypr/hypridle.conf
omarchy-restart-hypridle
fi