mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
feat(cli): add omarchy-launch-browser and projects-sync scripts, update cycle launcher and monitor handling
This commit is contained in:
1 parent
aa1dc10f93
commit
cf1c0e2e3e
4 files changed
+73
-10
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Launch the default browser; a cold Brave Origin start reopens the last session without the "Restore pages?" prompt.
|
||||
# omarchy:args=[url]
|
||||
|
||||
# Shadows /usr/bin/omarchy-launch-browser (~/.local/bin is earlier on PATH)
|
||||
# and hands off to it. A reboot or power-off kills Brave uncleanly, so the
|
||||
# next start counts as post-crash: Chromium then skips session restore and
|
||||
# shows the "Restore pages?" bubble instead. --hide-crash-restore-bubble
|
||||
# clears that post-crash state, and --restore-last-session reopens every
|
||||
# window. Added only on a cold, non-private start: a running browser ignores
|
||||
# both, and Omarchy's launcher would read the first flag as the URL to focus.
|
||||
if [[ " $* " != *" --private "* ]] &&
|
||||
[[ $(env -u BROWSER xdg-settings get default-web-browser) == brave-origin.desktop ]] &&
|
||||
! pgrep -f '^/opt/brave-origin-bin/brave( |$)' >/dev/null; then
|
||||
set -- --restore-last-session --hide-crash-restore-bubble "$@"
|
||||
fi
|
||||
|
||||
exec /usr/bin/omarchy-launch-browser "$@"
|
||||
Reference in new issue
Block a user