From 95f1f312b409902fd2a556cc42d390f4deff3696 Mon Sep 17 00:00:00 2001 From: riozee Date: Wed, 29 Oct 2025 12:16:57 +0900 Subject: [PATCH 1/8] Fix: omarchy-cmd-screenshot geometry for transformed monitors --- bin/omarchy-cmd-screenshot | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-cmd-screenshot b/bin/omarchy-cmd-screenshot index f4450f89..76257dfb 100755 --- a/bin/omarchy-cmd-screenshot +++ b/bin/omarchy-cmd-screenshot @@ -13,9 +13,23 @@ pkill slurp && exit 0 MODE="${1:-smart}" PROCESSING="${2:-slurp}" +# accounting for portrait/transformed displays +JQ_MONITOR_GEO=' + def format_geo: + .x as $x | .y as $y | + (.width / .scale | floor) as $w | + (.height / .scale | floor) as $h | + .transform as $t | + if $t == 1 or $t == 3 then + "\($x),\($y) \($h)x\($w)" + else + "\($x),\($y) \($w)x\($h)" + end; +' + get_rectangles() { local active_workspace=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .activeWorkspace.id') - hyprctl monitors -j | jq -r --arg ws "$active_workspace" '.[] | select(.activeWorkspace.id == ($ws | tonumber)) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"' + hyprctl monitors -j | jq -r --arg ws "$active_workspace" "${JQ_MONITOR_GEO} .[] | select(.activeWorkspace.id == (\$ws | tonumber)) | format_geo" hyprctl clients -j | jq -r --arg ws "$active_workspace" '.[] | select(.workspace.id == ($ws | tonumber)) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' } @@ -34,7 +48,7 @@ case "$MODE" in kill $PID 2>/dev/null ;; fullscreen) - SELECTION=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"') + SELECTION=$(hyprctl monitors -j | jq -r "${JQ_MONITOR_GEO} .[] | select(.focused == true) | format_geo") ;; smart|*) RECTS=$(get_rectangles) From d1757b25f38975e2f6850dbb09ed09df24c7d379 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 21 Feb 2026 08:43:53 +0100 Subject: [PATCH 2/8] No lazydocker either --- bin/omarchy-remove-all | 3 ++- default/hypr/plain-bindings.conf | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-remove-all b/bin/omarchy-remove-all index ee025123..002c3a4b 100755 --- a/bin/omarchy-remove-all +++ b/bin/omarchy-remove-all @@ -25,5 +25,6 @@ if gum confirm "Are you sure you want to remove all preinstalled web apps, TUI w pinta \ obsidian \ obs-studio \ - kdenlive + kdenlive \ + lazydocker fi diff --git a/default/hypr/plain-bindings.conf b/default/hypr/plain-bindings.conf index d3f675fd..81a47062 100644 --- a/default/hypr/plain-bindings.conf +++ b/default/hypr/plain-bindings.conf @@ -6,7 +6,6 @@ bindd = SUPER ALT SHIFT, F, File manager (cwd), exec, uwsm-app -- nautilus --new bindd = SUPER SHIFT, B, Browser, exec, omarchy-launch-browser bindd = SUPER SHIFT ALT, B, Browser (private), exec, omarchy-launch-browser --private bindd = SUPER SHIFT, N, Editor, exec, omarchy-launch-editor -bindd = SUPER SHIFT, D, Docker, exec, omarchy-launch-tui lazydocker # Add extra bindings # bindd = SUPER SHIFT, A, ChatGPT, exec, omarchy-launch-webapp "https://chatgpt.com" From 8e38f70832ed55a7c638f0248643367eaab3a8cb Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 21 Feb 2026 08:52:02 +0100 Subject: [PATCH 3/8] Cleanup duplication --- bin/omarchy-setup-dns | 74 ++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 46 deletions(-) diff --git a/bin/omarchy-setup-dns b/bin/omarchy-setup-dns index 472b5550..ccd9f9f6 100755 --- a/bin/omarchy-setup-dns +++ b/bin/omarchy-setup-dns @@ -1,5 +1,28 @@ #!/bin/bash +lock_dns_to_resolved() { + for file in /etc/systemd/network/*.network; do + [[ -f "$file" ]] || continue + if ! grep -q "^\[DHCPv4\]" "$file"; then continue; fi + + if ! sed -n '/^\[DHCPv4\]/,/^\[/p' "$file" | grep -q "^UseDNS="; then + sudo sed -i '/^\[DHCPv4\]/a UseDNS=no' "$file" + fi + + if grep -q "^\[IPv6AcceptRA\]" "$file" && ! sed -n '/^\[IPv6AcceptRA\]/,/^\[/p' "$file" | grep -q "^UseDNS="; then + sudo sed -i '/^\[IPv6AcceptRA\]/a UseDNS=no' "$file" + fi + done +} + +unlock_dns_to_dhcp() { + for file in /etc/systemd/network/*.network; do + [[ -f "$file" ]] || continue + sudo sed -i '/^\[DHCPv4\]/{n;/^UseDNS=no$/d}' "$file" + sudo sed -i '/^\[IPv6AcceptRA\]/{n;/^UseDNS=no$/d}' "$file" + done +} + if [[ -z $1 ]]; then dns=$(gum choose --height 5 --header "Select DNS provider" Cloudflare DHCP Custom) else @@ -14,24 +37,7 @@ DNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com FallbackDNS=9.9.9.9 149.112.112.112 DNSOverTLS=opportunistic EOF - - # Ensure network interfaces don't override our DNS settings - for file in /etc/systemd/network/*.network; do - [[ -f "$file" ]] || continue - if ! grep -q "^\[DHCPv4\]" "$file"; then continue; fi - - # Add UseDNS=no to DHCPv4 section if not present - if ! sed -n '/^\[DHCPv4\]/,/^\[/p' "$file" | grep -q "^UseDNS="; then - sudo sed -i '/^\[DHCPv4\]/a UseDNS=no' "$file" - fi - - # Add UseDNS=no to IPv6AcceptRA section if present - if grep -q "^\[IPv6AcceptRA\]" "$file" && ! sed -n '/^\[IPv6AcceptRA\]/,/^\[/p' "$file" | grep -q "^UseDNS="; then - sudo sed -i '/^\[IPv6AcceptRA\]/a UseDNS=no' "$file" - fi - done - - sudo systemctl restart systemd-networkd systemd-resolved + lock_dns_to_resolved ;; DHCP) @@ -39,21 +45,14 @@ DHCP) [Resolve] DNSOverTLS=no EOF - - # Allow network interfaces to use DHCP DNS - for file in /etc/systemd/network/*.network; do - [[ -f "$file" ]] || continue - sudo sed -i '/^UseDNS=no/d' "$file" - done - - sudo systemctl restart systemd-networkd systemd-resolved + unlock_dns_to_dhcp ;; Custom) echo "Enter your DNS servers (space-separated, e.g. '192.168.1.1 1.1.1.1'):" read -r dns_servers - if [[ -z "$dns_servers" ]]; then + if [[ -z $dns_servers ]]; then echo "Error: No DNS servers provided." exit 1 fi @@ -63,25 +62,8 @@ Custom) DNS=$dns_servers FallbackDNS=9.9.9.9 149.112.112.112 EOF - - # Ensure network interfaces don't override our DNS settings - for file in /etc/systemd/network/*.network; do - [[ -f "$file" ]] || continue - if ! grep -q "^\[DHCPv4\]" "$file"; then continue; fi - - # Add UseDNS=no to DHCPv4 section if not present - if ! sed -n '/^\[DHCPv4\]/,/^\[/p' "$file" | grep -q "^UseDNS="; then - sudo sed -i '/^\[DHCPv4\]/a UseDNS=no' "$file" - fi - - # Add UseDNS=no to IPv6AcceptRA section if present - if grep -q "^\[IPv6AcceptRA\]" "$file" && ! sed -n '/^\[IPv6AcceptRA\]/,/^\[/p' "$file" | grep -q "^UseDNS="; then - sudo sed -i '/^\[IPv6AcceptRA\]/a UseDNS=no' "$file" - fi - done - - sudo systemctl restart systemd-networkd systemd-resolved - + lock_dns_to_resolved ;; esac +sudo systemctl restart systemd-networkd systemd-resolved From ac075d1b0062cd90a3ce28073350f2eca198bc4c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 21 Feb 2026 09:02:09 +0100 Subject: [PATCH 4/8] Add Google as a DNS provider option --- bin/omarchy-setup-dns | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-setup-dns b/bin/omarchy-setup-dns index ccd9f9f6..b72e9458 100755 --- a/bin/omarchy-setup-dns +++ b/bin/omarchy-setup-dns @@ -24,7 +24,7 @@ unlock_dns_to_dhcp() { } if [[ -z $1 ]]; then - dns=$(gum choose --height 5 --header "Select DNS provider" Cloudflare DHCP Custom) + dns=$(gum choose --height 6 --header "Select DNS provider" Cloudflare Google DHCP Custom) else dns=$1 fi @@ -40,6 +40,16 @@ EOF lock_dns_to_resolved ;; +Google) + sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF' +[Resolve] +DNS=8.8.8.8#dns.google 8.8.4.4#dns.google +FallbackDNS=9.9.9.9 149.112.112.112 +DNSOverTLS=opportunistic +EOF + lock_dns_to_resolved + ;; + DHCP) sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF' [Resolve] From 778c203209d5193b026d5f346cedff6fca727d54 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 21 Feb 2026 09:12:59 +0100 Subject: [PATCH 5/8] Ensure we are using compiled binaries for Ruby --- bin/omarchy-install-dev-env | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-install-dev-env b/bin/omarchy-install-dev-env index 00d40130..0db83a6a 100755 --- a/bin/omarchy-install-dev-env +++ b/bin/omarchy-install-dev-env @@ -52,7 +52,8 @@ ruby) omarchy-pkg-add libyaml mise use --global ruby@latest mise settings add idiomatic_version_file_enable_tools ruby - echo "gem: --no-document" > ~/.gemrc + mise settings add ruby.compile false + echo "gem: --no-document" >~/.gemrc mise x ruby -- gem install rails --no-document echo -e "\nYou can now run: rails new myproject" ;; From 47c12a688881edd1e56c7ff6a88a71586e879ec2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 21 Feb 2026 09:14:48 +0100 Subject: [PATCH 6/8] Only ask for icon URL if we can't get a favicon --- bin/omarchy-webapp-install | 42 ++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/bin/omarchy-webapp-install b/bin/omarchy-webapp-install index 85c8bc81..3b649ca2 100755 --- a/bin/omarchy-webapp-install +++ b/bin/omarchy-webapp-install @@ -2,11 +2,22 @@ set -e -if [ "$#" -lt 3 ]; then +ICON_DIR="$HOME/.local/share/applications/icons" + +if [[ $# -lt 3 ]]; then echo -e "\e[32mLet's create a new web app you can start with the app launcher.\n\e[0m" APP_NAME=$(gum input --prompt "Name> " --placeholder "My favorite web app") APP_URL=$(gum input --prompt "URL> " --placeholder "https://example.com") - ICON_REF=$(gum input --prompt "Icon URL> " --placeholder "Leave blank to use favicon or see https://dashboardicons.com (must be PNG!)") + + # Try to fetch favicon automatically first. + FAVICON_URL="https://www.google.com/s2/favicons?domain=${APP_URL}&sz=128" + mkdir -p "$ICON_DIR" + if curl -fsSL -o "$ICON_DIR/$APP_NAME.png" "$FAVICON_URL" && [[ -s $ICON_DIR/$APP_NAME.png ]]; then + ICON_REF="$APP_NAME.png" + else + ICON_REF=$(gum input --prompt "Icon URL> " --placeholder "Could not fetch favicon automatically. Enter PNG icon URL (see https://dashboardicons.com)") + fi + CUSTOM_EXEC="" MIME_TYPES="" INTERACTIVE_MODE=true @@ -19,23 +30,22 @@ else INTERACTIVE_MODE=false fi -if [[ -z "$ICON_REF" ]]; then - ICON_REF="https://www.google.com/s2/favicons?domain=${APP_URL}&sz=128" -fi - # Ensure valid execution -if [[ -z "$APP_NAME" || -z "$APP_URL" || -z "$ICON_REF" ]]; then - echo "You must set app name, app URL, and icon URL!" +if [[ -z $APP_NAME || -z $APP_URL ]]; then + echo "You must set app name and app URL!" exit 1 fi -# Refer to local icon or fetch remotely from URL -ICON_DIR="$HOME/.local/share/applications/icons" +# Resolve icon from URL or from a local icon name. +mkdir -p "$ICON_DIR" + +if [[ -z $ICON_REF ]]; then + ICON_REF="https://www.google.com/s2/favicons?domain=${APP_URL}&sz=128" +fi + if [[ $ICON_REF =~ ^https?:// ]]; then ICON_PATH="$ICON_DIR/$APP_NAME.png" - if curl -sL -o "$ICON_PATH" "$ICON_REF"; then - ICON_PATH="$ICON_DIR/$APP_NAME.png" - else + if ! curl -fsSL -o "$ICON_PATH" "$ICON_REF" || [[ ! -s $ICON_PATH ]]; then echo "Error: Failed to download icon." exit 1 fi @@ -44,11 +54,7 @@ else fi # Use custom exec if provided, otherwise default behavior -if [[ -n $CUSTOM_EXEC ]]; then - EXEC_COMMAND="$CUSTOM_EXEC" -else - EXEC_COMMAND="omarchy-launch-webapp $APP_URL" -fi +EXEC_COMMAND="${CUSTOM_EXEC:-omarchy-launch-webapp $APP_URL}" # Create application .desktop file DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop" From 76ab1723344d873f45721a42eb7399521db54a5f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 21 Feb 2026 09:17:26 +0100 Subject: [PATCH 7/8] Scala needs java to be installed --- bin/omarchy-install-dev-env | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-install-dev-env b/bin/omarchy-install-dev-env index 0db83a6a..9c9b9b2e 100755 --- a/bin/omarchy-install-dev-env +++ b/bin/omarchy-install-dev-env @@ -2,8 +2,8 @@ # Install one of the supported development environments. Usually called via Install > Development > * in the Omarchy Menu. -if [[ -z "$1" ]]; then - echo "Usage: omarchy-install-dev-env " >&2 +if [[ -z $1 ]]; then + echo "Usage: omarchy-install-dev-env " >&2 exit 1 fi @@ -144,6 +144,7 @@ clojure) ;; scala) echo -e "Installing Scala...\n" + mise use --global java@latest mise use --global scala@latest mise use --global scala-cli@latest ;; From ffd8509da6b235f8756ea08b9c9f5e3149f50f9d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 21 Feb 2026 09:22:15 +0100 Subject: [PATCH 8/8] Fix Hibernation resume on nvidia computers --- bin/omarchy-hibernation-setup | 12 ++++++++++ default/systemd/system-sleep/force-igpu | 29 +++++++++++++++++-------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/bin/omarchy-hibernation-setup b/bin/omarchy-hibernation-setup index 108e8ffa..a43d34ec 100755 --- a/bin/omarchy-hibernation-setup +++ b/bin/omarchy-hibernation-setup @@ -62,6 +62,18 @@ echo "HOOKS+=(resume)" | sudo tee "$MKINITCPIO_CONF" >/dev/null # Ensure keyboard backlight doesn't prevent sleep sudo cp -p "$OMARCHY_PATH/default/systemd/system-sleep/keyboard-backlight" /usr/lib/systemd/system-sleep/ +# Add resume= kernel parameters so the initramfs resume hook knows where to find the +# hibernation image. Without these, resume happens late (after GPU drivers load) and fails. +RESUME_DROP_IN="/etc/limine-entry-tool.d/resume.conf" +if [[ ! -f "$RESUME_DROP_IN" ]]; then + echo "Adding resume kernel parameters" + sudo swapon -p 0 "$SWAP_FILE" 2>/dev/null + RESUME_DEVICE=$(findmnt -no SOURCE -T "$SWAP_FILE" | sed 's/\[.*\]//') + RESUME_OFFSET=$(btrfs inspect-internal map-swapfile -r "$SWAP_FILE") + sudo mkdir -p /etc/limine-entry-tool.d + echo "KERNEL_CMDLINE[default]+=\"resume=$RESUME_DEVICE resume_offset=$RESUME_OFFSET\"" | sudo tee "$RESUME_DROP_IN" >/dev/null +fi + # Use ACPI alarm for RTC wakeup on s2idle systems (needed for suspend-then-hibernate) if grep -q "\[s2idle\]" /sys/power/mem_sleep 2>/dev/null; then LIMINE_DROP_IN="/etc/limine-entry-tool.d/rtc-alarm.conf" diff --git a/default/systemd/system-sleep/force-igpu b/default/systemd/system-sleep/force-igpu index ab0d6d6c..6f129438 100755 --- a/default/systemd/system-sleep/force-igpu +++ b/default/systemd/system-sleep/force-igpu @@ -5,14 +5,25 @@ # will wake after suspend in Hybrid mode, even if the system was in Integrated mode before # suspending. -if [[ $1 == "post" ]]; then - # small delay so the device is fully re-enumerated - sleep 4 +case "$1" in + pre) + # Before hibernating, switch to Vfio so the nvidia driver is detached from the dGPU. + # Without this, hibernate resume fails because the nvidia driver can't freeze a + # powered-off dGPU (returns -EIO), which aborts the entire resume. + if [[ $2 == "hibernate" ]]; then + /usr/bin/supergfxctl -m Vfio + sleep 1 + fi + ;; + post) + # small delay so the device is fully re-enumerated + sleep 4 - # force-bind dGPU to vfio (fully detached from nvidia) - /usr/bin/supergfxctl -m Vfio - sleep 1 + # force-bind dGPU to vfio (fully detached from nvidia) + /usr/bin/supergfxctl -m Vfio + sleep 1 - # then go back to Integrated, which powers it off again - /usr/bin/supergfxctl -m Integrated -fi + # then go back to Integrated, which powers it off again + /usr/bin/supergfxctl -m Integrated + ;; +esac