feat(dotfiles): Add fish-shell & tmux configuration
This commit is contained in:
		
							parent
							
								
									7fe75e0138
								
							
						
					
					
						commit
						106ca20940
					
				
					 3 changed files with 46 additions and 9 deletions
				
			
		
							
								
								
									
										14
									
								
								dotfiles.nix
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								dotfiles.nix
									
										
									
									
									
								
							| 
						 | 
					@ -12,20 +12,16 @@ let dotfiles = pkgs.stdenv.mkDerivation {
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  installPhase = ''
 | 
					  installPhase = ''
 | 
				
			||||||
    mkdir -p $out/dotfiles
 | 
					    mkdir -p $out
 | 
				
			||||||
    cp ./* $out/dotfiles/
 | 
					    cp ./* $out/
 | 
				
			||||||
  '';
 | 
					  '';
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
in {
 | 
					in {
 | 
				
			||||||
  # /etc/ is a special place in NixOS!
 | 
					  # /etc/ is a special place in NixOS!
 | 
				
			||||||
  # Symlinks that need to be created there must be specified explicitly.
 | 
					  # Symlinks that need to be created there must be specified explicitly.
 | 
				
			||||||
  environment.etc = {
 | 
					  environment.etc = {
 | 
				
			||||||
    "i3/config" = {
 | 
					    "i3/config".source = "${dotfiles}/i3.conf";
 | 
				
			||||||
      source = "${dotfiles}/dotfiles/i3.conf";
 | 
					    "tmux.conf".source = "${dotfiles}/tmux.conf";
 | 
				
			||||||
      # Setting a mode causes Nix to copy the file instead of symlinking it.
 | 
					    "fish/foreign-env/tazjin".source = "${dotfiles}/config.fish";
 | 
				
			||||||
      # For i3 config in particular this is desirable because I want to be able
 | 
					 | 
				
			||||||
      # to modify and reload it before committing a change.
 | 
					 | 
				
			||||||
      mode = "0644";
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										27
									
								
								dotfiles/config.fish
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								dotfiles/config.fish
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,27 @@
 | 
				
			||||||
 | 
					# Configure classic prompt
 | 
				
			||||||
 | 
					set fish_color_user --bold blue
 | 
				
			||||||
 | 
					set fish_color_cwd --bold white
 | 
				
			||||||
 | 
					#set __fish_git_prompt_color green
 | 
				
			||||||
 | 
					set __fish_git_prompt_showcolorhints yes
 | 
				
			||||||
 | 
					set __fish_git_prompt_color_prefix purple
 | 
				
			||||||
 | 
					set __fish_git_prompt_color_suffix purple
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Fish configuration
 | 
				
			||||||
 | 
					set fish_greeting ""
 | 
				
			||||||
 | 
					set PATH $HOME/.local/bin $GOPATH/bin $PATH
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Editor configuration
 | 
				
			||||||
 | 
					set -gx EDITOR "emacsclient"
 | 
				
			||||||
 | 
					set -gx ALTERNATE_EDITOR "emacs -q -nw"
 | 
				
			||||||
 | 
					set -gx VISUAL "emacsclient"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Miscellaneous
 | 
				
			||||||
 | 
					eval (direnv hook fish)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Useful command aliases
 | 
				
			||||||
 | 
					alias gpr 'git pull --rebase'
 | 
				
			||||||
 | 
					alias gco 'git checkout'
 | 
				
			||||||
 | 
					alias gf 'git fetch'
 | 
				
			||||||
 | 
					alias gap 'git add -p'
 | 
				
			||||||
 | 
					alias pbcopy 'xclip -selection clipboard'
 | 
				
			||||||
 | 
					alias edit 'emacsclient -n'
 | 
				
			||||||
							
								
								
									
										14
									
								
								dotfiles/tmux.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								dotfiles/tmux.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,14 @@
 | 
				
			||||||
 | 
					set -g status off
 | 
				
			||||||
 | 
					set -gw mode-keys emacs
 | 
				
			||||||
 | 
					setw -g mouse on
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Correctly set window titles
 | 
				
			||||||
 | 
					set -g set-titles on
 | 
				
			||||||
 | 
					set -g set-titles-string "#W (#T)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# List of plugins
 | 
				
			||||||
 | 
					set -g @plugin 'tmux-plugins/tpm'
 | 
				
			||||||
 | 
					set -g @plugin 'tmux-plugins/tmux-yank'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
 | 
				
			||||||
 | 
					run '~/.tmux/plugins/tpm/tpm'
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue