2021-09-22 03:46:08 +00:00
|
|
|
# XONSH WEBCONFIG START
|
|
|
|
$PROMPT = '{RED} <3 {RESET}| {BOLD_GREEN}{cwd_base}{RESET} ) '
|
|
|
|
$XONSH_COLOR_STYLE = 'fruity'
|
|
|
|
xontrib load apt_tabcomplete argcomplete autovox jedi z
|
|
|
|
# XONSH WEBCONFIG END
|
|
|
|
|
2021-09-22 07:52:45 +00:00
|
|
|
# path stuff
|
|
|
|
|
|
|
|
import sys
|
|
|
|
sys.path.insert(0, '')
|
|
|
|
sys.path.append(Path("~/addins").resolve())
|
|
|
|
|
|
|
|
import addins
|
|
|
|
|
2021-09-22 03:46:08 +00:00
|
|
|
# debug
|
|
|
|
def _debug():
|
|
|
|
if $XONSH_SHOW_TRACEBACK:
|
|
|
|
$XONSH_SHOW_TRACEBACK = False
|
|
|
|
print("Debug mode disabled.")
|
|
|
|
else:
|
|
|
|
$XONSH_SHOW_TRACEBACK = True
|
|
|
|
print("Debug mode enabled.")
|
|
|
|
|
|
|
|
aliases['debug'] = _debug
|
|
|
|
|
|
|
|
# bitwarden shit
|
|
|
|
def _bwc(object : str, id : str):
|
|
|
|
if p'~/.bw_session'.exists():
|
|
|
|
if $XONSH_SHOW_TRACEBACK:
|
|
|
|
print("loaded .bw_session")
|
|
|
|
source ~/.bw_session
|
|
|
|
output = $(bw get @(object) @(id))
|
|
|
|
$(echo @(output) | xclip -sel clipboard)
|
|
|
|
return output
|
|
|
|
|
|
|
|
aliases['bwg'] = _bwc # legacy alias
|
|
|
|
aliases['bwc'] = _bwc
|
|
|
|
|
|
|
|
# dots
|
|
|
|
|
|
|
|
aliases['config'] = '/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
2021-09-22 07:52:45 +00:00
|
|
|
|
|
|
|
# ls
|
|
|
|
aliases['ls'] = 'ls -alhs --color=auto'
|