diff --git a/bin/omarchy-debug b/bin/omarchy-debug index 05c35df8..c86ff9e2 100755 --- a/bin/omarchy-debug +++ b/bin/omarchy-debug @@ -1,7 +1,34 @@ #!/bin/bash +NO_SUDO=false +PRINT_ONLY=false + +while [[ $# -gt 0 ]]; do + case "$1" in + --no-sudo) + NO_SUDO=true + shift + ;; + --print) + PRINT_ONLY=true + shift + ;; + *) + echo "Unknown option: $1" + echo "Usage: omarchy-debug [--no-sudo] [--print]" + exit 1 + ;; + esac +done + LOG_FILE="/tmp/omarchy-debug.log" +if [ "$NO_SUDO" = true ]; then + DMESG_OUTPUT="(skipped - --no-sudo flag used)" +else + DMESG_OUTPUT="$(sudo dmesg)" +fi + cat > "$LOG_FILE" </dev/null; comm -13 <(pacman -Sql | sort) <(pacman -Qqe | sort) | xargs -r expac -Q '%n %v (AUR)'; } | sort) EOF +if [ "$PRINT_ONLY" = true ]; then + cat "$LOG_FILE" + exit 0 +fi + OPTIONS=("View log" "Save in current directory") if ping -c 1 8.8.8.8 >/dev/null 2>&1; then OPTIONS=("Upload log" "${OPTIONS[@]}") diff --git a/bin/omarchy-launch-floating-terminal-with-presentation b/bin/omarchy-launch-floating-terminal-with-presentation index cc779efd..a549ae47 100755 --- a/bin/omarchy-launch-floating-terminal-with-presentation +++ b/bin/omarchy-launch-floating-terminal-with-presentation @@ -1,4 +1,4 @@ #!/bin/bash cmd="$*" -exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c "omarchy-show-logo; $cmd; omarchy-show-done" +exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal --title=Omarchy -e bash -c "omarchy-show-logo; $cmd; if [ \$? -ne 130 ]; then omarchy-show-done; fi" diff --git a/bin/omarchy-menu b/bin/omarchy-menu index c03e9b4f..37b34518 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -276,12 +276,13 @@ show_install_ai_menu() { echo ollama ) - case $(menu "Install" "󱚤 Claude Code\n󱚤 Copilot CLI [AUR]\n󱚤 Cursor CLI\n󱚤 Gemini\n󱚤 OpenAI Codex\n󱚤 LM Studio\n󱚤 Ollama\n󱚤 Crush\n󱚤 opencode") in + case $(menu "Install" " Dictation [AUR]\n󱚤 Claude Code\n󱚤 Copilot CLI [AUR]\n󱚤 Cursor CLI\n󱚤 Gemini\n󱚤 OpenAI Codex\n󱚤 LM Studio\n󱚤 Ollama\n󱚤 Crush\n󱚤 opencode") in + *Dictation*) present_terminal "echo 'Installing Hyprwhspr from AUR...'; yay -S --noconfirm hyprwhspr && hyprwhspr setup" ;; *Claude*) install "Claude Code" "claude-code" ;; *Copilot*) aur_install "Copilot CLI" "github-copilot-cli" ;; *Cursor*) install "Cursor CLI" "cursor-cli" ;; - *OpenAI*) install "OpenAI Codex" "openai-codex" ;; *Gemini*) install "Gemini" "gemini-cli" ;; + *OpenAI*) install "OpenAI Codex" "openai-codex" ;; *Studio*) install "LM Studio" "lmstudio" ;; *Ollama*) install "Ollama" $ollama_pkg ;; *Crush*) install "Crush" "crush-bin" ;; @@ -366,10 +367,11 @@ show_install_elixir_menu() { } show_remove_menu() { - case $(menu "Remove" "󰣇 Package\n Web App\n TUI\n󰸌 Theme\n󰍲 Windows\n󰈷 Fingerprint\n Fido2") in + case $(menu "Remove" "󰣇 Package\n Web App\n TUI\n󰵮 Development\n󰸌 Theme\n󰍲 Windows\n󰈷 Fingerprint\n Fido2") in *Package*) terminal omarchy-pkg-remove ;; *Web*) present_terminal omarchy-webapp-remove ;; *TUI*) present_terminal omarchy-tui-remove ;; + *Development*) show_remove_development_menu ;; *Theme*) present_terminal omarchy-theme-remove ;; *Windows*) present_terminal "omarchy-windows-vm remove" ;; *Fingerprint*) present_terminal "omarchy-setup-fingerprint --remove" ;; @@ -378,6 +380,50 @@ show_remove_menu() { esac } +show_remove_development_menu() { + case $(menu "Remove" "󰫏 Ruby on Rails\n JavaScript\n Go\n PHP\n Python\n Elixir\n Zig\n Rust\n Java\n .NET\n OCaml\n Clojure") in + *Rails*) present_terminal "omarchy-remove-dev-env ruby" ;; + *JavaScript*) show_remove_javascript_menu ;; + *Go*) present_terminal "omarchy-remove-dev-env go" ;; + *PHP*) show_remove_php_menu ;; + *Python*) present_terminal "omarchy-remove-dev-env python" ;; + *Elixir*) show_remove_elixir_menu ;; + *Zig*) present_terminal "omarchy-remove-dev-env zig" ;; + *Rust*) present_terminal "omarchy-remove-dev-env rust" ;; + *Java*) present_terminal "omarchy-remove-dev-env java" ;; + *NET*) present_terminal "omarchy-remove-dev-env dotnet" ;; + *OCaml*) present_terminal "omarchy-remove-dev-env ocaml" ;; + *Clojure*) present_terminal "omarchy-remove-dev-env clojure" ;; + *) show_remove_menu ;; + esac +} + +show_remove_javascript_menu() { + case $(menu "Remove" " Node.js\n Bun\n Deno") in + *Node*) present_terminal "omarchy-remove-dev-env node" ;; + *Bun*) present_terminal "omarchy-remove-dev-env bun" ;; + *Deno*) present_terminal "omarchy-remove-dev-env deno" ;; + *) show_remove_development_menu ;; + esac +} + +show_remove_php_menu() { + case $(menu "Remove" " PHP\n Laravel\n Symfony") in + *PHP*) present_terminal "omarchy-remove-dev-env php" ;; + *Laravel*) present_terminal "omarchy-remove-dev-env laravel" ;; + *Symfony*) present_terminal "omarchy-remove-dev-env symfony" ;; + *) show_remove_development_menu ;; + esac +} + +show_remove_elixir_menu() { + case $(menu "Remove" " Elixir\n Phoenix") in + *Elixir*) present_terminal "omarchy-remove-dev-env elixir" ;; + *Phoenix*) present_terminal "omarchy-remove-dev-env phoenix" ;; + *) show_remove_development_menu ;; + esac +} + show_update_menu() { case $(menu "Update" " Omarchy\n󰔫 Channel\n Config\n󰸌 Extra Themes\n Process\n󰇅 Hardware\n Firmware\n Password\n Timezone\n Time") in *Omarchy*) present_terminal omarchy-update ;; @@ -478,6 +524,10 @@ go_to_menu() { esac } +# Allow user extensions and overrides +USER_EXTENSIONS="$HOME/.config/omarchy/extensions/menu.sh" +[[ -f $USER_EXTENSIONS ]] && source "$USER_EXTENSIONS" + if [[ -n "$1" ]]; then BACK_TO_EXIT=true go_to_menu "$1" diff --git a/bin/omarchy-menu-keybindings b/bin/omarchy-menu-keybindings index 39a9e0b6..1c40d828 100755 --- a/bin/omarchy-menu-keybindings +++ b/bin/omarchy-menu-keybindings @@ -212,18 +212,26 @@ prioritize_entries() { cut -f2- } -monitor_height=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .height') -menu_height=$((monitor_height * 40 / 100)) +output_keybindings() { + build_keymap_cache -build_keymap_cache + { + dynamic_bindings + static_bindings + } | + sort -u | + parse_keycodes | + parse_bindings | + prioritize_entries +} -{ - dynamic_bindings - static_bindings -} | - sort -u | - parse_keycodes | - parse_bindings | - prioritize_entries | - walker --dmenu -p 'Keybindings' --width 800 --height "$menu_height" +if [[ "$1" == "--print" || "$1" == "-p" ]]; then + output_keybindings +else + monitor_height=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .height') + menu_height=$((monitor_height * 40 / 100)) + + output_keybindings | + walker --dmenu -p 'Keybindings' --width 800 --height "$menu_height" +fi diff --git a/bin/omarchy-refresh-chromium b/bin/omarchy-refresh-chromium new file mode 100755 index 00000000..bb119216 --- /dev/null +++ b/bin/omarchy-refresh-chromium @@ -0,0 +1,19 @@ +#!/bin/bash + +CONFIG_FILE="$HOME/.config/chromium-flags.conf" +INSTALL_GOOGLE_ACCOUNTS=false + +# Check if google accounts were installed +if [[ -f "$CONFIG_FILE" ]] && \ + grep -q -- "--oauth2-client-id" "$CONFIG_FILE" && \ + grep -q -- "--oauth2-client-secret" "$CONFIG_FILE"; then + INSTALL_GOOGLE_ACCOUNTS=true +fi + +# Refresh the Chromium configuration +omarchy-refresh-config chromium-flags.conf + +# Re-install Google accounts if previously configured +if [[ "$INSTALL_GOOGLE_ACCOUNTS" == true ]]; then + omarchy-install-chromium-google-account +fi diff --git a/bin/omarchy-remove-dev-env b/bin/omarchy-remove-dev-env new file mode 100755 index 00000000..d2320149 --- /dev/null +++ b/bin/omarchy-remove-dev-env @@ -0,0 +1,102 @@ +#!/bin/bash + +if [[ -z "$1" ]]; then + echo "Usage: omarchy-remove-dev-env " >&2 + exit 1 +fi + +remove_php() { + sudo pacman -Rns --noconfirm php composer php-sqlite xdebug 2>/dev/null || true +} + +case "$1" in +ruby) + echo -e "Removing Ruby...\n" + mise uninstall ruby --all + mise rm -g ruby + rm -f ~/.gemrc + ;; +node) + echo -e "Removing Node.js...\n" + mise uninstall node --all + mise rm -g node + ;; +bun) + echo -e "Removing Bun...\n" + mise uninstall bun --all + mise rm -g bun + ;; +deno) + echo -e "Removing Deno...\n" + mise uninstall deno --all + mise rm -g deno + ;; +go) + echo -e "Removing Go...\n" + mise uninstall go --all + mise rm -g go + ;; +php) + echo -e "Removing PHP...\n" + remove_php + ;; +laravel) + echo -e "Removing Laravel...\n" + composer global remove laravel/installer 2>/dev/null || true + ;; +symfony) + echo -e "Removing Symfony CLI...\n" + sudo pacman -Rns --noconfirm symfony-cli 2>/dev/null || true + ;; +python) + echo -e "Removing Python...\n" + mise uninstall python --all + mise rm -g python + rm -rf ~/.local/bin/uv ~/.local/bin/uvx ~/.cargo/bin/uv 2>/dev/null || true + ;; +elixir|phoenix) + echo -e "Removing Elixir/Erlang...\n" + mise uninstall elixir --all + mise uninstall erlang --all + mise rm -g elixir + mise rm -g erlang + ;; +zig) + echo -e "Removing Zig...\n" + mise uninstall zig --all + mise uninstall zls --all + mise rm -g zig + mise rm -g zls + ;; +rust) + echo -e "Removing Rust...\n" + rustup self uninstall -y 2>/dev/null || true + ;; +java) + echo -e "Removing Java...\n" + mise uninstall java --all + mise rm -g java + ;; +dotnet) + echo -e "Removing .NET...\n" + mise uninstall dotnet --all + mise rm -g dotnet + ;; +ocaml) + echo -e "Removing OCaml...\n" + opam switch remove default -y 2>/dev/null || true + rm -rf ~/.opam 2>/dev/null || true + sudo rm -f /usr/local/bin/opam 2>/dev/null || true + ;; +clojure) + echo -e "Removing Clojure...\n" + mise uninstall clojure --all + mise rm -g clojure + ;; +*) + echo "Unknown environment: $1" + exit 1 + ;; +esac + +echo -e "\nDone!" diff --git a/bin/omarchy-theme-set b/bin/omarchy-theme-set index 00ddba06..8291e20a 100755 --- a/bin/omarchy-theme-set +++ b/bin/omarchy-theme-set @@ -55,6 +55,7 @@ makoctl reload omarchy-theme-set-gnome omarchy-theme-set-browser omarchy-theme-set-vscode +omarchy-theme-set-vscodium omarchy-theme-set-cursor omarchy-theme-set-obsidian omarchy-theme-set-opencode diff --git a/bin/omarchy-theme-set-cursor b/bin/omarchy-theme-set-cursor index 2db672e1..18b962bc 100755 --- a/bin/omarchy-theme-set-cursor +++ b/bin/omarchy-theme-set-cursor @@ -1,4 +1,4 @@ #!/bin/bash # Call the VSCode theme setter with Cursor-specific parameters -omarchy-theme-set-vscode cursor "$HOME/.config/Cursor/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-cursor-theme-changes" Cursor +omarchy-theme-set-vscode cursor "$HOME/.config/Cursor/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-cursor-theme-changes" diff --git a/bin/omarchy-theme-set-vscode b/bin/omarchy-theme-set-vscode index c04010ca..31f95bf1 100755 --- a/bin/omarchy-theme-set-vscode +++ b/bin/omarchy-theme-set-vscode @@ -7,8 +7,6 @@ EDITOR_CMD="${1:-code}" SETTINGS_PATH="${2:-$HOME/.config/Code/User/settings.json}" SKIP_FLAG="${3:-$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes}" -EDITOR_NAME="${4:-VS Code}" - VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json" if omarchy-cmd-present "$EDITOR_CMD" && [[ ! -f "$SKIP_FLAG" ]]; then @@ -16,7 +14,7 @@ if omarchy-cmd-present "$EDITOR_CMD" && [[ ! -f "$SKIP_FLAG" ]]; then theme_name=$(jq -r '.name' "$VS_CODE_THEME") extension=$(jq -r '.extension' "$VS_CODE_THEME") - # Install $EDITOR_NAME theme extension + # Install theme extension if [[ -n "$extension" ]] && ! "$EDITOR_CMD" --list-extensions | grep -Fxq "$extension"; then "$EDITOR_CMD" --install-extension "$extension" >/dev/null fi @@ -39,7 +37,7 @@ if omarchy-cmd-present "$EDITOR_CMD" && [[ ! -f "$SKIP_FLAG" ]]; then "s/(\"workbench.colorTheme\"[[:space:]]*:[[:space:]]*\")[^\"]*(\")/\1$theme_name\2/" \ "$SETTINGS_PATH" else - # Remove theme from settings.json when the theme doesn't have $EDITOR_NAME support + # Remove theme from settings.json when the theme doesn't have editor support if [[ -f "$SETTINGS_PATH" ]]; then sed -i --follow-symlinks -E 's/\"workbench\.colorTheme\"[[:space:]]*:[^,}]*,?//' "$SETTINGS_PATH" fi diff --git a/bin/omarchy-theme-set-vscodium b/bin/omarchy-theme-set-vscodium new file mode 100755 index 00000000..3d955c02 --- /dev/null +++ b/bin/omarchy-theme-set-vscodium @@ -0,0 +1,4 @@ +#!/bin/bash + +# Call the VSCode theme setter with VSCodium-specific parameters +omarchy-theme-set-vscode codium "$HOME/.config/VSCodium/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-codium-theme-changes" diff --git a/bin/omarchy-tui-install b/bin/omarchy-tui-install index 657b70a6..ebd3dfa1 100755 --- a/bin/omarchy-tui-install +++ b/bin/omarchy-tui-install @@ -1,5 +1,7 @@ #!/bin/bash +set -e + if [ "$#" -ne 4 ]; then echo -e "\e[32mLet's create a TUI shortcut you can start with the app launcher.\n\e[0m" APP_NAME=$(gum input --prompt "Name> " --placeholder "My TUI") diff --git a/bin/omarchy-tui-remove b/bin/omarchy-tui-remove index 91e6f6bc..e436776b 100755 --- a/bin/omarchy-tui-remove +++ b/bin/omarchy-tui-remove @@ -1,5 +1,7 @@ #!/bin/bash +set -e + ICON_DIR="$HOME/.local/share/applications/icons" DESKTOP_DIR="$HOME/.local/share/applications/" diff --git a/bin/omarchy-update-restart b/bin/omarchy-update-restart index 2811e937..b6b73afe 100755 --- a/bin/omarchy-update-restart +++ b/bin/omarchy-update-restart @@ -1,10 +1,10 @@ #!/bin/bash if [ "$(uname -r | sed 's/-arch/\.arch/')" != "$(pacman -Q linux | awk '{print $2}')" ]; then - gum confirm "Linux kernel has been updated. Reboot?" && omarchy-state clear re*-required && sudo reboot now + gum confirm "Linux kernel has been updated. Reboot?" && omarchy-cmd-reboot elif [ -f "$HOME/.local/state/omarchy/reboot-required" ]; then - gum confirm "Updates require reboot. Ready?" && omarchy-state clear re*-required && sudo reboot now + gum confirm "Updates require reboot. Ready?" && omarchy-cmd-reboot fi for file in "$HOME"/.local/state/omarchy/restart-*-required; do diff --git a/bin/omarchy-webapp-install b/bin/omarchy-webapp-install index e954e842..a66dcabd 100755 --- a/bin/omarchy-webapp-install +++ b/bin/omarchy-webapp-install @@ -1,5 +1,7 @@ #!/bin/bash +set -e + 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") diff --git a/bin/omarchy-webapp-remove b/bin/omarchy-webapp-remove index a6f4ea46..2da36b54 100755 --- a/bin/omarchy-webapp-remove +++ b/bin/omarchy-webapp-remove @@ -1,5 +1,7 @@ #!/bin/bash +set -e + ICON_DIR="$HOME/.local/share/applications/icons" DESKTOP_DIR="$HOME/.local/share/applications/" diff --git a/config/hypr/hypridle.conf b/config/hypr/hypridle.conf index f2245a7a..59f55860 100644 --- a/config/hypr/hypridle.conf +++ b/config/hypr/hypridle.conf @@ -11,12 +11,12 @@ listener { } listener { - timeout = 300 # 5min + timeout = 150 # 5min on-timeout = loginctl lock-session # lock screen when timeout has passed } listener { - timeout = 330 # 5.5min + timeout = 30 # 5.5min on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected } diff --git a/default/hypr/apps/hyprshot.conf b/default/hypr/apps/hyprshot.conf index 514d9156..795ac396 100644 --- a/default/hypr/apps/hyprshot.conf +++ b/default/hypr/apps/hyprshot.conf @@ -1,2 +1,2 @@ # Remove 1px border around hyprshot screenshots -layerrule = animation none, match:namespace selection +layerrule = no_anim on, match:namespace selection diff --git a/default/hypr/apps/jetbrains.conf b/default/hypr/apps/jetbrains.conf index bbb6c2b9..d045f823 100644 --- a/default/hypr/apps/jetbrains.conf +++ b/default/hypr/apps/jetbrains.conf @@ -13,7 +13,7 @@ windowrule = stay_focused on, match:tag jetbrains windowrule = border_size 0, match:tag jetbrains # For some reason tag:jetbrains does not work for size rule -windowrule = size >50% >50%, match:class ^(jetbrains-.*), match:title ^()$, match:float 1 +windowrule = min_size (monitor_w*0.5) (monitor_h*0.5), match:class ^(jetbrains-.*), match:title ^()$, match:float 1 # Disable window flicker when autocomplete or tooltips appear windowrule = no_initial_focus on, match:class ^(jetbrains-.*)$, match:title ^(win.*)$, match:float 1 diff --git a/default/hypr/apps/pip.conf b/default/hypr/apps/pip.conf index f68a7ec2..e5b45d56 100644 --- a/default/hypr/apps/pip.conf +++ b/default/hypr/apps/pip.conf @@ -6,4 +6,4 @@ windowrule = size 600 338, match:tag pip windowrule = keep_aspect_ratio on, match:tag pip windowrule = border_size 0, match:tag pip windowrule = opacity 1 1, match:tag pip -windowrule = move 100%-w-40 4%, match:tag pip +windowrule = move (monitor_w-window_w-40) (monitor_h*0.04), match:tag pip diff --git a/default/hypr/apps/walker.conf b/default/hypr/apps/walker.conf index c3f7fe5a..127e3b42 100644 --- a/default/hypr/apps/walker.conf +++ b/default/hypr/apps/walker.conf @@ -1,2 +1,2 @@ # Application-specific animation -layerrule = animation none, match:namespace walker +layerrule = no_anim on, match:namespace walker diff --git a/default/hypr/apps/webcam-overlay.conf b/default/hypr/apps/webcam-overlay.conf index ca5b4dec..307d6864 100644 --- a/default/hypr/apps/webcam-overlay.conf +++ b/default/hypr/apps/webcam-overlay.conf @@ -3,4 +3,4 @@ windowrule = float on, match:title WebcamOverlay windowrule = pin on, match:title WebcamOverlay windowrule = no_initial_focus on, match:title WebcamOverlay windowrule = no_dim on, match:title WebcamOverlay -windowrule = move 100%-w-40 100%-w-40, match:title WebcamOverlay # There's a typo in the hyprland rule so 100%-w on the height param is actually correct here +windowrule = move (monitor_w-window_w-40) (monitor_h-window_h-40), match:title WebcamOverlay diff --git a/default/hypr/bindings/tiling-v2.conf b/default/hypr/bindings/tiling-v2.conf index 01aa7d72..2b4de61c 100644 --- a/default/hypr/bindings/tiling-v2.conf +++ b/default/hypr/bindings/tiling-v2.conf @@ -65,6 +65,8 @@ bindd = SUPER CTRL, TAB, Former workspace, workspace, previous # Move workspaces to other monitors bindd = SUPER SHIFT ALT, LEFT, Move workspace to left monitor, movecurrentworkspacetomonitor, l bindd = SUPER SHIFT ALT, RIGHT, Move workspace to right monitor, movecurrentworkspacetomonitor, r +bindd = SUPER SHIFT ALT, UP, Move workspace to up monitor, movecurrentworkspacetomonitor, u +bindd = SUPER SHIFT ALT, DOWN, Move workspace to down monitor, movecurrentworkspacetomonitor, d # Swap active window with the one next to it with SUPER + SHIFT + arrow keys bindd = SUPER SHIFT, LEFT, Swap window to the left, swapwindow, l diff --git a/migrations/1757021485.sh b/migrations/1757021485.sh index cb8f4c49..ab524755 100644 --- a/migrations/1757021485.sh +++ b/migrations/1757021485.sh @@ -1,3 +1,3 @@ echo "Install Copy URL extension for Chromium" -omarchy-refresh-config chromium-flags.conf +omarchy-refresh-chromium diff --git a/migrations/1767414310.sh b/migrations/1767414310.sh new file mode 100644 index 00000000..7ab1d2f0 --- /dev/null +++ b/migrations/1767414310.sh @@ -0,0 +1,4 @@ +echo "Use correct idle-timer sensitive timeouts for screensaver + screen off" + +sed -i 's/timeout = 300/timeout = 150/' ~/.config/hypr/hypridle.conf +sed -i 's/timeout = 330/timeout = 30/' ~/.config/hypr/hypridle.conf