mirror of
				https://github.com/mitchell/dotfiles.git
				synced 2025-10-30 20:15:26 +00:00 
			
		
		
		
	Refactor fish config and universal vars
This commit is contained in:
		
							parent
							
								
									2947c5fe66
								
							
						
					
					
						commit
						8c77a00b01
					
				|  | @ -1,12 +1,20 @@ | ||||||
| set -gx EDITOR nvim | # variables | ||||||
| 
 | set -gx AWS_SDK_LOAD_CONFIG true | ||||||
| set -gx GOPATH $HOME/code/go |  | ||||||
| set -gx GOBIN $GOPATH/bin |  | ||||||
| 
 | 
 | ||||||
| set -gx DOTNET_ENVIRONMENT Development | set -gx DOTNET_ENVIRONMENT Development | ||||||
| set -gx DOTNET_CLI_TELEMETRY_OPTOUT true | set -gx DOTNET_CLI_TELEMETRY_OPTOUT true | ||||||
| set -gx DOTNET_ROOT $HOME/.asdf/installs/dotnet-core/(command -sq dotnet; and dotnet --version) | set -gx DOTNET_ROOT $HOME/.asdf/installs/dotnet-core/(command -sq dotnet; and dotnet --version) | ||||||
| 
 | 
 | ||||||
|  | set -gx EDITOR nvim | ||||||
|  | 
 | ||||||
|  | set -gx FZF_CTRL_T_COMMAND 'ag --hidden --ignore .git -g ""' | ||||||
|  | set -gx FZF_DEFAULT_COMMAND 'ag --hidden --ignore .git -g ""' | ||||||
|  | 
 | ||||||
|  | set -gx GOPATH $HOME/code/go | ||||||
|  | set -gx GOBIN $GOPATH/bin | ||||||
|  | 
 | ||||||
|  | set -gx LIBVIRT_DEFAULT_URI 'qemu:///system' | ||||||
|  | 
 | ||||||
| set -gx PATH $PATH $GOBIN \ | set -gx PATH $PATH $GOBIN \ | ||||||
|     /snap/bin \ |     /snap/bin \ | ||||||
|     $HOME/bin \ |     $HOME/bin \ | ||||||
|  | @ -16,64 +24,53 @@ set -gx PATH $PATH $GOBIN \ | ||||||
|     $HOME/.cargo/bin \ |     $HOME/.cargo/bin \ | ||||||
|     $HOME/.dotnet/tools |     $HOME/.dotnet/tools | ||||||
| 
 | 
 | ||||||
| set -gx UNAME (uname) | set -g uname (uname) | ||||||
| 
 | 
 | ||||||
|  | # source imports  | ||||||
| command -sq kitty; and kitty + complete setup fish | source | command -sq kitty; and kitty + complete setup fish | source | ||||||
| 
 | 
 | ||||||
| switch "$UNAME" | switch $uname | ||||||
|     case 'Linux' |     case Linux | ||||||
|         test -e ~/.asdf/asdf.fish; and source ~/.asdf/asdf.fish |         test -e ~/.asdf/asdf.fish; and source ~/.asdf/asdf.fish | ||||||
|     case 'Darwin' |     case Darwin | ||||||
|         test -e (brew --prefix asdf)/asdf.fish; and source (brew --prefix asdf)/asdf.fish |         command -sq brew | ||||||
|  |         and test -e (brew --prefix asdf)/asdf.fish | ||||||
|  |         and source (brew --prefix asdf)/asdf.fish | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| # The next line updates PATH for the Google Cloud SDK. | # The next line updates PATH for the Google Cloud SDK. | ||||||
| # if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end | # if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end | ||||||
| 
 | 
 | ||||||
| # aliases | # aliases | ||||||
| function cp; rsync -aP $argv; end | alias cp 'rsync -aP' | ||||||
|  | alias dm 'docker-machine' | ||||||
|  | alias v  'nvim (fzf)' | ||||||
|  | alias vg 'vagrant' | ||||||
| 
 | 
 | ||||||
| function dm; docker-machine $argv; end | switch $uname | ||||||
|  |     case Linux | ||||||
|  |         alias cat      'batcat --theme ansi-dark' | ||||||
|  |         alias goland   'command goland' | ||||||
|  |         alias rider    'command rider' | ||||||
|  |         alias webstorm 'command webstorm' | ||||||
|  |     case Darwin | ||||||
|  |         alias cat      'bat --theme ansi-dark' | ||||||
|  |         alias goland   'open -a Goland' | ||||||
|  |         alias rider    'open -a Rider' | ||||||
|  |         alias webstorm 'open -a Webstorm' | ||||||
|  | end | ||||||
| 
 | 
 | ||||||
| function dm-env; eval (docker-machine env $argv); end | function dm-env; eval (docker-machine env $argv); end | ||||||
| 
 | 
 | ||||||
| function v; nvim (fzf); end | function temp -a ft | ||||||
|  |   nvim temp.$ft | ||||||
| 
 | 
 | ||||||
| function vg; vagrant $argv; end |   switch $uname | ||||||
| 
 |       case Linux | ||||||
| function cat |           xclip -selection clipboard < temp.$ft | ||||||
|     switch "$UNAME" |       case Darwin | ||||||
|         case 'Linux' |           pbcopy < temp.$ft | ||||||
|             batcat --theme ansi-dark $argv |  | ||||||
|         case 'Darwin' |  | ||||||
|             bat --theme ansi-dark $argv |  | ||||||
|     end |  | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
| function goland |   rm temp.$ft | ||||||
|     switch "$UNAME" |  | ||||||
|         case 'Linux' |  | ||||||
|             command goland $argv |  | ||||||
|         case 'Darwin' |  | ||||||
|             open -a Goland $argv |  | ||||||
| end | end | ||||||
| end |  | ||||||
| 
 |  | ||||||
| function rider |  | ||||||
|     switch "$UNAME" |  | ||||||
|         case 'Linux' |  | ||||||
|             command rider $argv |  | ||||||
|         case 'Darwin' |  | ||||||
|             open -a Rider $argv |  | ||||||
|     end |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
| function webstorm |  | ||||||
|     switch "$UNAME" |  | ||||||
|         case 'Linux' |  | ||||||
|             command webstorm $argv |  | ||||||
|         case 'Darwin' |  | ||||||
|             open -a Webstorm $argv |  | ||||||
|     end |  | ||||||
| end |  | ||||||
| 
 |  | ||||||
|  |  | ||||||
|  | @ -1,8 +1,5 @@ | ||||||
| # This file contains fish universal variable definitions. | # This file contains fish universal variable definitions. | ||||||
| # VERSION: 3.0 | # VERSION: 3.0 | ||||||
| SETUVAR --export AWS_SDK_LOAD_CONFIG:true |  | ||||||
| SETUVAR --export FZF_CTRL_T_COMMAND:ag\x20\x2d\x2dhidden\x20\x2d\x2dignore\x20\x2egit\x20\x2dg\x20\x22\x22 |  | ||||||
| SETUVAR --export FZF_DEFAULT_COMMAND:ag\x20\x2d\x2dhidden\x20\x2d\x2dignore\x20\x2egit\x20\x2dg\x20\x22\x22 |  | ||||||
| SETUVAR fish_color_autosuggestion:586e75 | SETUVAR fish_color_autosuggestion:586e75 | ||||||
| SETUVAR fish_color_cancel:\x2dr | SETUVAR fish_color_cancel:\x2dr | ||||||
| SETUVAR fish_color_command:93a1a1 | SETUVAR fish_color_command:93a1a1 | ||||||
|  | @ -14,6 +11,7 @@ SETUVAR fish_color_error:dc322f | ||||||
| SETUVAR fish_color_escape:00a6b2 | SETUVAR fish_color_escape:00a6b2 | ||||||
| SETUVAR fish_color_history_current:\x2d\x2dbold | SETUVAR fish_color_history_current:\x2d\x2dbold | ||||||
| SETUVAR fish_color_host:normal | SETUVAR fish_color_host:normal | ||||||
|  | SETUVAR fish_color_host_remote:yellow | ||||||
| SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue | SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue | ||||||
| SETUVAR fish_color_normal:normal | SETUVAR fish_color_normal:normal | ||||||
| SETUVAR fish_color_operator:00a6b2 | SETUVAR fish_color_operator:00a6b2 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue