diff --git a/bin/omarchy-cmd-audio-switch b/bin/omarchy-cmd-audio-switch index de81cc3f..7d1ea015 100755 --- a/bin/omarchy-cmd-audio-switch +++ b/bin/omarchy-cmd-audio-switch @@ -2,15 +2,11 @@ # Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute. -focused_monitor=$(omarchy-hyprland-monitor-focused) - sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]') sinks_count=$(echo "$sinks" | jq '. | length') if (( sinks_count == 0 )); then - swayosd-client \ - --monitor "$focused_monitor" \ - --custom-message "No audio devices found" + omarchy-swayosd-client --custom-message "No audio devices found" exit 1 fi @@ -57,10 +53,10 @@ fi next_sink_volume_icon="sink-volume-${icon_state}-symbolic" if [[ $next_sink_name != $current_sink_name ]]; then - pactl set-default-sink "$next_sink_name" + next_sink_wpid=$(echo "$next_sink" | jq -r '.properties."object.id"') + wpctl set-default "$next_sink_wpid" fi -swayosd-client \ - --monitor "$focused_monitor" \ +omarchy-swayosd-client \ --custom-message "$next_sink_description" \ --custom-icon "$next_sink_volume_icon" diff --git a/bin/omarchy-cmd-first-run b/bin/omarchy-cmd-first-run index 830bef54..67a0c321 100755 --- a/bin/omarchy-cmd-first-run +++ b/bin/omarchy-cmd-first-run @@ -10,6 +10,7 @@ if [[ -f $FIRST_RUN_MODE ]]; then rm -f "$FIRST_RUN_MODE" bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh" + bash "$OMARCHY_PATH/install/first-run/recover-internal-monitor.sh" bash "$OMARCHY_PATH/install/first-run/cleanup-reboot-sudoers.sh" bash "$OMARCHY_PATH/install/first-run/firewall.sh" bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh" diff --git a/bin/omarchy-cmd-mic-mute b/bin/omarchy-cmd-mic-mute index 7f10fa94..3931d0b8 100755 --- a/bin/omarchy-cmd-mic-mute +++ b/bin/omarchy-cmd-mic-mute @@ -1,9 +1,11 @@ #!/bin/bash -# Toggle microphone mute. Dell XPS systems get special handling for the hardware LED. +# 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 +elif omarchy-hw-match "ThinkPad"; then + omarchy-cmd-mic-mute-thinkpad else - swayosd-client --monitor "$(omarchy-hyprland-monitor-focused)" --input-volume mute-toggle + omarchy-swayosd-client --input-volume mute-toggle fi diff --git a/bin/omarchy-cmd-mic-mute-thinkpad b/bin/omarchy-cmd-mic-mute-thinkpad new file mode 100755 index 00000000..a6e551a7 --- /dev/null +++ b/bin/omarchy-cmd-mic-mute-thinkpad @@ -0,0 +1,23 @@ +#!/bin/bash + +# Toggle microphone mute on ThinkPad systems. Uses wpctl for reliable toggling +# and syncs the platform::micmute LED via brightnessctl. + +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 + +swayosd-client \ + --monitor "$(omarchy-hyprland-monitor-focused)" \ + --custom-message "$osd_message" \ + --custom-icon "$osd_icon" diff --git a/bin/omarchy-cmd-mic-mute-xps b/bin/omarchy-cmd-mic-mute-xps index 8e7ca135..16b2da19 100755 --- a/bin/omarchy-cmd-mic-mute-xps +++ b/bin/omarchy-cmd-mic-mute-xps @@ -38,7 +38,6 @@ if [[ -e /sys/class/leds/platform::micmute/brightness ]]; then done fi -swayosd-client \ - --monitor "$(omarchy-hyprland-monitor-focused)" \ +omarchy-swayosd-client \ --custom-message "$osd_message" \ --custom-icon "$osd_icon" diff --git a/bin/omarchy-cmd-screenrecord b/bin/omarchy-cmd-screenrecord index 8c730cbb..1e45d4ab 100755 --- a/bin/omarchy-cmd-screenrecord +++ b/bin/omarchy-cmd-screenrecord @@ -134,7 +134,7 @@ stop_screenrecording() { pkill -9 -f "^gpu-screen-recorder" notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000 else - trim_first_frame + finalize_recording local filename=$(cat "$RECORDING_FILE" 2>/dev/null) local preview="${filename%.mp4}-preview.png" @@ -159,17 +159,24 @@ screenrecording_active() { pgrep -f "^gpu-screen-recorder" >/dev/null } -trim_first_frame() { +finalize_recording() { local latest latest=$(cat "$RECORDING_FILE" 2>/dev/null) + [[ -f $latest ]] || return - if [[ -n $latest && -f $latest ]]; then - local trimmed="${latest%.mp4}-trimmed.mp4" - if ffmpeg -y -ss 0.1 -i "$latest" -c copy "$trimmed" -loglevel quiet 2>/dev/null; then - mv "$trimmed" "$latest" - else - rm -f "$trimmed" - 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") + 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) + fi + + local processed="${latest%.mp4}-processed.mp4" + if ffmpeg "${args[@]}" "$processed" -loglevel quiet 2>/dev/null; then + mv "$processed" "$latest" + else + rm -f "$processed" fi } diff --git a/bin/omarchy-hw-external-monitors b/bin/omarchy-hw-external-monitors new file mode 100755 index 00000000..b5dc967b --- /dev/null +++ b/bin/omarchy-hw-external-monitors @@ -0,0 +1,10 @@ +#!/bin/bash + +# Returns true when an external monitor is physically connected. +# Uses kernel DRM state so the result is independent of Hyprland's startup timing. + +for status in /sys/class/drm/card*-*/status; do + [[ "$status" == *-eDP-*/status ]] && continue + [[ "$(<"$status")" == "connected" ]] && exit 0 +done +exit 1 diff --git a/bin/omarchy-hw-hybrid-gpu b/bin/omarchy-hw-hybrid-gpu new file mode 100755 index 00000000..dcd0a8fd --- /dev/null +++ b/bin/omarchy-hw-hybrid-gpu @@ -0,0 +1,3 @@ +#!/bin/bash + +(($(lspci | grep -cE 'VGA|3D|Display') >= 2)) diff --git a/bin/omarchy-hw-match b/bin/omarchy-hw-match index ae3eb44d..c27875fa 100755 --- a/bin/omarchy-hw-match +++ b/bin/omarchy-hw-match @@ -1,6 +1,7 @@ #!/bin/bash -# Match against the computer's DMI product name (case-insensitive). -# Usage: omarchy-hw-match "XPS" +# Match against the computer's DMI product name or product family (case-insensitive). +# Usage: omarchy-hw-match "XPS" or omarchy-hw-match "ThinkPad" -grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null +grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null || +grep -qi "$1" /sys/class/dmi/id/product_family 2>/dev/null diff --git a/bin/omarchy-hw-recover-internal-monitor b/bin/omarchy-hw-recover-internal-monitor new file mode 100755 index 00000000..794cafea --- /dev/null +++ b/bin/omarchy-hw-recover-internal-monitor @@ -0,0 +1,11 @@ +#!/bin/bash + +# Clear the internal-monitor-disable toggle if no external display is connected. +# Runs before the graphical session so Hyprland doesn't block on having no output +# to render to when the user rebooted with the external unplugged. + +TOGGLE="$HOME/.local/state/omarchy/toggles/hypr/internal-monitor-disable.conf" + +if [[ -f $TOGGLE ]] && ! omarchy-hw-external-monitors; then + rm -f "$TOGGLE" +fi diff --git a/bin/omarchy-hw-touchpad b/bin/omarchy-hw-touchpad new file mode 100755 index 00000000..a4d813e0 --- /dev/null +++ b/bin/omarchy-hw-touchpad @@ -0,0 +1,4 @@ +#!/bin/bash + +device=$(hyprctl devices -j | jq -r '[.mice[] | .name | select(test("touchpad|trackpad"; "i"))] | first // empty') +[[ -n $device ]] && echo "$device" diff --git a/bin/omarchy-hyprland-monitor-internal b/bin/omarchy-hyprland-monitor-internal new file mode 100755 index 00000000..6936d2cf --- /dev/null +++ b/bin/omarchy-hyprland-monitor-internal @@ -0,0 +1,37 @@ +#!/bin/bash + +TOGGLE="internal-monitor-disable" + +enable() { + if omarchy-hyprland-toggle-enabled "$TOGGLE"; then + omarchy-hyprland-toggle --disabled-notification "󰍹 Laptop display enabled" "$TOGGLE" + fi +} + +disable() { + if omarchy-hw-external-monitors; then + if omarchy-hyprland-toggle-disabled "$TOGGLE"; then + omarchy-hyprland-toggle --enabled-notification "󰍹 Laptop display disabled" "$TOGGLE" + fi + else + notify-send -u low "󰍹 Can't disable the only active display" + exit 1 + fi +} + +recover() { + if ! omarchy-hw-external-monitors && omarchy-hyprland-toggle-enabled "$TOGGLE"; then + omarchy-hyprland-toggle "$TOGGLE" + fi +} + +case "$1" in + on) enable ;; + off) disable ;; + toggle) if omarchy-hyprland-toggle-enabled "$TOGGLE"; then enable; else disable; fi ;; + recover) recover ;; + *) + echo "Usage: $(basename "$0") {on|off|toggle|recover}" >&2 + exit 1 + ;; +esac diff --git a/bin/omarchy-hyprland-monitor-internal-toggle b/bin/omarchy-hyprland-monitor-internal-toggle deleted file mode 100755 index 6e06d81b..00000000 --- a/bin/omarchy-hyprland-monitor-internal-toggle +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Toggle the internal laptop display on/off. -# Useful when connected to an external monitor and you want to close the lid -# or just use the external display only. - -INTERNAL=$(hyprctl monitors all -j | jq -r '.[] | select(.name | startswith("eDP")) | .name') - -if [[ -z $INTERNAL ]]; then - notify-send -u low "󰍹 No internal display found" - exit 1 -fi - -DISABLED=$(hyprctl monitors all -j | jq -r --arg m "$INTERNAL" '.[] | select(.name == $m) | .disabled') - -if [[ $DISABLED == "true" ]]; then - hyprctl keyword monitor "$INTERNAL,preferred,auto,auto" - hyprctl dispatch movecursor 0 0 - notify-send -u low "󰍹 Internal display on" -else - ACTIVE_COUNT=$(hyprctl monitors -j | jq 'length') - if [[ $ACTIVE_COUNT -le 1 ]]; then - notify-send -u low "󰍹 Can't disable the only active display" - exit 1 - fi - - hyprctl keyword monitor "$INTERNAL,disable" - notify-send -u low "󰍹 Internal display off" -fi diff --git a/bin/omarchy-hyprland-monitor-scaling-cycle b/bin/omarchy-hyprland-monitor-scaling-cycle index 233ec06c..008dc864 100755 --- a/bin/omarchy-hyprland-monitor-scaling-cycle +++ b/bin/omarchy-hyprland-monitor-scaling-cycle @@ -8,15 +8,28 @@ WIDTH=$(echo "$MONITOR_INFO" | jq -r '.width') HEIGHT=$(echo "$MONITOR_INFO" | jq -r '.height') REFRESH_RATE=$(echo "$MONITOR_INFO" | jq -r '.refreshRate') -# Cycle through scales: 1 → 1.6 → 2 → 3 → 1 -CURRENT_INT=$(awk -v s="$CURRENT_SCALE" 'BEGIN { printf "%.0f", s * 10 }') +# Cycle through scales: 1 → 1.25 → 1.6 → 2 → 3 → 1 (or reverse with --reverse) +SCALES=(1 1.25 1.6 2 3) -case "$CURRENT_INT" in -10) NEW_SCALE=1.6 ;; -16) NEW_SCALE=2 ;; -20) NEW_SCALE=3 ;; -*) NEW_SCALE=1 ;; -esac +# Find the index of the scale closest to the current one (Hyprland may +# snap fractional scales to nearby values, so we can't match exactly) +CURRENT_IDX=$(awk -v s="$CURRENT_SCALE" -v list="${SCALES[*]}" 'BEGIN { + n = split(list, arr, " ") + best = 0; best_diff = 1e9 + for (i = 1; i <= n; i++) { + d = s - arr[i]; if (d < 0) d = -d + if (d < best_diff) { best_diff = d; best = i - 1 } + } + print best +}') + +if [[ "$1" == "--reverse" ]]; then + NEW_IDX=$(( (CURRENT_IDX - 1 + ${#SCALES[@]}) % ${#SCALES[@]} )) +else + NEW_IDX=$(( (CURRENT_IDX + 1) % ${#SCALES[@]} )) +fi + +NEW_SCALE=${SCALES[$NEW_IDX]} hyprctl keyword monitor "$ACTIVE_MONITOR,${WIDTH}x${HEIGHT}@${REFRESH_RATE},auto,$NEW_SCALE" notify-send -u low "󰍹 Display scaling set to ${NEW_SCALE}x" diff --git a/bin/omarchy-hyprland-monitor-watch b/bin/omarchy-hyprland-monitor-watch new file mode 100755 index 00000000..470bf3de --- /dev/null +++ b/bin/omarchy-hyprland-monitor-watch @@ -0,0 +1,14 @@ +#!/bin/bash + +# Listen on Hyprland's event socket and recover the internal display whenever +# a monitor is removed. + +SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" + +socat -U - "UNIX-CONNECT:$SOCKET" | while read -r event; do + case "$event" in + monitorremoved\>\>*|monitorremovedv2\>\>*) + omarchy-hyprland-monitor-internal recover + ;; + esac +done diff --git a/bin/omarchy-hyprland-toggle b/bin/omarchy-hyprland-toggle new file mode 100755 index 00000000..e272beed --- /dev/null +++ b/bin/omarchy-hyprland-toggle @@ -0,0 +1,31 @@ +#!/bin/bash + +# Toggle permanent Hyprland flags by copying them into a directory that's sourced entirely. + +ENABLED_NOTIFICATION="" +DISABLED_NOTIFICATION="" + +while [[ $# -gt 1 ]]; do + case $1 in + --enabled-notification) ENABLED_NOTIFICATION="$2"; shift 2 ;; + --disabled-notification) DISABLED_NOTIFICATION="$2"; shift 2 ;; + *) break ;; + esac +done + +FLAG_NAME="$1" +FLAG="$HOME/.local/state/omarchy/toggles/hypr/$FLAG_NAME.conf" +FLAG_SOURCE="$OMARCHY_PATH/default/hypr/toggles/$FLAG_NAME.conf" + +if [[ -f $FLAG ]]; then + rm $FLAG + [[ -n $DISABLED_NOTIFICATION ]] && notify-send -u low "$DISABLED_NOTIFICATION" +elif [[ -f $FLAG_SOURCE ]]; then + cp $FLAG_SOURCE $FLAG + [[ -n $ENABLED_NOTIFICATION ]] && notify-send -u low "$ENABLED_NOTIFICATION" +else + echo "Flag not found: $FLAG_NAME" + exit 1 +fi + +hyprctl reload diff --git a/bin/omarchy-hyprland-toggle-disabled b/bin/omarchy-hyprland-toggle-disabled new file mode 100755 index 00000000..4e526d09 --- /dev/null +++ b/bin/omarchy-hyprland-toggle-disabled @@ -0,0 +1,5 @@ +#!/bin/bash + +# Check if a Hyprland toggle is currently disabled (missing). + +[[ ! -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]] diff --git a/bin/omarchy-hyprland-toggle-enabled b/bin/omarchy-hyprland-toggle-enabled new file mode 100755 index 00000000..59a273a4 --- /dev/null +++ b/bin/omarchy-hyprland-toggle-enabled @@ -0,0 +1,5 @@ +#!/bin/bash + +# Check if a Hyprland toggle is currently enabled. + +[[ -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]] diff --git a/bin/omarchy-hyprland-window-gaps-toggle b/bin/omarchy-hyprland-window-gaps-toggle index d2cf2ffd..082e4574 100755 --- a/bin/omarchy-hyprland-window-gaps-toggle +++ b/bin/omarchy-hyprland-window-gaps-toggle @@ -1,15 +1,5 @@ #!/bin/bash -# Toggles the window gaps globally between no gaps and the default 10/5/2. +# Toggles the window gaps globally between no gaps and the default. -gaps=$(hyprctl getoption general:gaps_out -j | jq -r '.custom' | awk '{print $1}') - -if [[ $gaps == "0" ]]; then - hyprctl keyword general:gaps_out 10 - hyprctl keyword general:gaps_in 5 - hyprctl keyword general:border_size 2 -else - hyprctl keyword general:gaps_out 0 - hyprctl keyword general:gaps_in 0 - hyprctl keyword general:border_size 0 -fi +omarchy-hyprland-toggle window-no-gaps diff --git a/bin/omarchy-hyprland-window-single-square-aspect-toggle b/bin/omarchy-hyprland-window-single-square-aspect-toggle index 50ccdac9..70615793 100755 --- a/bin/omarchy-hyprland-window-single-square-aspect-toggle +++ b/bin/omarchy-hyprland-window-single-square-aspect-toggle @@ -1,13 +1,8 @@ #!/bin/bash -# Check current single_window_aspect_ratio setting -CURRENT_VALUE=$(hyprctl getoption "layout:single_window_aspect_ratio" 2>/dev/null | head -1) +# Toggle single-window square aspect ratio. -# Parse vec2 output: "vec2: [1, 1]" or "vec2: [0, 0]" -if [[ $CURRENT_VALUE == *"[1, 1]"* ]]; then - hyprctl keyword layout:single_window_aspect_ratio "0 0" - notify-send -u low " Disable single-window square aspect ratio" -else - hyprctl keyword layout:single_window_aspect_ratio "1 1" - notify-send -u low " Enable single-window square aspect" -fi +omarchy-hyprland-toggle \ + --enabled-notification " Enable single-window square aspect ratio" \ + --disabled-notification " Disable single-window square aspect ratio" \ + single-window-aspect-ratio diff --git a/bin/omarchy-install-tailscale b/bin/omarchy-install-tailscale index a4e9ed5b..4017eb80 100755 --- a/bin/omarchy-install-tailscale +++ b/bin/omarchy-install-tailscale @@ -2,9 +2,11 @@ # Install the Tailscale mesh VPN service and a web app for the Tailscale Admin Console. -curl -fsSL https://tailscale.com/install.sh | sh +echo -e "\nInstalling Tailscale..." +omarchy-pkg-add tailscale echo -e "\nStarting Tailscale..." +sudo systemctl enable --now tailscaled.service sudo tailscale up --accept-routes omarchy-webapp-install "Tailscale" "https://login.tailscale.com/admin/machines" https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/tailscale-light.png diff --git a/bin/omarchy-launch-screensaver b/bin/omarchy-launch-screensaver index aab3cb0e..b672c3e5 100755 --- a/bin/omarchy-launch-screensaver +++ b/bin/omarchy-launch-screensaver @@ -11,7 +11,7 @@ fi pgrep -f org.omarchy.screensaver && exit 0 # Allow screensaver to be turned off but also force started -if [[ -f ~/.local/state/omarchy/toggles/screensaver-off ]] && [[ $1 != "force" ]]; then +if omarchy-toggle-enabled screensaver-off && [[ $1 != "force" ]]; then exit 1 fi diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 3ee0ea5e..4cd677c2 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -168,8 +168,9 @@ show_share_menu() { } show_toggle_menu() { - case $(menu "Toggle" "󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Monitor Scaling\n󰛧 Laptop Display") in + 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" + case $(menu "Toggle" "$options") in *Screensaver*) omarchy-toggle-screensaver ;; *Nightlight*) omarchy-toggle-nightlight ;; *Idle*) omarchy-toggle-idle ;; @@ -178,15 +179,26 @@ show_toggle_menu() { *Ratio*) omarchy-hyprland-window-single-square-aspect-toggle ;; *Gaps*) omarchy-hyprland-window-gaps-toggle ;; *Scaling*) omarchy-hyprland-monitor-scaling-cycle ;; - *Laptop*) omarchy-hyprland-monitor-internal-toggle ;; *) back_to show_trigger_menu ;; esac } show_hardware_menu() { - case $(menu "Toggle" " Hybrid GPU") in + local options="󰛧 Laptop Display" + + if omarchy-hw-hybrid-gpu; then + options="$options\n Hybrid GPU" + fi + + if omarchy-hw-touchpad; then + options="$options\n󰟸 Touchpad" + fi + + case $(menu "Toggle" "$options") in + *Laptop*) omarchy-hyprland-monitor-internal toggle ;; + *Touchpad*) omarchy-toggle-touchpad ;; *"Hybrid GPU"*) present_terminal omarchy-toggle-hybrid-gpu ;; - *) show_trigger_menu ;; + *) back_to show_trigger_menu ;; esac } @@ -277,7 +289,7 @@ show_setup_config_menu() { show_setup_system_menu() { local options="" - if [[ -f ~/.local/state/omarchy/toggles/suspend-off ]]; then + if omarchy-toggle-enabled suspend-off; then options="$options󰒲 Enable Suspend" else options="$options󰒲 Disable Suspend" @@ -529,9 +541,10 @@ show_update_channel_menu() { esac } show_update_process_menu() { - case $(menu "Restart" " Hypridle\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in + case $(menu "Restart" " Hypridle\n Hyprsunset\n󰎟 Mako\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in *Hypridle*) omarchy-restart-hypridle ;; *Hyprsunset*) omarchy-restart-hyprsunset ;; + *Mako*) omarchy-restart-mako ;; *Swayosd*) omarchy-restart-swayosd ;; *Walker*) omarchy-restart-walker ;; *Waybar*) omarchy-restart-waybar ;; @@ -578,7 +591,7 @@ show_about() { show_system_menu() { local options="󱄄 Screensaver\n Lock" - [[ ! -f ~/.local/state/omarchy/toggles/suspend-off ]] && options="$options\n󰒲 Suspend" + ! omarchy-toggle-enabled suspend-off && options="$options\n󰒲 Suspend" omarchy-hibernation-available && options="$options\n󰤁 Hibernate" options="$options\n󰍃 Logout\n󰜉 Restart\n󰐥 Shutdown" @@ -604,6 +617,7 @@ go_to_menu() { *learn*) show_learn_menu ;; *trigger*) show_trigger_menu ;; *toggle*) show_toggle_menu ;; + *hardware*) show_hardware_menu ;; *share*) show_share_menu ;; *background*) show_background_menu ;; *capture*) show_capture_menu ;; diff --git a/bin/omarchy-menu-keybindings b/bin/omarchy-menu-keybindings index 34486206..7aa0490a 100755 --- a/bin/omarchy-menu-keybindings +++ b/bin/omarchy-menu-keybindings @@ -202,7 +202,7 @@ prioritize_entries() { if (match(line, /Move window to workspace/)) prio = 28 if (match(line, /Move window silently to workspace/)) prio = 29 if (match(line, /Swap window/)) prio = 30 - if (match(line, /Move window focus/)) prio = 31 + if (match(line, /Focus/)) prio = 31 if (match(line, /Move window$/)) prio = 32 if (match(line, /Resize window/)) prio = 33 if (match(line, /Expand window/)) prio = 34 diff --git a/bin/omarchy-migrate b/bin/omarchy-migrate index a60cba74..0e1ec2cc 100755 --- a/bin/omarchy-migrate +++ b/bin/omarchy-migrate @@ -10,7 +10,7 @@ mkdir -p "$STATE_DIR" mkdir -p "$STATE_DIR/skipped" # Run any pending migrations -for file in ~/.local/share/omarchy/migrations/*.sh; do +for file in $OMARCHY_PATH/migrations/*.sh; do filename=$(basename "$file") if [[ ! -f $STATE_DIR/$filename && ! -f $STATE_DIR/skipped/$filename ]]; then diff --git a/bin/omarchy-refresh-hyprland b/bin/omarchy-refresh-hyprland index 10e02674..49f484a0 100755 --- a/bin/omarchy-refresh-hyprland +++ b/bin/omarchy-refresh-hyprland @@ -7,3 +7,5 @@ omarchy-refresh-config hypr/bindings.conf omarchy-refresh-config hypr/input.conf omarchy-refresh-config hypr/looknfeel.conf omarchy-refresh-config hypr/hyprland.conf +omarchy-refresh-config hypr/monitors.conf +bash "$OMARCHY_PATH/install/config/detect-keyboard-layout.sh" diff --git a/bin/omarchy-sudo-passwordless-toggle b/bin/omarchy-sudo-passwordless-toggle index f2071f62..530a7dea 100755 --- a/bin/omarchy-sudo-passwordless-toggle +++ b/bin/omarchy-sudo-passwordless-toggle @@ -1,12 +1,19 @@ #!/bin/bash # Toggle passwordless sudo for the current user. +# Usage: omarchy-sudo-passwordless-toggle [MINUTES] # First run: enables passwordless sudo for 15 minutes (after confirmation). # Second run: disables it early. NOPASSWD_FILE="/etc/sudoers.d/99-omarchy-nopasswd-${USER}" TIMER_NAME="omarchy-nopasswd-expire-${USER}" +MINUTES=${1:-15} +if [[ $1 && ! $1 =~ ^[0-9]+$ ]]; then + echo "Usage: omarchy-sudo-passwordless-toggle [MINUTES]" >&2 + exit 1 +fi + # 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" @@ -14,28 +21,37 @@ fi # Check for the file directly — sudo -n can stay cached or be granted by other rules if sudo test -f "$NOPASSWD_FILE"; then - sudo rm "$NOPASSWD_FILE" - sudo systemctl stop "${TIMER_NAME}.timer" 2>/dev/null - echo "Passwordless sudo has been DISABLED. Sudo will require a password again." + if [[ $1 ]]; then + sudo systemctl stop "${TIMER_NAME}.timer" 2>/dev/null + sudo systemd-run --on-active=${MINUTES}m --timer-property=AccuracySec=1s --unit="$TIMER_NAME" \ + rm "$NOPASSWD_FILE" + echo "Passwordless sudo timer updated. It will now automatically disable in ${MINUTES} minutes." + else + sudo rm "$NOPASSWD_FILE" + sudo systemctl stop "${TIMER_NAME}.timer" 2>/dev/null + echo "Passwordless sudo has been DISABLED. Sudo will require a password again." + fi else echo "" - echo "⚠️ WARNING: This will allow ANY process running as your user to" - echo "execute ANY command as root WITHOUT a password for 15 minutes." + 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," echo "but it significantly weakens the security of your system." echo "Anyone or anything with access to your user account gets full root." echo "" - echo "Passwordless sudo will automatically disable after 15 minutes." + echo "Passwordless sudo will automatically disable after ${MINUTES} minutes." echo "Run this command again to disable it early." echo "" - if gum confirm "Enable passwordless sudo for 15 minutes? This is a significant security risk!"; then + if gum confirm "Enable passwordless sudo for ${MINUTES} minutes? This is a significant security risk!"; then echo "${USER} ALL=(ALL) NOPASSWD: ALL" | sudo tee "$NOPASSWD_FILE" > /dev/null sudo chmod 440 "$NOPASSWD_FILE" - sudo systemd-run --on-active=15m --timer-property=AccuracySec=1s --unit="$TIMER_NAME" \ + sudo systemd-run --on-active=${MINUTES}m --timer-property=AccuracySec=1s --unit="$TIMER_NAME" \ rm "$NOPASSWD_FILE" - echo "Passwordless sudo has been ENABLED. It will automatically disable in 15 minutes." + + 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." else echo "Aborted. No changes made." diff --git a/bin/omarchy-swayosd-brightness b/bin/omarchy-swayosd-brightness index 0dbe44d2..8cc1f119 100755 --- a/bin/omarchy-swayosd-brightness +++ b/bin/omarchy-swayosd-brightness @@ -8,8 +8,7 @@ percent="$1" progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')" [[ $progress == "0.00" ]] && progress="0.01" -swayosd-client \ - --monitor "$(omarchy-hyprland-monitor-focused)" \ - --custom-icon display-brightness \ +omarchy-swayosd-client \ + --custom-icon display-brightness-symbolic \ --custom-progress "$progress" \ --custom-progress-text "${percent}%" diff --git a/bin/omarchy-swayosd-client b/bin/omarchy-swayosd-client new file mode 100755 index 00000000..e05beb4f --- /dev/null +++ b/bin/omarchy-swayosd-client @@ -0,0 +1,5 @@ +#!/bin/bash + +# Wrapper for swayosd-client that targets the currently focused monitor. + +exec swayosd-client --monitor "$(omarchy-hyprland-monitor-focused)" "$@" diff --git a/bin/omarchy-swayosd-kbd-brightness b/bin/omarchy-swayosd-kbd-brightness index bf51d749..729b7c4c 100755 --- a/bin/omarchy-swayosd-kbd-brightness +++ b/bin/omarchy-swayosd-kbd-brightness @@ -8,8 +8,7 @@ percent="$1" progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')" [[ $progress == "0.00" ]] && progress="0.01" -swayosd-client \ - --monitor "$(omarchy-hyprland-monitor-focused)" \ - --custom-icon keyboard-brightness \ +omarchy-swayosd-client \ + --custom-icon keyboard-brightness-symbolic \ --custom-progress "$progress" \ --custom-progress-text "${percent}%" diff --git a/bin/omarchy-theme-install b/bin/omarchy-theme-install index 0c0f0c4e..5949c7ea 100755 --- a/bin/omarchy-theme-install +++ b/bin/omarchy-theme-install @@ -15,7 +15,7 @@ if [[ -z $REPO_URL ]]; then fi THEMES_DIR="$HOME/.config/omarchy/themes" -THEME_NAME=$(basename "$REPO_URL" .git | sed -E 's/^omarchy-//; s/-theme$//') +THEME_NAME=$(basename "$REPO_URL" .git | sed -E 's/^omarchy-//; s/-theme$//' | tr '[:upper:]' '[:lower:]') THEME_PATH="$THEMES_DIR/$THEME_NAME" # Remove existing theme if present diff --git a/bin/omarchy-theme-set-browser b/bin/omarchy-theme-set-browser index a069c167..05c8fc96 100755 --- a/bin/omarchy-theme-set-browser +++ b/bin/omarchy-theme-set-browser @@ -14,11 +14,11 @@ if omarchy-cmd-present chromium || omarchy-cmd-present brave; then if omarchy-cmd-present chromium; then echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/chromium/policies/managed/color.json" >/dev/null - chromium --refresh-platform-policy --no-startup-window &>/dev/null + pgrep -x chromium >/dev/null && chromium --refresh-platform-policy --no-startup-window &>/dev/null fi if omarchy-cmd-present brave; then echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/brave/policies/managed/color.json" >/dev/null - brave --refresh-platform-policy --no-startup-window &>/dev/null + pgrep -x brave >/dev/null && brave --refresh-platform-policy --no-startup-window &>/dev/null fi fi diff --git a/bin/omarchy-theme-set-vscode b/bin/omarchy-theme-set-vscode index ee8ad37d..bc9b5716 100755 --- a/bin/omarchy-theme-set-vscode +++ b/bin/omarchy-theme-set-vscode @@ -7,9 +7,8 @@ VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json" set_theme() { local editor_cmd="$1" local settings_path="$2" - local skip_flag="$3" - omarchy-cmd-present "$editor_cmd" && [[ ! -f $skip_flag ]] || return 0 + omarchy-cmd-present "$editor_cmd" || return 0 if [[ -f $VS_CODE_THEME ]]; then theme_name=$(jq -r '.name' "$VS_CODE_THEME") @@ -34,7 +33,7 @@ set_theme() { fi } -set_theme "code" "$HOME/.config/Code/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes" -set_theme "code-insiders" "$HOME/.config/Code - Insiders/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-vscode-insiders-theme-changes" -set_theme "codium" "$HOME/.config/VSCodium/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-codium-theme-changes" -set_theme "cursor" "$HOME/.config/Cursor/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-cursor-theme-changes" +! omarchy-toggle-enabled skip-vscode-theme-changes && set_theme "code" "$HOME/.config/Code/User/settings.json" +! omarchy-toggle-enabled skip-vscode-insiders-theme-changes && set_theme "code-insiders" "$HOME/.config/Code - Insiders/User/settings.json" +! omarchy-toggle-enabled skip-codium-theme-changes && set_theme "codium" "$HOME/.config/VSCodium/User/settings.json" +! omarchy-toggle-enabled skip-cursor-theme-changes && set_theme "cursor" "$HOME/.config/Cursor/User/settings.json" diff --git a/bin/omarchy-toggle b/bin/omarchy-toggle new file mode 100755 index 00000000..7db467fa --- /dev/null +++ b/bin/omarchy-toggle @@ -0,0 +1,26 @@ +#!/bin/bash + +# Toggle Omarchy features between enabled and disabled + +ENABLED_NOTIFICATION="" +DISABLED_NOTIFICATION="" + +while [[ $# -gt 1 ]]; do + case $1 in + --enabled-notification) ENABLED_NOTIFICATION="$2"; shift 2 ;; + --disabled-notification) DISABLED_NOTIFICATION="$2"; shift 2 ;; + *) break ;; + esac +done + +FLAG_NAME="$1" +FLAG="$HOME/.local/state/omarchy/toggles/$FLAG_NAME" + +if [[ -f $FLAG ]]; then + rm $FLAG + [[ -n $DISABLED_NOTIFICATION ]] && notify-send -u low "$DISABLED_NOTIFICATION" +else + mkdir -p "$(dirname $FLAG)" + touch $FLAG + [[ -n $ENABLED_NOTIFICATION ]] && notify-send -u low "$ENABLED_NOTIFICATION" +fi diff --git a/bin/omarchy-toggle-enabled b/bin/omarchy-toggle-enabled new file mode 100755 index 00000000..dd37c881 --- /dev/null +++ b/bin/omarchy-toggle-enabled @@ -0,0 +1,4 @@ +#!/bin/bash + +# Check if a toggle is enabled (flag file exists) +[[ -f "$HOME/.local/state/omarchy/toggles/$1" ]] diff --git a/bin/omarchy-toggle-screensaver b/bin/omarchy-toggle-screensaver index 9a36ab5e..33e8d1bc 100755 --- a/bin/omarchy-toggle-screensaver +++ b/bin/omarchy-toggle-screensaver @@ -1,12 +1,6 @@ #!/bin/bash -STATE_FILE=~/.local/state/omarchy/toggles/screensaver-off - -if [[ -f $STATE_FILE ]]; then - rm -f $STATE_FILE - notify-send -u low "󱄄 Screensaver enabled" -else - mkdir -p "$(dirname $STATE_FILE)" - touch $STATE_FILE - notify-send -u low "󱄄 Screensaver disabled" -fi +omarchy-toggle \ + --enabled-notification "󱄄 Screensaver disabled" \ + --disabled-notification "󱄄 Screensaver enabled" \ + screensaver-off diff --git a/bin/omarchy-toggle-suspend b/bin/omarchy-toggle-suspend index ab7d9e76..cd0d2191 100755 --- a/bin/omarchy-toggle-suspend +++ b/bin/omarchy-toggle-suspend @@ -1,12 +1,6 @@ #!/bin/bash -STATE_FILE=~/.local/state/omarchy/toggles/suspend-off - -if [[ -f $STATE_FILE ]]; then - rm -f $STATE_FILE - notify-send -u low "󰒲 Suspend now available in system menu" -else - mkdir -p "$(dirname $STATE_FILE)" - touch $STATE_FILE - notify-send -u low "󰒲 Suspend removed from system menu" -fi +omarchy-toggle \ + --enabled-notification "󰒲 Suspend removed from system menu" \ + --disabled-notification "󰒲 Suspend now available in system menu" \ + suspend-off diff --git a/bin/omarchy-toggle-touchpad b/bin/omarchy-toggle-touchpad new file mode 100755 index 00000000..6c8428ca --- /dev/null +++ b/bin/omarchy-toggle-touchpad @@ -0,0 +1,29 @@ +#!/bin/bash + +STATE_CONF="$HOME/.local/state/omarchy/toggles/hypr/touchpad-disabled.conf" + +device="$(omarchy-hw-touchpad)" + +if [[ -z $device ]]; then + echo "No touchpad device found" >&2 + exit 1 +fi + +enable() { + hyprctl keyword "device[$device]:enabled" true >/dev/null + rm -f "$STATE_CONF" + omarchy-swayosd-client --custom-icon input-touchpad-symbolic --custom-message "Touchpad enabled" +} + +disable() { + hyprctl keyword "device[$device]:enabled" false >/dev/null + mkdir -p "$(dirname "$STATE_CONF")" + printf 'device {\n name = %s\n enabled = false\n}\n' "$device" > "$STATE_CONF" + omarchy-swayosd-client --custom-icon touchpad-disabled-symbolic --custom-message "Touchpad disabled" +} + +case "${1:-toggle}" in + on) enable ;; + off) disable ;; + toggle) if [[ -f $STATE_CONF ]]; then enable; else disable; fi ;; +esac diff --git a/bin/omarchy-toggle-waybar b/bin/omarchy-toggle-waybar index 71387827..25762820 100755 --- a/bin/omarchy-toggle-waybar +++ b/bin/omarchy-toggle-waybar @@ -1,5 +1,7 @@ #!/bin/bash +omarchy-toggle waybar-off + if pgrep -x waybar >/dev/null; then pkill -x waybar else diff --git a/bin/omarchy-update-restart b/bin/omarchy-update-restart index ee03fbde..3a1bc4e2 100755 --- a/bin/omarchy-update-restart +++ b/bin/omarchy-update-restart @@ -2,7 +2,7 @@ echo -if [[ ! -d /usr/lib/modules/$(uname -r) ]]; then +if find /usr/lib/modules -maxdepth 2 -name vmlinuz -newermt "$(uptime -s)" 2>/dev/null | grep -q .; 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/bin/omarchy-voxtype-status b/bin/omarchy-voxtype-status index 039ebca7..acab6f30 100755 --- a/bin/omarchy-voxtype-status +++ b/bin/omarchy-voxtype-status @@ -1,5 +1,8 @@ #!/bin/bash +# Clean up the voxtype --follow child when Waybar reloads +trap 'kill 0' EXIT + if omarchy-cmd-present voxtype; then voxtype status --follow --extended --format json | while read -r line; do echo "$line" | jq -c '. + {alt: .class}' diff --git a/config/Typora/themes/ia_typora_night.css b/config/Typora/themes/ia_typora_night.css index d783d203..ac0b6c04 100644 --- a/config/Typora/themes/ia_typora_night.css +++ b/config/Typora/themes/ia_typora_night.css @@ -8,7 +8,7 @@ --light-header-color: #dbdbdb; /* H1-H3 */ --select-text-bg-color: #186a9a; --accent-color: #4f525a; - --background-color: #101010; + --background-color: #000000; --font-color: #bbbcbc; --header-color: #bebebe; /* H4-H6 */ --border-color: #232629; diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 6478d1be..ff272f9a 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -19,5 +19,8 @@ source = ~/.config/hypr/bindings.conf source = ~/.config/hypr/looknfeel.conf source = ~/.config/hypr/autostart.conf +# Toggle config flags dynamically +source = ~/.local/state/omarchy/toggles/hypr/*.conf + # Add any other personal Hyprland configuration below # windowrule = workspace 5, match:class qemu diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index 019bc925..01c9cde1 100644 --- a/config/hypr/monitors.conf +++ b/config/hypr/monitors.conf @@ -4,7 +4,7 @@ # Optimized for retina-class 2x displays, like 13" 2.8K, 27" 5K, 32" 6K. env = GDK_SCALE,2 -monitor=,preferred,auto,auto,vrr,1 +monitor=,preferred,auto,auto # Good compromise for 27" or 32" 4K monitors (but fractional!) # env = GDK_SCALE,1.75 @@ -21,3 +21,6 @@ monitor=,preferred,auto,auto,vrr,1 # Example for Framework 13 w/ 6K XDR Apple display # monitor = DP-5, 6016x3384@60, auto, 2 # monitor = eDP-1, 2880x1920@120, auto, 2 + +# Disable the second ghost monitor on an Apple 6K XDR over Thunderbolt +# monitor=DP-2,disable diff --git a/config/systemd/user/omarchy-recover-internal-monitor.service b/config/systemd/user/omarchy-recover-internal-monitor.service new file mode 100644 index 00000000..fef52180 --- /dev/null +++ b/config/systemd/user/omarchy-recover-internal-monitor.service @@ -0,0 +1,11 @@ +[Unit] +Description=Recover the internal monitor toggle when no external display is connected +Before=graphical-session-pre.target +ConditionPathExists=%h/.local/state/omarchy/toggles/hypr/internal-monitor-disable.conf + +[Service] +Type=oneshot +ExecStart=%h/.local/share/omarchy/bin/omarchy-hw-recover-internal-monitor + +[Install] +WantedBy=graphical-session-pre.target diff --git a/default/bash/aliases b/default/bash/aliases index 8e281d02..b3f6ad22 100644 --- a/default/bash/aliases +++ b/default/bash/aliases @@ -44,10 +44,11 @@ alias ....='cd ../../..' # Tools alias c='opencode' -alias cx='printf "\033[2J\033[3J\033[H" && claude --allow-dangerously-skip-permissions' +alias cx='printf "\033[2J\033[3J\033[H" && claude --permission-mode bypassPermissions' alias d='docker' alias r='rails' alias t='tmux attach || tmux new -s Work' +alias i='tdl c cx' n() { if [ "$#" -eq 0 ]; then command nvim . ; else command nvim "$@"; fi; } # Git diff --git a/default/bash/init b/default/bash/init index 2d363fa7..d2baba50 100644 --- a/default/bash/init +++ b/default/bash/init @@ -11,7 +11,11 @@ if command -v zoxide &> /dev/null; then fi if command -v try &> /dev/null; then - eval "$(SHELL=/bin/bash command try init ~/Work/tries)" + try() { + unset -f try + eval "$(SHELL=/bin/bash command try init ~/Work/tries)" + try "$@" + } fi if command -v fzf &> /dev/null; then diff --git a/default/elephant/omarchy_themes.lua b/default/elephant/omarchy_themes.lua index 945f4e60..e892f3e4 100644 --- a/default/elephant/omarchy_themes.lua +++ b/default/elephant/omarchy_themes.lua @@ -28,6 +28,15 @@ local function first_image_in_dir(dir) return nil end +-- Find preview.png, preview.jpg, or first backgrounds/ image in a theme dir +local function find_preview_path(dir) + local png = dir .. "/preview.png" + local jpg = dir .. "/preview.jpg" + if file_exists(png) then return png end + if file_exists(jpg) then return jpg end + return first_image_in_dir(dir .. "/backgrounds") +end + -- The main function elephant will call function GetEntries() local entries = {} @@ -51,19 +60,10 @@ function GetEntries() if theme_name and not seen_themes[theme_name] then seen_themes[theme_name] = true - -- Check for preview images directly (no subprocess) - local preview_path = nil - local preview_png = theme_path .. "/preview.png" - local preview_jpg = theme_path .. "/preview.jpg" - - if file_exists(preview_png) then - preview_path = preview_png - elseif file_exists(preview_jpg) then - preview_path = preview_jpg - else - -- Fallback: get first image from backgrounds (one ls call) - preview_path = first_image_in_dir(theme_path .. "/backgrounds") - end + -- Check the theme dir, then fall back to the default theme dir + -- (for partial user customizations that don't ship a preview) + local preview_path = find_preview_path(theme_path) + or find_preview_path(default_theme_dir .. "/" .. theme_name) if preview_path and preview_path ~= "" then local display_name = theme_name:gsub("_", " "):gsub("%-", " ") diff --git a/default/hypr/apps.conf b/default/hypr/apps.conf index 64a9567d..777692cd 100644 --- a/default/hypr/apps.conf +++ b/default/hypr/apps.conf @@ -12,6 +12,7 @@ source = ~/.local/share/omarchy/default/hypr/apps/geforce.conf source = ~/.local/share/omarchy/default/hypr/apps/moonlight.conf source = ~/.local/share/omarchy/default/hypr/apps/system.conf source = ~/.local/share/omarchy/default/hypr/apps/telegram.conf +source = ~/.local/share/omarchy/default/hypr/apps/typora.conf source = ~/.local/share/omarchy/default/hypr/apps/terminals.conf source = ~/.local/share/omarchy/default/hypr/apps/walker.conf source = ~/.local/share/omarchy/default/hypr/apps/webcam-overlay.conf diff --git a/default/hypr/apps/browser.conf b/default/hypr/apps/browser.conf index 7f30ba38..53acc6df 100644 --- a/default/hypr/apps/browser.conf +++ b/default/hypr/apps/browser.conf @@ -14,3 +14,6 @@ windowrule = tile on, match:tag chromium-based-browser # Only a subtle opacity change, but not for video sites windowrule = opacity 1.0 0.97, match:tag chromium-based-browser windowrule = opacity 1.0 0.97, match:tag firefox-based-browser + +# Hide the screen-sharing notification bar (the "Hide" button on it is broken on Wayland) +windowrule = workspace special silent, match:title .*is sharing.* diff --git a/default/hypr/apps/typora.conf b/default/hypr/apps/typora.conf new file mode 100644 index 00000000..873c82e6 --- /dev/null +++ b/default/hypr/apps/typora.conf @@ -0,0 +1,2 @@ +# Float Typora print dialog +windowrule = match:class ^Typora$, match:title ^Print$, float on, center on diff --git a/default/hypr/autostart.conf b/default/hypr/autostart.conf index b9d1b491..984b55a3 100644 --- a/default/hypr/autostart.conf +++ b/default/hypr/autostart.conf @@ -1,12 +1,13 @@ exec-once = uwsm-app -- hypridle exec-once = uwsm-app -- mako -exec-once = uwsm-app -- waybar +exec-once = ! omarchy-toggle-enabled waybar-off && uwsm-app -- waybar 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-powerprofiles-init +exec-once = uwsm-app -- omarchy-hyprland-monitor-watch # Slow app launch fix -- set systemd vars exec-once = systemctl --user import-environment $(env | cut -d'=' -f 1) diff --git a/default/hypr/bindings/media.conf b/default/hypr/bindings/media.conf index 88763037..c02872dc 100644 --- a/default/hypr/bindings/media.conf +++ b/default/hypr/bindings/media.conf @@ -1,28 +1,28 @@ -# Only display the OSD on the currently focused monitor -$osdclient = swayosd-client --monitor "$(omarchy-hyprland-monitor-focused)" - # Laptop multimedia keys for volume and LCD brightness (with OSD) -bindeld = ,XF86AudioRaiseVolume, Volume up, exec, $osdclient --output-volume raise -bindeld = ,XF86AudioLowerVolume, Volume down, exec, $osdclient --output-volume lower -bindeld = ,XF86AudioMute, Mute, exec, $osdclient --output-volume mute-toggle +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 = ,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 bindeld = ,XF86KbdBrightnessDown, Keyboard brightness down, exec, omarchy-brightness-keyboard down bindld = ,XF86KbdLightOnOff, Keyboard backlight cycle, exec, omarchy-brightness-keyboard cycle +bindld = ,XF86TouchpadToggle, Toggle touchpad, exec, omarchy-toggle-touchpad +bindld = ,XF86TouchpadOn, Enable touchpad, exec, omarchy-toggle-touchpad on +bindld = ,XF86TouchpadOff, Disable touchpad, exec, omarchy-toggle-touchpad off # Precise 1% multimedia adjustments with Alt modifier -bindeld = ALT, XF86AudioRaiseVolume, Volume up precise, exec, $osdclient --output-volume +1 -bindeld = ALT, XF86AudioLowerVolume, Volume down precise, exec, $osdclient --output-volume -1 +bindeld = ALT, XF86AudioRaiseVolume, Volume up precise, exec, omarchy-swayosd-client --output-volume +1 +bindeld = ALT, XF86AudioLowerVolume, Volume down precise, exec, omarchy-swayosd-client --output-volume -1 bindeld = ALT, XF86MonBrightnessUp, Brightness up precise, exec, omarchy-brightness-display +1% bindeld = ALT, XF86MonBrightnessDown, Brightness down precise, exec, omarchy-brightness-display 1%- # Requires playerctl -bindld = , XF86AudioNext, Next track, exec, $osdclient --playerctl next -bindld = , XF86AudioPause, Pause, exec, $osdclient --playerctl play-pause -bindld = , XF86AudioPlay, Play, exec, $osdclient --playerctl play-pause -bindld = , XF86AudioPrev, Previous track, exec, $osdclient --playerctl previous +bindld = , XF86AudioNext, Next track, exec, omarchy-swayosd-client --playerctl next +bindld = , XF86AudioPause, Pause, exec, omarchy-swayosd-client --playerctl play-pause +bindld = , XF86AudioPlay, Play, exec, omarchy-swayosd-client --playerctl play-pause +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 diff --git a/default/hypr/bindings/tiling-v2.conf b/default/hypr/bindings/tiling-v2.conf index 6b8da1dd..cdb928c3 100644 --- a/default/hypr/bindings/tiling-v2.conf +++ b/default/hypr/bindings/tiling-v2.conf @@ -13,10 +13,10 @@ bindd = SUPER, O, Pop window out (float & pin), exec, omarchy-hyprland-window-po bindd = SUPER, L, Toggle workspace layout, exec, omarchy-hyprland-workspace-layout-toggle # Move focus with SUPER + arrow keys -bindd = SUPER, LEFT, Move window focus left, movefocus, l -bindd = SUPER, RIGHT, Move window focus right, movefocus, r -bindd = SUPER, UP, Move window focus up, movefocus, u -bindd = SUPER, DOWN, Move window focus down, movefocus, d +bindd = SUPER, LEFT, Focus on left window, movefocus, l +bindd = SUPER, RIGHT, Focus on right window, movefocus, r +bindd = SUPER, UP, Focus on above window, movefocus, u +bindd = SUPER, DOWN, Focus on below window, movefocus, d # Switch workspaces with SUPER + [1-9; 0] bindd = SUPER, code:10, Switch to workspace 1, workspace, 1 @@ -76,11 +76,15 @@ bindd = SUPER SHIFT, UP, Swap window up, swapwindow, u bindd = SUPER SHIFT, DOWN, Swap window down, swapwindow, d # Cycle through applications on active workspace -bindd = ALT, TAB, Cycle to next window, cyclenext -bindd = ALT SHIFT, TAB, Cycle to prev window, cyclenext, prev +bindd = ALT, TAB, Focus on next window, cyclenext +bindd = ALT SHIFT, TAB, Focus on previous window, cyclenext, prev bindd = ALT, TAB, Reveal active window on top, bringactivetotop bindd = ALT SHIFT, TAB, Reveal active window on top, bringactivetotop +# Cycle through monitors +bindd = CTRL ALT, TAB, Focus on next monitor, focusmonitor, +1 +bindd = CTRL ALT SHIFT, TAB, Focus on previous monitor, focusmonitor, -1 + # Resize active window bindd = SUPER, code:20, Expand window left, resizeactive, -100 0 # - key bindd = SUPER, code:21, Shrink window left, resizeactive, 100 0 # = key @@ -124,5 +128,6 @@ bindd = SUPER ALT, code:12, Switch to group window 3, changegroupactive, 3 bindd = SUPER ALT, code:13, Switch to group window 4, changegroupactive, 4 bindd = SUPER ALT, code:14, Switch to group window 5, changegroupactive, 5 -# Cycle monitor scaling -bindd = SUPER, Slash, Cycle monitor scaling, exec, omarchy-hyprland-monitor-scaling-cycle +# Cycle monitor scaling with SUPER + / +bindd = SUPER, code:61, Cycle monitor scaling, exec, omarchy-hyprland-monitor-scaling-cycle +bindd = SUPER ALT, code:61, Cycle monitor scaling backwards, exec, omarchy-hyprland-monitor-scaling-cycle --reverse diff --git a/default/hypr/bindings/utilities.conf b/default/hypr/bindings/utilities.conf index 7de79d6b..628a0aec 100644 --- a/default/hypr/bindings/utilities.conf +++ b/default/hypr/bindings/utilities.conf @@ -3,6 +3,7 @@ bindd = SUPER, SPACE, Launch apps, exec, omarchy-launch-walker bindd = SUPER CTRL, E, Emoji picker, exec, omarchy-launch-walker -m symbols bindd = SUPER CTRL, C, Capture menu, exec, omarchy-menu capture bindd = SUPER CTRL, O, Toggle menu, exec, omarchy-menu toggle +bindd = SUPER CTRL, H, Hardware menu, exec, omarchy-menu hardware bindd = SUPER ALT, SPACE, Omarchy menu, exec, omarchy-menu bindd = SUPER SHIFT, code:201, Omarchy menu, exec, omarchy-menu bindd = SUPER, ESCAPE, System menu, exec, omarchy-menu system @@ -28,7 +29,9 @@ bindd = SUPER SHIFT ALT, COMMA, Restore last notification, exec, makoctl restore # Toggles 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, Delete, Toggle laptop display, exec, omarchy-hyprland-monitor-internal toggle +bindl = , switch:on:Lid Switch, exec, 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 diff --git a/default/hypr/looknfeel.conf b/default/hypr/looknfeel.conf index b73c9548..f735abda 100644 --- a/default/hypr/looknfeel.conf +++ b/default/hypr/looknfeel.conf @@ -91,7 +91,7 @@ animations { animation = global, 1, 10, default animation = border, 1, 5.39, easeOutQuint - animation = windows, 1, 4.79, easeOutQuint + animation = windows, 1, 3.79, easeOutQuint animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% animation = windowsOut, 1, 1.49, linear, popin 87% animation = fadeIn, 1, 1.73, almostLinear @@ -103,7 +103,7 @@ animations { animation = fadeLayersIn, 1, 1.79, almostLinear animation = fadeLayersOut, 1, 1.39, almostLinear animation = workspaces, 0, 0, ease - animation = specialWorkspace, 1, 4, easeOutQuint, slidevert + animation = specialWorkspace, 1, 3, easeOutQuint, slidevert } # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more diff --git a/default/hypr/toggles/flags.conf b/default/hypr/toggles/flags.conf new file mode 100644 index 00000000..a6334225 --- /dev/null +++ b/default/hypr/toggles/flags.conf @@ -0,0 +1,2 @@ +# This directory is intended for permanent config toggle flags. +# Do not remove this file (as the directory always needs at least one file). diff --git a/default/hypr/toggles/internal-monitor-disable.conf b/default/hypr/toggles/internal-monitor-disable.conf new file mode 100644 index 00000000..f5458f94 --- /dev/null +++ b/default/hypr/toggles/internal-monitor-disable.conf @@ -0,0 +1,2 @@ +# Disable the internal laptop monitor +monitor=eDP-1,disable diff --git a/default/hypr/toggles/single-window-aspect-ratio.conf b/default/hypr/toggles/single-window-aspect-ratio.conf new file mode 100644 index 00000000..b51d0e41 --- /dev/null +++ b/default/hypr/toggles/single-window-aspect-ratio.conf @@ -0,0 +1,5 @@ +# Avoid overly wide single-window layouts on wide screens +layout { + single_window_aspect_ratio = 1 1 +} + diff --git a/default/hypr/toggles/window-no-gaps.conf b/default/hypr/toggles/window-no-gaps.conf new file mode 100644 index 00000000..a9b6c578 --- /dev/null +++ b/default/hypr/toggles/window-no-gaps.conf @@ -0,0 +1,6 @@ +# Remove all window gaps and borders +general { + gaps_out = 0 + gaps_in = 0 + border_size = 0 +} diff --git a/default/snapper/root b/default/snapper/root new file mode 100644 index 00000000..96d0ef23 --- /dev/null +++ b/default/snapper/root @@ -0,0 +1,8 @@ +# Omarchy snapshots root only for pre-update recovery — kept to 5, no timeline +SUBVOLUME="/" +FSTYPE="btrfs" + +NUMBER_LIMIT="5" +NUMBER_LIMIT_IMPORTANT="5" + +TIMELINE_CREATE="no" diff --git a/default/systemd/system-sleep/resume-boost b/default/systemd/system-sleep/resume-boost deleted file mode 100644 index 318519e8..00000000 --- a/default/systemd/system-sleep/resume-boost +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Temporarily switch to performance power profile on resume -# to avoid sluggishness while the system catches up, then -# restore the previous profile after 10 seconds. - -if [[ $1 == "pre" ]]; then - mkdir -p /run/omarchy - powerprofilesctl get > /run/omarchy/power-profile-before-sleep -fi - -if [[ $1 == "post" ]]; then - previous=$(cat /run/omarchy/power-profile-before-sleep 2>/dev/null || echo "balanced") - powerprofilesctl set performance - systemd-run --on-active=10 --timer-property=AccuracySec=1 powerprofilesctl set "$previous" -fi diff --git a/default/voxtype/config.toml b/default/voxtype/config.toml index 59d1f943..ca80e7ee 100644 --- a/default/voxtype/config.toml +++ b/default/voxtype/config.toml @@ -25,6 +25,9 @@ sample_rate = 16000 # Maximum recording duration in seconds (safety limit) max_duration_secs = 60 +# Pause MPRIS media players during recording +pause_media = true + # [audio.feedback] # Enable audio feedback sounds (beeps when recording starts/stops) # enabled = true diff --git a/install/config/all.sh b/install/config/all.sh index b09332e6..69267195 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -22,6 +22,7 @@ run_logged $OMARCHY_INSTALL/config/unmount-fuse.sh run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh run_logged $OMARCHY_INSTALL/config/input-group.sh run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh +run_logged $OMARCHY_INSTALL/config/omarchy-toggles.sh run_logged $OMARCHY_INSTALL/config/kernel-modules-hook.sh run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh run_logged $OMARCHY_INSTALL/config/wifi-powersave-rules.sh @@ -43,10 +44,8 @@ run_logged $OMARCHY_INSTALL/config/hardware/intel/thermald.sh run_logged $OMARCHY_INSTALL/config/hardware/intel/ipu7-camera.sh run_logged $OMARCHY_INSTALL/config/hardware/intel/ptl-kernel.sh run_logged $OMARCHY_INSTALL/config/hardware/intel/fix-wifi7-eht.sh -run_logged $OMARCHY_INSTALL/config/hardware/intel/resume-boost.sh run_logged $OMARCHY_INSTALL/config/hardware/dell/fix-xps-haptic-touchpad.sh -run_logged $OMARCHY_INSTALL/config/hardware/dell/fix-xps-ptl-display.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-mic.sh diff --git a/install/config/hardware/dell/fix-xps-ptl-display.sh b/install/config/hardware/dell/fix-xps-ptl-display.sh deleted file mode 100644 index 3c66e47e..00000000 --- a/install/config/hardware/dell/fix-xps-ptl-display.sh +++ /dev/null @@ -1,20 +0,0 @@ -# Fix display issues on Dell XPS Panther Lake (Xe3) systems. -# Xe PSR causes freezes and display glitches on both OLED and IPS panels. -# LG OLED panels also need Panel Replay disabled. -if omarchy-hw-match "XPS" && omarchy-hw-intel-ptl; then - echo "Detected Dell XPS on Panther Lake, applying display power-saving fixes..." - - if omarchy-hw-dell-xps-oled; then - CMDLINE='KERNEL_CMDLINE[default]+=" xe.enable_psr=0 xe.enable_panel_replay=0"' - COMMENT='Disable Xe PSR and Panel Replay on Dell XPS Panther Lake OLED systems' - else - CMDLINE='KERNEL_CMDLINE[default]+=" xe.enable_psr=0"' - COMMENT='Disable Xe PSR on Dell XPS Panther Lake systems' - fi - - sudo mkdir -p /etc/limine-entry-tool.d - cat </dev/null -# $COMMENT -$CMDLINE -EOF -fi diff --git a/install/config/hardware/intel/ptl-kernel.sh b/install/config/hardware/intel/ptl-kernel.sh index cfc95e36..0e34def4 100644 --- a/install/config/hardware/intel/ptl-kernel.sh +++ b/install/config/hardware/intel/ptl-kernel.sh @@ -5,7 +5,9 @@ if omarchy-hw-intel-ptl; then echo "Detected Intel Panther Lake, installing PTL kernel..." omarchy-pkg-add linux-ptl linux-ptl-headers - sudo pacman -Rdd --noconfirm linux linux-headers 2>/dev/null || true + for pkg in linux linux-headers; do + sudo pacman -Rdd --noconfirm "$pkg" 2>/dev/null || true + done sudo mkdir -p /etc/limine-entry-tool.d cat </dev/null diff --git a/install/config/hardware/intel/resume-boost.sh b/install/config/hardware/intel/resume-boost.sh deleted file mode 100644 index 3d177cfd..00000000 --- a/install/config/hardware/intel/resume-boost.sh +++ /dev/null @@ -1,8 +0,0 @@ -# Boost CPU performance for 10 seconds after resume on Intel systems. -# The powersave governor with balance_power EPP is slow to ramp frequency -# after long suspends, causing noticeable sluggishness on wake. - -if omarchy-hw-intel; then - sudo mkdir -p /usr/lib/systemd/system-sleep - sudo install -m 0755 -o root -g root "$OMARCHY_PATH/default/systemd/system-sleep/resume-boost" /usr/lib/systemd/system-sleep/ -fi diff --git a/install/config/hardware/intel/video-acceleration.sh b/install/config/hardware/intel/video-acceleration.sh index b8ce4f80..33cc6fbe 100644 --- a/install/config/hardware/intel/video-acceleration.sh +++ b/install/config/hardware/intel/video-acceleration.sh @@ -1,9 +1,9 @@ # This installs hardware video acceleration for Intel GPUs if INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel'); then - # HD Graphics / Iris / Xe / Arc use intel-media-driver + # HD Graphics / Iris / Xe / Arc use intel-media-driver + VPL if [[ ${INTEL_GPU,,} =~ (hd\ graphics|uhd\ graphics|xe|iris|arc) ]]; then - omarchy-pkg-add intel-media-driver + omarchy-pkg-add intel-media-driver libvpl vpl-gpu-rt elif [[ ${INTEL_GPU,,} =~ "gma" ]]; then # Older generations from 2008 to ~2014-2017 use libva-intel-driver omarchy-pkg-add libva-intel-driver diff --git a/install/config/omarchy-toggles.sh b/install/config/omarchy-toggles.sh new file mode 100644 index 00000000..b4b5ea93 --- /dev/null +++ b/install/config/omarchy-toggles.sh @@ -0,0 +1,3 @@ +# Toggles are used to turn certain features on/off in a persistent way +mkdir -p ~/.local/state/omarchy/toggles/hypr +cp $OMARCHY_PATH/default/hypr/toggles/flags.conf ~/.local/state/omarchy/toggles/hypr/ diff --git a/install/first-run/recover-internal-monitor.sh b/install/first-run/recover-internal-monitor.sh new file mode 100644 index 00000000..c1e84fc0 --- /dev/null +++ b/install/first-run/recover-internal-monitor.sh @@ -0,0 +1 @@ +systemctl --user enable omarchy-recover-internal-monitor.service diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh index c91815dc..d588f43f 100644 --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -50,26 +50,14 @@ EOF # We overwrite the whole thing knowing the limine-update will add the entries for us sudo cp $OMARCHY_PATH/default/limine/limine.conf /boot/limine.conf - # Match Snapper configs if not installing from the ISO - if [[ -z ${OMARCHY_CHROOT_INSTALL:-} ]]; then - if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then - sudo snapper -c root create-config / - fi - - if ! sudo snapper list-configs 2>/dev/null | grep -q "home"; then - sudo snapper -c home create-config /home - fi + # Only snapshot root — /home is user data; rolling it back loses user work + if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then + sudo snapper -c root create-config / fi + sudo cp $OMARCHY_PATH/default/snapper/root /etc/snapper/configs/root - # Enable quota to allow space-aware algorithms to work - sudo btrfs quota enable / - - # Tweak default Snapper configs - sudo sed -i 's/^TIMELINE_CREATE="yes"/TIMELINE_CREATE="no"/' /etc/snapper/configs/{root,home} - sudo sed -i 's/^NUMBER_LIMIT="50"/NUMBER_LIMIT="5"/' /etc/snapper/configs/{root,home} - sudo sed -i 's/^NUMBER_LIMIT_IMPORTANT="10"/NUMBER_LIMIT_IMPORTANT="5"/' /etc/snapper/configs/{root,home} - sudo sed -i 's/^SPACE_LIMIT="0.5"/SPACE_LIMIT="0.3"/' /etc/snapper/configs/{root,home} - sudo sed -i 's/^FREE_LIMIT="0.2"/FREE_LIMIT="0.3"/' /etc/snapper/configs/{root,home} + # Disable btrfs quotas — full qgroup accounting is a major performance drag + sudo btrfs quota disable / 2>/dev/null || true chrootable_systemctl_enable limine-snapper-sync.service fi diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index d8dd7f55..c04547bf 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -112,6 +112,7 @@ sddm signal-desktop slurp spotify +socat starship sushi swaybg diff --git a/install/omarchy-other.packages b/install/omarchy-other.packages index b75c3685..47a3537f 100644 --- a/install/omarchy-other.packages +++ b/install/omarchy-other.packages @@ -55,6 +55,10 @@ tuxedo-drivers-nocompatcheck-dkms yt6801-dkms zram-generator +# Intel encoding processing +libvpl +vpl-gpu-rt + # Vulkan drivers (auto-detected by hardware) vulkan-intel vulkan-radeon diff --git a/migrations/1775241210.sh b/migrations/1775241210.sh new file mode 100644 index 00000000..f6e45eeb --- /dev/null +++ b/migrations/1775241210.sh @@ -0,0 +1,16 @@ +echo "Enable GPU in voxtype if Vulkan is available" + +if omarchy-cmd-present voxtype; then + if omarchy-hw-vulkan; then + echo "Vulkan is available, enabling GPU in voxtype" + sudo voxtype setup gpu --enable || true + fi + + # see https://github.com/peteonrails/voxtype/commit/ce6e9919cbe54cb8808dcb3cdd3bcb3260d7b900 + # earlier versions of voxtype hard-coded the non-GPU backend in the systemd service file, + # so we need to re-run setup to update it to use /usr/bin/voxtype (the symlink) + voxtype setup systemd + + systemctl --user restart voxtype + omarchy-restart-waybar +fi diff --git a/migrations/1776099290.sh b/migrations/1776099290.sh deleted file mode 100644 index 1d060533..00000000 --- a/migrations/1776099290.sh +++ /dev/null @@ -1,8 +0,0 @@ -echo "Ensure xe.enable_psr=0 is set in CMDLINE for XPS Panther Lake systems" - -if omarchy-hw-match "XPS" && omarchy-hw-intel-ptl && [[ -f /etc/default/limine ]]; then - if ! grep -Fq 'xe.enable_psr=0' /etc/default/limine; then - echo 'KERNEL_CMDLINE[default]+=" xe.enable_psr=0"' | sudo tee -a /etc/default/limine >/dev/null - sudo limine-mkinitcpio - fi -fi diff --git a/migrations/1776410469.sh b/migrations/1776410469.sh new file mode 100644 index 00000000..6f182c04 --- /dev/null +++ b/migrations/1776410469.sh @@ -0,0 +1,9 @@ +echo "Add flags sourcing to hyprland.conf" + +HYPR_CONF=~/.config/hypr/hyprland.conf + +source "$OMARCHY_PATH/install/config/omarchy-toggles.sh" + +if [[ -f $HYPR_CONF ]] && ! grep -q "toggles/hypr/\*\.conf" "$HYPR_CONF"; then + echo -e "\n# Toggle config flags dynamically\nsource = ~/.local/state/omarchy/toggles/hypr/*.conf" >> "$HYPR_CONF" +fi diff --git a/migrations/1776611242.sh b/migrations/1776611242.sh new file mode 100644 index 00000000..aa7e42bf --- /dev/null +++ b/migrations/1776611242.sh @@ -0,0 +1,4 @@ +echo "Install socat so we can reactivate internal display when external display is removed" + +omarchy-pkg-add socat +uwsm-app -- omarchy-hyprland-monitor-watch & diff --git a/migrations/1776615976.sh b/migrations/1776615976.sh new file mode 100644 index 00000000..32bebb60 --- /dev/null +++ b/migrations/1776615976.sh @@ -0,0 +1,3 @@ +echo "Install missing Intel VPL drivers (libvpl, vpl-gpu-rt) on systems with Intel GPUs" + +bash "$OMARCHY_PATH/install/config/hardware/intel/video-acceleration.sh" diff --git a/migrations/1776617403.sh b/migrations/1776617403.sh new file mode 100644 index 00000000..236d02ec --- /dev/null +++ b/migrations/1776617403.sh @@ -0,0 +1,14 @@ +echo "Enable pause_media in voxtype config" + +VOXTYPE_CONF=~/.config/voxtype/config.toml + +if [[ -f $VOXTYPE_CONF ]] && ! grep -q 'pause_media' "$VOXTYPE_CONF"; then + if grep -q '^\[audio\]' "$VOXTYPE_CONF"; then + sed -i '/^\[audio\]/a\ +\ +# Pause MPRIS media players during recording\ +pause_media = true' "$VOXTYPE_CONF" + else + printf '\n[audio]\n# Pause MPRIS media players during recording\npause_media = true\n' >> "$VOXTYPE_CONF" + fi +fi diff --git a/migrations/1776781956.sh b/migrations/1776781956.sh new file mode 100644 index 00000000..4c9e7406 --- /dev/null +++ b/migrations/1776781956.sh @@ -0,0 +1,19 @@ +echo "Dell XPS Panther Lake display kernel cmdline is no longer necessary" + +DROP_IN="/etc/limine-entry-tool.d/dell-xps-ptl-display.conf" +DEFAULT_LIMINE="/etc/default/limine" +NEEDS_UPDATE=0 + +if [[ -f $DROP_IN ]]; then + sudo rm -f "$DROP_IN" + NEEDS_UPDATE=1 +fi + +if [[ -f $DEFAULT_LIMINE ]] && grep -q 'xe\.enable_psr' "$DEFAULT_LIMINE"; then + sudo sed -i -E '/^KERNEL_CMDLINE.*xe\.enable_psr/d; /^# .*(Dell XPS|Xe PSR|Panel Replay)/d' "$DEFAULT_LIMINE" + NEEDS_UPDATE=1 +fi + +if (( NEEDS_UPDATE )); then + sudo limine-update +fi diff --git a/migrations/1776781957.sh b/migrations/1776781957.sh new file mode 100644 index 00000000..806d9dab --- /dev/null +++ b/migrations/1776781957.sh @@ -0,0 +1,7 @@ +echo "Drop vrr,1 from default monitor line as it creates a small lag" + +MONITORS_CONF=~/.config/hypr/monitors.conf + +if [[ -f $MONITORS_CONF ]]; then + sed -i 's/^monitor=,preferred,auto,auto,vrr,1$/monitor=,preferred,auto,auto/' "$MONITORS_CONF" +fi diff --git a/migrations/1776784497.sh b/migrations/1776784497.sh new file mode 100644 index 00000000..ef03e32d --- /dev/null +++ b/migrations/1776784497.sh @@ -0,0 +1,5 @@ +echo "Remove resume boost feature" + +if [[ -f /usr/lib/systemd/system-sleep/resume-boost ]]; then + sudo rm /usr/lib/systemd/system-sleep/resume-boost +fi diff --git a/migrations/1776927490.sh b/migrations/1776927490.sh new file mode 100644 index 00000000..d2c743d9 --- /dev/null +++ b/migrations/1776927490.sh @@ -0,0 +1,50 @@ +echo "Drop /home snapshots, btrfs quotas, and timeline snapshots (keep 5 root snapshots, never more)" + +if ! omarchy-cmd-present snapper btrfs; then + exit 0 +fi + +# Disable btrfs quotas first — every subvolume delete below would otherwise update +# all qgroups, which is exactly the performance drag we're removing. +sudo btrfs quota disable / 2>/dev/null || true + +# Remove the home config, all its snapshots, and the .snapshots subvolume. +# If the snapshots look like someone's been using them manually (pre/post pairs, +# userdata tags, freeform descriptions), ask before destroying. +if sudo snapper list-configs 2>/dev/null | grep -q "home"; then + drop_home="yes" + + if sudo snapper -c home --csvout list 2>/dev/null | \ + awk -F, 'NR>1 && ($6=="pre" || $6=="post" || $13!="" || ($12!="current" && $12!="timeline" && $12 !~ /^[0-9]+\.[0-9]+\.[0-9]+/))' | \ + grep -q .; then + gum confirm "Drop unused /home snapshots for better performance?" || drop_home="no" + fi + + if [[ $drop_home == "yes" ]]; then + sudo snapper -c home list --columns number 2>/dev/null | awk 'NR>2 && $1 != "0" {print $1}' | \ + xargs -r sudo snapper -c home delete 2>/dev/null + sudo snapper -c home delete-config 2>/dev/null + + if [[ -d /home/.snapshots ]]; then + for snap in /home/.snapshots/*/snapshot; do + [[ -d $snap ]] && sudo btrfs subvolume delete "$snap" 2>/dev/null + done + sudo rm -rf /home/.snapshots/* 2>/dev/null + sudo btrfs subvolume delete /home/.snapshots 2>/dev/null + fi + fi +fi + +# Ensure root config exists and matches our shipped defaults +if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then + sudo snapper -c root create-config / +fi +sudo cp $OMARCHY_PATH/default/snapper/root /etc/snapper/configs/root + +# Delete all timeline snapshots — we only want pre-update (cleanup=number) snapshots +sudo snapper -c root list --columns number,cleanup 2>/dev/null | \ + awk '$3 == "timeline" {print $1}' | \ + xargs -r sudo snapper -c root delete 2>/dev/null + +# Enforce NUMBER_LIMIT=5 on any existing number snapshots beyond the new cap +sudo snapper -c root cleanup number 2>/dev/null diff --git a/migrations/1776935686.sh b/migrations/1776935686.sh new file mode 100644 index 00000000..303db7b8 --- /dev/null +++ b/migrations/1776935686.sh @@ -0,0 +1,9 @@ +echo "Recover the internal monitor at login when no external display is connected" + +SERVICE=omarchy-recover-internal-monitor.service + +mkdir -p ~/.config/systemd/user +cp $OMARCHY_PATH/config/systemd/user/$SERVICE ~/.config/systemd/user/$SERVICE + +systemctl --user daemon-reload +systemctl --user enable $SERVICE diff --git a/themes/catppuccin/neovim.lua b/themes/catppuccin/neovim.lua index a8683876..f22267d6 100644 --- a/themes/catppuccin/neovim.lua +++ b/themes/catppuccin/neovim.lua @@ -1,13 +1,13 @@ return { - { - "catppuccin/nvim", - name = "catppuccin", - priority = 1000, - }, - { - "LazyVim/LazyVim", - opts = { - colorscheme = "catppuccin", - }, - }, + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + }, + { + "LazyVim/LazyVim", + opts = { + colorscheme = "catppuccin", + }, + }, } diff --git a/themes/lumon/colors.toml b/themes/lumon/colors.toml index b94e758e..1ddfcb14 100644 --- a/themes/lumon/colors.toml +++ b/themes/lumon/colors.toml @@ -1,5 +1,5 @@ # Accent and UI colors -accent = "#f2fcff" +accent = "#8bc9eb" active_border_color = "#f2fcff" active_tab_background = "#6fb8e3" diff --git a/themes/vantablack/backgrounds/0-dot-hands.jpg b/themes/vantablack/backgrounds/0-dot-hands.jpg new file mode 100644 index 00000000..b76792cb Binary files /dev/null and b/themes/vantablack/backgrounds/0-dot-hands.jpg differ diff --git a/themes/vantablack/btop.theme b/themes/vantablack/btop.theme index cf3d98ca..a1ed2790 100644 --- a/themes/vantablack/btop.theme +++ b/themes/vantablack/btop.theme @@ -1,5 +1,5 @@ # Main background, empty for terminal default, need to be empty if you want transparent background -theme[main_bg]="#0d0d0d" +theme[main_bg]="#000000" # Main text color theme[main_fg]="#ffffff" diff --git a/themes/vantablack/colors.toml b/themes/vantablack/colors.toml index 96e095fc..e3b2267d 100644 --- a/themes/vantablack/colors.toml +++ b/themes/vantablack/colors.toml @@ -4,14 +4,14 @@ cursor = "#ffffff" # Primary colors foreground = "#ffffff" -background = "#0d0d0d" +background = "#000000" # Selection colors -selection_foreground = "#0d0d0d" +selection_foreground = "#000000" selection_background = "#ffffff" # Normal colors (ANSI 0-7) -color0 = "#0d0d0d" +color0 = "#000000" color1 = "#a4a4a4" color2 = "#b6b6b6" color3 = "#cecece" diff --git a/version b/version index d5c0c991..40c341bd 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.5.1 +3.6.0