configs/.xonshrc

80 lines
2 KiB
Text
Raw Normal View History

2020-12-24 00:53:55 +01:00
# plugins
xontrib load pipeliner
xontrib load sh
xontrib load onepath
$XONTRIB_ONEPATH_ACTIONS['<XFILE>'] = 'vim' # Yes, I don't trust auto-exec
2021-01-30 01:22:15 +01:00
# xontrib load ssh_agent
2021-01-22 22:49:09 +01:00
xontrib load bashisms
xontrib load coreutils
2020-12-23 23:53:16 +01:00
2020-12-24 00:53:55 +01:00
# env
2020-12-23 23:46:05 +01:00
$PATH.insert(0, $HOME+'/bin')
$PATH.insert(0, $HOME+'/bin')
$PATH.insert(0, $HOME+'/.local/bin')
$PATH.insert(0, $HOME+'/.cargo/bin')
$PATH.insert(0, $HOME+'/.gem/ruby/2.7.0/bin')
$DATA = '/media/me/dataDrive'
2021-01-22 22:49:09 +01:00
$LC_TIME= 'fr_FR.utf8'
2020-12-23 23:46:05 +01:00
2021-04-23 11:41:02 +02:00
$GPG_TTY=$(tty)
2020-12-23 23:46:05 +01:00
$UPDATE_OS_ENVIRON = True
2020-12-24 11:02:17 +01:00
$PROMPT = '{env_name}{BOLD_INTENSE_PURPLE}{user}@{hostname}{BOLD_INTENSE_YELLOW} {cwd}{branch_color}{curr_branch: [{}]}{RESET} {BOLD_INTENSE_YELLOW}{prompt_end}{RESET} '
2020-12-24 00:53:55 +01:00
$XONTRIB_SH_SHELLS = ['bash', 'sh']
2020-12-23 23:53:16 +01:00
2020-12-23 23:46:05 +01:00
if ${...}.get('XDG_CURRENT_DESKTOP', '') != "KDE" and \
${...}.get('XDG_CURRENT_DESKTOP', '') != "GNOME":
$QT_QPA_PLATFORMTHEME = "qt5ct"
2020-12-23 22:58:38 +01:00
# navigation
aliases['..'] = 'cd ..'
aliases['...'] = 'cd ../.'
aliases['.3'] = 'cd ../../..'
aliases['.4'] = 'cd ../../../..'
aliases['.5'] = 'cd ../../../../..'
# vi = vim
aliases['vi'] = 'vim'
2021-01-22 22:49:09 +01:00
$EDITOR = 'vim'
2020-12-23 22:58:38 +01:00
2020-12-23 23:46:05 +01:00
# Package manager
aliases['upgrade'] = 'pacman -Suy && yay -Suy'
2020-12-23 22:58:38 +01:00
# git
aliases['add'] = 'git add'
aliases['branch'] = 'git branch'
aliases['commit'] = 'git commit -am'
aliases['clone'] = 'git clone'
aliases['pull'] = 'git pull'
aliases['push'] = 'git push'
aliases['merge'] = 'git merge'
aliases['status'] = 'git status'
aliases['rebase'] = 'git rebase'
aliases['checkout'] = 'git checkout'
# ssh
aliases['proxy_hindley'] = 'ssh -D 8080 hindley.adh.auro.re'
# config
aliases['config'] = '/usr/bin/git --git-dir=/home/me/.cfg/ --work-tree=/home/me'
2021-07-19 18:39:55 +02:00
aliases['dofus'] = "/home/me/.config/Ankama/Dofus/zaap-start.sh"
2020-12-23 23:46:05 +01:00
# fix some shit
aliases["alsamixer"] = "$[/usr/bin/alsamixer]"
2020-12-24 00:53:55 +01:00
# 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()