diff --git a/nix/configurations/vanadium/home/firefox.nix b/nix/configurations/vanadium/home/firefox.nix index af525054..87135e74 100644 --- a/nix/configurations/vanadium/home/firefox.nix +++ b/nix/configurations/vanadium/home/firefox.nix @@ -8,7 +8,7 @@ let in { programs.firefox = { - enable = false; + enable = true; policies.SearchEngines.Add = [ # Forges diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 32590777..2a11cb98 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -350,7 +350,7 @@ keybinds = ) -- Launcher - ++ (let launchFirefox = "zen" + ++ (let launchFirefox = "firefox" launchDmenu = "dmenu_run -i -fn \"Iosevka-18\" -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10" lock = "xscreensaver-command -lock" in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" ) diff --git a/nix/configurations/vanadium/home/zen-browser.nix b/nix/configurations/vanadium/home/zen-browser.nix index c658d744..0e2ecd9f 100644 --- a/nix/configurations/vanadium/home/zen-browser.nix +++ b/nix/configurations/vanadium/home/zen-browser.nix @@ -8,7 +8,7 @@ let in { programs.zen-browser = { - enable = true; + enable = false; policies.SearchEngines.Add = [ # Forges diff --git a/nix/homeModules/common/zen-browser.nix b/nix/homeModules/common/zen-browser.nix index a9cecff2..4a691331 100644 --- a/nix/homeModules/common/zen-browser.nix +++ b/nix/homeModules/common/zen-browser.nix @@ -32,6 +32,10 @@ in "zen.view.show-newtab-button-top" = false; "zen.view.use-single-toolbar" = false; "zen.tabs.ctrl-tab.ignore-pending-tabs" = true; # ctrl-tab ignore unloaded tabs + + # https://github.com/zen-browser/desktop/discussions/12025 + # This makes tabs sync across windows, which as annoying af + "zen.window-sync.enabled" = false; }; } ]; diff --git a/nix/packages/by-name/manage/src/Main.hs b/nix/packages/by-name/manage/src/Main.hs index dc112e47..52e2b7b5 100755 --- a/nix/packages/by-name/manage/src/Main.hs +++ b/nix/packages/by-name/manage/src/Main.hs @@ -23,14 +23,14 @@ main = do ) -> manageArgs `showHelpOr` do nixpkgs <- readNixpkgsPath - void $ readProcessFriendly "nixos-rebuild" (action : nixosRebuildArgs nixpkgs host <> extraArgs) + exitWith =<< transparentProcess "nixos-rebuild" (action : nixosRebuildArgs nixpkgs host <> extraArgs) ( "install" : host : (partitionArgs -> (manageArgs, extraArgs)) ) -> manageArgs `showHelpOr` do nixpkgs <- readNixpkgsPath - void $ readProcessFriendly "nixos-install" (nixosInstallArgs nixpkgs host <> extraArgs) + exitWith =<< transparentProcess "nixos-install" (nixosInstallArgs nixpkgs host <> extraArgs) _ -> putStr help >> exitFailure @@ -79,8 +79,10 @@ quote x = "\"" <> x <> "\"" blueForeground :: String -> String blueForeground x = "\ESC[34m" <> x <> "\ESC[0m" -readProcessFriendly :: String -> [String] -> IO String -readProcessFriendly cmdName args = do +-- | +-- Run with a shared std{in,out,err} +transparentProcess :: String -> [String] -> IO ExitCode +transparentProcess cmdName args = do hPutStrLn stderr $ "Executing: " <> (quote . blueForeground) (showCommandForUser cmdName args) (_, _, _, pid) <- createProcess @@ -89,8 +91,13 @@ readProcessFriendly cmdName args = do , std_out = UseHandle stdout , std_err = UseHandle stderr } - _ <- waitForProcess pid - pure "" + waitForProcess pid + +readProcessFriendly :: String -> [String] -> String -> IO String +readProcessFriendly cmdName args inp = do + hPutStrLn stderr + $ "Executing: " <> (quote . blueForeground) (showCommandForUser cmdName args) + readProcess cmdName args inp readNixpkgsPath :: IO StorePath readNixpkgsPath = @@ -100,5 +107,6 @@ readNixpkgsPath = , "-E" , "let sources = import ./npins; in sources.nixpkgs.outPath" ] + "" where clean = filter (\c -> c /= '\n' && c /= '"')