Merge branch 'dev' into rc
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
+30
-10
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
brave-flags.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"
|
||||
|
||||
@@ -17,6 +17,7 @@ btop
|
||||
chromium
|
||||
clang
|
||||
claude-code
|
||||
cliamp
|
||||
cups
|
||||
cups-browsed
|
||||
cups-filters
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user