diff --git a/bin/omarchy-config-direct-boot b/bin/omarchy-config-direct-boot new file mode 100755 index 00000000..7cfedd3a --- /dev/null +++ b/bin/omarchy-config-direct-boot @@ -0,0 +1,45 @@ +#!/bin/bash + +# Add 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 + echo "Error: System is not booted in UEFI mode" >&2 + exit 1 +fi + +if ! efibootmgr &>/dev/null; then + echo "Error: efibootmgr is not available or not functional" >&2 + exit 1 +fi + +if cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends"; then + echo "Error: American Megatrends firmware may not safely support custom EFI entries" >&2 + exit 1 +fi + +if cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then + echo "Error: Apple firmware uses its own boot manager" >&2 + exit 1 +fi + +uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) + +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 diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 7dac2416..69d042d5 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -566,14 +566,15 @@ show_about() { } show_system_menu() { - local options=" Lock\n󱄄 Screensaver" + local options="󱄄 Screensaver\n Lock\n󰍃 Logout" [[ -f ~/.local/state/omarchy/toggles/suspend-on ]] && options="$options\n󰒲 Suspend" omarchy-hibernation-available && options="$options\n󰤁 Hibernate" options="$options\n󰜉 Restart\n󰐥 Shutdown" case $(menu "System" "$options") in - *Lock*) omarchy-lock-screen ;; *Screensaver*) omarchy-launch-screensaver force ;; + *Lock*) omarchy-lock-screen ;; + *Logout*) omarchy-system-logout ;; *Suspend*) systemctl suspend ;; *Hibernate*) systemctl hibernate ;; *Restart*) omarchy-cmd-reboot ;; diff --git a/bin/omarchy-refresh-sddm b/bin/omarchy-refresh-sddm new file mode 100755 index 00000000..473bb3ee --- /dev/null +++ b/bin/omarchy-refresh-sddm @@ -0,0 +1,6 @@ +#!/bin/bash + +# Refresh the SDDM theme from default + +sudo rm -rf /usr/share/sddm/themes/omarchy +sudo cp -r $OMARCHY_PATH/default/sddm/omarchy /usr/share/sddm/themes/omarchy diff --git a/bin/omarchy-system-logout b/bin/omarchy-system-logout new file mode 100755 index 00000000..bf70b861 --- /dev/null +++ b/bin/omarchy-system-logout @@ -0,0 +1,11 @@ +#!/bin/bash + +# Logout command that first closes all application windows (thus giving them a chance to save state), +# then stops the session, returning to the SDDM login screen. + +# Schedule the session stop after closing windows (detached from terminal) +nohup bash -c "sleep 2 && uwsm stop" >/dev/null 2>&1 & + +# Now close all windows +omarchy-hyprland-window-close-all +sleep 1 # Allow apps like Chrome to shutdown correctly diff --git a/changes/v3-4-0.md b/changes/v3-4-0.md deleted file mode 100644 index 36031a03..00000000 --- a/changes/v3-4-0.md +++ /dev/null @@ -1,74 +0,0 @@ -# What changed? - -## Additions - -- Add single screenshot flow on PrintScr with editing option pushed to notification by @ryanrhughes -- Add Tmux with tailored config for improved aesthetics and ergonomics accessible via `t` alias in any terminal by @dhh -- Add hibernation by default on new installs by @dhh -- Add hybrid GPU mode toggle via supergfxctl for compatible laptops through _Trigger > Hardware_ by @dhh -- Add full compatibility (volume/brightness/hybrid GPU switching) with Asus Zephyrus G14/16 laptops by @dhh -- Add Motorcomm YT6801 ethernet driver for Slimbook + Tuxedo laptops by @dhh -- Add automatic power profile switching when plugged/unplugged by @pomartel -- Add SSH port forwarding functions fip/dip/lip for web development by @dhh -- Add `eff` command to open fuzzy find results directly in your editor by @dhh -- Add NVIDIA GeForce Now installer and window rules via *Install > Gaming* by @dhh -- Add option to remove all preinstalls via *Remove > Preinstalls* by @dhh -- Add audio soft mixer as opt-in toggle via *Setup > Audio* by @dhh -- Add `~/.config/omarchy/extensions/menu.sh` for overloading any menu action by @bhaveshsooka -- Add nautilus-python for "Open in Ghostty" context menu by @pomartel -- Add automatic fallback to Alacritty for legacy GPUs on install by @yaroslavrick -- Add window rules for Bitwarden Chrome Extension by @sgruendel -- Add emoji picker auto-pasting by @pomartel -- Add back mainline Chromium now that upstream has live theming fixed by @dhh - -### Aesthetics - -- Add theme synced keyboard backlighting on Asus ROG laptops by @dhh -- Add new default wallpaper for Tokyo Night theme by @Maxteabag -- Add Miasma theme by @OldJobobo -- Add Vantablack theme by @bjarneo -- Add headset icon for audio in Waybar by @pomartel - -## Keybindings - -- Add `Super + Shift + Return` as alternative keybind for launching browser by @dhh -- Add `Super + Ctrl + C` as alternative capture keybind for machines without PrintScr button by @dhh -- Add `Super + Alt + Shift + F` to open nautilus in current directory of terminal by X -- Add `Super + Ctrl + Alt + Backspace` to toggle single-window square aspect ratio by @dhh -- Add `Super + Ctrl + Backspace` to toggle resolution between 1-1.6-2-3x by @dhh -- Add opening Nautilus in terminal's current working directory by @schwepmo -- Add scratchpad auto-toggle on workspace switch by @mitanjan - -## Fixes - -- Fix AUR package installation to prefer AUR over repos when available by @dhh -- Fix Ghostty high IO pressure on some machines by @NicolasDorier -- Fix NVIDIA environment variables for Maxwell/Pascal/Volta GPUs by @johnzfitch -- Fix JetBrains window rules not working properly by @NicolasDorier -- Fix Telegram stealing focus on every message by @ryanrhughes -- Fix Steam window opacity rules by @nptr -- Fix video PWA window rules by @dhh -- Fix Walker crashing and not restarting by @dhh -- Fix hibernation to work reliably across different laptops by @dhh -- Fix hyprlock fingerprint auth check by @dhh -- Fix update snapshots not being cleaned on failed updates by @Mridul-Agarwal -- Fix Windows VM clipboard sharing in RDP by @arcangelo7 -- Fix Windows VM dynamic boot detection by @felixzsh -- Fix Windows VM timezone and add confirmation before VM removal by @pomartel -- Fix gum confirm color for "no" option by @dhh -- Fix omarchy-update-firmware premature exit by @nnutter -- Fix swayosd style path by @gilescope -- Fix yq dependency by replacing with pure bash TOML parsing by @dhh -- Fix AUR updates broken by interrupted git sessions by @dhh -- Fix Synaptics InterTouch touchpad detection by @Sameer292 -- Fix Starship prompt sanitization by @jamesrobey -- Fix Chromium Wayland color manager flag removal by @shreyansh-malviya -- Fix Development remove menu icons by @annoyedmilk -- Fix kb_variant support in input.conf by @manuel-rams -- Fix wiremix default device character display by @l1ghty -- Fix opencode auto-update disabled for pacman management by @sgruendel -- Fix Waybar Omarchy glyph spacing with thin space by @horaceko -- Fix suspend-to-hibernate failing on several laptops by removing it as a default by @dhh -- Fix missing Wayland color manager disabling flag in Chromium by @shreyansh-malviya -- Fix x11 fallback in SDL_VIDEODRIVER for compatibility by @ryanrhughes -- Fix AUR packages shouldn't update until after system packages and migrations by @dhh diff --git a/config/hypr/input.conf b/config/hypr/input.conf index 951dc1de..841c8f42 100644 --- a/config/hypr/input.conf +++ b/config/hypr/input.conf @@ -18,6 +18,9 @@ input { # Increase sensitivity for mouse/trackpad (default: 0) # sensitivity = 0.35 + + # Turn off mouse acceleration (default: false) + # force_no_accel = true touchpad { # Use natural (inverse) scrolling diff --git a/default/hypr/looknfeel.conf b/default/hypr/looknfeel.conf index c4df1d51..1decf433 100644 --- a/default/hypr/looknfeel.conf +++ b/default/hypr/looknfeel.conf @@ -129,6 +129,7 @@ misc { # https://wiki.hypr.land/Configuring/Variables/#cursor cursor { hide_on_key_press = true + warp_on_change_workspace = 1 } # Auto toggle scratchpad on switching workspace from scratchpad diff --git a/default/omarchy-skill/SKILL.md b/default/omarchy-skill/SKILL.md index cf3a0569..f591022a 100644 --- a/default/omarchy-skill/SKILL.md +++ b/default/omarchy-skill/SKILL.md @@ -1,22 +1,26 @@ --- name: omarchy description: > - REQUIRED for ANY changes to Linux desktop, window manager, or system config. + REQUIRED for end-user customization of Linux desktop, window manager, or system config. Use when editing ~/.config/hypr/, ~/.config/waybar/, ~/.config/walker/, ~/.config/alacritty/, ~/.config/kitty/, ~/.config/ghostty/, ~/.config/mako/, or ~/.config/omarchy/. Triggers: Hyprland, window rules, animations, keybindings, monitors, gaps, borders, blur, opacity, waybar, walker, terminal config, themes, wallpaper, night light, idle, lock screen, screenshots, layer rules, workspace - settings, display config, or any omarchy-* commands. + settings, display config, and user-facing omarchy commands. Excludes Omarchy + source development in ~/.local/share/omarchy/ and omarchy-dev-* workflows. --- # Omarchy Skill Manage [Omarchy](https://omarchy.org/) Linux systems - a beautiful, modern, opinionated Arch Linux distribution with Hyprland. +This skill is for end-user customization on installed systems. +It is not for contributing to Omarchy source code. + ## When This Skill MUST Be Used -**ALWAYS invoke this skill when the user's request involves ANY of these:** +**ALWAYS invoke this skill for end-user requests involving ANY of these:** - Editing ANY file in `~/.config/hypr/` (window rules, animations, keybindings, monitors, etc.) - Editing ANY file in `~/.config/waybar/`, `~/.config/walker/`, `~/.config/mako/` @@ -25,14 +29,16 @@ Manage [Omarchy](https://omarchy.org/) Linux systems - a beautiful, modern, opin - Window behavior, animations, opacity, blur, gaps, borders - Layer rules, workspace settings, display/monitor configuration - Themes, wallpapers, fonts, appearance changes -- Any `omarchy-*` command +- User-facing `omarchy-*` commands (`omarchy-theme-*`, `omarchy-refresh-*`, `omarchy-restart-*`, etc.) - Screenshots, screen recording, night light, idle behavior, lock screen **If you're about to edit a config file in ~/.config/ on this system, STOP and use this skill first.** +**Do NOT use this skill for Omarchy development tasks** (editing files in `~/.local/share/omarchy/`, creating migrations, or running `omarchy-dev-*` workflows). + ## Critical Safety Rules -**NEVER modify anything in `~/.local/share/omarchy/`** - but READING is safe and encouraged. +**For end-user customization tasks, NEVER modify anything in `~/.local/share/omarchy/`** - but READING is safe and encouraged. This directory contains Omarchy's source files managed by git. Any changes will be: - Lost on next `omarchy-update` @@ -60,6 +66,8 @@ This directory contains Omarchy's source files managed by git. Any changes will - `~/.config/omarchy/themes//` - Custom themes (must be real directories) - `~/.config/omarchy/hooks/` - Custom automation hooks +If the request is to develop Omarchy itself, this skill is out of scope. Follow repository development instructions instead of this skill. + ## System Architecture Omarchy is built on: @@ -336,26 +344,15 @@ When user requests system changes: 2. **Is it a config edit?** Edit in `~/.config/`, never `~/.local/share/omarchy/` 3. **Is it a theme customization?** Create a NEW custom theme directory 4. **Is it automation?** Use hooks in `~/.config/omarchy/hooks/` -5. **Is it a package install?** Use `yay` +5. **Is it a package install?** Use `omarchy-pkg-add` (or `omarchy-pkg-aur-add` for AUR-only packages) 6. **Unsure if command exists?** Search with `compgen -c | grep omarchy` -## Development (AI Agents) +## Out of Scope -When contributing to Omarchy itself (e.g., fixing bugs, adding features), migrations are used to apply changes to existing installations. - -### Creating Migrations - -```bash -# ALWAYS use --no-edit flag or you will get stuck -omarchy-dev-add-migration --no-edit -``` - -This creates a new migration file and outputs its path without opening an editor. The migration filename is based on the git commit timestamp. - -**Migration files** are shell scripts in `~/.local/share/omarchy/migrations/` that run once per system during `omarchy-update`. Use them for: -- Updating user configs with new defaults -- Installing new dependencies -- Running one-time setup tasks +This skill intentionally does not cover Omarchy source development. Do not use this skill for: +- Editing files in `~/.local/share/omarchy/` (`bin/`, `config/`, `default/`, `themes/`, `migrations/`, etc.) +- Creating or editing migrations +- Running `omarchy-dev-*` commands ## Example Requests diff --git a/default/sddm/omarchy/Main.qml b/default/sddm/omarchy/Main.qml new file mode 100644 index 00000000..30a491aa --- /dev/null +++ b/default/sddm/omarchy/Main.qml @@ -0,0 +1,98 @@ +import QtQuick 2.0 +import SddmComponents 2.0 + +Rectangle { + id: root + width: 640 + height: 480 + color: "#000000" + + property string currentUser: userModel.lastUser + property int sessionIndex: { + for (var i = 0; i < sessionModel.rowCount(); i++) { + var name = (sessionModel.data(sessionModel.index(i, 0), Qt.DisplayRole) || "").toString() + if (name.indexOf("uwsm") !== -1) + return i + } + return sessionModel.lastIndex + } + + Connections { + target: sddm + function onLoginFailed() { + errorMessage.text = "Login failed" + password.text = "" + password.focus = true + } + function onLoginSucceeded() { + errorMessage.text = "" + } + } + + Column { + anchors.centerIn: parent + spacing: root.height * 0.04 + width: parent.width + + Image { + source: "logo.svg" + width: root.width * 0.35 + height: Math.round(width * sourceSize.height / sourceSize.width) + fillMode: Image.PreserveAspectFit + anchors.horizontalCenter: parent.horizontalCenter + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter + spacing: root.width * 0.007 + + Text { + text: "\uf023" + color: "#ffffff" + font.family: "JetBrainsMono NF" + font.pixelSize: root.height * 0.025 + anchors.verticalCenter: parent.verticalCenter + } + + Rectangle { + width: root.width * 0.17 + height: root.height * 0.04 + color: "#000000" + border.color: "#ffffff" + border.width: 1 + + TextInput { + id: password + anchors.fill: parent + anchors.margins: root.height * 0.008 + verticalAlignment: TextInput.AlignVCenter + echoMode: TextInput.Password + font.family: "JetBrainsMono NF" + font.pixelSize: root.height * 0.02 + font.letterSpacing: root.height * 0.004 + passwordCharacter: "\u2022" + color: "#ffffff" + focus: true + + Keys.onPressed: { + if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { + sddm.login(root.currentUser, password.text, root.sessionIndex) + event.accepted = true + } + } + } + } + } + + Text { + id: errorMessage + text: "" + color: "#f7768e" + font.family: "JetBrainsMono NF" + font.pixelSize: root.height * 0.018 + anchors.horizontalCenter: parent.horizontalCenter + } + } + + Component.onCompleted: password.forceActiveFocus() +} diff --git a/default/sddm/omarchy/logo.svg b/default/sddm/omarchy/logo.svg new file mode 100644 index 00000000..0853b047 --- /dev/null +++ b/default/sddm/omarchy/logo.svg @@ -0,0 +1 @@ + diff --git a/default/sddm/omarchy/metadata.desktop b/default/sddm/omarchy/metadata.desktop new file mode 100644 index 00000000..7d07c7e4 --- /dev/null +++ b/default/sddm/omarchy/metadata.desktop @@ -0,0 +1,6 @@ +[SddmGreeterTheme] +Name=Omarchy +Description=Minimal terminal-style login theme matching the Limine bootloader aesthetic +Author=Omarchy +Type=sddm-theme +Version=1.0 diff --git a/default/sddm/omarchy/theme.conf b/default/sddm/omarchy/theme.conf new file mode 100644 index 00000000..e94cbbd3 --- /dev/null +++ b/default/sddm/omarchy/theme.conf @@ -0,0 +1 @@ +[General] diff --git a/default/systemd/user@.service.d/faster-shutdown.conf b/default/systemd/user@.service.d/faster-shutdown.conf new file mode 100644 index 00000000..449242ce --- /dev/null +++ b/default/systemd/user@.service.d/faster-shutdown.conf @@ -0,0 +1,2 @@ +[Service] +TimeoutStopSec=5s diff --git a/install/config/fast-shutdown.sh b/install/config/fast-shutdown.sh index 627e02a5..c7cc7827 100644 --- a/install/config/fast-shutdown.sh +++ b/install/config/fast-shutdown.sh @@ -1,3 +1,5 @@ sudo mkdir -p /etc/systemd/system.conf.d sudo cp "$OMARCHY_PATH/default/systemd/faster-shutdown.conf" /etc/systemd/system.conf.d/10-faster-shutdown.conf +sudo mkdir -p /etc/systemd/system/user@.service.d +sudo cp "$OMARCHY_PATH/default/systemd/user@.service.d/faster-shutdown.conf" /etc/systemd/system/user@.service.d/faster-shutdown.conf sudo systemctl daemon-reload diff --git a/install/config/xcompose.sh b/install/config/xcompose.sh index c571cf07..9534abb6 100644 --- a/install/config/xcompose.sh +++ b/install/config/xcompose.sh @@ -1,6 +1,8 @@ # Set default XCompose that is triggered with CapsLock tee ~/.XCompose >/dev/null < "$KEYRING_FILE" [keyring] display-name=Default keyring ctime=$(date +%s) @@ -13,7 +13,7 @@ lock-on-idle=false lock-after=false EOF -cat << EOF | tee "$DEFAULT_FILE" +cat << EOF > "$DEFAULT_FILE" Default_keyring EOF diff --git a/install/login/limine-snapper.sh b/install/login/limine-snapper.sh index 44c8cddc..afd05b15 100644 --- a/install/login/limine-snapper.sh +++ b/install/login/limine-snapper.sh @@ -91,19 +91,3 @@ if [[ -n $EFI ]] && efibootmgr &>/dev/null; then sudo efibootmgr -b "$bootnum" -B >/dev/null 2>&1 done < <(efibootmgr | grep -E "^Boot[0-9]{4}\*? Arch Linux Limine" | sed 's/^Boot\([0-9]\{4\}\).*/\1/') fi - -# Move this to a utility to allow manual activation -# if [[ -n $EFI ]] && efibootmgr &>/dev/null && -# ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends" && -# ! cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then -# -# uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) -# -# if [[ -n $uki_file ]]; then -# sudo efibootmgr --create \ -# --disk "$(findmnt -n -o SOURCE /boot | sed 's/p\?[0-9]*$//')" \ -# --part "$(findmnt -n -o SOURCE /boot | grep -o 'p\?[0-9]*$' | sed 's/^p//')" \ -# --label "Omarchy" \ -# --loader "\\EFI\\Linux\\$uki_file" -# fi -# fi diff --git a/install/login/sddm.sh b/install/login/sddm.sh index 1cbd5d7c..a0366b3b 100644 --- a/install/login/sddm.sh +++ b/install/login/sddm.sh @@ -1,5 +1,8 @@ -sudo mkdir -p /etc/sddm.conf.d +# Install omarchy SDDM theme +omarchy-refresh-sddm +# Setup SDDM login service +sudo mkdir -p /etc/sddm.conf.d if [[ ! -f /etc/sddm.conf.d/autologin.conf ]]; then cat <