aboutsummaryrefslogtreecommitdiff
path: root/fish
diff options
context:
space:
mode:
authorbozo.kopic <bozo.kopic@gmail.com>2015-05-12 21:18:32 +0200
committerbozo.kopic <bozo.kopic@gmail.com>2020-02-26 00:33:29 +0100
commit1e263266388c0b6cd39e09d81513e32aedc4268c (patch)
tree129f9d7620892ff9eb50f3738ff38de9155b76d1 /fish
.
Diffstat (limited to 'fish')
-rw-r--r--fish/config.fish7
-rw-r--r--fish/fish_variables31
-rw-r--r--fish/functions/fish_prompt.fish83
3 files changed, 121 insertions, 0 deletions
diff --git a/fish/config.fish b/fish/config.fish
new file mode 100644
index 0000000..c9fe730
--- /dev/null
+++ b/fish/config.fish
@@ -0,0 +1,7 @@
+if status --is-login
+ set -x PATH ~/python/bin ~/programs ~/programs/chicken/bin ~/.cabal/bin $PATH
+ set -x CHICKEN_REPOSITORY ~/programs/chicken_repository
+ set -x ATOM_NODE_URL http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
+ set -x QT_QPA_PLATFORMTHEME qt5ct
+ set -x VISUAL nvim
+end
diff --git a/fish/fish_variables b/fish/fish_variables
new file mode 100644
index 0000000..f0243aa
--- /dev/null
+++ b/fish/fish_variables
@@ -0,0 +1,31 @@
+# This file contains fish universal variable definitions.
+# VERSION: 3.0
+SETUVAR __fish_init_2_3_0:\x1d
+SETUVAR fish_color_autosuggestion:586e75
+SETUVAR fish_color_cancel:\x2dr
+SETUVAR fish_color_command:normal
+SETUVAR fish_color_comment:586e75
+SETUVAR fish_color_cwd:green
+SETUVAR fish_color_cwd_root:red
+SETUVAR fish_color_end:268bd2
+SETUVAR fish_color_error:dc322f
+SETUVAR fish_color_escape:00a6b2
+SETUVAR fish_color_history_current:\x2d\x2dbold
+SETUVAR fish_color_host:normal
+SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
+SETUVAR fish_color_normal:normal
+SETUVAR fish_color_operator:00a6b2
+SETUVAR fish_color_param:normal
+SETUVAR fish_color_quote:657b83
+SETUVAR fish_color_redirection:6c71c4
+SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dblack
+SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
+SETUVAR fish_color_status:red
+SETUVAR fish_color_user:brgreen
+SETUVAR fish_color_valid_path:\x2d\x2dunderline
+SETUVAR fish_greeting:
+SETUVAR fish_key_bindings:fish_default_key_bindings
+SETUVAR fish_pager_color_completion:B3A06D
+SETUVAR fish_pager_color_description:B3A06D
+SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline
+SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish
new file mode 100644
index 0000000..47cedee
--- /dev/null
+++ b/fish/functions/fish_prompt.fish
@@ -0,0 +1,83 @@
+function fish_prompt
+
+ set -l last_status $status
+
+ set -l color_host $fish_color_host
+ set -l color_cwd $fish_color_cwd
+ set -l suffix '$'
+
+ if set -q SSH_TTY
+ set color_host $fish_color_host_remote
+ end
+
+ if test "$USER" = "root"
+ set color_cwd $fish_color_cwd_root
+ set suffix '#'
+ end
+
+ if not set -q __fish_git_prompt_show_informative_status
+ set -g __fish_git_prompt_show_informative_status 1
+ end
+ if not set -q __fish_git_prompt_hide_untrackedfiles
+ set -g __fish_git_prompt_hide_untrackedfiles 1
+ end
+
+ if not set -q __fish_git_prompt_color_branch
+ set -g __fish_git_prompt_color_branch magenta --bold
+ end
+ if not set -q __fish_git_prompt_showupstream
+ set -g __fish_git_prompt_showupstream "informative"
+ end
+ if not set -q __fish_git_prompt_char_upstream_ahead
+ set -g __fish_git_prompt_char_upstream_ahead "↑"
+ end
+ if not set -q __fish_git_prompt_char_upstream_behind
+ set -g __fish_git_prompt_char_upstream_behind "↓"
+ end
+ if not set -q __fish_git_prompt_char_upstream_prefix
+ set -g __fish_git_prompt_char_upstream_prefix ""
+ end
+
+ if not set -q __fish_git_prompt_char_stagedstate
+ set -g __fish_git_prompt_char_stagedstate "● "
+ end
+ if not set -q __fish_git_prompt_char_dirtystate
+ set -g __fish_git_prompt_char_dirtystate "✚ "
+ end
+ if not set -q __fish_git_prompt_char_untrackedfiles
+ set -g __fish_git_prompt_char_untrackedfiles "…"
+ end
+ if not set -q __fish_git_prompt_char_invalidstate
+ set -g __fish_git_prompt_char_invalidstate "✖"
+ end
+ if not set -q __fish_git_prompt_char_cleanstate
+ set -g __fish_git_prompt_char_cleanstate "✔"
+ end
+
+ if not set -q __fish_git_prompt_color_dirtystate
+ set -g __fish_git_prompt_color_dirtystate blue
+ end
+ if not set -q __fish_git_prompt_color_stagedstate
+ set -g __fish_git_prompt_color_stagedstate yellow
+ end
+ if not set -q __fish_git_prompt_color_invalidstate
+ set -g __fish_git_prompt_color_invalidstate red
+ end
+ if not set -q __fish_git_prompt_color_untrackedfiles
+ set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
+ end
+ if not set -q __fish_git_prompt_color_cleanstate
+ set -g __fish_git_prompt_color_cleanstate green --bold
+ end
+
+ echo -n -s \
+ (set_color normal) "[" \
+ (set_color $fish_color_user) "$USER" \
+ (set_color normal) @ \
+ (set_color $color_host) (hostname) \
+ (set_color normal) " " \
+ (set_color $color_cwd) (prompt_pwd) \
+ (set_color normal) (__fish_vcs_prompt) \
+ (set_color normal) "]" $suffix " "
+
+end