diff --git a/platforms/home-manager/modules/nmasur/presets/programs/chawan.nix b/platforms/home-manager/modules/nmasur/presets/programs/chawan.nix new file mode 100644 index 0000000..24184ef --- /dev/null +++ b/platforms/home-manager/modules/nmasur/presets/programs/chawan.nix @@ -0,0 +1,25 @@ +{ + config, + pkgs, + lib, + ... +}: + +let + cfg = config.nmasur.presets.programs.chawan; +in + +{ + + options.nmasur.presets.programs.chawan.enable = lib.mkEnableOption "chawan TUI web browser"; + + config = lib.mkIf cfg.enable { + + # Set Chawan as the default app for manual pages + home.sessionVariables = { + MANPAGER = "${lib.getExe pkgs.chawan} -T text/x-ansi"; + }; + + }; + +} diff --git a/platforms/home-manager/modules/nmasur/presets/programs/helix.nix b/platforms/home-manager/modules/nmasur/presets/programs/helix.nix index 6f19dbb..fda4e43 100644 --- a/platforms/home-manager/modules/nmasur/presets/programs/helix.nix +++ b/platforms/home-manager/modules/nmasur/presets/programs/helix.nix @@ -22,7 +22,7 @@ in # Set Neovim as the default app for text editing and manual pages home.sessionVariables = { EDITOR = lib.mkForce "${lib.getExe pkgs.helix}"; - MANPAGER = lib.mkForce "sh -c 'col -bx | ${lib.getExe pkgs.helix}'"; + # MANPAGER = lib.mkForce "sh -c 'col -bx | ${lib.getExe pkgs.helix}'"; MANWIDTH = 87; MANROFFOPT = "-c"; }; @@ -181,17 +181,6 @@ in # Commandline git blame space.B = ":echo %sh{git log -n1 --date=short --pretty=format:'%%h %%ad %%s' $(git blame -L %{cursor_line},+1 \"%{buffer_name}\" | cut -d' ' -f1)}"; - # Open yazi - # https://github.com/sxyazi/yazi/pull/2461 - # Won't work until next Helix release - C-y = [ - ":sh rm -f /tmp/unique-file" - ":insert-output ${lib.getExe pkgs.yazi} %{buffer_name} --chooser-file=/tmp/unique-file" - ":insert-output echo \\x1b[?1049h\\x1b[?2004h > /dev/tty" - ":open %sh{cat /tmp/unique-file}" - ":redraw" - ]; - # Extend selection above X = "select_line_above"; @@ -256,6 +245,10 @@ in git-exclude = true; # Skip excluded files }; + completion-replace = true; # Replace whole word with completion + trim-trailing-whitespace = true; + rainbow-brackets = true; # Make it easier to match parentheses + # Show whitespace visible to the user # Waiting for trailing whitespace option ideally whitespace = { diff --git a/platforms/home-manager/modules/nmasur/presets/programs/neovim.nix b/platforms/home-manager/modules/nmasur/presets/programs/neovim.nix index 052cdf0..3c96470 100644 --- a/platforms/home-manager/modules/nmasur/presets/programs/neovim.nix +++ b/platforms/home-manager/modules/nmasur/presets/programs/neovim.nix @@ -44,7 +44,7 @@ in # Set Neovim as the default app for text editing and manual pages home.sessionVariables = { EDITOR = "${lib.getExe cfg.package}"; - MANPAGER = "${lib.getExe cfg.package} +Man!"; + # MANPAGER = "${lib.getExe cfg.package} +Man!"; }; # Create quick aliases for launching Neovim diff --git a/platforms/home-manager/modules/nmasur/presets/programs/zellij.nix b/platforms/home-manager/modules/nmasur/presets/programs/zellij.nix index 70e9481..382b7c6 100644 --- a/platforms/home-manager/modules/nmasur/presets/programs/zellij.nix +++ b/platforms/home-manager/modules/nmasur/presets/programs/zellij.nix @@ -198,6 +198,19 @@ in height = "99%"; }; }; + "bind \"Alt Shift y\"" = { + Run = { + _args = [ + (lib.getExe pkgs.yazi) + ]; + close_on_exit = true; + floating = true; + x = "1%"; + y = "1%"; + width = "99%"; + height = "99%"; + }; + }; "bind \"Super Shift ]\"" = { GoToNextTab = { }; }; diff --git a/platforms/home-manager/modules/nmasur/profiles/common.nix b/platforms/home-manager/modules/nmasur/profiles/common.nix index a694bdd..0d13731 100644 --- a/platforms/home-manager/modules/nmasur/profiles/common.nix +++ b/platforms/home-manager/modules/nmasur/profiles/common.nix @@ -33,6 +33,7 @@ in nmasur.presets = { programs = { bat.enable = lib.mkDefault true; + chawan.enable = lib.mkDefault true; fd.enable = lib.mkDefault true; ripgrep.enable = lib.mkDefault true; starship.enable = lib.mkDefault true;