Use consistent bash5 style for conditionals and quoting
This commit is contained in:
@@ -5,7 +5,7 @@ for desktop_file in ~/.local/share/applications/*.desktop; do
|
||||
if grep -q 'Exec=chromium --new-window --ozone-platform=wayland --app=' "$desktop_file"; then
|
||||
url=$(grep '^Exec=' "$desktop_file" | sed -n 's/.*--app="\?\([^"]*\)"\?.*/\1/p')
|
||||
|
||||
if [[ -n "$url" ]]; then
|
||||
if [[ -n $url ]]; then
|
||||
sed -i "s|^Exec=.*|Exec=omarchy-launch-webapp \"$url\"|" "$desktop_file"
|
||||
fi
|
||||
fi
|
||||
@@ -13,7 +13,7 @@ done
|
||||
|
||||
echo "Updating Hyprland bindings"
|
||||
HYPR_BINDINGS_FILE="$HOME/.config/hypr/bindings.conf"
|
||||
if [ -f "$HYPR_BINDINGS_FILE" ]; then
|
||||
if [[ -f $HYPR_BINDINGS_FILE ]]; then
|
||||
sed -i 's/\$browser =.*chromium.*$/\$browser = omarchy-launch-browser/' "$HYPR_BINDINGS_FILE"
|
||||
sed -i 's/\$webapp="/omarchy-launch-webapp "/g' "$HYPR_BINDINGS_FILE"
|
||||
sed -i '/^\$webapp = \$browser --app/d' "$HYPR_BINDINGS_FILE"
|
||||
|
||||
Reference in New Issue
Block a user