Trim launcher overhead for terminals and web apps (#13423)
omarchy-launch-webapp asked xdg-settings for the default browser with BROWSER still set to omarchy-launch-browser, which sends it down a slower path to the same answer: ~105ms instead of ~30ms on every web app launch. Unset it, as omarchy-launch-browser already does. omarchy-cmd-terminal-cwd found the focused terminal's shell with pgrep, which scans all of /proc on every new terminal. Read the terminal's child lists from /proc instead, keeping the newest child as before. Web app wrapper overhead drops from ~111ms to ~34ms, and a new terminal appears in ~77ms instead of ~90ms. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
804749970a
commit
25ead28f90
3 files changed
+58
-2
No files matched your search
@@ -3,7 +3,9 @@
|
||||
# omarchy:summary=Launch a URL as a web app in the default supported browser
|
||||
# omarchy:args=<url>
|
||||
|
||||
browser=$(xdg-settings get default-web-browser)
|
||||
# The session sets BROWSER to omarchy-launch-browser, which sends xdg-settings
|
||||
# down a slower path (~100ms against ~30ms) to the same answer.
|
||||
browser=$(env -u BROWSER xdg-settings get default-web-browser)
|
||||
|
||||
case $browser in
|
||||
google-chrome* | brave* | microsoft-edge* | opera* | vivaldi* | helium*) ;;
|
||||
|
||||
Reference in new issue
Block a user