| 
									
										
										
										
											2022-09-26 23:50:43 +01:00
										 |  |  | { config, pkgs, lib, libs, ... }: | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   programs.zsh = { | 
					
						
							|  |  |  |     enable = true; | 
					
						
							|  |  |  |     enableCompletion = false; | 
					
						
							|  |  |  |     dotDir = ".config/zsh"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     shellAliases = { | 
					
						
							| 
									
										
										
										
											2022-09-27 07:41:43 +01:00
										 |  |  |       fetch = "git fetch --all --jobs=4 --progress --prune"; | 
					
						
							| 
									
										
										
										
											2022-09-26 23:50:43 +01:00
										 |  |  |       run = "./run"; | 
					
						
							| 
									
										
										
										
											2022-09-27 07:41:43 +01:00
										 |  |  |       pull = "git pull --autostash --jobs=4 --summary origin"; | 
					
						
							|  |  |  |       rebase = "git rebase --autostash --stat"; | 
					
						
							|  |  |  |       update = "fetch && rebase"; | 
					
						
							| 
									
										
										
										
											2022-09-26 23:50:43 +01:00
										 |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     initExtra = ''
 | 
					
						
							| 
									
										
										
										
											2022-09-27 20:51:24 +01:00
										 |  |  |       if [ -f ~/.config/zsh/.p10k.zsh ]; then | 
					
						
							|  |  |  |         . ~/.config/zsh/.p10k.zsh | 
					
						
							|  |  |  |       fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-12 07:59:47 +01:00
										 |  |  |       eval "$(zoxide init zsh)" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-09-26 23:50:43 +01:00
										 |  |  |       # Case insensitive autocompletion. | 
					
						
							|  |  |  |       zstyle ":completion:*" matcher-list "" "m:{a-zA-Z}={A-Za-z}" "r:|=*" "l:|=* r:|=*" | 
					
						
							|  |  |  |       autoload -Uz compinit && compinit | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       # No arguments: `git status` | 
					
						
							|  |  |  |       # With arguments: acts like `git` | 
					
						
							|  |  |  |       g() { | 
					
						
							|  |  |  |         if [[ $# -gt 0 ]]; then | 
					
						
							|  |  |  |           git "$@" | 
					
						
							|  |  |  |         else | 
					
						
							|  |  |  |           git status | 
					
						
							|  |  |  |         fi | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     '';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     zplug = { | 
					
						
							|  |  |  |       enable = true; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       plugins = [ | 
					
						
							|  |  |  |         { name = "mollifier/cd-gitroot"; } | 
					
						
							|  |  |  |         { name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; } | 
					
						
							|  |  |  |         { name = "zsh-users/zsh-autosuggestions"; } | 
					
						
							|  |  |  |         { name = "zsh-users/zsh-completions"; } | 
					
						
							|  |  |  |         { name = "zsh-users/zsh-syntax-highlighting"; } | 
					
						
							|  |  |  |       ]; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |