diff --git a/applications/hidden/lstopo.desktop b/applications/hidden/lstopo.desktop new file mode 100644 index 00000000..e1e3e173 --- /dev/null +++ b/applications/hidden/lstopo.desktop @@ -0,0 +1,2 @@ +[Desktop Entry] +Hidden=true diff --git a/bin/omarchy-cmd-screenrecord b/bin/omarchy-cmd-screenrecord index 1e45d4ab..f07914ca 100755 --- a/bin/omarchy-cmd-screenrecord +++ b/bin/omarchy-cmd-screenrecord @@ -164,12 +164,17 @@ finalize_recording() { latest=$(cat "$RECORDING_FILE" 2>/dev/null) [[ -f $latest ]] || return + # Re-encode only when the first GOP contains discardable warmup packets — stream copy can't + # trim those (it rewinds to the keyframe). Clean recordings stay on the fast stream-copy path. + local video_codec=(-c:v copy) + if ffprobe -v error -select_streams v:0 -read_intervals %+0.2 -show_entries packet=flags -of csv=p=0 "$latest" 2>/dev/null | grep -q D; then + video_codec=(-c:v libx264 -preset veryfast -crf 20) + fi + # Trim the first frame, and normalize audio to -14 LUFS if present, in a single pass - local args=(-y -ss 0.1 -i "$latest") + local args=(-y -ss 0.1 -i "$latest" "${video_codec[@]}") if ffprobe -v error -select_streams a -show_entries stream=codec_type -of csv=p=0 "$latest" 2>/dev/null | grep -q audio; then - args+=(-af loudnorm=I=-14:TP=-1.5:LRA=11 -c:v copy) - else - args+=(-c copy) + args+=(-af loudnorm=I=-14:TP=-1.5:LRA=11) fi local processed="${latest%.mp4}-processed.mp4" diff --git a/bin/omarchy-cmd-screenshot b/bin/omarchy-cmd-screenshot index 9036c995..99e2976a 100755 --- a/bin/omarchy-cmd-screenshot +++ b/bin/omarchy-cmd-screenshot @@ -63,6 +63,13 @@ get_rectangles() { hyprctl clients -j | jq -r --arg ws "$active_workspace" '.[] | select(.workspace.id == ($ws | tonumber)) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' } +# Keep hyprpicker alive until after grim captures so the screenshot sees the +# frozen overlay rather than live content shifting during teardown. +cleanup_freeze() { + [[ -n $PID ]] && kill $PID 2>/dev/null +} +trap cleanup_freeze EXIT + # Select based on mode case "$MODE" in region) @@ -70,14 +77,12 @@ region) PID=$! sleep .1 SELECTION=$(slurp 2>/dev/null) - kill $PID 2>/dev/null ;; windows) hyprpicker -r -z >/dev/null 2>&1 & PID=$! sleep .1 SELECTION=$(get_rectangles | slurp -r 2>/dev/null) - kill $PID 2>/dev/null ;; fullscreen) SELECTION=$(hyprctl monitors -j | jq -r "${JQ_MONITOR_GEO} .[] | select(.focused == true) | format_geo") @@ -88,7 +93,6 @@ smart | *) PID=$! sleep .1 SELECTION=$(echo "$RECTS" | slurp 2>/dev/null) - kill $PID 2>/dev/null # If the selection area is L * W < 20, we'll assume you were trying to select whichever # window or output it was inside of to prevent accidental 2px snapshots diff --git a/bin/omarchy-config-direct-boot b/bin/omarchy-config-direct-boot index 6bb82123..50f3ba62 100755 --- a/bin/omarchy-config-direct-boot +++ b/bin/omarchy-config-direct-boot @@ -1,6 +1,6 @@ #!/bin/bash -# Add an EFI boot entry for the Omarchy UKI, allowing the system to boot directly +# 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. if [[ ! -d /sys/firmware/efi ]]; then @@ -23,23 +23,36 @@ if cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then exit 1 fi -uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) +existing_entry=$(efibootmgr | grep -E "^Boot[0-9A-Fa-f]+\*? Omarchy([[:space:]]|$)" | head -1) -if [[ -z $uki_file ]]; then - echo "Error: No Omarchy UKI found in /boot/EFI/Linux/" >&2 - exit 1 -fi +if [[ -n $existing_entry ]]; then + boot_num=$(echo "$existing_entry" | sed -n 's/^Boot\([0-9A-Fa-f]\+\).*/\1/p') -boot_source=$(findmnt -n -o SOURCE /boot) -disk=$(echo "$boot_source" | sed 's/p\?[0-9]*$//') -part=$(echo "$boot_source" | grep -o 'p\?[0-9]*$' | sed 's/^p//') + if gum confirm "Disable direct boot (remove Omarchy EFI entry)?"; then + echo "Removing EFI boot entry $boot_num" + sudo efibootmgr --bootnum "$boot_num" --delete-bootnum >/dev/null + fi -if gum confirm "Setup direct boot (so snapshot booting must be done via bios)?"; then - echo "Creating EFI boot entry for $uki_file" + exit 0 +else + uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) - sudo efibootmgr --create \ - --disk "$disk" \ - --part "$part" \ - --label "Omarchy" \ - --loader "\\EFI\\Linux\\$uki_file" + if [[ -z $uki_file ]]; then + echo "Error: No Omarchy UKI found in /boot/EFI/Linux/" >&2 + exit 1 + fi + + boot_source=$(findmnt -n -o SOURCE /boot) + disk=$(echo "$boot_source" | sed 's/p\?[0-9]*$//') + part=$(echo "$boot_source" | grep -o 'p\?[0-9]*$' | sed 's/^p//') + + if gum confirm "Setup direct boot (so snapshot booting must be done via bios)?"; then + echo "Creating EFI boot entry for $uki_file" + + sudo efibootmgr --create \ + --disk "$disk" \ + --part "$part" \ + --label "Omarchy" \ + --loader "\\EFI\\Linux\\$uki_file" + fi fi diff --git a/bin/omarchy-hw-asus-expertbook-b9406 b/bin/omarchy-hw-asus-expertbook-b9406 new file mode 100755 index 00000000..fa936a70 --- /dev/null +++ b/bin/omarchy-hw-asus-expertbook-b9406 @@ -0,0 +1,5 @@ +#!/bin/bash + +# Detect ASUS ExpertBook B9406 series laptops on Intel Panther Lake. + +omarchy-hw-match "B9406" && omarchy-hw-intel-ptl diff --git a/bin/omarchy-hw-hybrid-gpu b/bin/omarchy-hw-hybrid-gpu index dcd0a8fd..7f26f6af 100755 --- a/bin/omarchy-hw-hybrid-gpu +++ b/bin/omarchy-hw-hybrid-gpu @@ -1,3 +1,9 @@ #!/bin/bash -(($(lspci | grep -cE 'VGA|3D|Display') >= 2)) +# supergfxctl is authoritative: in Integrated mode the dGPU is unbound and +# hidden from lspci, so the controller count would undercount on those systems. +if command -v supergfxctl &>/dev/null; then + supergfxctl -s 2>/dev/null | grep -qw Hybrid +else + (($(lspci | grep -cE 'VGA|3D|Display') >= 2)) +fi diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 4cd677c2..e600644e 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -168,7 +168,7 @@ show_share_menu() { } 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" + 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" case $(menu "Toggle" "$options") in *Screensaver*) omarchy-toggle-screensaver ;; @@ -179,6 +179,7 @@ show_toggle_menu() { *Ratio*) omarchy-hyprland-window-single-square-aspect-toggle ;; *Gaps*) omarchy-hyprland-window-gaps-toggle ;; *Scaling*) omarchy-hyprland-monitor-scaling-cycle ;; + *"Direct Boot"*) present_terminal omarchy-config-direct-boot ;; *) back_to show_trigger_menu ;; esac } @@ -362,8 +363,8 @@ show_install_terminal_menu() { show_install_ai_menu() { ollama_pkg=$( - (command -v nvidia-smi &>/dev/null && echo ollama-cuda) || - (command -v rocminfo &>/dev/null && echo ollama-rocm) || + (omarchy-cmd-present nvidia-smi && echo ollama-cuda) || + (omarchy-cmd-present rocminfo && echo ollama-rocm) || echo ollama ) diff --git a/bin/omarchy-setup-fingerprint b/bin/omarchy-setup-fingerprint index 42149651..1579b586 100755 --- a/bin/omarchy-setup-fingerprint +++ b/bin/omarchy-setup-fingerprint @@ -100,6 +100,29 @@ else # Install required packages print_info "Installing required packages..." + + # ASUS ExpertBook B9406CAA ships a FocalTech FT9349 ESS reader (USB + # 2808:a97a). Mainline libfprint at 1.94.x lacks the focaltech_moc + # driver (and its 0xa97a id_table entry); OPR ships libfprint-git + # which carries both. Once upstream catches up, this branch is a + # no-op and `libfprint-git` provides=libfprint anyway. Detect via + # /sys to avoid depending on usbutils being installed first. + for v in /sys/bus/usb/devices/*/idVendor; do + [[ "$(cat "$v" 2>/dev/null)" == "2808" ]] || continue + [[ "$(cat "${v%idVendor}idProduct" 2>/dev/null)" == "a97a" ]] || continue + print_info "FocalTech FT9349 detected (B9406CAA) — using libfprint-git from OPR..." + # libfprint-git provides+conflicts libfprint; pacman -S --noconfirm + # defaults the conflict prompt to N and aborts. Pre-remove libfprint + # with -Rdd so the install goes silent. -Rdd (not omarchy-pkg-drop's + # -Rns) is required because fprintd requires libfprint; the dep is + # re-satisfied immediately by libfprint-git's provides=libfprint. + if omarchy-pkg-present libfprint; then + sudo pacman -Rdd --noconfirm libfprint + fi + omarchy-pkg-add libfprint-git + break + done + omarchy-pkg-add fprintd usbutils if ! check_fingerprint_hardware; then diff --git a/bin/omarchy-theme-set-plymouth b/bin/omarchy-theme-set-plymouth new file mode 100755 index 00000000..11f4a446 --- /dev/null +++ b/bin/omarchy-theme-set-plymouth @@ -0,0 +1,96 @@ +#!/bin/bash + +# Configure the Plymouth boot theme with a custom background color, accent color, and logo. +# Stages the change in a temp dir, previews it as a composited image, then optionally +# commits the staged files to /usr/share and rebuilds the initramfs. + +if [[ $# -ne 3 ]]; then + echo "Usage: omarchy-theme-set-plymouth " >&2 + exit 1 +fi + +bg_hex="${1#\#}" +accent_hex="${2#\#}" +logo_path="$3" + +if ! [[ $bg_hex =~ ^[0-9a-fA-F]{6}$ ]]; then + echo "Invalid background color: $1 (expected #RRGGBB)" >&2 + exit 1 +fi + +if ! [[ $accent_hex =~ ^[0-9a-fA-F]{6}$ ]]; then + echo "Invalid accent color: $2 (expected #RRGGBB)" >&2 + exit 1 +fi + +if [[ ! -f $logo_path ]]; then + echo "Logo file not found: $logo_path" >&2 + exit 1 +fi + +bg_r=$(awk -v n=$((16#${bg_hex:0:2})) 'BEGIN{printf "%.3f", n/255}') +bg_g=$(awk -v n=$((16#${bg_hex:2:2})) 'BEGIN{printf "%.3f", n/255}') +bg_b=$(awk -v n=$((16#${bg_hex:4:2})) 'BEGIN{printf "%.3f", n/255}') + +theme_dir="/usr/share/plymouth/themes/omarchy" +staging_dir=$(mktemp -d) +preview_png=$(mktemp --suffix=.png) +trap 'rm -rf "$staging_dir" "$preview_png"' EXIT + +cp ~/.local/share/omarchy/default/plymouth/* "$staging_dir/" +cp "$logo_path" "$staging_dir/logo.png" + +sed -i \ + -e "s/^Window.SetBackgroundTopColor.*/Window.SetBackgroundTopColor($bg_r, $bg_g, $bg_b);/" \ + -e "s/^Window.SetBackgroundBottomColor.*/Window.SetBackgroundBottomColor($bg_r, $bg_g, $bg_b);/" \ + "$staging_dir/omarchy.script" + +for asset in bullet.png entry.png lock.png progress_bar.png; do + magick "$staging_dir/$asset" -channel RGB +level-colors "#$accent_hex","#$accent_hex" "$staging_dir/$asset" +done + +if gum confirm "Preview new login screen?"; then + canvas_w=1920 + canvas_h=1080 + + logo_w=$(magick identify -format '%w' "$staging_dir/logo.png") + logo_h=$(magick identify -format '%h' "$staging_dir/logo.png") + entry_w=$(magick identify -format '%w' "$staging_dir/entry.png") + entry_h=$(magick identify -format '%h' "$staging_dir/entry.png") + lock_h=$(awk "BEGIN{print int($entry_h * 0.8)}") + lock_w=$(awk "BEGIN{print int(84 * $lock_h / 96)}") + + logo_x=$(( (canvas_w - logo_w) / 2 )) + logo_y=$(( (canvas_h - logo_h) / 2 )) + entry_x=$(( (canvas_w - entry_w) / 2 )) + entry_y=$(( logo_y + logo_h + 40 )) + lock_x=$(( entry_x - lock_w - 15 )) + lock_y=$(( entry_y + entry_h/2 - lock_h/2 )) + bullet_y=$(( entry_y + entry_h/2 - 4 )) + + bullet_args=() + for i in 0 1 2 3; do + bx=$(( entry_x + 20 + i * 12 )) + bullet_args+=( '(' "$staging_dir/bullet.png" -resize 7x7 ')' -geometry +${bx}+${bullet_y} -composite ) + done + + magick -size ${canvas_w}x${canvas_h} "xc:#$bg_hex" \ + "$staging_dir/logo.png" -geometry +${logo_x}+${logo_y} -composite \ + "$staging_dir/entry.png" -geometry +${entry_x}+${entry_y} -composite \ + \( "$staging_dir/lock.png" -resize ${lock_w}x${lock_h} \) -geometry +${lock_x}+${lock_y} -composite \ + "${bullet_args[@]}" \ + "$preview_png" + + imv -f "$preview_png" +fi + +if gum confirm "Apply new login screen?"; then + sudo cp -a "$staging_dir/." "$theme_dir/" + sudo plymouth-set-default-theme omarchy + + if omarchy-cmd-present limine-mkinitcpio; then + sudo limine-mkinitcpio + else + sudo mkinitcpio -P + fi +fi diff --git a/bin/omarchy-update-restart b/bin/omarchy-update-restart index 3a1bc4e2..e4d835b8 100755 --- a/bin/omarchy-update-restart +++ b/bin/omarchy-update-restart @@ -2,7 +2,21 @@ echo -if find /usr/lib/modules -maxdepth 2 -name vmlinuz -newermt "$(uptime -s)" 2>/dev/null | grep -q .; then +running_kernel=$(uname -r) +kernel_updated=false + +for kernel in /usr/lib/modules/*/vmlinuz; do + if [[ -f $kernel ]] && pacman -Qo "$kernel" &>/dev/null; then + installed_kernel=$(basename "$(dirname "$kernel")") + + if [[ $installed_kernel != $running_kernel ]]; then + kernel_updated=true + break + fi + fi +done + +if [[ $kernel_updated == "true" ]]; then gum confirm "Linux kernel has been updated. Reboot?" && omarchy-system-reboot elif [[ -f $HOME/.local/state/omarchy/reboot-required ]]; then gum confirm "Updates require reboot. Ready?" && omarchy-system-reboot diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index ff272f9a..cf4f9ad0 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -1,4 +1,4 @@ -# Learn how to configure Hyprland: https://wiki.hyprland.org/Configuring/ +# Learn how to configure Hyprland: https://wiki.hypr.land/Configuring/ # Use defaults Omarchy defaults (but don't edit these directly!) source = ~/.local/share/omarchy/default/hypr/autostart.conf diff --git a/config/hypr/input.conf b/config/hypr/input.conf index 1dd2e075..c8b0a19c 100644 --- a/config/hypr/input.conf +++ b/config/hypr/input.conf @@ -1,5 +1,5 @@ # Control your input devices -# See https://wiki.hypr.land/Configuring/Variables/#input +# See https://wiki.hypr.land/Configuring/Basics/Variables/#input input { # Use multiple keyboard layouts and switch between them with Left Alt + Right Alt # kb_layout = us,dk,eu @@ -45,7 +45,7 @@ windowrule = match:class (Alacritty|kitty), scroll_touchpad 1.5 windowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2 # Enable touchpad gestures for changing workspaces -# See https://wiki.hyprland.org/Configuring/Gestures/ +# See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Gestures/ # gesture = 3, horizontal, workspace # Enable touchpad gestures for moving focus (helpful on scrolling layout) diff --git a/config/hypr/looknfeel.conf b/config/hypr/looknfeel.conf index 2d2b7000..f4a2c00c 100644 --- a/config/hypr/looknfeel.conf +++ b/config/hypr/looknfeel.conf @@ -1,6 +1,6 @@ # Change the default Omarchy look'n'feel -# https://wiki.hyprland.org/Configuring/Variables/#general +# https://wiki.hypr.land/Configuring/Basics/Variables/#general general { # No gaps between windows or borders # gaps_in = 0 @@ -11,7 +11,7 @@ general { # layout = scrolling } -# https://wiki.hyprland.org/Configuring/Variables/#decoration +# https://wiki.hypr.land/Configuring/Basics/Variables/#decoration decoration { # Use round window corners # rounding = 8 @@ -21,13 +21,13 @@ decoration { # dim_strength = 0.15 } -# https://wiki.hyprland.org/Configuring/Variables/#animations +# https://wiki.hypr.land/Configuring/Basics/Variables/#animations animations { # Disable all animations # enabled = no } -# https://wiki.hypr.land/Configuring/Variables/#layout +# https://wiki.hypr.land/Configuring/Basics/Variables/#layout layout { # Avoid overly wide single-window layouts on wide screens # single_window_aspect_ratio = 1 1 diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index 01c9cde1..455c80fe 100644 --- a/config/hypr/monitors.conf +++ b/config/hypr/monitors.conf @@ -1,4 +1,4 @@ -# See https://wiki.hyprland.org/Configuring/Monitors/ +# See https://wiki.hypr.land/Configuring/Basics/Monitors/ # List current monitors and resolutions possible: hyprctl monitors # Format: monitor = [port], resolution, position, scale diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index 8d857c69..150cfea6 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -93,6 +93,7 @@ "tooltip-format-charging": "{power:>1.0f}W↑ {capacity}%", "interval": 5, "on-click": "omarchy-menu power", + "on-click-right": "notify-send -u low \"$(omarchy-battery-status)\"", "states": { "warning": 20, "critical": 10 diff --git a/default/hypr/input.conf b/default/hypr/input.conf index 74b2acab..14e9ccb6 100644 --- a/default/hypr/input.conf +++ b/default/hypr/input.conf @@ -1,4 +1,4 @@ -# https://wiki.hyprland.org/Configuring/Variables/#input +# https://wiki.hypr.land/Configuring/Basics/Variables/#input input { kb_layout = us kb_variant = diff --git a/default/hypr/looknfeel.conf b/default/hypr/looknfeel.conf index f735abda..0bdd6dee 100644 --- a/default/hypr/looknfeel.conf +++ b/default/hypr/looknfeel.conf @@ -1,30 +1,30 @@ -# Refer to https://wiki.hyprland.org/Configuring/Variables/ +# Refer to https://wiki.hypr.land/Configuring/Basics/Variables/ # Variables $activeBorderColor = rgba(33ccffee) rgba(00ff99ee) 45deg $inactiveBorderColor = rgba(595959aa) -# https://wiki.hyprland.org/Configuring/Variables/#general +# https://wiki.hypr.land/Configuring/Basics/Variables/#general general { gaps_in = 5 gaps_out = 10 border_size = 2 - # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + # https://wiki.hypr.land/Configuring/Basics/Variables/#variable-types for info about colors col.active_border = $activeBorderColor col.inactive_border = $inactiveBorderColor # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = false - # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + # Please see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Tearing/ before you turn this on allow_tearing = false layout = dwindle } -# https://wiki.hyprland.org/Configuring/Variables/#decoration +# https://wiki.hypr.land/Configuring/Basics/Variables/#decoration decoration { rounding = 0 @@ -35,7 +35,7 @@ decoration { color = rgba(1a1a1aee) } - # https://wiki.hyprland.org/Configuring/Variables/#blur + # https://wiki.hypr.land/Configuring/Basics/Variables/#blur blur { enabled = true size = 2 @@ -46,7 +46,7 @@ decoration { } } -# https://wiki.hypr.land/Configuring/Variables/#group +# https://wiki.hypr.land/Configuring/Basics/Variables/#group group { col.border_active = $activeBorderColor col.border_inactive = $inactiveBorderColor @@ -77,11 +77,11 @@ group { } -# https://wiki.hyprland.org/Configuring/Variables/#animations +# https://wiki.hypr.land/Configuring/Basics/Variables/#animations animations { enabled = yes, please :) - # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + # Default animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/ for more bezier = easeOutQuint,0.23,1,0.32,1 bezier = easeInOutCubic,0.65,0.05,0.36,1 @@ -106,19 +106,19 @@ animations { animation = specialWorkspace, 1, 3, easeOutQuint, slidevert } -# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more +# See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more dwindle { pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = true # You probably want this force_split = 2 # Always split on the right } -# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more +# See https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ for more master { new_status = master } -# https://wiki.hyprland.org/Configuring/Variables/#misc +# https://wiki.hypr.land/Configuring/Basics/Variables/#misc misc { disable_hyprland_logo = true disable_splash_rendering = true @@ -128,7 +128,7 @@ misc { on_focus_under_fullscreen = 1 } -# https://wiki.hypr.land/Configuring/Variables/#cursor +# https://wiki.hypr.land/Configuring/Basics/Variables/#cursor cursor { hide_on_key_press = true warp_on_change_workspace = 1 diff --git a/default/hypr/windows.conf b/default/hypr/windows.conf index 67a9a6a9..3ceca48f 100644 --- a/default/hypr/windows.conf +++ b/default/hypr/windows.conf @@ -1,4 +1,4 @@ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +# See https://wiki.hypr.land/Configuring/Basics/Window-Rules/ for more # Hyprland 0.53+ syntax windowrule = suppress_event maximize, match:class .* diff --git a/install/config/all.sh b/install/config/all.sh index 69267195..78f249ec 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -14,6 +14,7 @@ run_logged $OMARCHY_INSTALL/config/mise-work.sh run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh run_logged $OMARCHY_INSTALL/config/docker.sh run_logged $OMARCHY_INSTALL/config/mimetypes.sh +run_logged $OMARCHY_INSTALL/config/user-dirs.sh run_logged $OMARCHY_INSTALL/config/nautilus-python.sh run_logged $OMARCHY_INSTALL/config/localdb.sh run_logged $OMARCHY_INSTALL/config/walker-elephant.sh @@ -47,8 +48,11 @@ run_logged $OMARCHY_INSTALL/config/hardware/intel/fix-wifi7-eht.sh run_logged $OMARCHY_INSTALL/config/hardware/dell/fix-xps-haptic-touchpad.sh +run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-display.sh +run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-mic.sh +run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-z13-touchpad.sh run_logged $OMARCHY_INSTALL/config/hardware/framework/fix-f13-amd-audio-input.sh run_logged $OMARCHY_INSTALL/config/hardware/framework/qmk-hid.sh diff --git a/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh b/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh new file mode 100644 index 00000000..de03d286 --- /dev/null +++ b/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh @@ -0,0 +1,21 @@ +# Display fixes for ASUS ExpertBook B9406 (Panther Lake / Xe3 iGPU). +# +# Panel Replay is Xe3-new, default-on in the xe driver, and has a broken +# exit/wake path on this eDP panel: the panel latches the last-presented +# frame in self-refresh and never wakes for subsequent atomic commits, so +# the screen only updates on a full modeset (e.g. a VT switch). The older +# xe.enable_psr=0 knob does not cover Panel Replay. +# +# The panel's EDID on eDP-1 reads as empty, so xe takes backlight type from +# VBT (which says PWM) but the panel actually wants DPCD AUX backlight. +# Without xe.enable_dpcd_backlight=1, intel_backlight sysfs writes succeed +# but produce no visible change; brightness is effectively binary. + +if omarchy-hw-asus-expertbook-b9406; then + sudo mkdir -p /etc/limine-entry-tool.d + cat </dev/null +# ASUS ExpertBook B9406 (Panther Lake / Xe3) display workarounds +KERNEL_CMDLINE[default]+=" xe.enable_panel_replay=0" +KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1" +EOF +fi diff --git a/install/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh b/install/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh new file mode 100644 index 00000000..d39da070 --- /dev/null +++ b/install/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh @@ -0,0 +1,23 @@ +# Touchpad quirks for ASUS ExpertBook B9406 (Pixart 093A:4F05 on i2c-hid). +# +# The kernel produces perfect Precision Touchpad reports but libinput's +# jump-detection heuristic discards every motion event as "kernel bug: +# Touch jump detected and discarded" because the pad reports pressure +# values of 0-1, confusing the contact stability check. Button events +# still pass, so clicks register but motion does not. +# +# Mask the pressure axes with a quirks override, same pattern as the +# Asus UX302LA entry in libinput's shipped 50-system-asus.quirks. + +if omarchy-hw-asus-expertbook-b9406; then + sudo mkdir -p /etc/libinput + sudo tee /etc/libinput/asus-expertbook-b9406.quirks >/dev/null < /dev/null <<'EOF' +ACTION=="add|change", KERNEL=="event*", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="1a30", ENV{ID_INPUT_TOUCHPAD}=="1", ENV{ID_INPUT_TOUCHPAD_INTEGRATION}="internal" +EOF + sudo udevadm control --reload-rules +fi diff --git a/install/config/theme.sh b/install/config/theme.sh index 439ec08d..0dab91ad 100644 --- a/install/config/theme.sh +++ b/install/config/theme.sh @@ -24,4 +24,4 @@ sudo mkdir -p /etc/brave/policies/managed sudo chmod a+rw /etc/brave/policies/managed # Default Chromium to follow system appearance ("device") instead of dark -echo '{"browser":{"theme":{"color_scheme":0}}}' | sudo tee /usr/lib/chromium/initial_preferences >/dev/null +echo '{"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' | sudo tee /usr/lib/chromium/initial_preferences >/dev/null diff --git a/install/config/user-dirs.sh b/install/config/user-dirs.sh new file mode 100644 index 00000000..331d5dfc --- /dev/null +++ b/install/config/user-dirs.sh @@ -0,0 +1,12 @@ +mkdir -p ~/Downloads ~/Pictures ~/Videos ~/.config/gtk-3.0 + +xdg-user-dirs-update --set TEMPLATES "$HOME" +xdg-user-dirs-update --set PUBLICSHARE "$HOME" +xdg-user-dirs-update --set DESKTOP "$HOME" + +rmdir ~/Templates ~/Public ~/Desktop 2>/dev/null || true + +touch ~/.config/gtk-3.0/bookmarks +for dir in Downloads Pictures Videos; do + printf 'file://%s/%s %s\n' "$HOME" "$dir" "$dir" >>~/.config/gtk-3.0/bookmarks +done diff --git a/migrations/1777017528.sh b/migrations/1777017528.sh new file mode 100644 index 00000000..7f340748 --- /dev/null +++ b/migrations/1777017528.sh @@ -0,0 +1,6 @@ +echo "Show battery status notification on right-click of the waybar battery icon" + +if ! grep -q 'omarchy-battery-status' ~/.config/waybar/config.jsonc; then + sed -i '/"on-click": "omarchy-menu power",/a\ "on-click-right": "notify-send -u low \\"$(omarchy-battery-status)\\"",' ~/.config/waybar/config.jsonc + omarchy-restart-waybar +fi diff --git a/migrations/1777018408.sh b/migrations/1777018408.sh new file mode 100644 index 00000000..af644b53 --- /dev/null +++ b/migrations/1777018408.sh @@ -0,0 +1,9 @@ +echo "Fix Chromium appearance mode to also set color_scheme2 (the field Chromium actually reads now)" + +echo '{"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' | sudo tee /usr/lib/chromium/initial_preferences >/dev/null + +# Update existing Chromium profiles so color_scheme2 follows the system, not dark +PREFS="$HOME/.config/chromium/Default/Preferences" +if [[ -f "$PREFS" ]] && command -v jq &>/dev/null; then + jq '.browser.theme.color_scheme = 0 | .browser.theme.color_scheme2 = 0' "$PREFS" > "$PREFS.tmp" && mv "$PREFS.tmp" "$PREFS" +fi diff --git a/migrations/1777072987.sh b/migrations/1777072987.sh new file mode 100644 index 00000000..e2d6080c --- /dev/null +++ b/migrations/1777072987.sh @@ -0,0 +1,7 @@ +echo "Fix disable-while-typing on ASUS ROG Flow Z13 detachable keyboard" + +source $OMARCHY_PATH/install/config/hardware/asus/fix-z13-touchpad.sh + +if [[ -f /etc/udev/rules.d/99-omarchy-asus-z13-touchpad.rules ]]; then + omarchy-state set reboot-required +fi