mirror of
https://github.com/LukeHagar/omarchy.git
synced 2025-12-06 12:37:46 +00:00
* Add private browser key binding * Include other Firefox-based browsers * Simplify implementation * Add migration to add the hotkey --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
13 lines
408 B
Bash
Executable File
13 lines
408 B
Bash
Executable File
#!/bin/bash
|
|
|
|
default_browser=$(xdg-settings get default-web-browser)
|
|
browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$default_browser 2>/dev/null | head -1)
|
|
|
|
if [[ $browser_exec =~ (firefox|zen|librewolf) ]]; then
|
|
private_flag="--private-window"
|
|
else
|
|
private_flag="--incognito"
|
|
fi
|
|
|
|
exec setsid uwsm app -- "$browser_exec" "${@/--private/$private_flag}"
|