refactor: implement component-based architecture for enhanced maintainability
- Reorganize directory structure into core/, features/, and themes/ - Colocate application Nix logic, configs, scripts, and theme overrides - Implement 'Inversion of Control' for theming: apps now pull theme-specific layouts - Update flake.nix and shared library paths to match the new structure - Document the new Feature-Centric architecture in README.md
This commit is contained in:
17
features/apps/scripts/nomarchy-launch-browser
Executable file
17
features/apps/scripts/nomarchy-launch-browser
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Launch the default browser as determined by xdg-settings.
|
||||
# Automatically converts --private into the correct flag for the given browser.
|
||||
|
||||
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 --help | grep -q MOZ_LOG; then
|
||||
private_flag="--private-window"
|
||||
elif [[ $browser_exec =~ edge ]]; then
|
||||
private_flag="--inprivate"
|
||||
else
|
||||
private_flag="--incognito"
|
||||
fi
|
||||
|
||||
exec setsid uwsm-app -- "$browser_exec" "${@/--private/$private_flag}"
|
||||
Reference in New Issue
Block a user