From bb91845ba684aee777592587b823c3ebc126561b Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Wed, 8 Jun 2016 17:12:26 -0400 Subject: [PATCH] Add .xonshrc --- install.conf.yaml | 1 + xonsh/.xonshrc | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 xonsh/.xonshrc diff --git a/install.conf.yaml b/install.conf.yaml index 183dd0b..d9b2214 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -23,3 +23,4 @@ ~/.config/sxhkd: sxhkd/ ~/.config/panel: panel/ ~/.config/nvim: neovim/ + ~/.xonshrc: xonsh/.xonshrc diff --git a/xonsh/.xonshrc b/xonsh/.xonshrc new file mode 100644 index 0000000..ce6b6a9 --- /dev/null +++ b/xonsh/.xonshrc @@ -0,0 +1,34 @@ +$PATH.append($HOME + '/bin') + +$EDITOR = 'emacs' +$VISUAL = $EDITOR + +$XDG_CONFIG_HOME = $HOME + '/.config' + +if any(v in __xonsh_env__ for v in ['SSH_TTY', 'SSH_CLIENT', 'SSH_CONNECTION']): + $LOCAL_SESSION = True +else: + $LOCAL_SESSION = False + +$XONSH_COLOR_STYLE = 'monokai' + +blue = '#5fd7ff' +orange = '#d75f00' +purple = '#af5fff' +red = '#ff0000' +green = '#87ff00' +gray = '#626262' + +def colorize(color, string): + return '{{{}}}{}'.format(color, string) + +lbrkt = colorize(gray, '[') +rbrkt = colorize(gray, ']') +colon = colorize(gray, ':') +user = colorize(purple, '{user}') +host = colorize(blue, '{hostname}') +dir = colorize(green, '{cwd}') +branch = colorize(orange, '{curr_branch}') + +$PROMPT = "{prompt_end} " +$RIGHT_PROMPT = lbrkt + user + colon + host + colon + dir + branch + rbrkt