update .xonshrc

This commit is contained in:
Jean-Marie Mineau 2020-12-24 00:53:55 +01:00
parent d9425f5b03
commit 77e5010f22

View file

@ -2,8 +2,14 @@
$PROMPT = '{env_name}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_BLUE}{prompt_end}{RESET} '
# XONSH WEBCONFIG END
# env
# plugins
xontrib load pipeliner
xontrib load sh
xontrib load onepath
$XONTRIB_ONEPATH_ACTIONS['<XFILE>'] = 'vim' # Yes, I don't trust auto-exec
xontrib load ssh_agent
# env
$PATH.insert(0, $HOME+'/bin')
$PATH.insert(0, $HOME+'/bin')
$PATH.insert(0, $HOME+'/.local/bin')
@ -15,6 +21,7 @@ $DATA = '/media/me/dataDrive'
$UPDATE_OS_ENVIRON = True
$PROMPT = '{env_name}{BOLD_INTENSE_PURPLE}{user}@{hostname}{BOLD_INTENSE_YELLOW} {cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_INTENSE_YELLOW}{prompt_end}{RESET} '
$XONTRIB_SH_SHELLS = ['bash', 'sh']
if ${...}.get('XDG_CURRENT_DESKTOP', '') != "KDE" and \
${...}.get('XDG_CURRENT_DESKTOP', '') != "GNOME":
@ -53,3 +60,16 @@ aliases['config'] = '/usr/bin/git --git-dir=/home/me/.cfg/ --work-tree=/home/me'
# fix some shit
aliases["alsamixer"] = "$[/usr/bin/alsamixer]"
# python utils :)
import matplotlib.pyplot as plt
import numpy as np
def plot(f, a:float=0.0, b:float=10.0, n:int=300):
""" Plot the function f between a and b with an
accuracy of n points.
"""
x = np.linspace(a, b, n)
plt.plot(x, list(map(f, x)))
plt.show()