-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xonshrc
48 lines (39 loc) · 1.42 KB
/
.xonshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
$UPDATE_OS_ENVIRON = True
# $ENABLE_ASYNC_PROMPT = True
$PROJECT_DIRS = "~/devel"
$XSH_AVOX_VENV_NAME = ".venv"
$VI_MODE = True
# $UPDATE_PROMPT_ON_KEYPRESS = True
$XONTRIB_SH_SHELLS = ['bash', 'sh']
$STARSHIP_CONFIG = '~/.config/starship_xonsh.toml'
# XONSH WEBCONFIG START
#source-zsh --login False "echo loading xonsh foreign shell"
xontrib load abbrevs argcomplete autovox autoxsh avox avox_poetry
xontrib load back2dir cmd_done commands coreutils direnv docker_tabcomplete
xontrib load fzf-widgets gitinfo histcpy sh vox z
xontrib load prompt_starship
# XONSH WEBCONFIG END
#
def _venv_name():
var = __xonsh__.env.get("VIRTUAL_ENV", None)
if var:
return "using «{}»".format(var)
from prompt_toolkit.keys import Keys
$fzf_history_binding = Keys.ControlR
$fzf_ssh_binding = Keys.ControlS
$APRS_LOGIN="WB4BOR-6"
$APRS_PASSWORD="24496"
$PROMPT_FIELDS['shell'] = "xonsh"
$PROMPT_FIELDS["venv_name"] = _venv_name
$starship = True
aliases['ll'] = 'ls -alh'
aliases['hpdev'] = 'ssh 192.168.1.3'
aliases['dev'] = 'ssh 192.168.1.44'
aliases['fuck'] = 'thefuck'
aliases['FUCK'] = 'thefuck'
sap_path = p"$HOME/.sap.xsh"
if sap_path.exists():
source p"$HOME/.sap.xsh"
elif not $starship:
$PROMPT = ("╭─{INTENSE_GREEN}{user}{RESET}{INTENSE_BLACK}({shell}){RESET} at {BLUE}{hostname}{RESET} in {cwd} {INTENSE_GREEN}{gitstatus}{RESET} {INTENSE_BLACK}{venv_name}{RESET}\n"
"╰─{INTENSE_RED}{prompt_end}{RESET} ")