diff --git a/bin/omarchy-cmd-screensaver b/bin/omarchy-cmd-screensaver index 3a44369f76..b1c7932f22 100755 --- a/bin/omarchy-cmd-screensaver +++ b/bin/omarchy-cmd-screensaver @@ -1,13 +1,13 @@ #!/bin/bash screensaver_in_focus() { - hyprctl activewindow -j | jq -e '.class == "com.omarchy.Screensaver"' >/dev/null 2>&1 + hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1 } exit_screensaver() { hyprctl keyword cursor:invisible false pkill -x tte 2>/dev/null - pkill -f com.omarchy.Screensaver 2>/dev/null + pkill -f org.omarchy.screensaver 2>/dev/null exit 0 } diff --git a/bin/omarchy-launch-about b/bin/omarchy-launch-about index 8505ff0e1c..a64f4b6df2 100755 --- a/bin/omarchy-launch-about +++ b/bin/omarchy-launch-about @@ -1,3 +1,3 @@ #!/bin/bash -exec setsid uwsm-app -- xdg-terminal-exec --app-id=com.omarchy.Omarchy -e bash -c 'fastfetch; read -n 1 -s' +exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.terminal -e bash -c 'fastfetch; read -n 1 -s' diff --git a/bin/omarchy-launch-editor b/bin/omarchy-launch-editor index f120001e98..7597cfccb2 100755 --- a/bin/omarchy-launch-editor +++ b/bin/omarchy-launch-editor @@ -4,7 +4,7 @@ omarchy-cmd-present "$EDITOR" || EDITOR=nvim case "$EDITOR" in nvim | vim | nano | micro | hx | helix) - exec setsid uwsm-app -- xdg-terminal-exec "$EDITOR" "$@" + exec omarchy-launch-tui "$EDITOR" "$@" ;; *) exec setsid uwsm-app -- "$EDITOR" "$@" diff --git a/bin/omarchy-launch-floating-terminal-with-presentation b/bin/omarchy-launch-floating-terminal-with-presentation index c074cbf6ad..cc779efdf4 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=com.omarchy.Omarchy --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; omarchy-show-done" diff --git a/bin/omarchy-launch-screensaver b/bin/omarchy-launch-screensaver index 2dfd0c9bed..932ee4707b 100755 --- a/bin/omarchy-launch-screensaver +++ b/bin/omarchy-launch-screensaver @@ -6,7 +6,7 @@ if ! command -v tte &>/dev/null; then fi # Exit early if screensave is already running -pgrep -f com.omarchy.Screensaver && exit 0 +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 @@ -22,19 +22,19 @@ for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do case $terminal in *Alacritty*) hyprctl dispatch exec -- \ - alacritty --class=com.omarchy.Screensaver \ + alacritty --class=org.omarchy.screensaver \ --config-file ~/.local/share/omarchy/default/alacritty/screensaver.toml \ -e omarchy-cmd-screensaver ;; *ghostty*) hyprctl dispatch exec -- \ - ghostty --class=com.omarchy.Screensaver \ + ghostty --class=org.omarchy.screensaver \ --font-size=18 \ -e omarchy-cmd-screensaver ;; *kitty*) hyprctl dispatch exec -- \ - kitty --class=com.omarchy.Screensaver \ + kitty --class=org.omarchy.screensaver \ --override font_size=18 \ -e omarchy-cmd-screensaver ;; diff --git a/bin/omarchy-launch-tui b/bin/omarchy-launch-tui new file mode 100755 index 0000000000..67440b2bad --- /dev/null +++ b/bin/omarchy-launch-tui @@ -0,0 +1,3 @@ +#!/bin/bash + +exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.omarchy.$(basename $1) -e "$1" "${@:2}" diff --git a/bin/omarchy-launch-wifi b/bin/omarchy-launch-wifi index 28e4d300bc..fc1e2c83ab 100755 --- a/bin/omarchy-launch-wifi +++ b/bin/omarchy-launch-wifi @@ -1,3 +1,3 @@ #!/bin/bash -exec setsid omarchy-launch-or-focus com.omarchy.Impala "uwsm-app -- xdg-terminal-exec --app-id=com.omarchy.Impala -e impala" +exec setsid omarchy-launch-or-focus org.omarchy.impala "omarchy-launch-tui impala" diff --git a/bin/omarchy-lock-screen b/bin/omarchy-lock-screen index 5417afff40..f57d45268a 100755 --- a/bin/omarchy-lock-screen +++ b/bin/omarchy-lock-screen @@ -9,4 +9,4 @@ if pgrep -x "1password" >/dev/null; then fi # Avoid running screensaver when locked -pkill -f com.omarchy.Screensaver +pkill -f org.omarchy.screensaver diff --git a/bin/omarchy-menu b/bin/omarchy-menu index d52a548ee7..49570c4872 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -37,7 +37,7 @@ menu() { } terminal() { - xdg-terminal-exec --app-id=com.omarchy.Omarchy "$@" + xdg-terminal-exec --app-id=org.omarchy.terminal "$@" } present_terminal() { @@ -180,7 +180,7 @@ show_setup_menu() { options="$options\n Defaults\n󰱔 DNS\n Security\n Config" case $(menu "Setup" "$options") in - *Audio*) xdg-terminal-exec --app-id=com.omarchy.Wiremix -e wiremix ;; + *Audio*) omarchy-launch-or-focus org.omarchy.wiremix "omarchy-launch-tui wiremix" ;; *Wifi*) rfkill unblock wifi omarchy-launch-wifi diff --git a/config/hypr/bindings.conf b/config/hypr/bindings.conf index f8171f9d36..5d98dd655d 100644 --- a/config/hypr/bindings.conf +++ b/config/hypr/bindings.conf @@ -8,8 +8,8 @@ bindd = SUPER SHIFT, B, Browser, exec, $browser bindd = SUPER SHIFT ALT, B, Browser (private), exec, $browser --private bindd = SUPER SHIFT, M, Music, exec, omarchy-launch-or-focus spotify bindd = SUPER SHIFT, N, Editor, exec, omarchy-launch-editor -bindd = SUPER SHIFT, T, Activity, exec, $terminal -e btop -bindd = SUPER SHIFT, D, Docker, exec, $terminal -e lazydocker +bindd = SUPER SHIFT, T, Activity, exec, omarchy-launch-tui btop +bindd = SUPER SHIFT, D, Docker, exec, omarchy-launch-tui lazydocker bindd = SUPER SHIFT, G, Signal, exec, omarchy-launch-or-focus signal "uwsm-app -- signal-desktop" bindd = SUPER SHIFT, O, Obsidian, exec, omarchy-launch-or-focus obsidian "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime" bindd = SUPER SHIFT, W, Typora, exec, uwsm-app -- typora --enable-wayland-ime diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index 6bd34ee4cb..143f8f3550 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -56,7 +56,7 @@ "cpu": { "interval": 5, "format": "󰍛", - "on-click": "xdg-terminal-exec btop" + "on-click": "omarchy-launch-or-focus org.omarchy.btop \"omarchy-launch-tui btop\"" }, "clock": { "format": "{:L%A %H:%M}", @@ -105,7 +105,7 @@ }, "pulseaudio": { "format": "{icon}", - "on-click": "xdg-terminal-exec --app-id=com.omarchy.Wiremix -e wiremix", + "on-click": "omarchy-launch-or-focus org.omarchy.wiremix \"omarchy-launch-tui wiremix\"", "on-click-right": "pamixer -t", "tooltip-format": "Playing at {volume}%", "scroll-step": 5, diff --git a/default/hypr/apps/system.conf b/default/hypr/apps/system.conf index 08f107713e..522cef3ee1 100644 --- a/default/hypr/apps/system.conf +++ b/default/hypr/apps/system.conf @@ -3,12 +3,12 @@ windowrule = float, tag:floating-window windowrule = center, tag:floating-window windowrule = size 875 600, tag:floating-window -windowrule = tag +floating-window, class:(blueberry.py|com.omarchy.Impala|com.omarchy.Wiremix|com.omarchy.Omarchy|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float) +windowrule = tag +floating-window, class:(blueberry.py|org.omarchy.impala|org.omarchy.wiremix|org.omarchy.terminal|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float) 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 # Fullscreen screensaver -windowrule = fullscreen, class:com.omarchy.Screensaver +windowrule = fullscreen, class:org.omarchy.screensaver # No transparency on media windows windowrule = opacity 1 1, class:^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$ diff --git a/migrations/1763386443.sh b/migrations/1763386443.sh new file mode 100644 index 0000000000..53e2426170 --- /dev/null +++ b/migrations/1763386443.sh @@ -0,0 +1,8 @@ +echo "Uniquely identify terminal apps with custom app-ids using omarchy-launch-tui" + +# Replace terminal -e calls with omarchy-launch-tui in bindings +sed -i 's/\$terminal -e \([^ ]*\)/omarchy-launch-tui \1/g' ~/.config/hypr/bindings.conf + +# Update waybar to use omarchy-launch-or-focus with omarchy-launch-tui for TUI apps +sed -i 's/xdg-terminal-exec btop/omarchy-launch-or-focus org.omarchy.btop "omarchy-launch-tui btop"/' ~/.config/waybar/config.jsonc +sed -i 's/xdg-terminal-exec --app-id=com\.omarchy\.Wiremix -e wiremix/omarchy-launch-or-focus org.omarchy.wiremix "omarchy-launch-tui wiremix"/' ~/.config/waybar/config.jsonc