| 
									
										
										
										
											2025-04-23 14:19:05 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2025-07-28 02:34:00 +01:00
										 |  |  |   flake.modules.homeManager.base = | 
					
						
							|  |  |  |     { config, pkgs, ... }: | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       programs.zsh.initContent = ''
 | 
					
						
							| 
									
										
										
										
											2025-04-23 14:19:05 +01:00
										 |  |  |         background() { | 
					
						
							|  |  |  |           for ((i=2;i<=$#;i++)); do | 
					
						
							|  |  |  |             ''${@[1]} ''${@[$i]} &> /dev/null &
 | 
					
						
							|  |  |  |           done | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # suffix | 
					
						
							|  |  |  |         alias -s gz="tar -tf" | 
					
						
							|  |  |  |         alias -s {html,HTML}="background zsh" | 
					
						
							|  |  |  |         alias -s {jpg,JPG,png,PNG}="background okular" | 
					
						
							|  |  |  |         alias -s {pdf,PDF}="background okular" | 
					
						
							|  |  |  |         alias -s {zip,ZIP}="unzip -l" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         git() { | 
					
						
							|  |  |  |           case "$1" in | 
					
						
							|  |  |  |             root) | 
					
						
							|  |  |  |               shift | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |               local ROOT="$(${pkgs.git}/bin/git rev-parse --show-toplevel 2> /dev/null || echo -n .)" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |               if [[ $# == 0 ]]; then | 
					
						
							|  |  |  |                 cd "''${ROOT}" | 
					
						
							|  |  |  |               else | 
					
						
							|  |  |  |                 (cd "''${ROOT}" && eval "''${@}") | 
					
						
							|  |  |  |               fi | 
					
						
							|  |  |  |               ;; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             *) | 
					
						
							|  |  |  |               ${pkgs.git}/bin/git "''${@}" | 
					
						
							|  |  |  |               ;; | 
					
						
							|  |  |  |           esac | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         mbsync() { | 
					
						
							|  |  |  |           ${pkgs.isync}/bin/mbsync --config "${config.xdg.configHome}/isync/mbsyncrc" "''${@}" | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ttyper() { | 
					
						
							|  |  |  |           command ${pkgs.ttyper}/bin/ttyper --language english1000 --words 50 "''${@}" | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-10 08:00:00 +01:00
										 |  |  |         weather() { | 
					
						
							|  |  |  |           curl "https://wttr.in/''$1" | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-23 14:19:05 +01:00
										 |  |  |         yt-dlp() { | 
					
						
							|  |  |  |           command yt-dlp --paths ~/Videos "$@" | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         bindkey -s ^f "tmux-sessionizer\n" | 
					
						
							|  |  |  |         bindkey -s ^v "nvim\n" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         setopt auto_cd | 
					
						
							|  |  |  |         setopt auto_pushd | 
					
						
							|  |  |  |         setopt pushd_ignore_dups | 
					
						
							|  |  |  |         setopt pushdminus | 
					
						
							|  |  |  |       '';
 | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | } |