You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.2 KiB
Plaintext

# 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
xontrib load bashisms
xontrib load coreutils
source-bash "$HOME/.cargo/env"
# env
$PATH.insert(0, $HOME+'/.nix-profile/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'
$LC_TIME= 'fr_FR.utf8'
$GPG_TTY=$(tty)
$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":
$QT_QPA_PLATFORMTHEME = "qt5ct"
# navigation
aliases['..'] = 'cd ..'
aliases['...'] = 'cd ../.'
aliases['.3'] = 'cd ../../..'
aliases['.4'] = 'cd ../../../..'
aliases['.5'] = 'cd ../../../../..'
aliases['eurecom'] = 'cd ~/Document/telecom/EURECOM'
# vi = vim
aliases['vi'] = 'vim'
$EDITOR = 'vim'
# Package manager
aliases['upgrade'] = 'pacman -Suy && yay -Suy'
# 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'
# config
aliases['config'] = '/usr/bin/git --git-dir=/home/me/.cfg/ --work-tree=/home/me'
aliases['dofus'] = "/home/me/.config/Ankama/Dofus/zaap-start.sh"
# 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()
import hashlib
def md5(val:str=None)->str:
if val is None:
val = input("Value: ")
val = val.encode()
return hashlib.md5(val).hexdigest()