refactor: inputs/ --> {sys,home}/
This commit is contained in:
		
							parent
							
								
									8f22a24963
								
							
						
					
					
						commit
						f77c627980
					
				
					 225 changed files with 77 additions and 88 deletions
				
			
		
							
								
								
									
										17
									
								
								home/modules/console/multiplexer/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								home/modules/console/multiplexer/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| { lib, config, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     ./zellij | ||||
|     #./screen | ||||
|     ./tmux | ||||
|   ]; | ||||
| 
 | ||||
|   options.homeModules.console.multiplexer = { | ||||
|     zellij = { | ||||
|       enable = lib.mkEnableOption "Enable zellij multiplexer"; | ||||
|     }; | ||||
|     tmux = { | ||||
|       enable = lib.mkEnableOption "Enable tmux multiplexer"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										58
									
								
								home/modules/console/multiplexer/tmux/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								home/modules/console/multiplexer/tmux/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,58 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.homeModules.console.multiplexer.tmux; | ||||
|   inherit (config.colorscheme) palette; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs.tmux = { | ||||
|       enable = true; | ||||
|       shell = "${pkgs.fish}/bin/fish"; | ||||
|       prefix = "C-space"; | ||||
|       baseIndex = 1; | ||||
|       keyMode = "vi"; | ||||
|       escapeTime = 0; | ||||
|       mouse = true; | ||||
|       plugins = with pkgs; [ | ||||
|         { | ||||
|           plugin = tmuxPlugins.mode-indicator; | ||||
|         } | ||||
|       ]; | ||||
|       extraConfig = /* sh */ '' | ||||
|         # General Settings | ||||
|         set -g set-clipboard on | ||||
|         #Appearance | ||||
|         set -g status-position top | ||||
|         set -g status-style "fg=#${palette.base05} bg=#${palette.base00}" | ||||
|         #Windows | ||||
|         set -g status-justify "centre" | ||||
|         setw -g window-status-current-format "#[bg=#${palette.base0B},fg=#${palette.base00},bold] #W " | ||||
|         setw -g window-status-format "#[bg=#${palette.base03},fg=#${palette.base05}] #W " | ||||
|         #Left | ||||
|         set -g status-left " #{tmux_mode_indicator} #[bg=#${palette.base0B},fg=#${palette.base00}] #S" | ||||
|         set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}' | ||||
|         #Move to Pane | ||||
|         bind -n M-Left select-pane -L | ||||
|         bind -n M-h select-pane -L | ||||
|         bind -n M-Right select-pane -R | ||||
|         bind -n M-l select-pane -R | ||||
|         bind -n M-Up select-pane -U | ||||
|         bind -n M-k select-pane -U | ||||
|         bind -n M-Down select-pane -D | ||||
|         bind -n M-j select-pane -D | ||||
|         #Split Pane | ||||
|         bind -n M-- split-window -h | ||||
|         bind -n M-= split-window -v | ||||
|         #Resize Pane | ||||
|         bind -n C-M-Up resize-pane -U 5 | ||||
|         bind -n C-M-Down resize-pane -D 5 | ||||
|         bind -n C-M-Left resize-pane -L 5 | ||||
|         bind -n C-M-Right resize-pane -R 5 | ||||
|         #Move to Window | ||||
|         bind -n M-1  | ||||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										60
									
								
								home/modules/console/multiplexer/zellij/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								home/modules/console/multiplexer/zellij/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,60 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| let | ||||
|   inherit (config.colorscheme) palette; | ||||
|   cfg = config.homeModules.console.multiplexer.zellij; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     programs.zellij = { | ||||
|       enable = true; | ||||
|       settings = { | ||||
|         theme = "${config.colorscheme.slug}"; | ||||
|         default_shell = "fish"; | ||||
|         default_layout = "default"; | ||||
|         pane_frames = false; | ||||
|         themes = { | ||||
|           "${config.colorscheme.slug}" = { | ||||
|             fg = "#${palette.base05}"; | ||||
|             bg = "#${palette.base00}"; | ||||
|             black = "#${palette.base00}"; | ||||
|             red = "#${palette.base08}"; | ||||
|             green = "#${palette.base0B}"; | ||||
|             yellow = "#${palette.base0A}"; | ||||
|             blue = "#${palette.base0D}"; | ||||
|             magenta = "#${palette.base0E}"; | ||||
|             cyan = "#${palette.base0C}"; | ||||
|             white = "#${palette.base05}"; | ||||
|             orange = "#${palette.base09}"; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     # Layouts | ||||
|     # Default layout | ||||
|     xdg.configFile."zellij/layouts/default.kdl" = import ./layouts/defaultLayout.nix { inherit pkgs config; }; | ||||
|     # Layout for bash scripts | ||||
|     xdg.configFile."zellij/layouts/script.kdl" = import ./layouts/scriptLayout.nix { inherit pkgs config; }; | ||||
|     # Layout for configuring my flake | ||||
|     xdg.configFile."zellij/layouts/flake.kdl" = import ./layouts/flakeLayout.nix { inherit pkgs config; }; | ||||
| 
 | ||||
|     # Additional keybinds | ||||
|     xdg.configFile."zellij/config.kdl".text = /* kdl */ '' | ||||
|       keybinds { | ||||
|           shared_except "locked" { | ||||
|               bind "Alt 1" { GoToTab 1; } | ||||
|               bind "Alt 2" { GoToTab 2; } | ||||
|               bind "Alt 3" { GoToTab 3; } | ||||
|               bind "Alt 4" { GoToTab 4; } | ||||
|               bind "Alt 5" { GoToTab 5; } | ||||
|               bind "Alt 6" { GoToTab 6; } | ||||
|               bind "Alt 7" { GoToTab 7; } | ||||
|               bind "Alt 8" { GoToTab 8; } | ||||
|               bind "Alt 9" { GoToTab 9; } | ||||
|           } | ||||
|       } | ||||
|     ''; | ||||
|   }; | ||||
| } | ||||
| 
 | ||||
|  | @ -0,0 +1,60 @@ | |||
| { pkgs, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (config.colorscheme) palette; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   text = /* kdl */ '' | ||||
|     layout { | ||||
|       default_tab_template { | ||||
|         pane size=2 borderless=true { | ||||
|           plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" { | ||||
|             format_left  "{mode}" | ||||
|             format_right "{session} {command_git_branch} {datetime}" | ||||
|             format_center "#[fg=#${palette.base0D},bold] {tabs}" | ||||
|             format_space "" | ||||
| 
 | ||||
|             border_enabled  "true" | ||||
|             border_char     "─" | ||||
|             border_format   "#[fg=#${palette.base05}]{char}" | ||||
|             border_position "bottom" | ||||
| 
 | ||||
|             hide_frame_for_single_pane "true" | ||||
| 
 | ||||
|             mode_normal       "#[fg=#${palette.base0D}] " | ||||
|             mode_tmux         "#[fg=#${palette.base0E}] " | ||||
|             mode_pane         "#[fg=#${palette.base08}] " | ||||
|             mode_tab          "#[fg=#${palette.base08}] " | ||||
|             mode_rename_tab   "#[fg=#${palette.base08}] " | ||||
|             mode_rename_pane  "#[fg=#${palette.base08}] " | ||||
|             mode_session      "#[fg=#${palette.base08}] " | ||||
|             mode_locked       "#[fg=#${palette.base05}] " | ||||
|             mode_move         "#[fg=#${palette.base0B}] " | ||||
|             mode_resize       "#[fg=#${palette.base0B}] " | ||||
|             mode_prompt       "#[fg=#${palette.base0A}] " | ||||
|             mode_search       "#[fg=#${palette.base0A}] " | ||||
|             mode_enter_search "#[fg=#${palette.base0A}] " | ||||
| 
 | ||||
|             tab_normal   "#[bg=#${palette.base01}] {name} " | ||||
|             tab_active   "#[bg=#${palette.base02}] {name} " | ||||
|             tab_separator "  " | ||||
| 
 | ||||
|             command_git_branch_command     "git rev-parse --abbrev-ref HEAD" | ||||
|             command_git_branch_format      "#[fg=#${palette.base0C}] {stdout} " | ||||
|             command_git_branch_interval    "10" | ||||
|             command_git_branch_rendermode  "static" | ||||
| 
 | ||||
|             datetime        "#[fg=#${palette.base05},bold] {format} " | ||||
|             datetime_format "%I:%M %p" | ||||
|             datetime_timezone "${config.home.sessionVariables.TZ}" | ||||
|           } | ||||
|         } | ||||
|       children | ||||
|     } | ||||
|       tab name="terminal" focus=true { | ||||
|           pane name="term" focus=true | ||||
|       } | ||||
|     } | ||||
|   ''; | ||||
| } | ||||
|  | @ -0,0 +1,66 @@ | |||
| { pkgs, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (config.colorscheme) palette; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   text = /* kdl */ '' | ||||
|     layout { | ||||
|       default_tab_template { | ||||
|         pane size=2 borderless=true { | ||||
|           plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" { | ||||
|             format_left  "{mode}" | ||||
|             format_right "{session} {command_git_branch} {datetime}" | ||||
|             format_center "#[fg=#${palette.base0D},bold] {tabs}" | ||||
|             format_space "" | ||||
| 
 | ||||
|             border_enabled  "true" | ||||
|             border_char     "─" | ||||
|             border_format   "#[fg=#${palette.base05}]{char}" | ||||
|             border_position "bottom" | ||||
| 
 | ||||
|             hide_frame_for_single_pane "true" | ||||
| 
 | ||||
|             mode_normal       "#[fg=#${palette.base0D}] " | ||||
|             mode_tmux         "#[fg=#${palette.base0E}] " | ||||
|             mode_pane         "#[fg=#${palette.base08}] " | ||||
|             mode_tab          "#[fg=#${palette.base08}] " | ||||
|             mode_rename_tab   "#[fg=#${palette.base08}] " | ||||
|             mode_rename_pane  "#[fg=#${palette.base08}] " | ||||
|             mode_session      "#[fg=#${palette.base08}] " | ||||
|             mode_locked       "#[fg=#${palette.base05}] " | ||||
|             mode_move         "#[fg=#${palette.base0B}] " | ||||
|             mode_resize       "#[fg=#${palette.base0B}] " | ||||
|             mode_prompt       "#[fg=#${palette.base0A}] " | ||||
|             mode_search       "#[fg=#${palette.base0A}] " | ||||
|             mode_enter_search "#[fg=#${palette.base0A}] " | ||||
| 
 | ||||
|             tab_normal   "#[bg=#${palette.base01}] {name} " | ||||
|             tab_active   "#[bg=#${palette.base02}] {name} " | ||||
|             tab_separator "  " | ||||
| 
 | ||||
|             command_git_branch_command     "git rev-parse --abbrev-ref HEAD" | ||||
|             command_git_branch_format      "#[fg=#${palette.base0C}] {stdout} " | ||||
|             command_git_branch_interval    "10" | ||||
|             command_git_branch_rendermode  "static" | ||||
| 
 | ||||
|             datetime        "#[fg=#${palette.base05},bold] {format} " | ||||
|             datetime_format "%I:%M %p" | ||||
|             datetime_timezone "${config.home.sessionVariables.TZ}" | ||||
|           } | ||||
|         } | ||||
|       children | ||||
|       } | ||||
|       tab name="terminal" focus=true { | ||||
|           pane name="term" cwd="$FLAKE" focus=true | ||||
|       } | ||||
|       tab name="editor" { | ||||
|           pane name="edit" edit="$FLAKE" | ||||
|       } | ||||
|       tab name="git" { | ||||
|           pane name="git" cwd="$FLAKE" command="lazygit" | ||||
|       } | ||||
|     } | ||||
|   ''; | ||||
| } | ||||
|  | @ -0,0 +1,64 @@ | |||
| { pkgs, config, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (config.colorscheme) palette; | ||||
| in | ||||
| 
 | ||||
| { | ||||
| text = /* kdl */ '' | ||||
|   layout { | ||||
|     default_tab_template { | ||||
|       pane size=2 borderless=true { | ||||
|         plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" { | ||||
|           format_left  "{mode}" | ||||
|             format_right "{session} {command_git_branch} {datetime}" | ||||
|             format_center "#[fg=#${palette.base0D},bold] {tabs}" | ||||
|             format_space "" | ||||
| 
 | ||||
|             border_enabled  "true" | ||||
|             border_char     "─" | ||||
|             border_format   "#[fg=#${palette.base05}]{char}" | ||||
|             border_position "bottom" | ||||
| 
 | ||||
|             hide_frame_for_single_pane "true" | ||||
| 
 | ||||
|             mode_normal       "#[fg=#${palette.base0D}] " | ||||
|             mode_tmux         "#[fg=#${palette.base0E}] " | ||||
|             mode_pane         "#[fg=#${palette.base08}] " | ||||
|             mode_tab          "#[fg=#${palette.base08}] " | ||||
|             mode_rename_tab   "#[fg=#${palette.base08}] " | ||||
|             mode_rename_pane  "#[fg=#${palette.base08}] " | ||||
|             mode_session      "#[fg=#${palette.base08}] " | ||||
|             mode_locked       "#[fg=#${palette.base05}] " | ||||
|             mode_move         "#[fg=#${palette.base0B}] " | ||||
|             mode_resize       "#[fg=#${palette.base0B}] " | ||||
|             mode_prompt       "#[fg=#${palette.base0A}] " | ||||
|             mode_search       "#[fg=#${palette.base0A}] " | ||||
|             mode_enter_search "#[fg=#${palette.base0A}] " | ||||
| 
 | ||||
|             tab_normal   "#[bg=#${palette.base01}] {name} " | ||||
|             tab_active   "#[bg=#${palette.base02}] {name} " | ||||
|             tab_separator "  " | ||||
| 
 | ||||
|             command_git_branch_command     "git rev-parse --abbrev-ref HEAD" | ||||
|             command_git_branch_format      "#[fg=#${palette.base0C}] {stdout} " | ||||
|             command_git_branch_interval    "10" | ||||
|             command_git_branch_rendermode  "static" | ||||
| 
 | ||||
|             datetime        "#[fg=#${palette.base05},bold] {format} " | ||||
|             datetime_format "%I:%M %p" | ||||
|             datetime_timezone "${config.home.sessionVariables.TZ}" | ||||
|         } | ||||
|       } | ||||
|       children | ||||
|     } | ||||
|       tab name="edit" focus=true { | ||||
|           pane edit="./" name="edit" focus=true size="85%" borderless=true | ||||
|           pane name="term" focus=false size="15%" borderless=false | ||||
|       } | ||||
|       tab name="git" focus=false { | ||||
|           pane name="git" focus=false command="lazygit" | ||||
|       } | ||||
|   } | ||||
| ''; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue