diff --git a/bin/omarchy-branch-set b/bin/omarchy-branch-set new file mode 100755 index 00000000..ef531e91 --- /dev/null +++ b/bin/omarchy-branch-set @@ -0,0 +1,14 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-channel-set [master|dev]" + exit 1 +else + branch="$1" +fi + +case "$branch" in + "master") git -C $OMARCHY_PATH switch master ;; + "dev") git -C $OMARCHY_PATH switch dev ;; + *) echo "Unknown branch: $branch"; exit 1; ;; +esac diff --git a/bin/omarchy-channel-set b/bin/omarchy-channel-set new file mode 100755 index 00000000..067aad2d --- /dev/null +++ b/bin/omarchy-channel-set @@ -0,0 +1,15 @@ +#!/bin/bash + +if (($# == 0)); then + echo "Usage: omarchy-channel-set [stable|edge|dev]" + exit 1 +else + channel="$1" +fi + +case "$channel" in +"stable") omarchy-branch-set "master" && omarchy-refresh-pacman "stable" ;; +"edge") omarchy-branch-set "edge" && omarchy-refresh-pacman "stable" ;; +"dev") omarchy-branch-set "dev" && omarchy-refresh-pacman "edge" ;; +*) echo "Unknown channel: $channel"; exit 1; ;; +esac diff --git a/bin/omarchy-cmd-reboot b/bin/omarchy-cmd-reboot new file mode 100755 index 00000000..c1f6472d --- /dev/null +++ b/bin/omarchy-cmd-reboot @@ -0,0 +1,6 @@ +#!/bin/bash + +omarchy-state clear re*-required +omarchy-hyprland-window-close-all +sleep 1 # Allow apps like Chrome to shutdown correctly +systemctl reboot --no-wall diff --git a/bin/omarchy-cmd-screensaver b/bin/omarchy-cmd-screensaver index 33337851..156b1180 100755 --- a/bin/omarchy-cmd-screensaver +++ b/bin/omarchy-cmd-screensaver @@ -18,12 +18,14 @@ printf '\033]11;rgb:00/00/00\007' # Set background color to black hyprctl keyword cursor:invisible true &>/dev/null while true; do + effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | grep -Ev '^(dev_worm)$' | sort -u | shuf -n1) + tte -i ~/.config/omarchy/branding/screensaver.txt \ - --frame-rate 120 --canvas-width 0 --canvas-height 0 --anchor-canvas c --anchor-text c\ - --no-eol --no-restore-cursor random_effect & + --frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c\ + --no-eol --no-restore-cursor $effect & while pgrep -x tte >/dev/null; do - if read -n 1 -t 3 || ! screensaver_in_focus; then + if read -n 1 -t 1 || ! screensaver_in_focus; then exit_screensaver fi done diff --git a/bin/omarchy-cmd-shutdown b/bin/omarchy-cmd-shutdown new file mode 100755 index 00000000..cd5748ed --- /dev/null +++ b/bin/omarchy-cmd-shutdown @@ -0,0 +1,6 @@ +#!/bin/bash + +omarchy-state clear re*-required +omarchy-hyprland-window-close-all +sleep 1 # Allow apps like Chrome to shutdown correctly +systemctl poweroff --no-wall diff --git a/bin/omarchy-hyprland-window-pop b/bin/omarchy-hyprland-window-pop index 85b5b531..d1e8ef3c 100755 --- a/bin/omarchy-hyprland-window-pop +++ b/bin/omarchy-hyprland-window-pop @@ -26,9 +26,9 @@ addr=$(echo "$active" | jq -r ".address") if [[ $pinned == "true" ]]; then hyprctl -q --batch \ - dispatch pin address:$addr; \ - dispatch togglefloating address:$addr; \ - dispatch tagwindow -pop address:$addr; + "dispatch pin address:$addr;" \ + "dispatch togglefloating address:$addr;" \ + "dispatch tagwindow -pop address:$addr;" elif [[ -n $addr ]]; then hyprctl dispatch togglefloating address:$addr hyprctl dispatch resizeactive exact $width $height address:$addr @@ -40,7 +40,7 @@ elif [[ -n $addr ]]; then fi hyprctl -q --batch \ - dispatch pin address:$addr; \ - dispatch alterzorder top address:$addr; \ - dispatch tagwindow +pop address:$addr; + "dispatch pin address:$addr;" \ + "dispatch alterzorder top address:$addr;" \ + "dispatch tagwindow +pop address:$addr;" fi diff --git a/bin/omarchy-install-steam b/bin/omarchy-install-steam index 3d23cf08..a5764bb4 100755 --- a/bin/omarchy-install-steam +++ b/bin/omarchy-install-steam @@ -3,5 +3,5 @@ set -e echo "Now pick dependencies matching your graphics card" -sudo pacman -S --noconfirm steam +sudo pacman -S steam setsid gtk-launch steam >/dev/null 2>&1 & diff --git a/bin/omarchy-launch-screensaver b/bin/omarchy-launch-screensaver index 932ee470..6fa5b2c4 100755 --- a/bin/omarchy-launch-screensaver +++ b/bin/omarchy-launch-screensaver @@ -29,6 +29,7 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do *ghostty*) hyprctl dispatch exec -- \ ghostty --class=org.omarchy.screensaver \ + --config-file=~/.local/share/omarchy/default/ghostty/screensaver \ --font-size=18 \ -e omarchy-cmd-screensaver ;; @@ -36,6 +37,7 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do hyprctl dispatch exec -- \ kitty --class=org.omarchy.screensaver \ --override font_size=18 \ + --override window_padding_width=0 \ -e omarchy-cmd-screensaver ;; *) diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 962a84a8..b80d6178 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -252,7 +252,7 @@ show_install_editor_menu() { case $(menu "Install" " VSCode\n Cursor\n Zed\n Sublime Text\n Helix\n Emacs") in *VSCode*) present_terminal omarchy-install-vscode ;; *Cursor*) install_and_launch "Cursor" "cursor-bin" "cursor" ;; - *Zed*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;; + *Zed*) present_terminal "echo 'Installing Zed...'; sudo pacman -S zed && setsid gtk-launch dev.zed.Zed" ;; *Sublime*) install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;; *Helix*) install "Helix" "helix" ;; *Emacs*) install "Emacs" "emacs-wayland" && systemctl --user enable --now emacs.service ;; @@ -438,8 +438,8 @@ show_system_menu() { *Lock*) omarchy-lock-screen ;; *Screensaver*) omarchy-launch-screensaver force ;; *Suspend*) systemctl suspend ;; - *Restart*) omarchy-state clear re*-required && systemctl reboot --no-wall ;; - *Shutdown*) omarchy-state clear re*-required && systemctl poweroff --no-wall ;; + *Restart*) omarchy-cmd-reboot ;; + *Shutdown*) omarchy-cmd-shutdown ;; *) back_to show_main_menu ;; esac } diff --git a/bin/omarchy-refresh-pacman b/bin/omarchy-refresh-pacman index f24f9398..36d9678f 100755 --- a/bin/omarchy-refresh-pacman +++ b/bin/omarchy-refresh-pacman @@ -1,4 +1,20 @@ #!/bin/bash +# Take backup of existing files +sudo cp -f /etc/pacman.conf /etc/pacman.conf.bak +sudo cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak + sudo cp -f ~/.local/share/omarchy/default/pacman/pacman.conf /etc/pacman.conf -omarchy-refresh-pacman-mirrorlist + +if [[ $1 == "edge" ]]; then + sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-edge /etc/pacman.d/mirrorlist + sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/edge/$arch|' /etc/pacman.conf + echo "Setting channel to edge" +else + sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-stable /etc/pacman.d/mirrorlist + sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/stable/$arch|' /etc/pacman.conf + echo "Setting channel to stable" +fi + +echo +sudo pacman -Syu --noconfirm diff --git a/bin/omarchy-refresh-pacman-mirrorlist b/bin/omarchy-refresh-pacman-mirrorlist deleted file mode 100755 index abaf9b1e..00000000 --- a/bin/omarchy-refresh-pacman-mirrorlist +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [[ $1 == "edge" ]]; then - sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-edge /etc/pacman.d/mirrorlist -else - sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-stable /etc/pacman.d/mirrorlist -fi diff --git a/bin/omarchy-refresh-pacman-opr-server b/bin/omarchy-refresh-pacman-opr-server deleted file mode 100755 index 601e6b92..00000000 --- a/bin/omarchy-refresh-pacman-opr-server +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [[ $1 == "edge" ]]; then - sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/edge/$arch|' /etc/pacman.conf -else - sudo sed -i 's|https://pkgs.omarchy.org/.*$arch|https://pkgs.omarchy.org/stable/$arch|' /etc/pacman.conf -fi diff --git a/bin/omarchy-refresh-walker b/bin/omarchy-refresh-walker index 04112a4d..e32e2fcb 100755 --- a/bin/omarchy-refresh-walker +++ b/bin/omarchy-refresh-walker @@ -1,5 +1,9 @@ #!/bin/bash +# Ensure walker is set to autostart +mkdir -p ~/.config/autostart/ +cp $OMARCHY_PATH/autostart/walker.desktop ~/.config/autostart/ + omarchy-refresh-config walker/config.toml omarchy-refresh-config elephant/calc.toml omarchy-refresh-config elephant/desktopapplications.toml diff --git a/bin/omarchy-restart-walker b/bin/omarchy-restart-walker index 5919c88f..b3886e18 100755 --- a/bin/omarchy-restart-walker +++ b/bin/omarchy-restart-walker @@ -16,6 +16,7 @@ if [[ $EUID -eq 0 ]]; then setsid walker --gapplication-service & " else + elephant service enable 2>/dev/null systemctl --user restart elephant.service setsid walker --gapplication-service & fi diff --git a/bin/omarchy-tui-remove b/bin/omarchy-tui-remove index 564cffb2..91e6f6bc 100755 --- a/bin/omarchy-tui-remove +++ b/bin/omarchy-tui-remove @@ -6,7 +6,7 @@ DESKTOP_DIR="$HOME/.local/share/applications/" if [ "$#" -eq 0 ]; then # Find all TUIs while IFS= read -r -d '' file; do - if grep -q '^Exec=.*$TERMINAL.*-e' "$file"; then + if grep -qE '^Exec=.*(\$TERMINAL|xdg-terminal-exec).*-e' "$file"; then TUIS+=("$(basename "${file%.desktop}")") fi done < <(find "$DESKTOP_DIR" -name '*.desktop' -print0) diff --git a/bin/omarchy-version-channel b/bin/omarchy-version-channel new file mode 100755 index 00000000..8affb87e --- /dev/null +++ b/bin/omarchy-version-channel @@ -0,0 +1,23 @@ +#!/bin/bash + +if grep -q "https://stable-mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then + mirror="stable" +elif grep -q "https://mirror.omarchy.org/" /etc/pacman.d/mirrorlist; then + mirror="edge" +else + mirror="unknown" +fi + +if grep -q "https://pkgs.omarchy.org/stable/" /etc/pacman.conf; then + pkgs="stable" +elif grep -q "https://pkgs.omarchy.org/edge/" /etc/pacman.conf; then + pkgs="edge" +else + pkgs="unknown" +fi + +if [[ $mirror == $pkgs ]]; then + echo $mirror +else + echo "$mirror / $pkgs" +fi diff --git a/bin/omarchy-version-pkgs b/bin/omarchy-version-pkgs new file mode 100755 index 00000000..bc638110 --- /dev/null +++ b/bin/omarchy-version-pkgs @@ -0,0 +1,3 @@ +#!/bin/bash + +date -d "$(grep upgraded /var/log/pacman.log | tail -1 | sed -E 's/\[([^]]+)\].*/\1/')" "+%A, %B %d %Y at %H:%M" diff --git a/config/brave-flags.conf b/config/brave-flags.conf index 3510e03d..bce00d52 100644 --- a/config/brave-flags.conf +++ b/config/brave-flags.conf @@ -1,5 +1,6 @@ --ozone-platform=wayland --ozone-platform-hint=wayland --enable-features=TouchpadOverscrollHistoryNavigation +--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url # Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957 --disable-features=WaylandWpColorManagerV1 diff --git a/config/fastfetch/config.jsonc b/config/fastfetch/config.jsonc index 31542724..ddee6f36 100644 --- a/config/fastfetch/config.jsonc +++ b/config/fastfetch/config.jsonc @@ -74,6 +74,12 @@ "keyColor": "blue", "text": "branch=$(omarchy-version-branch); echo \"$branch\"" }, + { + "type": "command", + "key": "│ ├󰔫", + "keyColor": "blue", + "text": "channel=$(omarchy-version-channel); echo \"$channel\"" + }, { "type": "kernel", "key": "│ ├", @@ -122,7 +128,7 @@ "break", { "type": "custom", - "format": "\u001b[90m┌────────────────────Uptime / Age────────────────────┐" + "format": "\u001b[90m┌────────────────Age / Uptime / Update───────────────┐" }, { "type": "command", @@ -135,6 +141,12 @@ "key": "󱫐 Uptime", "keyColor": "magenta" }, + { + "type": "command", + "key": " Update", + "keyColor": "magenta", + "text": "updated=$(omarchy-version-pkgs); echo \"$updated\"" + }, { "type": "custom", "format": "\u001b[90m└────────────────────────────────────────────────────┘" diff --git a/default/ghostty/screensaver b/default/ghostty/screensaver new file mode 100644 index 00000000..dc359062 --- /dev/null +++ b/default/ghostty/screensaver @@ -0,0 +1,3 @@ +window-padding-x = 0 +window-padding-y = 0 +window-padding-color = "extend-always" diff --git a/default/hypr/apps/system.conf b/default/hypr/apps/system.conf index 713d8beb..ccf2dd27 100644 --- a/default/hypr/apps/system.conf +++ b/default/hypr/apps/system.conf @@ -3,7 +3,7 @@ windowrule = float, tag:floating-window windowrule = center, tag:floating-window windowrule = size 875 600, tag:floating-window -windowrule = tag +floating-window, class:(org.omarchy.bluetui|org.omarchy.impala|org.omarchy.wiremix|org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv) +windowrule = tag +floating-window, class:(org.omarchy.bluetui|org.omarchy.impala|org.omarchy.wiremix|org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv) windowrule = tag +floating-window, class:(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus), title:^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*) windowrule = float, class:org.gnome.Calculator diff --git a/install/config/increase-lockout-limit.sh b/install/config/increase-lockout-limit.sh index 522deb72..5932906f 100644 --- a/install/config/increase-lockout-limit.sh +++ b/install/config/increase-lockout-limit.sh @@ -1,3 +1,7 @@ # Increase lockout limit to 10 and decrease timeout to 2 minutes sudo sed -i 's|^\(auth\s\+required\s\+pam_faillock.so\)\s\+preauth.*$|\1 preauth silent deny=10 unlock_time=120|' "/etc/pam.d/system-auth" sudo sed -i 's|^\(auth\s\+\[default=die\]\s\+pam_faillock.so\)\s\+authfail.*$|\1 authfail deny=10 unlock_time=120|' "/etc/pam.d/system-auth" + +# Ensure lockout limit is reset on restart +sudo sed -i '/pam_faillock\.so preauth/d' /etc/pam.d/sddm-autologin +sudo sed -i '/auth.*pam_permit\.so/a auth required pam_faillock.so authsucc' /etc/pam.d/sddm-autologin diff --git a/migrations/1756411333.sh b/migrations/1756411333.sh index c44e9ce1..5312a6f5 100644 --- a/migrations/1756411333.sh +++ b/migrations/1756411333.sh @@ -1,3 +1,3 @@ echo "Use new Omarchy mirror as default" -omarchy-refresh-pacman-mirrorlist +omarchy-refresh-pacman diff --git a/migrations/1761897226.sh b/migrations/1761897226.sh new file mode 100644 index 00000000..34dbc1fd --- /dev/null +++ b/migrations/1761897226.sh @@ -0,0 +1,3 @@ +echo "Install Copy URL extension for Brave" + +omarchy-refresh-config brave-flags.conf diff --git a/migrations/1762770815.sh b/migrations/1762770815.sh index 9c16f7b0..36e6a4b4 100644 --- a/migrations/1762770815.sh +++ b/migrations/1762770815.sh @@ -1,4 +1,3 @@ echo "Pull packages from stable Arch mirror" -omarchy-refresh-pacman-mirrorlist stable -sudo pacman -Syu +omarchy-refresh-pacman diff --git a/migrations/1763561396.sh b/migrations/1763561396.sh index 1e428ff1..d69e51e1 100644 --- a/migrations/1763561396.sh +++ b/migrations/1763561396.sh @@ -1,4 +1,3 @@ echo "Switch to stable Omarchy Package Repository builds" omarchy-refresh-pacman -sudo pacman -Syu --noconfirm diff --git a/migrations/1763753641.sh b/migrations/1763753641.sh new file mode 100644 index 00000000..40d83994 --- /dev/null +++ b/migrations/1763753641.sh @@ -0,0 +1,3 @@ +echo "Include pacman mirror and OPR upstreams (edge vs stable) in About" + +omarchy-refresh-fastfetch diff --git a/migrations/1764067068.sh b/migrations/1764067068.sh new file mode 100644 index 00000000..01843585 --- /dev/null +++ b/migrations/1764067068.sh @@ -0,0 +1,6 @@ +echo "Use Bluetooth off icon in the waybar when BlueTUI has turned off the adapter" + +if ! grep -q '"format-off": "󰂲"' ~/.config/waybar/config.jsonc; then + sed -i '/"format-disabled": "󰂲",/a\ "format-off": "󰂲",' ~/.config/waybar/config.jsonc + omarchy-restart-waybar +fi diff --git a/migrations/1764067963.sh b/migrations/1764067963.sh new file mode 100644 index 00000000..99590cbb --- /dev/null +++ b/migrations/1764067963.sh @@ -0,0 +1,4 @@ +echo "Ensure lockout limit is reset on reboot" + +sudo sed -i '/pam_faillock\.so preauth/d' /etc/pam.d/sddm-autologin +sudo sed -i '/auth.*pam_permit\.so/a auth required pam_faillock.so authsucc' /etc/pam.d/sddm-autologin diff --git a/version b/version index 944880fa..8c68cc60 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.2.0 +3.2.1-beta