mirror of
https://codeberg.org/Mo8it/dotfiles.git
synced 2025-01-01 15:39:20 +00:00
Add xonsh
This commit is contained in:
parent
9c87ba3b89
commit
ec44964baa
1 changed files with 69 additions and 0 deletions
69
.xonshrc
Normal file
69
.xonshrc
Normal file
|
@ -0,0 +1,69 @@
|
|||
# Xontribs
|
||||
_xontribs = [
|
||||
"abbrevs",
|
||||
]
|
||||
xontrib load @(_xontribs)
|
||||
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
|
||||
abbrevs["ssh"] = "kitty +kitten ssh"
|
||||
|
||||
aliases["ls"] = "lsd"
|
||||
aliases["ll"] = "lsd -l"
|
||||
aliases["cat"] = "bat"
|
||||
|
||||
## 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:])"
|
Loading…
Reference in a new issue