mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Reflect default browser changes in bindings and webapps (#871)
* Abstract default browser to omarchy-browser (a wrapper) * Fix the omarchy-browser command as it used to loop. Extract info from the browser .desktop files. * Clean up and fix bugs * Cleanup unused change * Fix indentation * Separate out omarchy-browser from omarchy-webapp so that we don't break webapps for browsers other than Chromium or Google Chrome. * Fix incorrect function call * Add a migration script * Migration script fixes * Simplify the browser and webapp commands. Rename commands to align with launch terminology. * Add support for Microsoft Edge, Opera and Vivaldi * Fix errors * Remove --name and --class -- They're not respected when --app is defined * We don't ship with Chrome * Simplify launchers * Use launch commands everywhere --------- Co-authored-by: Ryan Hughes <ryan@heyoodle.com>
This commit is contained in:
21
migrations/1755507891.sh
Executable file
21
migrations/1755507891.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Migrating to use omarchy-launch-webapp and omarchy-launch-browser"
|
||||
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
|
||||
sed -i "s|^Exec=.*|Exec=omarchy-launch-webapp \"$url\"|" "$desktop_file"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Updating Hyprland bindings"
|
||||
HYPR_BINDINGS_FILE="$HOME/.config/hypr/bindings.conf"
|
||||
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"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user