add kak pager and use it for man pages
This commit is contained in:
		
							parent
							
								
									0cd3802686
								
							
						
					
					
						commit
						c19d02520c
					
				
					 5 changed files with 26 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -23,6 +23,7 @@
 | 
			
		|||
    bmenu = [ bemenu final.dhist fish j4-dmenu-desktop jq sway ];
 | 
			
		||||
    _diffr = [ diffr ];
 | 
			
		||||
    kak-pager = [ fish final._diffr ];
 | 
			
		||||
    kak-man-pager = [ final.kak-pager ];
 | 
			
		||||
    terminal = [ alacritty ];
 | 
			
		||||
    wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
 | 
			
		||||
    screenshotsh =
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										9
									
								
								scripts/kak-man-pager
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								scripts/kak-man-pager
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
col -b -x |
 | 
			
		||||
kak -e '
 | 
			
		||||
    map global normal q :q<ret>;
 | 
			
		||||
    set buffer filetype man;
 | 
			
		||||
    rmhl global/number-lines;
 | 
			
		||||
    set global scrolloff 10,0
 | 
			
		||||
'
 | 
			
		||||
| 
						 | 
				
			
			@ -24,6 +24,7 @@ in {
 | 
			
		|||
    ./fzf.nix
 | 
			
		||||
    ./ranger
 | 
			
		||||
    ./pass.nix
 | 
			
		||||
    ./man.nix
 | 
			
		||||
    inputs.hyprland.homeManagerModules.default
 | 
			
		||||
  ] ++ lib.optional (desktop == "sway") ./sway.nix;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,6 +128,7 @@ in {
 | 
			
		|||
      bmenu
 | 
			
		||||
      kak-lsp
 | 
			
		||||
      kak-pager
 | 
			
		||||
      kak-man-pager
 | 
			
		||||
    ];
 | 
			
		||||
    home.sessionVariables = {
 | 
			
		||||
      EDITOR = "kak";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										14
									
								
								user/man.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								user/man.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
{ config, pkgs, lib, inputs, ... }:
 | 
			
		||||
let inherit (import ./variables.nix) key theme color accent font desktop;
 | 
			
		||||
in {
 | 
			
		||||
  config = {
 | 
			
		||||
    programs.man = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      generateCaches = true;
 | 
			
		||||
    };
 | 
			
		||||
    home.sessionVariables = {
 | 
			
		||||
      PAGER = "${pkgs.kak-pager}/bin/kak-pager";
 | 
			
		||||
      MANPAGER = "${pkgs.kak-man-pager}/bin/kak-man-pager";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue