diff --git a/applications/icons/Cliamp.png b/applications/icons/Cliamp.png new file mode 100644 index 00000000..94b3b06e Binary files /dev/null and b/applications/icons/Cliamp.png differ diff --git a/bin/omarchy-npx-install b/bin/omarchy-npx-install index e64b9660..181111e9 100755 --- a/bin/omarchy-npx-install +++ b/bin/omarchy-npx-install @@ -29,20 +29,40 @@ fi node_bin="\$node_root/bin/node" npx_bin="\$node_root/bin/npx" -# Resolve the package bin inside npx, then run it with node@latest without leaking node@latest into PATH. -# Some wrappers are aliases, e.g. playwright-cli wraps the playwright bin. -package_bin_path=\$("\$node_bin" "\$npx_bin" --yes --package "\$package" -- which "\$package" 2>/dev/null) +ensure_bin_runtime() { + local bin_path=\$1 + local shebang -if [[ -n \$package_bin_path ]]; then - exec "\$node_bin" "\$package_bin_path" "\$@" -fi + IFS= read -r shebang < "\$bin_path" + + if [[ \$shebang == "#!"*"/bun"* || \$shebang == "#!"*"/env bun"* ]]; then + if omarchy-cmd-missing bun; then + echo "Installing bun runtime for \$package..." + omarchy-pkg-add bun + hash -r + fi + fi +} + +exec_package_bin() { + local package_bin_path=\$1 + + if [[ -n \$package_bin_path ]]; then + ensure_bin_runtime "\$package_bin_path" + PATH="\$node_root/bin:\$PATH" exec "\$package_bin_path" "\$@" + fi +} + +# Resolve the package bin inside npx, then run it with node@latest available for node shebangs. +# Some wrappers are aliases, e.g. playwright-cli wraps the playwright bin. +"\$node_bin" "\$npx_bin" --yes --prefer-online --package "\$package" -- true + +package_bin_path=\$("\$node_bin" "\$npx_bin" --yes --package "\$package" -- which "\$package" 2>/dev/null) +exec_package_bin "\$package_bin_path" "\$@" # Scoped packages like @openai/codex expose an unscoped bin like codex. package_bin_path=\$("\$node_bin" "\$npx_bin" --yes --package "\$package" -- which "\$command" 2>/dev/null) - -if [[ -n \$package_bin_path ]]; then - exec "\$node_bin" "\$package_bin_path" "\$@" -fi +exec_package_bin "\$package_bin_path" "\$@" echo "Could not resolve npm bin for \$package / \$command" >&2 exit 127 diff --git a/bin/omarchy-remove-preinstalls b/bin/omarchy-remove-preinstalls index 49f6a42b..761ee126 100755 --- a/bin/omarchy-remove-preinstalls +++ b/bin/omarchy-remove-preinstalls @@ -19,6 +19,7 @@ if gum confirm "Are you sure you want to remove all preinstalled web apps, TUI w omarchy-pkg-drop \ aether \ + cliamp \ typora \ spotify \ libreoffice-fresh \ diff --git a/bin/omarchy-theme-set-browser b/bin/omarchy-theme-set-browser index 05c8fc96..aa07c39c 100755 --- a/bin/omarchy-theme-set-browser +++ b/bin/omarchy-theme-set-browser @@ -2,7 +2,7 @@ CHROMIUM_THEME=~/.config/omarchy/current/theme/chromium.theme -if omarchy-cmd-present chromium || omarchy-cmd-present brave; then +if omarchy-cmd-present chromium || omarchy-cmd-present brave || omarchy-cmd-present brave-origin-beta; then if [[ -f $CHROMIUM_THEME ]]; then THEME_RGB_COLOR=$(<$CHROMIUM_THEME) THEME_HEX_COLOR=$(printf '#%02x%02x%02x' ${THEME_RGB_COLOR//,/ }) @@ -17,8 +17,12 @@ if omarchy-cmd-present chromium || omarchy-cmd-present brave; then pgrep -x chromium >/dev/null && chromium --refresh-platform-policy --no-startup-window &>/dev/null fi - if omarchy-cmd-present brave; then + # Brave and Brave Origin Beta share /etc/brave/policies, so a single write covers both + if omarchy-cmd-present brave || omarchy-cmd-present brave-origin-beta; then echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/brave/policies/managed/color.json" >/dev/null - pgrep -x brave >/dev/null && brave --refresh-platform-policy --no-startup-window &>/dev/null + if pgrep -x brave >/dev/null; then + omarchy-cmd-present brave && brave --refresh-platform-policy --no-startup-window &>/dev/null + omarchy-cmd-present brave-origin-beta && brave-origin-beta --refresh-platform-policy --no-startup-window &>/dev/null + fi fi fi diff --git a/config/brave-origin-beta-flags.conf b/config/brave-origin-beta-flags.conf new file mode 120000 index 00000000..f3609ca7 --- /dev/null +++ b/config/brave-origin-beta-flags.conf @@ -0,0 +1 @@ +brave-flags.conf \ No newline at end of file diff --git a/config/hypr/bindings.conf b/config/hypr/bindings.conf index b17347b1..e7eb692d 100644 --- a/config/hypr/bindings.conf +++ b/config/hypr/bindings.conf @@ -7,6 +7,7 @@ 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, M, Music, exec, omarchy-launch-or-focus spotify +bindd = SUPER SHIFT ALT, M, Music TUI, exec, omarchy-launch-or-focus-tui cliamp bindd = SUPER SHIFT, N, Editor, exec, omarchy-launch-editor 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" diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index 03e89779..967e00be 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -17,6 +17,7 @@ btop chromium clang claude-code +cliamp cups cups-browsed cups-filters diff --git a/install/packaging/npx.sh b/install/packaging/npx.sh index 70487dc6..c68c83f7 100644 --- a/install/packaging/npx.sh +++ b/install/packaging/npx.sh @@ -4,3 +4,4 @@ omarchy-npx-install @github/copilot copilot omarchy-npx-install opencode-ai opencode omarchy-npx-install playwright playwright-cli omarchy-npx-install @mariozechner/pi-coding-agent pi +omarchy-npx-install @kitlangton/ghui ghui diff --git a/install/packaging/tuis.sh b/install/packaging/tuis.sh index 273a5d70..3f58defe 100644 --- a/install/packaging/tuis.sh +++ b/install/packaging/tuis.sh @@ -2,3 +2,4 @@ ICON_DIR="$HOME/.local/share/applications/icons" omarchy-tui-install "Disk Usage" "bash -c 'dust -r; read -n 1 -s'" float "$ICON_DIR/Disk Usage.png" omarchy-tui-install "Docker" "lazydocker" tile "$ICON_DIR/Docker.png" +omarchy-tui-install "Cliamp" "cliamp" tile "$ICON_DIR/Cliamp.png" diff --git a/migrations/1777618046.sh b/migrations/1777618046.sh new file mode 100644 index 00000000..6c5c8f10 --- /dev/null +++ b/migrations/1777618046.sh @@ -0,0 +1,5 @@ +echo "Symlink Brave Origin Beta flags to brave-flags.conf so both browsers share configuration" + +if [[ ! -e ~/.config/brave-origin-beta-flags.conf ]]; then + ln -s brave-flags.conf ~/.config/brave-origin-beta-flags.conf +fi diff --git a/migrations/1777620904.sh b/migrations/1777620904.sh new file mode 100644 index 00000000..b05500fc --- /dev/null +++ b/migrations/1777620904.sh @@ -0,0 +1,13 @@ +echo "Add cliamp music TUI player (Super+Shift+Alt+M)" + +if omarchy-pkg-missing cliamp; then + omarchy-pkg-add cliamp + + cp ~/.local/share/omarchy/applications/icons/cliamp.png ~/.local/share/applications/icons/cliamp.png + gtk-update-icon-cache ~/.local/share/icons/hicolor &>/dev/null + omarchy-tui-install "Cliamp" "cliamp" tile "$HOME/.local/share/applications/icons/cliamp.png" + + if [[ -f ~/.config/hypr/bindings.conf ]] && ! grep -q "cliamp" ~/.config/hypr/bindings.conf; then + sed -i '/^bindd = SUPER SHIFT, M, Music, exec, omarchy-launch-or-focus spotify/a bindd = SUPER SHIFT ALT, M, Music TUI, exec, omarchy-launch-or-focus-tui cliamp' ~/.config/hypr/bindings.conf + fi +fi