2022-04-23 21:06:49 +00:00
|
|
|
# Xontribs
|
|
|
|
_xontribs = [
|
|
|
|
"abbrevs",
|
2022-04-24 14:14:18 +00:00
|
|
|
"hist_navigator",
|
|
|
|
"fzf-widgets",
|
2022-04-27 00:19:35 +00:00
|
|
|
"avox_poetry",
|
2022-04-23 21:06:49 +00:00
|
|
|
]
|
|
|
|
xontrib load @(_xontribs)
|
|
|
|
|
2022-04-24 14:14:18 +00:00
|
|
|
# fzf
|
|
|
|
$fzf_history_binding = "c-r"
|
|
|
|
|
2022-04-27 00:19:35 +00:00
|
|
|
# Poetry
|
|
|
|
$VIRTUALENV_HOME = "~/.cache/pypoetry/virtualenvs"
|
|
|
|
|
2022-04-23 21:06:49 +00:00
|
|
|
# Options
|
|
|
|
$XONSH_COLOR_STYLE = "one-dark"
|
|
|
|
$PROMPT_TOOLKIT_COLOR_DEPTH = "DEPTH_24_BIT"
|
|
|
|
|
|
|
|
$VI_MODE = True
|
|
|
|
|
|
|
|
$XONSH_HISTORY_BACKEND = "sqlite"
|
|
|
|
$DOTGLOB = True
|
|
|
|
$XONSH_SHOW_TRACEBACK = False
|
|
|
|
$ENABLE_ASYNC_PROMPT = True
|
|
|
|
|
|
|
|
# Replacements
|
|
|
|
abbrevs["rm"] = "trash"
|
2022-04-27 00:19:35 +00:00
|
|
|
abbrevs["ssh"] = "kitty +kitten ssh"
|
2022-04-23 21:06:49 +00:00
|
|
|
|
|
|
|
# Safety options
|
|
|
|
abbrevs["cp"] = "cp -i"
|
|
|
|
abbrevs["mv"] = "mv -i"
|
|
|
|
abbrevs["rmi"] = "rm -i"
|
|
|
|
|
|
|
|
# Default options
|
|
|
|
abbrevs["rsync"] = "rsync -avh --partial --zc=zstd --zl=22 --info=PROGRESS2 --no-i-r --stats"
|
|
|
|
|
|
|
|
# Podman
|
|
|
|
sagemath_image = "docker.io/sagemath/sagemath:latest"
|
|
|
|
abbrevs["sage"] = f"podman pull {sagemath_image}; podman run -it --rm {sagemath_image}"
|
|
|
|
abbrevs["sage-jupyter"] = f"podman pull {sagemath_image}; podman run -it --rm -p8888:8888 {sagemath_image} sage-jupyter"
|
|
|
|
|
|
|
|
fedora_image = "registry.fedoraproject.org/fedora:latest"
|
|
|
|
abbrevs["fedora"] = f"podman pull {fedora_image}; podman run -it --rm {fedora_image}"
|
|
|
|
|
|
|
|
asciidoctor_image = "docker.io/asciidoctor/docker-asciidoctor:latest"
|
|
|
|
abbrevs["adoc"] = f"podman pull {asciidoctor_image}; podman run -it --rm -v @($(pwd).strip()):/documents/:Z {asciidoctor_image}"
|
|
|
|
|
|
|
|
# Environment variables
|
|
|
|
$EDITOR = "/usr/bin/nvim"
|
|
|
|
$JULIA_NUM_THREADS = "16"
|
|
|
|
|
|
|
|
# Setup
|
|
|
|
## Zoxide
|
|
|
|
execx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')
|
|
|
|
|
|
|
|
## Starship
|
|
|
|
execx($(starship init xonsh))
|
|
|
|
|
|
|
|
# Aliases
|
|
|
|
aliases["cd"] = "z"
|
|
|
|
aliases["onefetch"] = "onefetch --no-palette"
|
|
|
|
aliases["ls"] = "lsd"
|
|
|
|
aliases["ll"] = "lsd -l"
|
|
|
|
aliases["cat"] = "bat"
|
2022-04-27 00:19:35 +00:00
|
|
|
aliases["lg"] = "lazygit"
|
2022-04-23 21:06:49 +00:00
|
|
|
|
|
|
|
## Taskwarrior
|
|
|
|
aliases["ta"] = "task add project:@($args[0]) @($args[1:])"
|
|
|
|
aliases["tal"] = "ta @($args) priority:L"
|
|
|
|
aliases["tam"] = "ta @($args) priority:M"
|
|
|
|
aliases["tah"] = "ta @($args) priority:H"
|
|
|
|
|
|
|
|
## Vit
|
|
|
|
aliases["v"] = "vit"
|
|
|
|
aliases["vp"] = "vit project:@($args[0]) @($args[1:])"
|