diff options
author | Malfurious <m@lfurio.us> | 2021-05-13 03:31:51 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2021-05-13 03:31:51 -0400 |
commit | d18b1f2a2e25cb71639c10ecbe90a01c76487702 (patch) | |
tree | 9d4fc231721b90a9f4114656d23f2b16435a938a | |
parent | be5ba871463d36554c0ff1ecb01ca23a5ac218a0 (diff) | |
download | rice-d18b1f2a2e25cb71639c10ecbe90a01c76487702.tar.gz rice-d18b1f2a2e25cb71639c10ecbe90a01c76487702.zip |
Add fish config
-rw-r--r-- | .config/fish/config.fish | 2 | ||||
-rw-r--r-- | .config/fish/functions/clera.fish | 3 | ||||
-rw-r--r-- | .config/fish/functions/fish_greeting.fish | 3 | ||||
-rw-r--r-- | .config/fish/functions/fish_prompt.fish | 23 | ||||
-rw-r--r-- | .config/fish/functions/gist.fish | 3 | ||||
-rw-r--r-- | .config/fish/functions/rice.fish | 3 |
6 files changed, 37 insertions, 0 deletions
diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100644 index 0000000..4e7f405 --- /dev/null +++ b/.config/fish/config.fish @@ -0,0 +1,2 @@ +set --export EDITOR "vim" +set --export GIT_RADAR_FORMAT " \\x01\\033[1;30m\\x02git:(\\x01\\033[0m\\x02%{branch}%{ :local}\\x01\\033[1;30m\\x02)\\x01\\033[0m\\x02%{ :stash}%{ :changes}" diff --git a/.config/fish/functions/clera.fish b/.config/fish/functions/clera.fish new file mode 100644 index 0000000..2c9c91b --- /dev/null +++ b/.config/fish/functions/clera.fish @@ -0,0 +1,3 @@ +function clera + clear $argv; +end diff --git a/.config/fish/functions/fish_greeting.fish b/.config/fish/functions/fish_greeting.fish new file mode 100644 index 0000000..e2774dd --- /dev/null +++ b/.config/fish/functions/fish_greeting.fish @@ -0,0 +1,3 @@ +function fish_greeting + screenfetch $argv; +end diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..e03b391 --- /dev/null +++ b/.config/fish/functions/fish_prompt.fish @@ -0,0 +1,23 @@ +function fish_prompt --description 'Write out the prompt' + set -l normal (set_color normal) + set -l color_cwd $fish_color_cwd + set -l color_host $fish_color_host + set -l suffix '>' + + # Color the prompt differently when we're root + if contains -- $USER root toor + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '#' + end + + # If we're running via SSH, change the host color + if set -q SSH_TTY + set color_host $fish_color_host_remote + end + + # TODO: git-sonar will eventually be located in the $PATH + echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $color_host) (prompt_hostname) $normal ' ' \ + (set_color $color_cwd) (prompt_pwd) $normal (~/rice/submodules/git-sonar/git-sonar --fish --fetch) $normal " " $suffix " " +end diff --git a/.config/fish/functions/gist.fish b/.config/fish/functions/gist.fish new file mode 100644 index 0000000..61b09b7 --- /dev/null +++ b/.config/fish/functions/gist.fish @@ -0,0 +1,3 @@ +function gist + git status -s $argv; +end diff --git a/.config/fish/functions/rice.fish b/.config/fish/functions/rice.fish new file mode 100644 index 0000000..d0b8bae --- /dev/null +++ b/.config/fish/functions/rice.fish @@ -0,0 +1,3 @@ +function rice + git --git-dir=$HOME/rice/.gitdir --work-tree=$HOME $argv; +end |