Compare commits
No commits in common. "728a29554647c2d48acfb1d5162c4d500ead920b" and "435e0e670e4cd0dabde21072f2f6ce2ae4cb0269" have entirely different histories.
728a295546
...
435e0e670e
83 changed files with 8002 additions and 1 deletions
1
.chezmoiroot
Normal file
1
.chezmoiroot
Normal file
|
@ -0,0 +1 @@
|
||||||
|
home
|
162
.gitignore
vendored
Normal file
162
.gitignore
vendored
Normal file
|
@ -0,0 +1,162 @@
|
||||||
|
|
||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/python
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=python
|
||||||
|
|
||||||
|
### Python ###
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
#lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
#poetry.lock
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
#.idea/
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/python
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
__pypackages__
|
9
Makefile
Normal file
9
Makefile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
.PHONY: lint lint.py lint.sh
|
||||||
|
|
||||||
|
lint: lint.py lint.sh
|
||||||
|
|
||||||
|
lint.python:
|
||||||
|
black $(shell find -type f -name "*.py")
|
||||||
|
lint.sh:
|
||||||
|
shfmt -s -w $(shell shfmt -f .)
|
||||||
|
|
19
README.md
Normal file
19
README.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# dotfiles
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
From Source:
|
||||||
|
```bash
|
||||||
|
sh -c "$(curl -fsLS https://chezmoi.io/get)" -- init --apply git.dayl.in/daylin -S ~/.dotfiles --ssh
|
||||||
|
```
|
||||||
|
|
||||||
|
From Mirror:
|
||||||
|
```bash
|
||||||
|
sh -c "$(curl -fsLS https://chezmoi.io/get)" -- init --apply daylinmorgan -S ~/.dotfiles --ssh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Relevant XKCD
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://imgs.xkcd.com/comics/borrow_your_laptop.png">
|
||||||
|
</p>
|
16
bin/install-pkgs
Executable file
16
bin/install-pkgs
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if ! $(is-executable yq); then
|
||||||
|
echo "you will need to install yq"
|
||||||
|
echo "see here for more info: https://github.com/mikefarah/yq"
|
||||||
|
fi
|
||||||
|
|
||||||
|
YAMLDOC="$HOME/.dotfiles/info/pkgs.yml"
|
||||||
|
|
||||||
|
readarray pkgs < <(yq e '.["arch"] | .[] | ... comments=""' $YAMLDOC)
|
||||||
|
|
||||||
|
sudo pacman -S $(echo ${pkgs[@]})
|
||||||
|
|
||||||
|
readarray pkgs < <(yq e '.["aur"] | .[] | ... comments=""' $YAMLDOC)
|
||||||
|
|
||||||
|
paru -S $(echo ${pkgs[@]})
|
7
bin/is-executable
Executable file
7
bin/is-executable
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -x "$(command -v $1)" ]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
9
bin/is-tty
Executable file
9
bin/is-tty
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case $(tty) in /dev/tty[0-9]*)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
110
bin/welcome.py
Executable file
110
bin/welcome.py
Executable file
|
@ -0,0 +1,110 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from rich.console import Console
|
||||||
|
from rich.text import Text
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
console = Console(force_terminal=True)
|
||||||
|
|
||||||
|
colors = [
|
||||||
|
"black",
|
||||||
|
"red",
|
||||||
|
"green",
|
||||||
|
"yellow",
|
||||||
|
"blue",
|
||||||
|
"magenta",
|
||||||
|
"cyan",
|
||||||
|
"white",
|
||||||
|
"bright_black",
|
||||||
|
"bright_red",
|
||||||
|
"bright_green",
|
||||||
|
"bright_yellow",
|
||||||
|
"bright_blue",
|
||||||
|
"bright_magenta",
|
||||||
|
"bright_cyan",
|
||||||
|
"bright_white",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def wave():
|
||||||
|
"""
|
||||||
|
╮╭╭╮╮╭╭╮╮╭╭╮╮╭╭╮
|
||||||
|
╰╯╯╰╰╯╯╰╰╯╯╰╰╯╯╰
|
||||||
|
"""
|
||||||
|
|
||||||
|
lines = ["╮╭╭╮╮╭╭╮╮╭╭╮╮╭╭╮", "╰╯╯╰╰╯╯╰╰╯╯╰╰╯╯╰"]
|
||||||
|
for line in lines:
|
||||||
|
styled_line = [
|
||||||
|
Text(line[i * 2 : i * 2 + 2], style=color)
|
||||||
|
for i, color in enumerate(colors[:8])
|
||||||
|
]
|
||||||
|
console.print(Text("").join(styled_line))
|
||||||
|
|
||||||
|
|
||||||
|
def dots():
|
||||||
|
"""
|
||||||
|
● ● ● ● ● ● ● ●
|
||||||
|
"""
|
||||||
|
|
||||||
|
console.print(Text(" ").join([Text("●", style=color) for color in colors[:8]]))
|
||||||
|
|
||||||
|
|
||||||
|
def double_dots():
|
||||||
|
"""
|
||||||
|
● ● ● ● ● ● ● ●
|
||||||
|
● ● ● ● ● ● ● ●
|
||||||
|
"""
|
||||||
|
|
||||||
|
console.print(Text(" ").join([Text("●", style=color) for color in colors[:8]]))
|
||||||
|
console.print(Text(" ").join([Text("●", style=color) for color in colors[8:]]))
|
||||||
|
|
||||||
|
|
||||||
|
def wave_w_dots():
|
||||||
|
"""
|
||||||
|
Alternating colors from red to white with
|
||||||
|
black separators
|
||||||
|
|
||||||
|
╮╮●╭╭╭─╮╮╮●╭╭╭─╮╮╮●╭╭╭─╮╮╮●╭╭
|
||||||
|
╰╰─╯╯╯●╰╰╰─╯╯╯●╰╰╰─╯╯╯●╰╰╰─╯╯
|
||||||
|
"""
|
||||||
|
|
||||||
|
lines = ["╮╮●╭╭╭─╮╮╮●╭╭╭─╮╮╮●╭╭╭─╮╮╮●╭╭", "╰╰─╯╯╯●╰╰╰─╯╯╯●╰╰╰─╯╯╯●╰╰╰─╯╯"]
|
||||||
|
|
||||||
|
for line in lines:
|
||||||
|
styled_line = []
|
||||||
|
for i, x in enumerate(line):
|
||||||
|
if i % 4:
|
||||||
|
styled_line.append(Text(x, style=colors[1 + int(i / 4)]))
|
||||||
|
else:
|
||||||
|
styled_line.append(Text(x, style="black"))
|
||||||
|
|
||||||
|
console.print(Text("").join(styled_line))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
prompts = {
|
||||||
|
"wave": wave,
|
||||||
|
"dots": dots,
|
||||||
|
"double-dots": double_dots,
|
||||||
|
"wave-dots": wave_w_dots,
|
||||||
|
}
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="generate ansi color coded login prompts"
|
||||||
|
)
|
||||||
|
parser.add_argument("--welcome", type=str, help="a welcome screen to print")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if not args.welcome:
|
||||||
|
for name, prompt in prompts.items():
|
||||||
|
console.print(f"name: {name}")
|
||||||
|
prompt()
|
||||||
|
elif args.welcome not in prompts.keys():
|
||||||
|
console.print(f"{args.welcome} is not a registered prompt")
|
||||||
|
else:
|
||||||
|
console.print()
|
||||||
|
prompts[args.welcome]()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
188
extras.sh
Executable file
188
extras.sh
Executable file
|
@ -0,0 +1,188 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
# script to install the extra needed tools programmatically
|
||||||
|
|
||||||
|
# add command line flags and function to govern install?
|
||||||
|
|
||||||
|
MAMBAFORGE_RELEASE="https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh"
|
||||||
|
MAMBAFORGE_INSTALLER="Mambaforge-Linux-x86_64.sh"
|
||||||
|
|
||||||
|
help() {
|
||||||
|
cat <<EOF
|
||||||
|
extras downloaders
|
||||||
|
|
||||||
|
by default will download all packages listed below
|
||||||
|
|
||||||
|
usage: $0 [OPTIONS]
|
||||||
|
|
||||||
|
--help Show this message
|
||||||
|
--force Overwrite current installations
|
||||||
|
|
||||||
|
To install a subset of these
|
||||||
|
use any of the package specific flag:
|
||||||
|
|
||||||
|
--fzf
|
||||||
|
--nvm
|
||||||
|
--mambaforge
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
for opt in "$@"; do
|
||||||
|
case $opt in
|
||||||
|
--help)
|
||||||
|
help
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--force) force=1 ;;
|
||||||
|
--fzf) fzf=1 ;;
|
||||||
|
--nvm) nvm=1 ;;
|
||||||
|
--mambaforge) mamba=1 ;;
|
||||||
|
*)
|
||||||
|
echo "unknown option: $opt"
|
||||||
|
help
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
check_existing() {
|
||||||
|
pkg=$1
|
||||||
|
install_dir=$2
|
||||||
|
declare -n skip_out=$3
|
||||||
|
|
||||||
|
if [ -d "$install_dir" ]; then
|
||||||
|
echo "found existing $pkg installation"
|
||||||
|
if [[ "$force" ]]; then
|
||||||
|
echo "removing previous installation"
|
||||||
|
rm -rf $install_dir
|
||||||
|
skip_out=0
|
||||||
|
else
|
||||||
|
skip_out=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
skip_out=0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
ask() {
|
||||||
|
while true; do
|
||||||
|
read -p "$1 ([y]/n) " -r
|
||||||
|
REPLY=${REPLY:-"y"}
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
return 1
|
||||||
|
elif [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
install_fzf() {
|
||||||
|
echo "##############"
|
||||||
|
echo installing fzf
|
||||||
|
echo "##############"
|
||||||
|
|
||||||
|
check_existing "fzf" "$HOME/.fzf" skip
|
||||||
|
|
||||||
|
if [[ $skip -eq 1 ]]; then
|
||||||
|
echo "remove your previous installation or rerun with --force"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "installing fzf using git"
|
||||||
|
|
||||||
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
||||||
|
~/.fzf/install \
|
||||||
|
--key-bindings \
|
||||||
|
--completion \
|
||||||
|
--no-bash \
|
||||||
|
--no-zsh \
|
||||||
|
--no-update-rc
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
install_nvm() {
|
||||||
|
echo "##############"
|
||||||
|
echo installing nvm
|
||||||
|
echo "##############"
|
||||||
|
|
||||||
|
check_existing "nvm" "$HOME/.nvm" skip
|
||||||
|
|
||||||
|
if [[ $skip -eq 1 ]]; then
|
||||||
|
echo "remove your previous installation or rerun with --force"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local current_dir=$PWD
|
||||||
|
|
||||||
|
git clone https://github.com/nvm-sh/nvm.git ~/.nvm
|
||||||
|
cd ~/.nvm
|
||||||
|
git checkout v0.39.0
|
||||||
|
. ./nvm.sh
|
||||||
|
|
||||||
|
cd $current_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
install_mambaforge() {
|
||||||
|
echo "#####################"
|
||||||
|
echo installing mambaforge
|
||||||
|
echo "#####################"
|
||||||
|
|
||||||
|
check_existing "mambaforge" "$HOME/mambaforge" skip
|
||||||
|
|
||||||
|
if [[ $skip -eq 1 ]]; then
|
||||||
|
echo "remove your previous installation or rerun with --force"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "fetching install script from github"
|
||||||
|
|
||||||
|
current_dir=$PWD
|
||||||
|
|
||||||
|
cd ~/
|
||||||
|
|
||||||
|
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
|
||||||
|
bash "$MAMBAFORGE_INSTALLER" -s
|
||||||
|
rm "$MAMBAFORGE_INSTALLER"
|
||||||
|
|
||||||
|
echo "cleaning up installer"
|
||||||
|
|
||||||
|
cd $current_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
install_all() {
|
||||||
|
echo "installing all packages..."
|
||||||
|
echo
|
||||||
|
install_fzf
|
||||||
|
echo
|
||||||
|
install_nvm
|
||||||
|
echo
|
||||||
|
install_mambaforge
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# remove once functional
|
||||||
|
echo $@
|
||||||
|
|
||||||
|
echo "#################"
|
||||||
|
echo EXTRAS DOWNLOADER
|
||||||
|
echo "#################"
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
install_all
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$fzf" ]; then
|
||||||
|
install_fzf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$nvm" ]; then
|
||||||
|
install_nvm
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$mamba" ]; then
|
||||||
|
install_mambaforge
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "FINISHED!"
|
1
home/.chezmoi.toml.tmpl
Normal file
1
home/.chezmoi.toml.tmpl
Normal file
|
@ -0,0 +1 @@
|
||||||
|
sourceDir = "~/.dotfiles"
|
10
home/.chezmoiignore
Normal file
10
home/.chezmoiignore
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{{- if ne .chezmoi.hostname "thinkpad" }}
|
||||||
|
bin/lock
|
||||||
|
.xinitrc
|
||||||
|
.xprofile
|
||||||
|
.zprofile
|
||||||
|
.config/alacritty
|
||||||
|
.config/leftwm
|
||||||
|
.config/autorandr
|
||||||
|
.config/pikaur.conf
|
||||||
|
{{- end }}
|
5
home/dot_zprofile
Normal file
5
home/dot_zprofile
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# startx automatically if on first tty
|
||||||
|
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
|
||||||
|
startx
|
||||||
|
logout
|
||||||
|
fi
|
39
home/dot_zshrc
Normal file
39
home/dot_zshrc
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
|
||||||
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
|
#Get dotfiles directory
|
||||||
|
|
||||||
|
if [ -d "$HOME/.dotfiles" ]; then
|
||||||
|
DOTFILES_DIR="$HOME/.dotfiles"
|
||||||
|
else
|
||||||
|
echo "Unable to find dotfiles, exiting."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make utilities available
|
||||||
|
|
||||||
|
PATH="$DOTFILES_DIR/bin:$PATH"
|
||||||
|
|
||||||
|
for DOTFILE in "$DOTFILES_DIR"/lib/{path,env,prompt,alias,function,conda,custom}.zsh; do
|
||||||
|
[ -f "$DOTFILE" ] && . "$DOTFILE"
|
||||||
|
done
|
||||||
|
|
||||||
|
unset DOTFILE
|
||||||
|
|
||||||
|
DOTFILES_EXTRA_DIR="$HOME/.extra"
|
||||||
|
|
||||||
|
if [ -d "$DOTFILES_EXTRA_DIR" ]; then
|
||||||
|
for EXTRAFILE in "$DOTFILES_EXTRA_DIR"/runcom/*.sh; do
|
||||||
|
[ -f "$EXTRAFILE" ] && . "$EXTRAFILE"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset EXTRAFILE
|
||||||
|
|
||||||
|
export DOTFILES_DIR DOTFILES_EXTRA_DIR
|
||||||
|
|
||||||
|
# welcome art
|
||||||
|
# clear
|
||||||
|
! is-tty && [ -f ~/.welcome ] && cat ~/.welcome
|
||||||
|
|
64
home/executable_dot_xinitrc
Normal file
64
home/executable_dot_xinitrc
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
#!/bin/sh
|
||||||
|
userresources=$HOME/.Xresources
|
||||||
|
usermodmap=$HOME/.Xmodmap
|
||||||
|
sysresources=/etc/X11/xinit/.Xresources
|
||||||
|
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||||
|
|
||||||
|
# merge in defaults and keymaps
|
||||||
|
|
||||||
|
if [ -f $sysresources ]; then
|
||||||
|
xrdb -merge $sysresources
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $sysmodmap ]; then
|
||||||
|
xmodmap $sysmodmap
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$userresources" ]; then
|
||||||
|
xrdb -merge "$userresources"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$usermodmap" ]; then
|
||||||
|
xmodmap "$usermodmap"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# start some nice programs
|
||||||
|
|
||||||
|
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||||
|
for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
|
||||||
|
[ -x "$f" ] && . "$f"
|
||||||
|
done
|
||||||
|
unset f
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -f ~/.xprofile ] && . ~/.xprofile
|
||||||
|
|
||||||
|
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
|
||||||
|
export SSH_AUTH_SOCK
|
||||||
|
|
||||||
|
# $1 is xterm
|
||||||
|
# $2 is the wm arg passed to startx
|
||||||
|
# i.e. startx qtile
|
||||||
|
|
||||||
|
case $2 in
|
||||||
|
leftwm)
|
||||||
|
export DESKTOP_SESSION=leftwm
|
||||||
|
exec leftwm
|
||||||
|
;;
|
||||||
|
plasma)
|
||||||
|
export DESKTOP_SESSION=plasma
|
||||||
|
exec startplasma-x11
|
||||||
|
;;
|
||||||
|
xmonad)
|
||||||
|
export DESKTOP_SESSION=xmonad
|
||||||
|
xmonad
|
||||||
|
;;
|
||||||
|
qtile)
|
||||||
|
export DESKTOP_SESSION=qtile
|
||||||
|
exec qtile start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
export DESKTOP_SESSION=qtile
|
||||||
|
exec qtile start
|
||||||
|
;;
|
||||||
|
esac
|
10
home/executable_dot_xprofile
Normal file
10
home/executable_dot_xprofile
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# enable touch on only laptop monitor
|
||||||
|
xinput --map-to-output 'ELAN901C:00 04F3:2C29' eDP-1
|
||||||
|
|
||||||
|
xss-lock -- ~/bin/lock &
|
||||||
|
|
||||||
|
unclutter --timeout 1 &
|
||||||
|
|
||||||
|
SKIP_WM_RESET=1 autorandr -c --default default
|
23
home/private_bin/executable_ansi_colors
Normal file
23
home/private_bin/executable_ansi_colors
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
print("\\033[XXm")
|
||||||
|
|
||||||
|
for i in range(30,37+1):
|
||||||
|
print("\033[%dm%d\t\t\033[%dm%d" % (i,i,i+60,i+60))
|
||||||
|
|
||||||
|
print("\\033[39m\\033[49m - Reset colour")
|
||||||
|
print("\\033[2K - Clear Line")
|
||||||
|
print("\\033[<L>;<C>H OR \\033[<L>;<C>f puts the cursor at line L and column C.")
|
||||||
|
print("\\033[<N>A Move the cursor up N lines")
|
||||||
|
print("\\033[<N>B Move the cursor down N lines")
|
||||||
|
print("\\033[<N>C Move the cursor forward N columns")
|
||||||
|
print("\\033[<N>D Move the cursor backward N columns")
|
||||||
|
print("\\033[2J Clear the screen, move to (0,0)")
|
||||||
|
print("\\033[K Erase to end of line")
|
||||||
|
print("\\033[s Save cursor position")
|
||||||
|
print("\\033[u Restore cursor position")
|
||||||
|
print()
|
||||||
|
print("\\032[4m Underline on")
|
||||||
|
print("\\033[24m Underline off")
|
||||||
|
print("\\033[1m Bold on")
|
||||||
|
print("\\033[21m Bold off")
|
148
home/private_bin/executable_concom
Normal file
148
home/private_bin/executable_concom
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import shlex
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
from shutil import which
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def is_tool(name):
|
||||||
|
"""Check whether `name` is on PATH and marked as executable."""
|
||||||
|
if not which(name):
|
||||||
|
print(f"ERROR: {name} is not found in your PATH")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
def is_repo():
|
||||||
|
if not (Path.cwd() / ".git").is_dir():
|
||||||
|
print(color("Not a git repo.","9"))
|
||||||
|
print("exiting...")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
def run(cmd, capture=True, returncode=False):
|
||||||
|
result = subprocess.run(
|
||||||
|
shlex.split(cmd),
|
||||||
|
stdout=subprocess.PIPE if capture else None,
|
||||||
|
text=True,
|
||||||
|
shell=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
if returncode:
|
||||||
|
return result.returncode
|
||||||
|
elif capture:
|
||||||
|
return result.stdout.strip()
|
||||||
|
|
||||||
|
|
||||||
|
def confirm(q):
|
||||||
|
return run(
|
||||||
|
"gum confirm "
|
||||||
|
"--selected.bold "
|
||||||
|
"--selected.background 11 "
|
||||||
|
"--selected.foreground 8 "
|
||||||
|
f"'{q}'",
|
||||||
|
returncode=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: make gum (and git?) a class an obsufcate the commands
|
||||||
|
|
||||||
|
def color(text, color):
|
||||||
|
return run(f"gum style --foreground {color} '{text}'")
|
||||||
|
|
||||||
|
|
||||||
|
def nl_to_ol(text):
|
||||||
|
return " ".join([f"'{f}'" for f in text.splitlines()])
|
||||||
|
|
||||||
|
|
||||||
|
def check_status():
|
||||||
|
files = nl_to_ol(run("git ls-files -dmo"))
|
||||||
|
if not files:
|
||||||
|
print(color("nothing to stage", "red"))
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
|
return files
|
||||||
|
|
||||||
|
|
||||||
|
def stage_files(files):
|
||||||
|
to_add = run(f"gum choose --no-limit {files} ")
|
||||||
|
run(f"git add {to_add}")
|
||||||
|
|
||||||
|
|
||||||
|
def get_staged_info():
|
||||||
|
|
||||||
|
staged = run("git diff --cached --stat")
|
||||||
|
fstaged = []
|
||||||
|
if not staged:
|
||||||
|
files = check_status()
|
||||||
|
print(color("nothing staged..", 9))
|
||||||
|
if files and confirm("Would you like to stage files?") == 0:
|
||||||
|
stage_files(files)
|
||||||
|
return get_staged_info()
|
||||||
|
else:
|
||||||
|
print("exiting...")
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
for text in staged.splitlines()[-1].split(","):
|
||||||
|
if "changed" in text:
|
||||||
|
fstaged.append(color(text.strip(), 11))
|
||||||
|
elif "insertion" in text:
|
||||||
|
fstaged.append(color(text.strip(), 10))
|
||||||
|
elif "deletion" in text:
|
||||||
|
fstaged.append(color(text.strip(), 9))
|
||||||
|
else:
|
||||||
|
print(f"Unexpected output from git diff: {text}")
|
||||||
|
|
||||||
|
return "\n\t".join(fstaged)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
is_tool("gum")
|
||||||
|
is_tool("git")
|
||||||
|
is_repo()
|
||||||
|
|
||||||
|
run(
|
||||||
|
"gum style "
|
||||||
|
"--foreground 212 --border-foreground 212 --border rounded "
|
||||||
|
'--align center --width 30 --margin "1 4" '
|
||||||
|
f"'{color('ConCom',11)}'",
|
||||||
|
capture=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
print(f" staged: \n\t{get_staged_info()}\n")
|
||||||
|
|
||||||
|
commit_type = run(
|
||||||
|
"gum choose fix feat docs style refactor test chore revert custom"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not commit_type:
|
||||||
|
print("exiting...")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
elif commit_type == "custom":
|
||||||
|
commit_type = run('gum input --placeholder "type"')
|
||||||
|
|
||||||
|
scope = run('gum input --placeholder "scope"')
|
||||||
|
scope = f"({scope})" if scope else ""
|
||||||
|
|
||||||
|
summary = run(
|
||||||
|
f'gum input --value "{commit_type}{scope}: " --placeholder "Summary of this change"'
|
||||||
|
)
|
||||||
|
|
||||||
|
print(f"{color('message:',11)}\n {summary}")
|
||||||
|
|
||||||
|
actions = {
|
||||||
|
"commit": lambda: run(f"git commit -m '{summary}'", capture=False),
|
||||||
|
"commit(with message)": lambda: run(
|
||||||
|
f"git commit -m '{summary}' -m '# note: abort with :cq!' -e", capture=False
|
||||||
|
),
|
||||||
|
"quit": lambda: (print("exiting..."), sys.exit()),
|
||||||
|
}
|
||||||
|
|
||||||
|
print("\nHow to proceed?\n")
|
||||||
|
choices = " ".join([f"'{choice}'" for choice in actions])
|
||||||
|
choice = str(run(f"gum choose {choices}"))
|
||||||
|
|
||||||
|
actions[choice]()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
77
home/private_bin/executable_get-updates
Normal file
77
home/private_bin/executable_get-updates
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
cat <<HELP
|
||||||
|
|
||||||
|
get-updates [option]
|
||||||
|
|
||||||
|
--notify send a notification with available packages
|
||||||
|
-h,--help print this page and exit
|
||||||
|
|
||||||
|
HELP
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
header() {
|
||||||
|
echo "============="
|
||||||
|
}
|
||||||
|
|
||||||
|
updates_output() {
|
||||||
|
notify=$1
|
||||||
|
if ! [[ -z $updates_arch ]]; then
|
||||||
|
header
|
||||||
|
echo "ARCH: $(echo "$updates_arch" | wc -l)"
|
||||||
|
header
|
||||||
|
[[ -z $notify ]] && echo "$updates_arch"
|
||||||
|
fi
|
||||||
|
if ! [[ -z $updates_aur ]]; then
|
||||||
|
header
|
||||||
|
echo "AUR: $(echo "$updates_aur" | wc -l)"
|
||||||
|
header
|
||||||
|
[[ -z $notify ]] && echo "$updates_aur"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
update_system() {
|
||||||
|
echo
|
||||||
|
read -p "Would you like to update? (y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
|
||||||
|
pikaur -Syu --noedit --nodiff
|
||||||
|
}
|
||||||
|
|
||||||
|
for opt in "$@"; do
|
||||||
|
case $opt in
|
||||||
|
-h | --help)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
--notify)
|
||||||
|
notify=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-* | --*)
|
||||||
|
echo "Invalid option: $opt"
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "fetching updates..."
|
||||||
|
echo
|
||||||
|
|
||||||
|
updates_arch="$(checkupdates 2>/dev/null | awk '{print $1}')"
|
||||||
|
updates_aur="$(pikaur -Qua 2>/dev/null | awk '{print $1}')"
|
||||||
|
updates_info="$(updates_output $notify)"
|
||||||
|
|
||||||
|
if [[ -z $updates_info ]]; then
|
||||||
|
echo "system up to date"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ -z $notify ]]; then
|
||||||
|
notify-send -w "System Updates Available!" "$updates_info"
|
||||||
|
else
|
||||||
|
echo "System Updates Available!"
|
||||||
|
echo "$updates_info"
|
||||||
|
update_system
|
||||||
|
fi
|
85
home/private_bin/executable_lock
Normal file
85
home/private_bin/executable_lock
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
if ! [[ -f /usr/bin/i3lock ]]; then
|
||||||
|
notify-send "no i3lock...install i3lock-color"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
# colors
|
||||||
|
bg_color=22212cbb
|
||||||
|
red=ff9580ff
|
||||||
|
cyan=80ffeaff
|
||||||
|
green=8aff80ff
|
||||||
|
orange=ffca80ff
|
||||||
|
selection=454158ff
|
||||||
|
|
||||||
|
# greeter config
|
||||||
|
font="MonoLisa Nerd Font:style=Bold"
|
||||||
|
greeter_msg="LOCKED"
|
||||||
|
|
||||||
|
ff=(
|
||||||
|
"Sub-Zero"
|
||||||
|
"3D-ASCII"
|
||||||
|
"big"
|
||||||
|
"small"
|
||||||
|
"lean"
|
||||||
|
"JS Bracket Letters"
|
||||||
|
"Epic"
|
||||||
|
"Fender"
|
||||||
|
"Slant"
|
||||||
|
"lineblocks"
|
||||||
|
"Marquee"
|
||||||
|
"Avatar"
|
||||||
|
"Contrast"
|
||||||
|
"amcrazor"
|
||||||
|
"Kban"
|
||||||
|
"Calvin S"
|
||||||
|
"Dr Pepper"
|
||||||
|
)
|
||||||
|
|
||||||
|
fig_font=${ff[RANDOM % ${#ff[@]}]}
|
||||||
|
|
||||||
|
make_figlet() {
|
||||||
|
figlet -f "$fig_font" "$greeter_msg"
|
||||||
|
}
|
||||||
|
|
||||||
|
font_size=25
|
||||||
|
font_to_px=$((font_size * 16 / 12))
|
||||||
|
greeter_h=$(($(make_figlet | wc -l) * font_to_px))
|
||||||
|
greeter_w=$(($(make_figlet | wc -L) * font_to_px))
|
||||||
|
|
||||||
|
greeter_pos="x+w/2-${greeter_w}/4:y+h/2-${greeter_h}/4"
|
||||||
|
|
||||||
|
# do the locking
|
||||||
|
|
||||||
|
# suspend message display
|
||||||
|
pkill -u "$USER" -USR1 dunst
|
||||||
|
sleep 0.1
|
||||||
|
|
||||||
|
# lock the screen
|
||||||
|
i3lock \
|
||||||
|
-n \
|
||||||
|
--screen 1 \
|
||||||
|
--color $bg_color \
|
||||||
|
--inside-color ffffff00 \
|
||||||
|
--ring-color $green \
|
||||||
|
--ringwrong-color $red \
|
||||||
|
--ringver-color $cyan \
|
||||||
|
--insidewrong-color $bg_color \
|
||||||
|
--insidever-color $bg_color \
|
||||||
|
--line-uses-ring \
|
||||||
|
--separator-color $selection \
|
||||||
|
--keyhl-color $cyan \
|
||||||
|
--bshl-color $red \
|
||||||
|
--wrong-color $red \
|
||||||
|
--ind-pos x+w-5-r:y+h-10-r \
|
||||||
|
--ring-width 25 \
|
||||||
|
--radius 100 \
|
||||||
|
--verif-text "" \
|
||||||
|
--greeter-text "$(make_figlet)" \
|
||||||
|
--greeter-font "${font}" \
|
||||||
|
--greeter-size $font_size \
|
||||||
|
--greeter-color $cyan \
|
||||||
|
--greeter-pos "${greeter_pos}" \
|
||||||
|
--greeter-align 1
|
||||||
|
|
||||||
|
# resume message display
|
||||||
|
pkill -u "$USER" -USR2 dunst
|
65
home/private_bin/executable_ssh-serve-files
Normal file
65
home/private_bin/executable_ssh-serve-files
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#colors
|
||||||
|
help() {
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
ssh-serve-files
|
||||||
|
|
||||||
|
usage: ssh-serve-files [user@]hostname [-p port] [-d dir]
|
||||||
|
|
||||||
|
optional flags:
|
||||||
|
-h, --help show this help text
|
||||||
|
-p, --port port to tunnel and start http server at
|
||||||
|
-d, --dir directory of files to serve [default: ~/]
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $# -eq 0 ]]; then
|
||||||
|
echo "please provide [user@]hostname"
|
||||||
|
help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PORT=8090
|
||||||
|
DIR="~/"
|
||||||
|
|
||||||
|
USER_HOST=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
while [[ $1 =~ ^- && $1 != "--" ]]; do
|
||||||
|
echo checking $1
|
||||||
|
case $1 in
|
||||||
|
-h | --help)
|
||||||
|
help
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-p | --port)
|
||||||
|
shift
|
||||||
|
PORT=${PORT:+$1}
|
||||||
|
;;
|
||||||
|
-d | --dir)
|
||||||
|
shift
|
||||||
|
DIR=${DIR:+$1}
|
||||||
|
;;
|
||||||
|
-* | --*)
|
||||||
|
echo "Invalid option: $opt"
|
||||||
|
help
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
URL="http://localhost:$PORT"
|
||||||
|
|
||||||
|
echo "connecting to $USER_HOST with port $PORT"
|
||||||
|
echo "serving directory:"
|
||||||
|
echo "->>$DIR"
|
||||||
|
|
||||||
|
echo "opening $URL using $BROWSER"
|
||||||
|
$BROWSER $URL >/dev/null 2>&1 &
|
||||||
|
|
||||||
|
# first change directory in case python<3.7
|
||||||
|
ssh -tL localhost:$PORT:localhost:$PORT $USER_HOST \
|
||||||
|
"cd $DIR && python3 -m http.server $PORT"
|
231
home/private_bin/executable_tools
Normal file
231
home/private_bin/executable_tools
Normal file
|
@ -0,0 +1,231 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#colors
|
||||||
|
MAGENTA=$(tput setaf 5)
|
||||||
|
CYAN=$(tput setaf 6)
|
||||||
|
YELLOW=$(tput setaf 3)
|
||||||
|
RED=$(tput setaf 1)
|
||||||
|
GREEN=$(tput setaf 2)
|
||||||
|
NORMAL=$(tput sgr0)
|
||||||
|
|
||||||
|
BIN_DIR=$HOME/bin
|
||||||
|
YAMLDOC="$DOTFILES_DIR/info/tools.yml"
|
||||||
|
INSTALL_YES=${GREEN}✓${NORMAL}
|
||||||
|
INSTALL_NO=${RED}✗${NORMAL}
|
||||||
|
|
||||||
|
# get current binary files
|
||||||
|
shopt -s nullglob
|
||||||
|
BINARY_FILES=($HOME/bin/*)
|
||||||
|
|
||||||
|
alias eget="eget --system linux/amd64"
|
||||||
|
|
||||||
|
post_download_install() {
|
||||||
|
|
||||||
|
tool=$1
|
||||||
|
temp_file=$(mktemp -p . ${tool}.XXX.sh)
|
||||||
|
key=$tool yq e 'explode(.) | .[env(key)].post-download' $YAMLDOC >$temp_file
|
||||||
|
. $temp_file
|
||||||
|
rm $temp_file
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
eget_tool() {
|
||||||
|
|
||||||
|
tool=$1
|
||||||
|
|
||||||
|
echo -n $tool
|
||||||
|
|
||||||
|
user=$(key=$tool yq e 'explode(.) | .[env(key)].user' $YAMLDOC)
|
||||||
|
asset=$(key=$tool yq e 'explode(.) | .[env(key)].asset // ""' $YAMLDOC)
|
||||||
|
file=$(key=$tool yq e 'explode(.) | .[env(key)].file // ""' $YAMLDOC)
|
||||||
|
to=$(key=$tool yq e 'explode(.) | .[env(key)].to // ""' $YAMLDOC)
|
||||||
|
download_only=$(key=$tool yq e 'explode(.) | .[env(key)].download-only // ""' $YAMLDOC)
|
||||||
|
custom_flags=$(key=$tool yq e 'explode(.) | .[env(key)].custom_flags // ""' $YAMLDOC)
|
||||||
|
|
||||||
|
eget $user/$tool \
|
||||||
|
${asset:+--asset $asset} \
|
||||||
|
${file:+--file $file} \
|
||||||
|
${to:+--to $to} \
|
||||||
|
${download_only:+--download-only} \
|
||||||
|
${custom_flags} \
|
||||||
|
-q
|
||||||
|
|
||||||
|
if [[ $download_only ]]; then
|
||||||
|
echo -n ' --> '
|
||||||
|
echo -n 'running post-download script'
|
||||||
|
post_download_install $tool
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
deps_check() {
|
||||||
|
|
||||||
|
mkdir -p $BIN_DIR
|
||||||
|
if ! $(is-executable eget); then
|
||||||
|
echo "I don't see eget on your path..."
|
||||||
|
read -p "Do you want to download it to ${BIN_DIR}? " -n 1 -r
|
||||||
|
echo # (optional) move to a new line
|
||||||
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
curl https://zyedidia.github.io/eget.sh | sh
|
||||||
|
mv eget $BIN_DIR/eget
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! $(is-executable yq); then
|
||||||
|
eget mikefarah/yq --asset yq_linux_amd64
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
get_days() {
|
||||||
|
install_date=$1
|
||||||
|
date_out=$(date -d @$1 +'%Y.%m.%d %R')
|
||||||
|
now=$(date +'%s')
|
||||||
|
days=$(((now - install_date) / 86400))
|
||||||
|
if ((days > 60)); then
|
||||||
|
echo "${RED}$date_out${NORMAL}"
|
||||||
|
elif ((days > 30)); then
|
||||||
|
echo "${YELLOW}$date_out${NORMAL}"
|
||||||
|
else
|
||||||
|
echo "$date_out"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_install() {
|
||||||
|
bin_name=$BIN_DIR/$1
|
||||||
|
if printf '%s\n' "${BINARY_FILES[@]}" | grep -Fxq "$bin_name"; then
|
||||||
|
modified=$(date -r $bin_name +'%s')
|
||||||
|
echo $(get_days $modified)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
list() {
|
||||||
|
|
||||||
|
deps_check
|
||||||
|
|
||||||
|
user_len=$(yq e '.[] | .user ' $YAMLDOC | tail -n +2 | sort | uniq | awk '{print length}' | sort -nr | head -n 1)
|
||||||
|
tool_len=$(yq e 'keys| .[]' $YAMLDOC | tail -n +2 | sort | uniq | awk '{print length}' | sort -nr | head -n 1)
|
||||||
|
table_width=$((user_len + tool_len + 25))
|
||||||
|
tool_cell=$(printf "%${tool_len}s" "")
|
||||||
|
user_cell=$(printf "%${user_len}s" "")
|
||||||
|
|
||||||
|
echo "${CYAN}CONFIGURED TOOLS${NORMAL}"
|
||||||
|
printf "%${table_width}s\n" "" | tr ' ' =
|
||||||
|
printf \
|
||||||
|
"${CYAN}tool${NORMAL}%s | \
|
||||||
|
${CYAN}author${NORMAL}%s | \
|
||||||
|
${CYAN} install date${NORMAL}\n" \
|
||||||
|
"${tool_cell:4}" "${user_cell:6}"
|
||||||
|
printf "%${table_width}s\n" "" | tr ' ' -
|
||||||
|
readarray tools < <(yq e 'keys | .[]' $YAMLDOC)
|
||||||
|
#sort tools for readability
|
||||||
|
tools=($(echo "${tools[@]:1}" | tr ' ' '\n' | sort | uniq))
|
||||||
|
for tool in "${tools[@]}"; do
|
||||||
|
|
||||||
|
user=$(key=$tool yq e 'explode(.) | .[env(key)].user' $YAMLDOC)
|
||||||
|
bin_name=$(key=$tool yq e 'explode(.) | .[env(key)].to' $YAMLDOC)
|
||||||
|
[[ $bin_name == "null" ]] && bin_name=$tool
|
||||||
|
|
||||||
|
modified=$(check_install $bin_name)
|
||||||
|
|
||||||
|
! [[ -z $modified ]] && installed=$INSTALL_YES || installed=$INSTALL_NO
|
||||||
|
|
||||||
|
printf \
|
||||||
|
"${MAGENTA}%s${NORMAL}%s | \
|
||||||
|
${YELLOW}%s${NORMAL}%s | \
|
||||||
|
$installed $modified\n" \
|
||||||
|
$tool "${tool_cell:${#tool}}" \
|
||||||
|
$user "${user_cell:${#user}}"
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
if ! [ -z "$1" ]; then
|
||||||
|
tool=$1
|
||||||
|
|
||||||
|
echo "installing $tool"
|
||||||
|
info=$(key=$tool yq e 'explode(.) | .[env(key)]' $YAMLDOC)
|
||||||
|
if [[ $info == "null" ]]; then
|
||||||
|
echo "$tool not found in $YAMLDOC"
|
||||||
|
echo "exiting"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
eget_tool $tool
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
download_all() {
|
||||||
|
|
||||||
|
echo "Downloading binaries to ${GREEN}$BIN_DIR${NORMAL}"
|
||||||
|
|
||||||
|
deps_check
|
||||||
|
|
||||||
|
readarray tools < <(yq e 'keys | .[]' $YAMLDOC)
|
||||||
|
echo "installing......"
|
||||||
|
|
||||||
|
for tool in "${tools[@]:1}"; do
|
||||||
|
eget_tool $tool
|
||||||
|
done
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
help() {
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
eget/yq powered binary downloader
|
||||||
|
|
||||||
|
usage: tools [tool tool2 ...]
|
||||||
|
|
||||||
|
optional flags:
|
||||||
|
-h, --help show this help text
|
||||||
|
-l, --list list all tools
|
||||||
|
-a, --all download all tools
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
for opt in "$@"; do
|
||||||
|
case $opt in
|
||||||
|
-h | --help)
|
||||||
|
help
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-l | --list)
|
||||||
|
list
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-a | --all)
|
||||||
|
download_all
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-* | --*)
|
||||||
|
echo "Invalid option: $opt"
|
||||||
|
help
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
args+=("$opt")
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# if no args, show help
|
||||||
|
|
||||||
|
if [ -z "$args" ]; then
|
||||||
|
echo "${RED}No arguments supplied${NORMAL}"
|
||||||
|
help
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Downloading binaries to ${GREEN}$BIN_DIR${NORMAL}"
|
||||||
|
deps_check
|
||||||
|
for tool in "$args"; do
|
||||||
|
download $tool
|
||||||
|
done
|
||||||
|
fi
|
854
home/private_dot_config/alacritty/alacritty.yml
Normal file
854
home/private_dot_config/alacritty/alacritty.yml
Normal file
|
@ -0,0 +1,854 @@
|
||||||
|
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||||
|
|
||||||
|
# Import additional configuration files
|
||||||
|
#
|
||||||
|
# Imports are loaded in order, skipping all missing files, with the importing
|
||||||
|
# file being loaded last. If a field is already present in a previous import, it
|
||||||
|
# will be replaced.
|
||||||
|
#
|
||||||
|
# All imports must either be absolute paths starting with `/`, or paths relative
|
||||||
|
# to the user's home directory starting with `~/`.
|
||||||
|
import:
|
||||||
|
# - ~/.config/alacritty/dracula-pro.yml
|
||||||
|
- ~/.config/alacritty/catppuccin.yml
|
||||||
|
|
||||||
|
# Any items in the `env` entry below will be added as
|
||||||
|
# environment variables. Some entries may override variables
|
||||||
|
# set by alacritty itself.
|
||||||
|
env:
|
||||||
|
# TERM variable
|
||||||
|
#
|
||||||
|
# This value is used to set the `$TERM` environment variable for
|
||||||
|
# each instance of Alacritty. If it is not present, alacritty will
|
||||||
|
# check the local terminfo database and use `alacritty` if it is
|
||||||
|
# available, otherwise `xterm-256color` is used.
|
||||||
|
TERM: xterm-256color
|
||||||
|
|
||||||
|
window:
|
||||||
|
# Window dimensions (changes require restart)
|
||||||
|
#
|
||||||
|
# Number of lines/columns (not pixels) in the terminal. The number of columns
|
||||||
|
# must be at least `2`, while using a value of `0` for columns and lines will
|
||||||
|
# fall back to the window manager's recommended size.
|
||||||
|
dimensions:
|
||||||
|
columns: 90
|
||||||
|
lines: 45
|
||||||
|
|
||||||
|
# Window position (changes require restart)
|
||||||
|
#
|
||||||
|
# Specified in number of pixels.
|
||||||
|
# If the position is not set, the window manager will handle the placement.
|
||||||
|
#position:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
opacity: .80
|
||||||
|
# Window padding (changes require restart)
|
||||||
|
#
|
||||||
|
# Blank space added around the window in pixels. This padding is scaled
|
||||||
|
# by DPI and the specified value is always added at both opposing sides.
|
||||||
|
padding:
|
||||||
|
x: 10
|
||||||
|
y: 10
|
||||||
|
|
||||||
|
# Spread additional padding evenly around the terminal content.
|
||||||
|
dynamic_padding: true
|
||||||
|
|
||||||
|
# Window decorations
|
||||||
|
#
|
||||||
|
# Values for `decorations`:
|
||||||
|
# - full: Borders and title bar
|
||||||
|
# - none: Neither borders nor title bar
|
||||||
|
#
|
||||||
|
# Values for `decorations` (macOS only):
|
||||||
|
# - transparent: Title bar, transparent background and title bar buttons
|
||||||
|
# - buttonless: Title bar, transparent background and no title bar buttons
|
||||||
|
decorations: full
|
||||||
|
|
||||||
|
# Startup Mode (changes require restart)
|
||||||
|
#
|
||||||
|
# Values for `startup_mode`:
|
||||||
|
# - Windowed
|
||||||
|
# - Maximized
|
||||||
|
# - Fullscreen
|
||||||
|
#
|
||||||
|
# Values for `startup_mode` (macOS only):
|
||||||
|
# - SimpleFullscreen
|
||||||
|
#startup_mode: Windowed
|
||||||
|
|
||||||
|
# Window title
|
||||||
|
title: Alacritty
|
||||||
|
|
||||||
|
# Allow terminal applications to change Alacritty's window title.
|
||||||
|
#dynamic_title: true
|
||||||
|
|
||||||
|
# Window class (Linux/BSD only):
|
||||||
|
#class:
|
||||||
|
# Application instance name
|
||||||
|
#instance: Alacritty
|
||||||
|
# General application class
|
||||||
|
#general: Alacritty
|
||||||
|
|
||||||
|
# GTK theme variant (Linux/BSD only)
|
||||||
|
#
|
||||||
|
# Override the variant of the GTK theme. Commonly supported values are `dark`
|
||||||
|
# and `light`. Set this to `None` to use the default theme variant.
|
||||||
|
#gtk_theme_variant: None
|
||||||
|
|
||||||
|
#scrolling:
|
||||||
|
# Maximum number of lines in the scrollback buffer.
|
||||||
|
# Specifying '0' will disable scrolling.
|
||||||
|
#history: 10000
|
||||||
|
|
||||||
|
# Scrolling distance multiplier.
|
||||||
|
#multiplier: 3
|
||||||
|
|
||||||
|
# Font configuration
|
||||||
|
font:
|
||||||
|
# Normal (roman) font face
|
||||||
|
normal:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) Menlo
|
||||||
|
# - (Linux/BSD) monospace
|
||||||
|
# - (Windows) Consolas
|
||||||
|
family: "MonoLisa Nerd Font"
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Regular
|
||||||
|
|
||||||
|
# Bold font face
|
||||||
|
bold:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
#family: "MonoLisa Nerd Font"
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
style: Bold
|
||||||
|
|
||||||
|
# Italic font face
|
||||||
|
italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
# family: "DejaVuSansMono NF"
|
||||||
|
# family: "MonoLisa NF"
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
style: Italic
|
||||||
|
|
||||||
|
# Bold italic font face
|
||||||
|
bold_italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
# family: "MonoLisa NF"
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
style: Bold Italic
|
||||||
|
|
||||||
|
# Point size
|
||||||
|
size: 8
|
||||||
|
|
||||||
|
# Offset is the extra space around each character. `offset.y` can be thought
|
||||||
|
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
||||||
|
# spacing.
|
||||||
|
#offset:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Glyph offset determines the locations of the glyphs within their cells with
|
||||||
|
# the default being at the bottom. Increasing `x` moves the glyph to the
|
||||||
|
# right, increasing `y` moves the glyph upward.
|
||||||
|
#glyph_offset:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Thin stroke font rendering (macOS only)
|
||||||
|
#
|
||||||
|
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||||
|
# it is recommended to set `use_thin_strokes` to `false`.
|
||||||
|
#use_thin_strokes: true
|
||||||
|
|
||||||
|
# If `true`, bold text is drawn using the bright color variants.
|
||||||
|
draw_bold_text_with_bright_colors: true
|
||||||
|
|
||||||
|
# Colors (Tomorrow Night)
|
||||||
|
#colors:
|
||||||
|
# Default colors
|
||||||
|
#primary:
|
||||||
|
# background: '#1d1f21'
|
||||||
|
# foreground: '#c5c8c6'
|
||||||
|
|
||||||
|
# Bright and dim foreground colors
|
||||||
|
#
|
||||||
|
# The dimmed foreground color is calculated automatically if it is not
|
||||||
|
# present. If the bright foreground color is not set, or
|
||||||
|
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
|
||||||
|
# color will be used.
|
||||||
|
#dim_foreground: '#828482'
|
||||||
|
#bright_foreground: '#eaeaea'
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
#
|
||||||
|
# Colors which should be used to draw the terminal cursor.
|
||||||
|
#
|
||||||
|
# Allowed values are CellForeground/CellBackground, which reference the
|
||||||
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
|
#cursor:
|
||||||
|
# text: CellBackground
|
||||||
|
# cursor: CellForeground
|
||||||
|
|
||||||
|
# Vi mode cursor colors
|
||||||
|
#
|
||||||
|
# Colors for the cursor when the vi mode is active.
|
||||||
|
#
|
||||||
|
# Allowed values are CellForeground/CellBackground, which reference the
|
||||||
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
|
#vi_mode_cursor:
|
||||||
|
# text: CellBackground
|
||||||
|
# cursor: CellForeground
|
||||||
|
|
||||||
|
# Search colors
|
||||||
|
#
|
||||||
|
# Colors used for the search bar and match highlighting.
|
||||||
|
#search:
|
||||||
|
# Allowed values are CellForeground/CellBackground, which reference the
|
||||||
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
|
#matches:
|
||||||
|
# foreground: '#000000'
|
||||||
|
# background: '#ffffff'
|
||||||
|
#focused_match:
|
||||||
|
# foreground: '#ffffff'
|
||||||
|
# background: '#000000'
|
||||||
|
|
||||||
|
#bar:
|
||||||
|
# background: '#c5c8c6'
|
||||||
|
# foreground: '#1d1f21'
|
||||||
|
|
||||||
|
# Keyboard regex hints
|
||||||
|
#hints:
|
||||||
|
# First character in the hint label
|
||||||
|
#
|
||||||
|
# Allowed values are CellForeground/CellBackground, which reference the
|
||||||
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
|
#start:
|
||||||
|
# foreground: '#1d1f21'
|
||||||
|
# background: '#e9ff5e'
|
||||||
|
|
||||||
|
# All characters after the first one in the hint label
|
||||||
|
#
|
||||||
|
# Allowed values are CellForeground/CellBackground, which reference the
|
||||||
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
|
#end:
|
||||||
|
# foreground: '#e9ff5e'
|
||||||
|
# background: '#1d1f21'
|
||||||
|
|
||||||
|
# Line indicator
|
||||||
|
#
|
||||||
|
# Color used for the indicator displaying the position in history during
|
||||||
|
# search and vi mode.
|
||||||
|
#
|
||||||
|
# By default, these will use the opposing primary color.
|
||||||
|
#line_indicator:
|
||||||
|
# foreground: None
|
||||||
|
# background: None
|
||||||
|
|
||||||
|
# Selection colors
|
||||||
|
#
|
||||||
|
# Colors which should be used to draw the selection area.
|
||||||
|
#
|
||||||
|
# Allowed values are CellForeground/CellBackground, which reference the
|
||||||
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
|
#selection:
|
||||||
|
# text: CellBackground
|
||||||
|
# background: CellForeground
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
#normal:
|
||||||
|
# black: '#1d1f21'
|
||||||
|
# red: '#cc6666'
|
||||||
|
# green: '#b5bd68'
|
||||||
|
# yellow: '#f0c674'
|
||||||
|
# blue: '#81a2be'
|
||||||
|
# magenta: '#b294bb'
|
||||||
|
# cyan: '#8abeb7'
|
||||||
|
# white: '#c5c8c6'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
#bright:
|
||||||
|
# black: '#666666'
|
||||||
|
# red: '#d54e53'
|
||||||
|
# green: '#b9ca4a'
|
||||||
|
# yellow: '#e7c547'
|
||||||
|
# blue: '#7aa6da'
|
||||||
|
# magenta: '#c397d8'
|
||||||
|
# cyan: '#70c0b1'
|
||||||
|
# white: '#eaeaea'
|
||||||
|
|
||||||
|
# Dim colors
|
||||||
|
#
|
||||||
|
# If the dim colors are not set, they will be calculated automatically based
|
||||||
|
# on the `normal` colors.
|
||||||
|
#dim:
|
||||||
|
# black: '#131415'
|
||||||
|
# red: '#864343'
|
||||||
|
# green: '#777c44'
|
||||||
|
# yellow: '#9e824c'
|
||||||
|
# blue: '#556a7d'
|
||||||
|
# magenta: '#75617b'
|
||||||
|
# cyan: '#5b7d78'
|
||||||
|
# white: '#828482'
|
||||||
|
|
||||||
|
# Indexed Colors
|
||||||
|
#
|
||||||
|
# The indexed colors include all colors from 16 to 256.
|
||||||
|
# When these are not set, they're filled with sensible defaults.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# `- { index: 16, color: '#ff00ff' }`
|
||||||
|
#
|
||||||
|
#indexed_colors: []
|
||||||
|
|
||||||
|
# Bell
|
||||||
|
#
|
||||||
|
# The bell is rung every time the BEL control character is received.
|
||||||
|
#bell:
|
||||||
|
# Visual Bell Animation
|
||||||
|
#
|
||||||
|
# Animation effect for flashing the screen when the visual bell is rung.
|
||||||
|
#
|
||||||
|
# Values for `animation`:
|
||||||
|
# - Ease
|
||||||
|
# - EaseOut
|
||||||
|
# - EaseOutSine
|
||||||
|
# - EaseOutQuad
|
||||||
|
# - EaseOutCubic
|
||||||
|
# - EaseOutQuart
|
||||||
|
# - EaseOutQuint
|
||||||
|
# - EaseOutExpo
|
||||||
|
# - EaseOutCirc
|
||||||
|
# - Linear
|
||||||
|
#animation: EaseOutExpo
|
||||||
|
|
||||||
|
# Duration of the visual bell flash in milliseconds. A `duration` of `0` will
|
||||||
|
# disable the visual bell animation.
|
||||||
|
#duration: 0
|
||||||
|
|
||||||
|
# Visual bell animation color.
|
||||||
|
#color: '#ffffff'
|
||||||
|
|
||||||
|
# Bell Command
|
||||||
|
#
|
||||||
|
# This program is executed whenever the bell is rung.
|
||||||
|
#
|
||||||
|
# When set to `command: None`, no command will be executed.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# command:
|
||||||
|
# program: notify-send
|
||||||
|
# args: ["Hello, World!"]
|
||||||
|
#
|
||||||
|
#command: None
|
||||||
|
|
||||||
|
# Background opacity
|
||||||
|
#
|
||||||
|
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||||
|
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||||
|
#background_opacity: 1.0
|
||||||
|
|
||||||
|
#selection:
|
||||||
|
# This string contains all characters that are used as separators for
|
||||||
|
# "semantic words" in Alacritty.
|
||||||
|
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||||
|
|
||||||
|
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||||
|
#save_to_clipboard: false
|
||||||
|
|
||||||
|
cursor:
|
||||||
|
# Cursor style
|
||||||
|
style:
|
||||||
|
# Cursor shape
|
||||||
|
#
|
||||||
|
# Values for `shape`:
|
||||||
|
# - ▇ Block
|
||||||
|
# - _ Underline
|
||||||
|
# - | Beam
|
||||||
|
shape: Underline
|
||||||
|
|
||||||
|
# Cursor blinking state
|
||||||
|
#
|
||||||
|
# Values for `blinking`:
|
||||||
|
# - Never: Prevent the cursor from ever blinking
|
||||||
|
# - Off: Disable blinking by default
|
||||||
|
# - On: Enable blinking by default
|
||||||
|
# - Always: Force the cursor to always blink
|
||||||
|
blinking: Never
|
||||||
|
|
||||||
|
# Vi mode cursor style
|
||||||
|
#
|
||||||
|
# If the vi mode cursor style is `None` or not specified, it will fall back to
|
||||||
|
# the style of the active value of the normal cursor.
|
||||||
|
#
|
||||||
|
# See `cursor.style` for available options.
|
||||||
|
#vi_mode_style: None
|
||||||
|
|
||||||
|
# Cursor blinking interval in milliseconds.
|
||||||
|
#blink_interval: 750
|
||||||
|
|
||||||
|
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||||
|
# window is not focused.
|
||||||
|
#unfocused_hollow: true
|
||||||
|
|
||||||
|
# Thickness of the cursor relative to the cell width as floating point number
|
||||||
|
# from `0.0` to `1.0`.
|
||||||
|
#thickness: 0.15
|
||||||
|
|
||||||
|
# Live config reload (changes require restart)
|
||||||
|
#live_config_reload: true
|
||||||
|
|
||||||
|
# Shell
|
||||||
|
#
|
||||||
|
# You can set `shell.program` to the path of your favorite shell, e.g.
|
||||||
|
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
|
||||||
|
# shell.
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) /bin/bash --login
|
||||||
|
# - (Linux/BSD) user login shell
|
||||||
|
# - (Windows) powershell
|
||||||
|
#shell:
|
||||||
|
# program: /bin/bash
|
||||||
|
# args:
|
||||||
|
# - --login
|
||||||
|
|
||||||
|
# Startup directory
|
||||||
|
#
|
||||||
|
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||||
|
# directory of the parent process will be used.
|
||||||
|
#working_directory: None
|
||||||
|
|
||||||
|
# Send ESC (\x1b) before characters when alt is pressed.
|
||||||
|
#alt_send_esc: true
|
||||||
|
|
||||||
|
#mouse:
|
||||||
|
# Click settings
|
||||||
|
#
|
||||||
|
# The `double_click` and `triple_click` settings control the time
|
||||||
|
# alacritty should wait for accepting multiple clicks as one double
|
||||||
|
# or triple click.
|
||||||
|
#double_click: { threshold: 300 }
|
||||||
|
#triple_click: { threshold: 300 }
|
||||||
|
|
||||||
|
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||||
|
#hide_when_typing: false
|
||||||
|
|
||||||
|
# Regex hints
|
||||||
|
#
|
||||||
|
# Terminal hints can be used to find text in the visible part of the terminal
|
||||||
|
# and pipe it to other applications.
|
||||||
|
#hints:
|
||||||
|
# Keys used for the hint labels.
|
||||||
|
#alphabet: "jfkdls;ahgurieowpq"
|
||||||
|
|
||||||
|
# List with all available hints
|
||||||
|
#
|
||||||
|
# Each hint must have a `regex` and either an `action` or a `command` field.
|
||||||
|
# The fields `mouse`, `binding` and `post_processing` are optional.
|
||||||
|
#
|
||||||
|
# The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and
|
||||||
|
# `mouse.mods` accept the same values as they do in the `key_bindings` section.
|
||||||
|
#
|
||||||
|
# The `mouse.enabled` field controls if the hint should be underlined while
|
||||||
|
# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it.
|
||||||
|
#
|
||||||
|
# If the `post_processing` field is set to `true`, heuristics will be used to
|
||||||
|
# shorten the match if there are characters likely not to be part of the hint
|
||||||
|
# (e.g. a trailing `.`). This is most useful for URIs.
|
||||||
|
#
|
||||||
|
# Values for `action`:
|
||||||
|
# - Copy
|
||||||
|
# Copy the hint's text to the clipboard.
|
||||||
|
# - Paste
|
||||||
|
# Paste the hint's text to the terminal or search.
|
||||||
|
# - Select
|
||||||
|
# Select the hint's text.
|
||||||
|
# - MoveViModeCursor
|
||||||
|
# Move the vi mode cursor to the beginning of the hint.
|
||||||
|
#enabled:
|
||||||
|
# - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\
|
||||||
|
# [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
|
||||||
|
# command: xdg-open
|
||||||
|
# post_processing: true
|
||||||
|
# mouse:
|
||||||
|
# enabled: true
|
||||||
|
# mods: None
|
||||||
|
# binding:
|
||||||
|
# key: U
|
||||||
|
# mods: Control|Shift
|
||||||
|
|
||||||
|
# Mouse bindings
|
||||||
|
#
|
||||||
|
# Mouse bindings are specified as a list of objects, much like the key
|
||||||
|
# bindings further below.
|
||||||
|
#
|
||||||
|
# To trigger mouse bindings when an application running within Alacritty
|
||||||
|
# captures the mouse, the `Shift` modifier is automatically added as a
|
||||||
|
# requirement.
|
||||||
|
#
|
||||||
|
# Each mouse binding will specify a:
|
||||||
|
#
|
||||||
|
# - `mouse`:
|
||||||
|
#
|
||||||
|
# - Middle
|
||||||
|
# - Left
|
||||||
|
# - Right
|
||||||
|
# - Numeric identifier such as `5`
|
||||||
|
#
|
||||||
|
# - `action` (see key bindings)
|
||||||
|
#
|
||||||
|
# And optionally:
|
||||||
|
#
|
||||||
|
# - `mods` (see key bindings)
|
||||||
|
#mouse_bindings:
|
||||||
|
# - { mouse: Middle, action: PasteSelection }
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
#
|
||||||
|
# Key bindings are specified as a list of objects. For example, this is the
|
||||||
|
# default paste binding:
|
||||||
|
#
|
||||||
|
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||||
|
#
|
||||||
|
# Each key binding will specify a:
|
||||||
|
#
|
||||||
|
# - `key`: Identifier of the key pressed
|
||||||
|
#
|
||||||
|
# - A-Z
|
||||||
|
# - F1-F24
|
||||||
|
# - Key0-Key9
|
||||||
|
#
|
||||||
|
# A full list with available key codes can be found here:
|
||||||
|
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||||
|
#
|
||||||
|
# Instead of using the name of the keys, the `key` field also supports using
|
||||||
|
# the scancode of the desired key. Scancodes have to be specified as a
|
||||||
|
# decimal number. This command will allow you to display the hex scancodes
|
||||||
|
# for certain keys:
|
||||||
|
#
|
||||||
|
# `showkey --scancodes`.
|
||||||
|
#
|
||||||
|
# Then exactly one of:
|
||||||
|
#
|
||||||
|
# - `chars`: Send a byte sequence to the running application
|
||||||
|
#
|
||||||
|
# The `chars` field writes the specified string to the terminal. This makes
|
||||||
|
# it possible to pass escape sequences. To find escape codes for bindings
|
||||||
|
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||||
|
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||||
|
# to keys. It is therefore required to update the terminfo when changing an
|
||||||
|
# escape sequence.
|
||||||
|
#
|
||||||
|
# - `action`: Execute a predefined action
|
||||||
|
#
|
||||||
|
# - ToggleViMode
|
||||||
|
# - SearchForward
|
||||||
|
# Start searching toward the right of the search origin.
|
||||||
|
# - SearchBackward
|
||||||
|
# Start searching toward the left of the search origin.
|
||||||
|
# - Copy
|
||||||
|
# - Paste
|
||||||
|
# - IncreaseFontSize
|
||||||
|
# - DecreaseFontSize
|
||||||
|
# - ResetFontSize
|
||||||
|
# - ScrollPageUp
|
||||||
|
# - ScrollPageDown
|
||||||
|
# - ScrollHalfPageUp
|
||||||
|
# - ScrollHalfPageDown
|
||||||
|
# - ScrollLineUp
|
||||||
|
# - ScrollLineDown
|
||||||
|
# - ScrollToTop
|
||||||
|
# - ScrollToBottom
|
||||||
|
# - ClearHistory
|
||||||
|
# Remove the terminal's scrollback history.
|
||||||
|
# - Hide
|
||||||
|
# Hide the Alacritty window.
|
||||||
|
# - Minimize
|
||||||
|
# Minimize the Alacritty window.
|
||||||
|
# - Quit
|
||||||
|
# Quit Alacritty.
|
||||||
|
# - ToggleFullscreen
|
||||||
|
# - SpawnNewInstance
|
||||||
|
# Spawn a new instance of Alacritty.
|
||||||
|
# - ClearLogNotice
|
||||||
|
# Clear Alacritty's UI warning and error notice.
|
||||||
|
# - ClearSelection
|
||||||
|
# Remove the active selection.
|
||||||
|
# - ReceiveChar
|
||||||
|
# - None
|
||||||
|
#
|
||||||
|
# - Vi mode exclusive actions:
|
||||||
|
#
|
||||||
|
# - Open
|
||||||
|
# Perform the action of the first matching hint under the vi mode cursor
|
||||||
|
# with `mouse.enabled` set to `true`.
|
||||||
|
# - ToggleNormalSelection
|
||||||
|
# - ToggleLineSelection
|
||||||
|
# - ToggleBlockSelection
|
||||||
|
# - ToggleSemanticSelection
|
||||||
|
# Toggle semantic selection based on `selection.semantic_escape_chars`.
|
||||||
|
#
|
||||||
|
# - Vi mode exclusive cursor motion actions:
|
||||||
|
#
|
||||||
|
# - Up
|
||||||
|
# One line up.
|
||||||
|
# - Down
|
||||||
|
# One line down.
|
||||||
|
# - Left
|
||||||
|
# One character left.
|
||||||
|
# - Right
|
||||||
|
# One character right.
|
||||||
|
# - First
|
||||||
|
# First column, or beginning of the line when already at the first column.
|
||||||
|
# - Last
|
||||||
|
# Last column, or beginning of the line when already at the last column.
|
||||||
|
# - FirstOccupied
|
||||||
|
# First non-empty cell in this terminal row, or first non-empty cell of
|
||||||
|
# the line when already at the first cell of the row.
|
||||||
|
# - High
|
||||||
|
# Top of the screen.
|
||||||
|
# - Middle
|
||||||
|
# Center of the screen.
|
||||||
|
# - Low
|
||||||
|
# Bottom of the screen.
|
||||||
|
# - SemanticLeft
|
||||||
|
# Start of the previous semantically separated word.
|
||||||
|
# - SemanticRight
|
||||||
|
# Start of the next semantically separated word.
|
||||||
|
# - SemanticLeftEnd
|
||||||
|
# End of the previous semantically separated word.
|
||||||
|
# - SemanticRightEnd
|
||||||
|
# End of the next semantically separated word.
|
||||||
|
# - WordLeft
|
||||||
|
# Start of the previous whitespace separated word.
|
||||||
|
# - WordRight
|
||||||
|
# Start of the next whitespace separated word.
|
||||||
|
# - WordLeftEnd
|
||||||
|
# End of the previous whitespace separated word.
|
||||||
|
# - WordRightEnd
|
||||||
|
# End of the next whitespace separated word.
|
||||||
|
# - Bracket
|
||||||
|
# Character matching the bracket at the cursor's location.
|
||||||
|
# - SearchNext
|
||||||
|
# Beginning of the next match.
|
||||||
|
# - SearchPrevious
|
||||||
|
# Beginning of the previous match.
|
||||||
|
# - SearchStart
|
||||||
|
# Start of the match to the left of the vi mode cursor.
|
||||||
|
# - SearchEnd
|
||||||
|
# End of the match to the right of the vi mode cursor.
|
||||||
|
#
|
||||||
|
# - Search mode exclusive actions:
|
||||||
|
# - SearchFocusNext
|
||||||
|
# Move the focus to the next search match.
|
||||||
|
# - SearchFocusPrevious
|
||||||
|
# Move the focus to the previous search match.
|
||||||
|
# - SearchConfirm
|
||||||
|
# - SearchCancel
|
||||||
|
# - SearchClear
|
||||||
|
# Reset the search regex.
|
||||||
|
# - SearchDeleteWord
|
||||||
|
# Delete the last word in the search regex.
|
||||||
|
# - SearchHistoryPrevious
|
||||||
|
# Go to the previous regex in the search history.
|
||||||
|
# - SearchHistoryNext
|
||||||
|
# Go to the next regex in the search history.
|
||||||
|
#
|
||||||
|
# - macOS exclusive actions:
|
||||||
|
# - ToggleSimpleFullscreen
|
||||||
|
# Enter fullscreen without occupying another space.
|
||||||
|
#
|
||||||
|
# - Linux/BSD exclusive actions:
|
||||||
|
#
|
||||||
|
# - CopySelection
|
||||||
|
# Copy from the selection buffer.
|
||||||
|
# - PasteSelection
|
||||||
|
# Paste from the selection buffer.
|
||||||
|
#
|
||||||
|
# - `command`: Fork and execute a specified command plus arguments
|
||||||
|
#
|
||||||
|
# The `command` field must be a map containing a `program` string and an
|
||||||
|
# `args` array of command line parameter strings. For example:
|
||||||
|
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||||
|
#
|
||||||
|
# And optionally:
|
||||||
|
#
|
||||||
|
# - `mods`: Key modifiers to filter binding actions
|
||||||
|
#
|
||||||
|
# - Command
|
||||||
|
# - Control
|
||||||
|
# - Option
|
||||||
|
# - Super
|
||||||
|
# - Shift
|
||||||
|
# - Alt
|
||||||
|
#
|
||||||
|
# Multiple `mods` can be combined using `|` like this:
|
||||||
|
# `mods: Control|Shift`.
|
||||||
|
# Whitespace and capitalization are relevant and must match the example.
|
||||||
|
#
|
||||||
|
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||||
|
#
|
||||||
|
# This is mainly used to send applications the correct escape sequences
|
||||||
|
# when in different modes.
|
||||||
|
#
|
||||||
|
# - AppCursor
|
||||||
|
# - AppKeypad
|
||||||
|
# - Search
|
||||||
|
# - Alt
|
||||||
|
# - Vi
|
||||||
|
#
|
||||||
|
# A `~` operator can be used before a mode to apply the binding whenever
|
||||||
|
# the mode is *not* active, e.g. `~Alt`.
|
||||||
|
#
|
||||||
|
# Bindings are always filled by default, but will be replaced when a new
|
||||||
|
# binding with the same triggers is defined. To unset a default binding, it can
|
||||||
|
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||||
|
# a no-op if you do not wish to receive input characters for that binding.
|
||||||
|
#
|
||||||
|
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||||
|
# in the order they were defined in.
|
||||||
|
#key_bindings:
|
||||||
|
#- { key: Paste, action: Paste }
|
||||||
|
#- { key: Copy, action: Copy }
|
||||||
|
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||||
|
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
|
||||||
|
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
|
||||||
|
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
||||||
|
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
|
||||||
|
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
||||||
|
|
||||||
|
# Vi Mode
|
||||||
|
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
|
||||||
|
#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
|
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
||||||
|
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
|
||||||
|
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
|
#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
|
||||||
|
#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
|
||||||
|
#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
|
||||||
|
#- { key: G, mode: Vi|~Search, action: ScrollToTop }
|
||||||
|
#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
|
#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
|
||||||
|
#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
|
||||||
|
#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
|
||||||
|
#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
|
||||||
|
#- { key: Y, mode: Vi|~Search, action: Copy }
|
||||||
|
#- { key: Y, mode: Vi|~Search, action: ClearSelection }
|
||||||
|
#- { key: Copy, mode: Vi|~Search, action: ClearSelection }
|
||||||
|
#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
|
||||||
|
#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
|
||||||
|
#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
|
||||||
|
#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
|
||||||
|
#- { key: Return, mode: Vi|~Search, action: Open }
|
||||||
|
#- { key: K, mode: Vi|~Search, action: Up }
|
||||||
|
#- { key: J, mode: Vi|~Search, action: Down }
|
||||||
|
#- { key: H, mode: Vi|~Search, action: Left }
|
||||||
|
#- { key: L, mode: Vi|~Search, action: Right }
|
||||||
|
#- { key: Up, mode: Vi|~Search, action: Up }
|
||||||
|
#- { key: Down, mode: Vi|~Search, action: Down }
|
||||||
|
#- { key: Left, mode: Vi|~Search, action: Left }
|
||||||
|
#- { key: Right, mode: Vi|~Search, action: Right }
|
||||||
|
#- { key: Key0, mode: Vi|~Search, action: First }
|
||||||
|
#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
|
||||||
|
#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
|
||||||
|
#- { key: H, mods: Shift, mode: Vi|~Search, action: High }
|
||||||
|
#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
|
||||||
|
#- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
|
||||||
|
#- { key: B, mode: Vi|~Search, action: SemanticLeft }
|
||||||
|
#- { key: W, mode: Vi|~Search, action: SemanticRight }
|
||||||
|
#- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
|
||||||
|
#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
|
||||||
|
#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
|
||||||
|
#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
|
||||||
|
#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
|
||||||
|
#- { key: Slash, mode: Vi|~Search, action: SearchForward }
|
||||||
|
#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
|
||||||
|
#- { key: N, mode: Vi|~Search, action: SearchNext }
|
||||||
|
#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
|
||||||
|
|
||||||
|
# Search Mode
|
||||||
|
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
|
||||||
|
#- { key: Escape, mode: Search, action: SearchCancel }
|
||||||
|
#- { key: C, mods: Control, mode: Search, action: SearchCancel }
|
||||||
|
#- { key: U, mods: Control, mode: Search, action: SearchClear }
|
||||||
|
#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord }
|
||||||
|
#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious }
|
||||||
|
#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext }
|
||||||
|
#- { key: Up, mode: Search, action: SearchHistoryPrevious }
|
||||||
|
#- { key: Down, mode: Search, action: SearchHistoryNext }
|
||||||
|
#- { key: Return, mode: Search|~Vi, action: SearchFocusNext }
|
||||||
|
#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious }
|
||||||
|
|
||||||
|
# (Windows, Linux, and BSD only)
|
||||||
|
#- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste }
|
||||||
|
#- { key: C, mods: Control|Shift, action: Copy }
|
||||||
|
#- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward }
|
||||||
|
#- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward }
|
||||||
|
#- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection }
|
||||||
|
#- { key: Insert, mods: Shift, action: PasteSelection }
|
||||||
|
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||||
|
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||||
|
#- { key: Plus, mods: Control, action: IncreaseFontSize }
|
||||||
|
#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize }
|
||||||
|
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||||
|
#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize }
|
||||||
|
|
||||||
|
# (Windows only)
|
||||||
|
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||||
|
|
||||||
|
# (macOS only)
|
||||||
|
#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" }
|
||||||
|
#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory }
|
||||||
|
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||||
|
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: Plus, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||||
|
#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize }
|
||||||
|
#- { key: V, mods: Command, action: Paste }
|
||||||
|
#- { key: C, mods: Command, action: Copy }
|
||||||
|
#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection }
|
||||||
|
#- { key: H, mods: Command, action: Hide }
|
||||||
|
#- { key: H, mods: Command|Alt, action: HideOtherApplications }
|
||||||
|
#- { key: M, mods: Command, action: Minimize }
|
||||||
|
#- { key: Q, mods: Command, action: Quit }
|
||||||
|
#- { key: W, mods: Command, action: Quit }
|
||||||
|
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||||
|
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||||
|
#- { key: F, mods: Command, mode: ~Search, action: SearchForward }
|
||||||
|
#- { key: B, mods: Command, mode: ~Search, action: SearchBackward }
|
||||||
|
|
||||||
|
#debug:
|
||||||
|
# Display the time it takes to redraw each frame.
|
||||||
|
#render_timer: false
|
||||||
|
|
||||||
|
# Keep the log file after quitting Alacritty.
|
||||||
|
#persistent_logging: false
|
||||||
|
|
||||||
|
# Log level
|
||||||
|
#
|
||||||
|
# Values for `log_level`:
|
||||||
|
# - Off
|
||||||
|
# - Error
|
||||||
|
# - Warn
|
||||||
|
# - Info
|
||||||
|
# - Debug
|
||||||
|
# - Trace
|
||||||
|
#log_level: Warn
|
||||||
|
|
||||||
|
# Print all received window events.
|
||||||
|
#print_events: false
|
37
home/private_dot_config/alacritty/catppuccin.yml
Normal file
37
home/private_dot_config/alacritty/catppuccin.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# Catppuccin!
|
||||||
|
colors:
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
background: '0x1E1D2F'
|
||||||
|
foreground: '0xD9E0EE'
|
||||||
|
|
||||||
|
# Colors the cursor will use if `custom_cursor_colors` is true
|
||||||
|
cursor:
|
||||||
|
text: '0x1E1D2F'
|
||||||
|
cursor: '0xF5E0DC'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '0x6E6C7E'
|
||||||
|
red: '0xF28FAD'
|
||||||
|
green: '0xABE9B3'
|
||||||
|
yellow: '0xFAE3B0'
|
||||||
|
blue: '0x96CDFB'
|
||||||
|
magenta: '0xF5C2E7'
|
||||||
|
cyan: '0x89DCEB'
|
||||||
|
white: '0xD9E0EE'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '0x988BA2'
|
||||||
|
red: '0xF28FAD'
|
||||||
|
green: '0xABE9B3'
|
||||||
|
yellow: '0xFAE3B0'
|
||||||
|
blue: '0x96CDFB'
|
||||||
|
magenta: '0xF5C2E7'
|
||||||
|
cyan: '0x89DCEB'
|
||||||
|
white: '0xD9E0EE'
|
||||||
|
|
||||||
|
indexed_colors:
|
||||||
|
- { index: 16, color: '0xF8BD96' }
|
||||||
|
- { index: 17, color: '0xF5E0DC' }
|
53
home/private_dot_config/alacritty/dracula-pro.yml
Normal file
53
home/private_dot_config/alacritty/dracula-pro.yml
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# Colors (Dracula PRO)
|
||||||
|
colors:
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
background: '0x22212c'
|
||||||
|
foreground: '0xf8f8f2'
|
||||||
|
|
||||||
|
# Bright and dim foreground colors
|
||||||
|
#
|
||||||
|
# The dimmed foreground color is calculated automatically if it is not present.
|
||||||
|
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
|
||||||
|
# is `false`, the normal foreground color will be used.
|
||||||
|
#dim_foreground: '0x9a9a9a'
|
||||||
|
#bright_foreground: '0xffffff'
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
#
|
||||||
|
# Colors which should be used to draw the terminal cursor. If these are unset,
|
||||||
|
# the cursor color will be the inverse of the cell color.
|
||||||
|
cursor:
|
||||||
|
text: '0x454158'
|
||||||
|
cursor: '0xf8f8f2'
|
||||||
|
|
||||||
|
# Selection colors
|
||||||
|
#
|
||||||
|
# Colors which should be used to draw the selection area. If selection
|
||||||
|
# background is unset, selection color will be the inverse of the cell colors.
|
||||||
|
# If only text is unset the cell text color will remain the same.
|
||||||
|
selection:
|
||||||
|
text: '0xf8f8f2'
|
||||||
|
background: '0x454158'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '0x22212c'
|
||||||
|
red: '0xff9580'
|
||||||
|
green: '0x8aff80'
|
||||||
|
yellow: '0xffff80'
|
||||||
|
blue: '0x9580ff'
|
||||||
|
magenta: '0xff80bf'
|
||||||
|
cyan: '0x80ffea'
|
||||||
|
white: '0xf8f8f2'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '0x22212c'
|
||||||
|
red: '0xffaa99'
|
||||||
|
green: '0xa2ff99'
|
||||||
|
yellow: '0xffff99'
|
||||||
|
blue: '0xaa99ff'
|
||||||
|
magenta: '0xff99cc'
|
||||||
|
cyan: '0x99ffee'
|
||||||
|
white: '0xffffff'
|
61
home/private_dot_config/alacritty/dracula.yml
Normal file
61
home/private_dot_config/alacritty/dracula.yml
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# Dracula theme for Alacritty
|
||||||
|
# https://draculatheme.com/alacritty
|
||||||
|
#
|
||||||
|
# Color palette
|
||||||
|
# https://spec.draculatheme.com
|
||||||
|
#
|
||||||
|
# Template
|
||||||
|
# https://github.com/alacritty/alacritty/blob/master/alacritty.yml
|
||||||
|
|
||||||
|
colors:
|
||||||
|
primary:
|
||||||
|
background: '#282a36'
|
||||||
|
foreground: '#f8f8f2'
|
||||||
|
bright_foreground: '#ffffff'
|
||||||
|
cursor:
|
||||||
|
text: CellBackground
|
||||||
|
cursor: CellForeground
|
||||||
|
vi_mode_cursor:
|
||||||
|
text: CellBackground
|
||||||
|
cursor: CellForeground
|
||||||
|
search:
|
||||||
|
matches:
|
||||||
|
foreground: '#44475a'
|
||||||
|
background: '#50fa7b'
|
||||||
|
focused_match:
|
||||||
|
foreground: '#44475a'
|
||||||
|
background: '#ffb86c'
|
||||||
|
bar:
|
||||||
|
background: '#282a36'
|
||||||
|
foreground: '#f8f8f2'
|
||||||
|
hints:
|
||||||
|
start:
|
||||||
|
foreground: '#282a36'
|
||||||
|
background: '#f1fa8c'
|
||||||
|
end:
|
||||||
|
foreground: '#f1fa8c'
|
||||||
|
background: '#282a36'
|
||||||
|
line_indicator:
|
||||||
|
foreground: None
|
||||||
|
background: None
|
||||||
|
selection:
|
||||||
|
text: CellForeground
|
||||||
|
background: '#44475a'
|
||||||
|
normal:
|
||||||
|
black: '#21222c'
|
||||||
|
red: '#ff5555'
|
||||||
|
green: '#50fa7b'
|
||||||
|
yellow: '#f1fa8c'
|
||||||
|
blue: '#bd93f9'
|
||||||
|
magenta: '#ff79c6'
|
||||||
|
cyan: '#8be9fd'
|
||||||
|
white: '#f8f8f2'
|
||||||
|
bright:
|
||||||
|
black: '#6272a4'
|
||||||
|
red: '#ff6e6e'
|
||||||
|
green: '#69ff94'
|
||||||
|
yellow: '#ffffa5'
|
||||||
|
blue: '#d6acff'
|
||||||
|
magenta: '#ff92df'
|
||||||
|
cyan: '#a4ffff'
|
||||||
|
white: '#ffffff'
|
9
home/private_dot_config/alacritty/update.sh
Normal file
9
home/private_dot_config/alacritty/update.sh
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# run this from within WSL
|
||||||
|
|
||||||
|
files=(alacritty.yml dracula.yml dracula-pro.yml)
|
||||||
|
|
||||||
|
for file in "${files[@]}"; do
|
||||||
|
cp -v $DOTFILES_DIR/config/alacritty/$file /mnt/c/Users/daylin/AppData/Roaming/alacritty/$file
|
||||||
|
done
|
11
home/private_dot_config/autorandr/executable_postswitch
Normal file
11
home/private_dot_config/autorandr/executable_postswitch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ -n $SKIP_WM_RESET ]]; then
|
||||||
|
notify-send 'autorandr' '\nmonitor change detected\nskipping WM reset'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# WM Agnostic
|
||||||
|
notify-send 'autorandr' '\nmonitor change detected\nresetting WM'
|
||||||
|
sleep 3
|
||||||
|
xdotool key Shift_L+Super_L+R
|
960
home/private_dot_config/bat/themes/catppuccin/Catppuccin.tmTheme
Normal file
960
home/private_dot_config/bat/themes/catppuccin/Catppuccin.tmTheme
Normal file
|
@ -0,0 +1,960 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Catppuccin</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#d9e0ee</string>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#1e1e2e</string>
|
||||||
|
<key>caret</key>
|
||||||
|
<string>#d9e0ec</string>
|
||||||
|
<key>invisibles</key>
|
||||||
|
<string>#c3bac6</string>
|
||||||
|
<key>gutterForeground</key>
|
||||||
|
<string>#988ba2</string>
|
||||||
|
<key>gutterForegroundHighlight</key>
|
||||||
|
<string>#abe9b3</string>
|
||||||
|
<key>lineHighlight</key>
|
||||||
|
<string>#1e1e2e</string>
|
||||||
|
<key>selection</key>
|
||||||
|
<string>#6e6c7e</string>
|
||||||
|
<key>selectionBorder</key>
|
||||||
|
<string>#1e1e2e</string>
|
||||||
|
<key>activeGuide</key>
|
||||||
|
<string>#f8bd96</string>
|
||||||
|
<key>findHighlightForeground</key>
|
||||||
|
<string>#161320</string>
|
||||||
|
<key>findHighlight</key>
|
||||||
|
<string>#fae3b0</string>
|
||||||
|
<key>bracketsForeground</key>
|
||||||
|
<string>#988ba2</string>
|
||||||
|
<key>bracketContentsForeground</key>
|
||||||
|
<string>#988ba2</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Comment</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>comment</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#6e6c7e</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>String</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>string</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#abe9b3</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>String regex</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>string.regexp</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f8bd96</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Number</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant.numeric</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f8bd96</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant.language.boolean</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f8bd96</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>bold italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Built-in constant</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant.language</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#c9cbff</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Built-in function</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.function.builtin</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f8bd96</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>User-defined constant</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.other.constant</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f8bd96</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Variable</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Keyword</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Conditional/loop</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.control.loop, keyword.control.conditional, keyword.control.c++</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#ddb6f2</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>bold</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Return</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.control.return, keyword.control.flow.return</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5c2e7</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>bold</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Exception</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.type.exception</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f8bd96</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Operator</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.operator, punctuation.accessor</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#89dceb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>bold</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Punctuation separator</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>punctuation.separator</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Punctuation terminator</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>punctuation.terminator</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Punctuation bracket</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>punctuation.section</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#988ba2</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Include</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.control.import.include</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Storage</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>storage</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Storage type</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>storage.type</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#fae3b0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Storage modifier</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>storage.modifier</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Storage type namespace</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.namespace, meta.path</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5e0dc</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Storage type class</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>storage.type.class</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5e0dc</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Label</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.label</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#96cdfb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Keyword class</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.declaration.class</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Class name</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.class, meta.toc-list.full-identifier</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#89dceb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Inherited class</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.other.inherited-class</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#89dceb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Function name</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.function, variable.function</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#96cdfb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Function macro</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.function.preprocessor</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Macro directive - ifdef</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.control.import</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Constructor</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.function.constructor, entity.name.function.destructor</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#c9cbff</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Function argument</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.parameter.function</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5e0dc</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Function declaration</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>keyword.declaration.function</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#e8a2af</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Library function</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.function</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#89dceb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Library constant</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.constant</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#96cdfb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Library class/type</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.type, support.class</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#96cdfb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Library variable</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.other.variable</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Variable function</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.function</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#96cdfb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Variable parameter</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.parameter</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5e0dc</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Variable other</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.other</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#d9e0ee</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Variable field</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.other.member</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5e0dc</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Variable language</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.language</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Tag name</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.tag</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f8bd96</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Tag attribute</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.other.attribute-name</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#ddb6f2</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Tag delimiter</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>punctuation.definition.tag</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#e8a2af</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Markdown URL</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.underline.link.markdown</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5e0dc</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic underline</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Markdown reference</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>meta.link.inline.description</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#c9cbff</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>bold</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Markdown literal</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>comment.block.markdown, meta.code-fence, markup.raw.code-fence, markup.raw.inline</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Markdown title</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>punctuation.definition.heading, entity.name.section</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#96cdfb</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>bold</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Markdown emphasis</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.italic</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#e8a2af</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Markdown strong</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.bold</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#e8a2af</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>bold</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Escape</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant.character.escape</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5c2e7</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Bash built-in function</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.shell.bash meta.function.shell meta.compound.shell meta.function-call.identifier.shell</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f5c2e7</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Bash parameter</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.language.shell</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Lua field</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.lua meta.function.lua meta.block.lua meta.mapping.value.lua meta.mapping.key.lua string.unquoted.key.lua</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#c9cbff</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Lua constructor</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.lua meta.function.lua meta.block.lua meta.mapping.key.lua string.unquoted.key.lua</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f2cdcd</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Java constant</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.constant.java</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>CSS property</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.type.property-name.css</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f2cdcd</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>CSS constant</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>support.constant.property-value.css</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#d9e0ee</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>CSS suffix</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>constant.numeric.suffix.css, keyword.other.unit.css</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string>italic</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>CSS variable property</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.other.custom-property.name.css, support.type.custom-property.name.css, punctuation.definition.custom-property.css</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>SCSS tag</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>entity.name.tag.css</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#c9cbff</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>SASS variable</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>variable.other.sass</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#b5e8e0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Invalid</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>invalid</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#d9e0ee</string>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Invalid deprecated</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>invalid.deprecated</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#d9e0ee</string>
|
||||||
|
<key>background</key>
|
||||||
|
<string>#ddb6f2</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Diff header</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>meta.diff, meta.diff.header</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#6e6c7e</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Diff deleted</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.deleted</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Diff inserted</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.inserted</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#abe9b3</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Diff changed</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>markup.changed</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#fae3b0</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Message error</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>message.error</string>
|
||||||
|
<key>settings</key>
|
||||||
|
<dict>
|
||||||
|
<key>foreground</key>
|
||||||
|
<string>#f28fad</string>
|
||||||
|
<key>fontStyle</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>4d0379b5-ef82-467b-b8b8-365889420646</string>
|
||||||
|
<key>colorSpaceName</key>
|
||||||
|
<string>sRGB</string>
|
||||||
|
<key>semanticClass</key>
|
||||||
|
<string>theme.dark.Catppuccin</string>
|
||||||
|
<key>author</key>
|
||||||
|
<string>BrunDerSchwarzmagier</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
161
home/private_dot_config/bottom/bottom.toml
Normal file
161
home/private_dot_config/bottom/bottom.toml
Normal file
|
@ -0,0 +1,161 @@
|
||||||
|
# This is a default config file for bottom. All of the settings are commented
|
||||||
|
# out by default; if you wish to change them uncomment and modify as you see
|
||||||
|
# fit.
|
||||||
|
|
||||||
|
# This group of options represents a command-line flag/option. Flags explicitly
|
||||||
|
# added when running (ie: btm -a) will override this config file if an option
|
||||||
|
# is also set here.
|
||||||
|
|
||||||
|
[flags]
|
||||||
|
# Whether to hide the average cpu entry.
|
||||||
|
#hide_avg_cpu = false
|
||||||
|
# Whether to use dot markers rather than braille.
|
||||||
|
#dot_marker = false
|
||||||
|
# The update rate of the application.
|
||||||
|
rate = 250
|
||||||
|
# Whether to put the CPU legend to the left.
|
||||||
|
#left_legend = false
|
||||||
|
# Whether to set CPU% on a process to be based on the total CPU or just current usage.
|
||||||
|
#current_usage = false
|
||||||
|
# Whether to group processes with the same name together by default.
|
||||||
|
#group_processes = false
|
||||||
|
# Whether to make process searching case sensitive by default.
|
||||||
|
#case_sensitive = false
|
||||||
|
# Whether to make process searching look for matching the entire word by default.
|
||||||
|
#whole_word = false
|
||||||
|
# Whether to make process searching use regex by default.
|
||||||
|
#regex = false
|
||||||
|
# Defaults to Celsius. Temperature is one of:
|
||||||
|
#temperature_type = "k"
|
||||||
|
#temperature_type = "f"
|
||||||
|
#temperature_type = "c"
|
||||||
|
#temperature_type = "kelvin"
|
||||||
|
#temperature_type = "fahrenheit"
|
||||||
|
#temperature_type = "celsius"
|
||||||
|
# The default time interval (in milliseconds).
|
||||||
|
#default_time_value = 60000
|
||||||
|
# The time delta on each zoom in/out action (in milliseconds).
|
||||||
|
#time_delta = 15000
|
||||||
|
# Hides the time scale.
|
||||||
|
#hide_time = false
|
||||||
|
# Override layout default widget
|
||||||
|
#default_widget_type = "proc"
|
||||||
|
#default_widget_count = 1
|
||||||
|
# Use basic mode
|
||||||
|
#basic = false
|
||||||
|
# Use the old network legend style
|
||||||
|
#use_old_network_legend = false
|
||||||
|
# Remove space in tables
|
||||||
|
#hide_table_gap = false
|
||||||
|
# Show the battery widgets
|
||||||
|
#battery = false
|
||||||
|
# Disable mouse clicks
|
||||||
|
#disable_click = false
|
||||||
|
# Built-in themes. Valid values are "default", "default-light", "gruvbox", "gruvbox-light", "nord", "nord-light"
|
||||||
|
#color = "default"
|
||||||
|
# Show memory values in the processes widget as values by default
|
||||||
|
#mem_as_value = false
|
||||||
|
# Show tree mode by default in the processes widget.
|
||||||
|
#tree = false
|
||||||
|
# Shows an indicator in table widgets tracking where in the list you are.
|
||||||
|
#show_table_scroll_position = false
|
||||||
|
# Show processes as their commands by default in the process widget.
|
||||||
|
process_command = true
|
||||||
|
# Displays the network widget with binary prefixes.
|
||||||
|
#network_use_binary_prefix = false
|
||||||
|
# Displays the network widget using bytes.
|
||||||
|
#network_use_bytes = false
|
||||||
|
# Displays the network widget with a log scale.
|
||||||
|
#network_use_log = false
|
||||||
|
# Hides advanced options to stop a process on Unix-like systems.
|
||||||
|
#disable_advanced_kill = false
|
||||||
|
|
||||||
|
# These are all the components that support custom theming. Note that colour support
|
||||||
|
# will depend on terminal support.
|
||||||
|
|
||||||
|
#[colors] # Uncomment if you want to use custom colors
|
||||||
|
# Represents the colour of table headers (processes, CPU, disks, temperature).
|
||||||
|
#table_header_color="LightBlue"
|
||||||
|
# Represents the colour of the label each widget has.
|
||||||
|
#widget_title_color="Gray"
|
||||||
|
# Represents the average CPU color.
|
||||||
|
#avg_cpu_color="Red"
|
||||||
|
# Represents the colour the core will use in the CPU legend and graph.
|
||||||
|
#cpu_core_colors=["LightMagenta", "LightYellow", "LightCyan", "LightGreen", "LightBlue", "LightRed", "Cyan", "Green", "Blue", "Red"]
|
||||||
|
# Represents the colour RAM will use in the memory legend and graph.
|
||||||
|
#ram_color="LightMagenta"
|
||||||
|
# Represents the colour SWAP will use in the memory legend and graph.
|
||||||
|
#swap_color="LightYellow"
|
||||||
|
# Represents the colour rx will use in the network legend and graph.
|
||||||
|
#rx_color="LightCyan"
|
||||||
|
# Represents the colour tx will use in the network legend and graph.
|
||||||
|
#tx_color="LightGreen"
|
||||||
|
# Represents the colour of the border of unselected widgets.
|
||||||
|
#border_color="Gray"
|
||||||
|
# Represents the colour of the border of selected widgets.
|
||||||
|
#highlighted_border_color="LightBlue"
|
||||||
|
# Represents the colour of most text.
|
||||||
|
#text_color="Gray"
|
||||||
|
# Represents the colour of text that is selected.
|
||||||
|
#selected_text_color="Black"
|
||||||
|
# Represents the background colour of text that is selected.
|
||||||
|
#selected_bg_color="LightBlue"
|
||||||
|
# Represents the colour of the lines and text of the graph.
|
||||||
|
#graph_color="Gray"
|
||||||
|
# Represents the colours of the battery based on charge
|
||||||
|
#high_battery_color="green"
|
||||||
|
#medium_battery_color="yellow"
|
||||||
|
#low_battery_color="red"
|
||||||
|
|
||||||
|
# Layout - layouts follow a pattern like this:
|
||||||
|
# [[row]] represents a row in the application.
|
||||||
|
# [[row.child]] represents either a widget or a column.
|
||||||
|
# [[row.child.child]] represents a widget.
|
||||||
|
#
|
||||||
|
# All widgets must have the type value set to one of ["cpu", "mem", "proc", "net", "temp", "disk", "empty"].
|
||||||
|
# All layout components have a ratio value - if this is not set, then it defaults to 1.
|
||||||
|
# The default widget layout:
|
||||||
|
[[row]]
|
||||||
|
ratio=25
|
||||||
|
[[row.child]]
|
||||||
|
ratio=6
|
||||||
|
type="cpu"
|
||||||
|
[[row.child]]
|
||||||
|
ratio=4
|
||||||
|
type="mem"
|
||||||
|
[[row]]
|
||||||
|
ratio=75
|
||||||
|
[[row.child]]
|
||||||
|
type="proc"
|
||||||
|
default=true
|
||||||
|
|
||||||
|
|
||||||
|
# Filters - you can hide specific temperature sensors, network interfaces, and disks using filters. This is admittedly
|
||||||
|
# a bit hard to use as of now, and there is a planned in-app interface for managing this in the future:
|
||||||
|
#[disk_filter]
|
||||||
|
#is_list_ignored = true
|
||||||
|
#list = ["/dev/sda\\d+", "/dev/nvme0n1p2"]
|
||||||
|
#regex = true
|
||||||
|
#case_sensitive = false
|
||||||
|
#whole_word = false
|
||||||
|
|
||||||
|
#[mount_filter]
|
||||||
|
#is_list_ignored = true
|
||||||
|
#list = ["/mnt/.*", "/boot"]
|
||||||
|
#regex = true
|
||||||
|
#case_sensitive = false
|
||||||
|
#whole_word = false
|
||||||
|
|
||||||
|
#[temp_filter]
|
||||||
|
#is_list_ignored = true
|
||||||
|
#list = ["cpu", "wifi"]
|
||||||
|
#regex = false
|
||||||
|
#case_sensitive = false
|
||||||
|
#whole_word = false
|
||||||
|
|
||||||
|
#[net_filter]
|
||||||
|
#is_list_ignored = true
|
||||||
|
#list = ["virbr0.*"]
|
||||||
|
#regex = true
|
||||||
|
#case_sensitive = false
|
||||||
|
#whole_word = false
|
1
home/private_dot_config/conda/condarc
Normal file
1
home/private_dot_config/conda/condarc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
changeps1: False
|
40
home/private_dot_config/git/config
Normal file
40
home/private_dot_config/git/config
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
[credential]
|
||||||
|
helper = cache
|
||||||
|
[core]
|
||||||
|
excludesfile = /home/daylin/.config/git/ignore
|
||||||
|
[user]
|
||||||
|
name = Daylin Morgan
|
||||||
|
email = daylinmorgan@gmail.com
|
||||||
|
[submodule]
|
||||||
|
recurse = true
|
||||||
|
[pull]
|
||||||
|
rebase = true
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
[branch]
|
||||||
|
autosetuprebase = always
|
||||||
|
[alias]
|
||||||
|
adog = log --all --decorate --oneline --graph
|
||||||
|
gl = config --global -l
|
||||||
|
last = log -1 HEAD --stat
|
||||||
|
ll = log --oneline
|
||||||
|
st = status -sb
|
||||||
|
|
||||||
|
s = status -s
|
||||||
|
co = checkout
|
||||||
|
cob = checkout -b
|
||||||
|
|
||||||
|
cmt = !git commit -m \"time: $(date +\"%Y.%m.%d %H:%M:%S\")\"
|
||||||
|
save = !git add -A && git commit -m \"time: $(date +\"%Y.%m.%d %H:%M:%S\")\"
|
||||||
|
|
||||||
|
# list aliases
|
||||||
|
la = "!git config -l | grep alias | cut -c 7-"
|
||||||
|
test = !git add -A && git commit -m \"$(date)\"
|
||||||
|
root = rev-parse --show-toplevel
|
||||||
|
[filter "lfs"]
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
process = git-lfs filter-process
|
||||||
|
required = true
|
||||||
|
[help]
|
||||||
|
autocorrect = 20
|
2
home/private_dot_config/git/ignore
Normal file
2
home/private_dot_config/git/ignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.vscode/
|
||||||
|
tmp/
|
9
home/private_dot_config/lazygit/config.yml
Normal file
9
home/private_dot_config/lazygit/config.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
gui:
|
||||||
|
theme:
|
||||||
|
selectedLineBgColor:
|
||||||
|
- reverse
|
||||||
|
selectedRangeBgColor:
|
||||||
|
- reverse
|
||||||
|
showFileTree: true
|
||||||
|
git:
|
||||||
|
branchLogCmd: 'git log --graph --all --color=always --decorate --date=relative --oneline'
|
364
home/private_dot_config/leftwm/config.toml
Normal file
364
home/private_dot_config/leftwm/config.toml
Normal file
|
@ -0,0 +1,364 @@
|
||||||
|
modkey = "Mod4"
|
||||||
|
mousekey = "Mod4"
|
||||||
|
workspaces = []
|
||||||
|
tags = ["1", "2", "3", "4", "5", "6", "7", "8"]
|
||||||
|
layouts = ["MainAndVertStack", "Monocle", "EvenVertical", "CenterMainBalanced"]
|
||||||
|
layout_mode = "Workspace"
|
||||||
|
disable_current_tag_swap = false
|
||||||
|
focus_behaviour = "Sloppy"
|
||||||
|
focus_new_windows = true
|
||||||
|
|
||||||
|
window_rules = [
|
||||||
|
{window_class = "wavebox", spawn_on_tag = 8}
|
||||||
|
]
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Program Specific Settings
|
||||||
|
#####################################
|
||||||
|
# ------
|
||||||
|
# Rofi
|
||||||
|
# ------
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "~/.config/leftwm/themes/current/rofi/bin/launcher.sh"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "p"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "~/.config/leftwm/themes/current/rofi/bin/powermenu.sh"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "p"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "~/.config/leftwm/themes/current/rofi/bin/keymap.sh"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "k"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "~/.config/leftwm/themes/current/rofi/bin/bluetooth.sh"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "b"
|
||||||
|
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "thunar"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "e"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "alacritty"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "Return"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "~/bin/lock"
|
||||||
|
modifier = ["modkey", "Control"]
|
||||||
|
key = "l"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "flameshot gui"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "s"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "flameshot screen -n 0"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "s"
|
||||||
|
|
||||||
|
[[scratchpad]]
|
||||||
|
name = "Alacritty" # This is the name which is referenced when calling (case-sensitive)
|
||||||
|
value = "alacritty" # The command to load the application if it isn't started
|
||||||
|
# x, y, width, height are in pixels when an integer is inputted or a percentage when a float is inputted.
|
||||||
|
# These values are relative to the size of the workspace, and will be restricted depending on the workspace size.
|
||||||
|
x = 0.1
|
||||||
|
y = 0.1
|
||||||
|
height = 0.8
|
||||||
|
width = 0.8
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "ToggleScratchPad"
|
||||||
|
value = "Alacritty"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "t"
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# LeftWM Keybindings
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "CloseWindow"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "q"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "SoftReload"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "r"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "loginctl kill-session $XDG_SESSION_ID"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "x"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToLastWorkspace"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "w"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "SwapTags"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "w"
|
||||||
|
|
||||||
|
# [[keybind]]
|
||||||
|
# command = "MoveWindowUp"
|
||||||
|
# modifier = ["modkey", "Shift"]
|
||||||
|
# key = "k"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveWindowDown"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "j"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveWindowTop"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "Return"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "FocusWindowUp"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "k"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "FocusWindowDown"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "j"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "NextLayout"
|
||||||
|
modifier = ["modkey", "Control"]
|
||||||
|
key = "k"
|
||||||
|
|
||||||
|
#[[keybind]]
|
||||||
|
#command = "PreviousLayout"
|
||||||
|
#modifier = ["modkey", "Control"]
|
||||||
|
#key = "j"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "FocusWorkspaceNext"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "l"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "FocusWorkspacePrevious"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "h"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveWindowUp"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "Up"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveWindowDown"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "Down"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "FocusWindowUp"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "Up"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "FocusWindowDown"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "Down"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "NextLayout"
|
||||||
|
modifier = ["modkey", "Control"]
|
||||||
|
key = "Up"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "PreviousLayout"
|
||||||
|
modifier = ["modkey", "Control"]
|
||||||
|
key = "Down"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "FocusWorkspaceNext"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "Right"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "FocusWorkspacePrevious"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "Left"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "1"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "1"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "2"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "2"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "3"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "3"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "4"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "4"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "5"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "5"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "6"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "6"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "7"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "7"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "8"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "8"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "GotoTag"
|
||||||
|
value = "9"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "9"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "1"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "1"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "2"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "2"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "3"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "3"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "4"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "4"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "5"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "5"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "6"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "6"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "7"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "7"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "8"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "8"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "MoveToTag"
|
||||||
|
value = "9"
|
||||||
|
modifier = ["modkey", "Shift"]
|
||||||
|
key = "9"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "IncreaseMainWidth"
|
||||||
|
value = "5"
|
||||||
|
modifier = ["modkey", "Control"]
|
||||||
|
key = "j"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "DecreaseMainWidth"
|
||||||
|
value = "5"
|
||||||
|
modifier = ["modkey", "Control"]
|
||||||
|
key = "h"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "ToggleFullScreen"
|
||||||
|
modifier = ["modkey"]
|
||||||
|
key = "f"
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# System Specific Settings
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "amixer set 'Master' 10%-"
|
||||||
|
modifier = []
|
||||||
|
key = "XF86XK_AudioLowerVolume"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "amixer set 'Master' 10%+"
|
||||||
|
modifier = []
|
||||||
|
key = "XF86XK_AudioRaiseVolume"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "amixer sset 'Master' toggle"
|
||||||
|
modifier = []
|
||||||
|
key = "XF86XK_AudioMute"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "light -A 5"
|
||||||
|
modifier = []
|
||||||
|
key = "XF86XK_MonBrightnessUp"
|
||||||
|
|
||||||
|
[[keybind]]
|
||||||
|
command = "Execute"
|
||||||
|
value = "light -U 5"
|
||||||
|
modifier = []
|
||||||
|
key = "XF86XK_MonBrightnessDown"
|
29
home/private_dot_config/lf/lfcd.sh
Normal file
29
home/private_dot_config/lf/lfcd.sh
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Change working dir in shell to last dir in lf on exit (adapted from ranger).
|
||||||
|
#
|
||||||
|
# You need to either copy the content of this file to your shell rc file
|
||||||
|
# (e.g. ~/.bashrc) or source this file directly:
|
||||||
|
#
|
||||||
|
# LFCD="/path/to/lfcd.sh"
|
||||||
|
# if [ -f "$LFCD" ]; then
|
||||||
|
# source "$LFCD"
|
||||||
|
# fi
|
||||||
|
#
|
||||||
|
# You may also like to assign a key to this command:
|
||||||
|
#
|
||||||
|
# bind '"\C-o":"lfcd\C-m"' # bash
|
||||||
|
# bindkey -s '^o' 'lfcd\n' # zsh
|
||||||
|
#
|
||||||
|
|
||||||
|
lfcd() {
|
||||||
|
tmp="$(mktemp)"
|
||||||
|
lf -last-dir-path="$tmp" "$@"
|
||||||
|
if [ -f "$tmp" ]; then
|
||||||
|
dir="$(cat "$tmp")"
|
||||||
|
rm -f "$tmp"
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
if [ "$dir" != "$(pwd)" ]; then
|
||||||
|
cd "$dir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
102
home/private_dot_config/lf/lfrc
Normal file
102
home/private_dot_config/lf/lfrc
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
# interpreter for shell commands
|
||||||
|
set shell sh
|
||||||
|
|
||||||
|
# set '-eu' options for shell commands
|
||||||
|
# These options are used to have safer shell commands. Option '-e' is used to
|
||||||
|
# exit on error and option '-u' is used to give error for unset variables.
|
||||||
|
# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
|
||||||
|
# $fx variables contain names with '*' or '?' characters. However, this option
|
||||||
|
# is used selectively within individual commands as it can be limiting at
|
||||||
|
# times.
|
||||||
|
set shellopts '-eu'
|
||||||
|
|
||||||
|
# set internal field separator (IFS) to "\n" for shell commands
|
||||||
|
# This is useful to automatically split file names in $fs and $fx properly
|
||||||
|
# since default file separator used in these variables (i.e. 'filesep' option)
|
||||||
|
# is newline. You need to consider the values of these options and create your
|
||||||
|
# commands accordingly.
|
||||||
|
set ifs "\n"
|
||||||
|
|
||||||
|
# leave some space at the top and the bottom of the screen
|
||||||
|
set scrolloff 10
|
||||||
|
|
||||||
|
# use enter for shell commands
|
||||||
|
map <enter> shell
|
||||||
|
|
||||||
|
# execute current file (must be executable)
|
||||||
|
map x $$f
|
||||||
|
map X !$f
|
||||||
|
|
||||||
|
# dedicated keys for file opener actions
|
||||||
|
map o &mimeopen $f
|
||||||
|
map O $mimeopen --ask $f
|
||||||
|
|
||||||
|
# define a custom 'open' command
|
||||||
|
# This command is called when current file is not a directory. You may want to
|
||||||
|
# use either file extensions and/or mime types here. Below uses an editor for
|
||||||
|
# text files and a file opener for the rest.
|
||||||
|
cmd open ${{
|
||||||
|
test -L $f && f=$(readlink -f $f)
|
||||||
|
case $(file --mime-type $f -b) in
|
||||||
|
text/*) $EDITOR $fx;;
|
||||||
|
*) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;;
|
||||||
|
esac
|
||||||
|
}}
|
||||||
|
|
||||||
|
# define a custom 'rename' command without prompt for overwrite
|
||||||
|
# cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
||||||
|
# map r push :rename<space>
|
||||||
|
|
||||||
|
# make sure trash folder exists
|
||||||
|
# %mkdir -p ~/.trash
|
||||||
|
|
||||||
|
# move current file or selected files to trash folder
|
||||||
|
# (also see 'man mv' for backup/overwrite options)
|
||||||
|
cmd trash %set -f; mv $fx ~/.trash
|
||||||
|
|
||||||
|
# define a custom 'delete' command
|
||||||
|
# cmd delete ${{
|
||||||
|
# set -f
|
||||||
|
# printf "$fx\n"
|
||||||
|
# printf "delete?[y/n]"
|
||||||
|
# read ans
|
||||||
|
# [ $ans = "y" ] && rm -rf $fx
|
||||||
|
# }}
|
||||||
|
|
||||||
|
# use '<delete>' key for either 'trash' or 'delete' command
|
||||||
|
# map <delete> trash
|
||||||
|
# map <delete> delete
|
||||||
|
|
||||||
|
# extract the current file with the right command
|
||||||
|
# (xkcd link: https://xkcd.com/1168/)
|
||||||
|
cmd extract ${{
|
||||||
|
set -f
|
||||||
|
case $f in
|
||||||
|
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
|
||||||
|
*.tar.gz|*.tgz) tar xzvf $f;;
|
||||||
|
*.tar.xz|*.txz) tar xJvf $f;;
|
||||||
|
*.zip) unzip $f;;
|
||||||
|
*.rar) unrar x $f;;
|
||||||
|
*.7z) 7z x $f;;
|
||||||
|
esac
|
||||||
|
}}
|
||||||
|
|
||||||
|
# compress current file or selected files with tar and gunzip
|
||||||
|
cmd tar ${{
|
||||||
|
set -f
|
||||||
|
mkdir $1
|
||||||
|
cp -r $fx $1
|
||||||
|
tar czf $1.tar.gz $1
|
||||||
|
rm -rf $1
|
||||||
|
}}
|
||||||
|
|
||||||
|
# compress current file or selected files with zip
|
||||||
|
cmd zip ${{
|
||||||
|
set -f
|
||||||
|
mkdir $1
|
||||||
|
cp -r $fx $1
|
||||||
|
zip -r $1.zip $1
|
||||||
|
rm -rf $1
|
||||||
|
}}
|
||||||
|
|
||||||
|
set drawbox
|
114
home/private_dot_config/lsd/config.yaml
Normal file
114
home/private_dot_config/lsd/config.yaml
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
# == Classic ==
|
||||||
|
# This is a shorthand to override some of the options to be backwards compatible
|
||||||
|
# with `ls`. It affects the "color"->"when", "sorting"->"dir-grouping", "date"
|
||||||
|
# and "icons"->"when" options.
|
||||||
|
# Possible values: false, true
|
||||||
|
classic: false
|
||||||
|
|
||||||
|
# == Blocks ==
|
||||||
|
# This specifies the columns and their order when using the long and the tree
|
||||||
|
# layout.
|
||||||
|
# Possible values: permission, user, group, size, size_value, date, name, inode
|
||||||
|
blocks:
|
||||||
|
- permission
|
||||||
|
- user
|
||||||
|
- size
|
||||||
|
- date
|
||||||
|
- name
|
||||||
|
|
||||||
|
# == Color ==
|
||||||
|
# This has various color options. (Will be expanded in the future.)
|
||||||
|
color:
|
||||||
|
# When to colorize the output.
|
||||||
|
# When "classic" is set, this is set to "never".
|
||||||
|
# Possible values: never, auto, always
|
||||||
|
when: auto
|
||||||
|
|
||||||
|
# == Date ==
|
||||||
|
# This specifies the date format for the date column. The freeform format
|
||||||
|
# accepts an strftime like string.
|
||||||
|
# When "classic" is set, this is set to "date".
|
||||||
|
# Possible values: date, relative, +<date_format>
|
||||||
|
date: +<%Y.%m.%d>
|
||||||
|
|
||||||
|
# == Dereference ==
|
||||||
|
# Whether to dereference symbolic links.
|
||||||
|
# Possible values: false, true
|
||||||
|
dereference: false
|
||||||
|
|
||||||
|
# == Display ==
|
||||||
|
# What items to display. Do not specify this for the default behavior.
|
||||||
|
# Possible values: all, almost-all, directory-only
|
||||||
|
# display: all
|
||||||
|
|
||||||
|
# == Icons ==
|
||||||
|
icons:
|
||||||
|
# When to use icons.
|
||||||
|
# When "classic" is set, this is set to "never".
|
||||||
|
# Possible values: always, auto, never
|
||||||
|
when: auto
|
||||||
|
# Which icon theme to use.
|
||||||
|
# Possible values: fancy, unicode
|
||||||
|
theme: fancy
|
||||||
|
# Separator between icon and the name
|
||||||
|
# Default to 1 space
|
||||||
|
separator: ' '
|
||||||
|
|
||||||
|
|
||||||
|
# == Ignore Globs ==
|
||||||
|
# A list of globs to ignore when listing.
|
||||||
|
ignore-globs:
|
||||||
|
- .git
|
||||||
|
- node_modules
|
||||||
|
|
||||||
|
# == Indicators ==
|
||||||
|
# Whether to add indicator characters to certain listed files.
|
||||||
|
# Possible values: false, true
|
||||||
|
indicators: false
|
||||||
|
|
||||||
|
# == Layout ==
|
||||||
|
# Which layout to use. "oneline" might be a bit confusing here and should be
|
||||||
|
# called "one-per-line". It might be changed in the future.
|
||||||
|
# Possible values: grid, tree, oneline
|
||||||
|
layout: grid
|
||||||
|
|
||||||
|
# == Recursion ==
|
||||||
|
recursion:
|
||||||
|
# Whether to enable recursion.
|
||||||
|
# Possible values: false, true
|
||||||
|
enabled: false
|
||||||
|
# How deep the recursion should go. This has to be a positive integer. Leave
|
||||||
|
# it unspecified for (virtually) infinite.
|
||||||
|
# depth: 2
|
||||||
|
|
||||||
|
# == Size ==
|
||||||
|
# Specifies the format of the size column.
|
||||||
|
# Possible values: default, short, bytes
|
||||||
|
size: default
|
||||||
|
|
||||||
|
# == Sorting ==
|
||||||
|
sorting:
|
||||||
|
# Specify what to sort by.
|
||||||
|
# Possible values: extension, name, time, size, version
|
||||||
|
column: name
|
||||||
|
# Whether to reverse the sorting.
|
||||||
|
# Possible values: false, true
|
||||||
|
reverse: false
|
||||||
|
# Whether to group directories together and where.
|
||||||
|
# When "classic" is set, this is set to "none".
|
||||||
|
# Possible values: first, last, none
|
||||||
|
dir-grouping: none
|
||||||
|
|
||||||
|
# == No Symlink ==
|
||||||
|
# Whether to omit showing symlink targets
|
||||||
|
# Possible values: false, true
|
||||||
|
no-symlink: false
|
||||||
|
|
||||||
|
# == Total size ==
|
||||||
|
# Whether to display the total size of directories.
|
||||||
|
# Possible values: false, true
|
||||||
|
total-size: false
|
||||||
|
|
||||||
|
# == Symlink arrow ==
|
||||||
|
# Specifies how the symlink arrow display, chars in both ascii and utf8
|
||||||
|
symlink-arrow: ⇒
|
5
home/private_dot_config/lvim/config.lua
Normal file
5
home/private_dot_config/lvim/config.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
require('settings')
|
||||||
|
require('plugins')
|
||||||
|
require('keybindings')
|
||||||
|
require('autocommands')
|
||||||
|
require('lsp')
|
29
home/private_dot_config/lvim/ftplugin/markdown.lua
Normal file
29
home/private_dot_config/lvim/ftplugin/markdown.lua
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
local _, util = pcall(require, "zk.util")
|
||||||
|
|
||||||
|
-- Add the key mappings only for Markdown files in a zk notebook.
|
||||||
|
if util.notebook_root(vim.fn.expand('%:p')) ~= nil then
|
||||||
|
local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end
|
||||||
|
local opts = { noremap=true, silent=false }
|
||||||
|
-- Open the link under the caret.
|
||||||
|
map("n", "<CR>", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||||
|
-- Create a new note after asking for its title.
|
||||||
|
-- This overrides the global `<leader>zn` mapping to create the note in the same directory as the current buffer.
|
||||||
|
map("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
|
||||||
|
-- Create a new note in the same directory as the current buffer, using the current selection for title.
|
||||||
|
map("v", "<leader>znt", ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }<CR>", opts)
|
||||||
|
-- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title.
|
||||||
|
map("v", "<leader>znc", ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
|
||||||
|
|
||||||
|
-- Open notes linking to the current buffer.
|
||||||
|
map("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
|
||||||
|
-- Alternative for backlinks using pure LSP and showing the source context.
|
||||||
|
--map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||||
|
-- Open notes linked by the current buffer.
|
||||||
|
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
|
||||||
|
|
||||||
|
-- Preview a linked note.
|
||||||
|
map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||||
|
-- Open the code actions for a visual selection.
|
||||||
|
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
|
||||||
|
end
|
8
home/private_dot_config/lvim/lua/autocommands.lua
Normal file
8
home/private_dot_config/lvim/lua/autocommands.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
-- Is this necessary?
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "zsh",
|
||||||
|
callback = function()
|
||||||
|
-- let treesitter use bash highlight for zsh files as well
|
||||||
|
require("nvim-treesitter.highlight").attach(0, "bash")
|
||||||
|
end,
|
||||||
|
})
|
78
home/private_dot_config/lvim/lua/commands.lua
Normal file
78
home/private_dot_config/lvim/lua/commands.lua
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
-- local _, zk = pcall(require, "zk")
|
||||||
|
-- local _, commands = pcall(require, "zk.commands")
|
||||||
|
|
||||||
|
-- TODO: figure out what's wrong with these ....
|
||||||
|
-- local function dump(o)
|
||||||
|
-- if type(o) == 'table' then
|
||||||
|
-- local s = '{ '
|
||||||
|
-- for k, v in pairs(o) do
|
||||||
|
-- if type(k) ~= 'number' then k = '"' .. k .. '"' end
|
||||||
|
-- s = s .. '[' .. k .. '] = ' .. dump(v) .. ','
|
||||||
|
-- end
|
||||||
|
-- return s .. '} '
|
||||||
|
-- else
|
||||||
|
-- return tostring(o)
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- commands.add("ZkLinkTo", function(options)
|
||||||
|
-- zk.pick_notes(options, { title = "ZkLinkTo" }, function(notes)
|
||||||
|
-- local note = notes[1]
|
||||||
|
-- local title = ''
|
||||||
|
-- print(dump(note))
|
||||||
|
-- if note.title then
|
||||||
|
-- title = note.title
|
||||||
|
-- else
|
||||||
|
-- title = "Untitled"
|
||||||
|
-- end
|
||||||
|
-- local link = "[" .. title .. "](" .. note.absPath .. ")"
|
||||||
|
-- print(link)
|
||||||
|
-- -- notes = { notes }
|
||||||
|
-- for i, note in ipairs(notes) do
|
||||||
|
-- print(i)
|
||||||
|
-- print(note.title)
|
||||||
|
-- if note.title then
|
||||||
|
-- print("[" .. note.title .. "](" .. note.absPath .. ")")
|
||||||
|
-- link = "[" .. note.title .. "](" .. note.absPath .. ")"
|
||||||
|
-- else
|
||||||
|
-- print('no title brah')
|
||||||
|
-- link = 'other lin'
|
||||||
|
-- print(link)
|
||||||
|
-- end
|
||||||
|
-- print(link)
|
||||||
|
-- print(note.absPath)
|
||||||
|
-- -- -- vim.cmd("e " .. note.absPath)
|
||||||
|
-- end
|
||||||
|
-- end)
|
||||||
|
-- end)
|
||||||
|
|
||||||
|
-- commands.add("ZkListLin", function(options)
|
||||||
|
-- zk.pick_notes(options, { title = "ZkLinkTo" }, function(notes)
|
||||||
|
-- local note = notes[1]
|
||||||
|
-- local title = ''
|
||||||
|
-- print(dump(note))
|
||||||
|
-- if note.title then
|
||||||
|
-- title = note.title
|
||||||
|
-- else
|
||||||
|
-- title = "Untitled"
|
||||||
|
-- end
|
||||||
|
-- local link = "[" .. title .. "](" .. note.absPath .. ")"
|
||||||
|
-- print(link)
|
||||||
|
-- -- notes = { notes }
|
||||||
|
-- for i, note in ipairs(notes) do
|
||||||
|
-- print(i)
|
||||||
|
-- print(note.title)
|
||||||
|
-- if note.title then
|
||||||
|
-- print("[" .. note.title .. "](" .. note.absPath .. ")")
|
||||||
|
-- link = "[" .. note.title .. "](" .. note.absPath .. ")"
|
||||||
|
-- else
|
||||||
|
-- print('no title brah')
|
||||||
|
-- link = 'other lin'
|
||||||
|
-- print(link)
|
||||||
|
-- end
|
||||||
|
-- print(link)
|
||||||
|
-- print(note.absPath)
|
||||||
|
-- -- -- vim.cmd("e " .. note.absPath)
|
||||||
|
-- end
|
||||||
|
-- end)
|
||||||
|
-- end)
|
64
home/private_dot_config/lvim/lua/keybindings.lua
Normal file
64
home/private_dot_config/lvim/lua/keybindings.lua
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
-- Map a key with optional options
|
||||||
|
local function map(mode, keys, action, options)
|
||||||
|
if options == nil then
|
||||||
|
options = { noremap = true }
|
||||||
|
end
|
||||||
|
vim.api.nvim_set_keymap(mode, keys, action, options)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
map('i', 'jk', '<Esc>', { noremap = true })
|
||||||
|
map('v', 'jk', '<Esc>', { noremap = true })
|
||||||
|
map('n', "H", "^", { noremap = true })
|
||||||
|
map('n', "L", "$", { noremap = true })
|
||||||
|
map('n', 'j', "v:count ? 'j' : 'gj'", { expr = true, noremap = true })
|
||||||
|
map('n', 'k', "v:count ? 'k' : 'gk'", { expr = true, noremap = true })
|
||||||
|
map('n', "<C-j>","}",{noremap = true})
|
||||||
|
map('n', "<C-k>","{",{noremap = true})
|
||||||
|
|
||||||
|
-- zettelkasten keybindings
|
||||||
|
-- Create a new note after asking for its title.
|
||||||
|
-- map("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>")
|
||||||
|
|
||||||
|
-- -- Open notes.
|
||||||
|
-- map("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>")
|
||||||
|
-- -- Open notes associated with the selected tags.
|
||||||
|
-- map("n", "<leader>zt", "<Cmd>ZkTags<CR>")
|
||||||
|
|
||||||
|
-- -- Search for the notes matching a given query.
|
||||||
|
-- map("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = vim.fn.input('Search: ') }<CR>")
|
||||||
|
-- -- Search for the notes matching the current visual selection.
|
||||||
|
|
||||||
|
map("v", "<leader>zf", ":'<,'>ZkMatch<CR>")
|
||||||
|
|
||||||
|
local mappings = lvim.builtin.which_key.mappings
|
||||||
|
|
||||||
|
mappings["z"] = {
|
||||||
|
name = "zk",
|
||||||
|
n = { "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", "New" },
|
||||||
|
o = { "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", "Open" },
|
||||||
|
t = { "<Cmd>ZkTags<CR>", "Tags" },
|
||||||
|
f = { "<Cmd>ZkNotes { sort = { 'modified' }, match = vim.fn.input('Search: ') }<CR>", "Fuzzy Search" },
|
||||||
|
}
|
||||||
|
mappings["s"]["p"] = { "<cmd>Telescope projects<CR>", "Recent Projects" }
|
||||||
|
mappings["s"]["w"] = { "<cmd>Telescope live_grep<CR>", "Find Word" }
|
||||||
|
|
||||||
|
|
||||||
|
-- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode.
|
||||||
|
-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet.
|
||||||
|
local _, actions = pcall(require, "telescope.actions")
|
||||||
|
lvim.builtin.telescope.defaults.mappings = {
|
||||||
|
-- for input mode
|
||||||
|
i = {
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
["<C-n>"] = actions.cycle_history_next,
|
||||||
|
["<C-p>"] = actions.cycle_history_prev,
|
||||||
|
},
|
||||||
|
-- for normal mode
|
||||||
|
n = {
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
},
|
||||||
|
}
|
1
home/private_dot_config/lvim/lua/lsp.lua
Normal file
1
home/private_dot_config/lvim/lua/lsp.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require'lspconfig'.taplo.setup{}
|
98
home/private_dot_config/lvim/lua/plugins.lua
Normal file
98
home/private_dot_config/lvim/lua/plugins.lua
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
local p = function(name) return string.format("require'config.%s'", name) end
|
||||||
|
|
||||||
|
-- extra plugins
|
||||||
|
lvim.plugins = {
|
||||||
|
{ 'chrisbra/Colorizer' },
|
||||||
|
{
|
||||||
|
'catppuccin/nvim',
|
||||||
|
as = 'catppuccin'
|
||||||
|
},
|
||||||
|
{ 'NoahTheDuke/vim-just' },
|
||||||
|
{ 'ggandor/lightspeed.nvim' },
|
||||||
|
{ 'elkowar/yuck.vim' },
|
||||||
|
{
|
||||||
|
'mickael-menu/zk-nvim',
|
||||||
|
config = function()
|
||||||
|
require("zk").setup({
|
||||||
|
-- can be "telescope", "fzf" or "select" (`vim.ui.select`)
|
||||||
|
-- it's recommended to use "telescope" or "fzf"
|
||||||
|
picker = "telescope",
|
||||||
|
lsp = {
|
||||||
|
-- `config` is passed to `vim.lsp.start_client(config)`
|
||||||
|
config = {
|
||||||
|
cmd = { "zk", "lsp" },
|
||||||
|
name = "zk",
|
||||||
|
-- on_attach = ...
|
||||||
|
-- etc, see `:h vim.lsp.start_client()`
|
||||||
|
},
|
||||||
|
|
||||||
|
-- automatically attach buffers in a zk notebook that match the given filetypes
|
||||||
|
auto_attach = {
|
||||||
|
enabled = true,
|
||||||
|
filetypes = { "markdown" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- default plugins settings
|
||||||
|
-- lvim.builtin.nvimtree.setup.git.ignore = false
|
||||||
|
|
||||||
|
lvim.builtin.notify.active = true
|
||||||
|
lvim.builtin.terminal.active = true
|
||||||
|
|
||||||
|
local function pick_color()
|
||||||
|
local colors = { "String", "Identifier", "Keyword", "Number", "Constant" }
|
||||||
|
return colors[math.random(#colors)]
|
||||||
|
end
|
||||||
|
|
||||||
|
local function myfooter(lvim_version)
|
||||||
|
-- local plugins = #vim.tbl_keys(packer_plugins) needs to be in config of packer table...
|
||||||
|
local v = vim.version()
|
||||||
|
local datetime = os.date " %Y.%m.%d %H:%M:%S"
|
||||||
|
return string.format(" %s v%s.%s.%s %s", lvim_version, v.major, v.minor, v.patch, datetime)
|
||||||
|
end
|
||||||
|
|
||||||
|
local lvim_version = require("lvim.utils.git").get_lvim_version()
|
||||||
|
|
||||||
|
local hl = pick_color()
|
||||||
|
|
||||||
|
lvim.builtin.alpha.dashboard.section.header.opts.hl = hl
|
||||||
|
lvim.builtin.alpha.dashboard.section.footer.opts.hl = hl
|
||||||
|
lvim.builtin.alpha.dashboard.section.footer.val = myfooter(lvim_version)
|
||||||
|
|
||||||
|
|
||||||
|
lvim.builtin.alpha.dashboard.section.header.val = {
|
||||||
|
[[ _______________________________________ ]],
|
||||||
|
[[ |,---"-----------------------------"---,| ]],
|
||||||
|
[[ ||___ 16 bit.................... || ]],
|
||||||
|
[[ ||====\ :HHHHHHHHHHHHHHHHHHHHHHHHHHH || ]],
|
||||||
|
[[ ||=====):H c> lvim H || ]],
|
||||||
|
[[ ||====/ :H ╦ ╦ ╦╔╗╔╔═╗╦═╗╦ ╦╦╔╦╗ H || ]],
|
||||||
|
[[ || :H ║ ║ ║║║║╠═╣╠╦╝╚╗╔╝║║║║ H || ]],
|
||||||
|
[[ ||PORTFO:H ╩═╝╚═╝╝╚╝╩ ╩╩╚═ ╚╝ ╩╩ ╩ H || ]],
|
||||||
|
[[ || :HHHHHHHHHHHHHHHHHHHHHHHHHHH || ]],
|
||||||
|
[[ ||_____,_________________________,_____|| ]],
|
||||||
|
[[ |)_____)-----.| /I\ATARI |.------(_____(| ]],
|
||||||
|
[[ //"""""""|_____|=----------=|______|"""""""\ ]],
|
||||||
|
[[ // _| _| _| _| _| _| _| _| _| _| _| _| _| _| \ ]],
|
||||||
|
[[ // ___| _| _| _| _| _| _| _| _| _| _| _| | | \ ]],
|
||||||
|
[[ |/ ___| _| _| _| _| _| _| _| _| _| _| _| ______| \ ]],
|
||||||
|
[[ / __| _| _| _| _| _| _| _| _| _| _| _| _| _| ___| \ ]],
|
||||||
|
[[ / _| _| _| _| ________________________| _| _| _| _| \ ]],
|
||||||
|
[[|------"--------------------------------------"-------|]],
|
||||||
|
[[`-----------------------------------------------------']],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- simpler header
|
||||||
|
--[[
|
||||||
|
╦ ╦ ╦╔╗╔╔═╗╦═╗╦ ╦╦╔╦╗
|
||||||
|
║ ║ ║║║║╠═╣╠╦╝╚╗╔╝║║║║
|
||||||
|
╩═╝╚═╝╝╚╝╩ ╩╩╚═ ╚╝ ╩╩ ╩
|
||||||
|
]] --
|
27
home/private_dot_config/lvim/lua/settings.lua
Normal file
27
home/private_dot_config/lvim/lua/settings.lua
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
-- settings
|
||||||
|
local opt = vim.opt
|
||||||
|
opt.timeoutlen = 200
|
||||||
|
-- opt.cmdheight = 0 -- broken??
|
||||||
|
|
||||||
|
-- lvim specific settings
|
||||||
|
-- general
|
||||||
|
lvim.log.level = "warn"
|
||||||
|
lvim.format_on_save = false
|
||||||
|
lvim.colorscheme = "catppuccin"
|
||||||
|
|
||||||
|
-- if you don't want all the parsers change this to a table of the ones you want
|
||||||
|
lvim.builtin.treesitter.ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"python",
|
||||||
|
"typescript",
|
||||||
|
"tsx",
|
||||||
|
"css",
|
||||||
|
"rust",
|
||||||
|
"yaml",
|
||||||
|
"toml"
|
||||||
|
}
|
||||||
|
|
||||||
|
lvim.builtin.treesitter.highlight.enabled = true
|
4
home/private_dot_config/nvim/init.lua
Normal file
4
home/private_dot_config/nvim/init.lua
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
require('settings')
|
||||||
|
--require('plugins')
|
||||||
|
require('keybindings')
|
||||||
|
|
87
home/private_dot_config/nvim/init.vim.bak
Normal file
87
home/private_dot_config/nvim/init.vim.bak
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
" Custom Mappings
|
||||||
|
imap jj <Esc>
|
||||||
|
|
||||||
|
"---------------
|
||||||
|
" Tabs
|
||||||
|
"---------------
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set noexpandtab
|
||||||
|
|
||||||
|
" Use case insensitive search, except when using capital letters
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
|
||||||
|
" When opening a new line and no filetype-specific indenting is enabled, keep
|
||||||
|
" the same indent as the line you're currently on. Useful for READMEs, etc.
|
||||||
|
set autoindent
|
||||||
|
|
||||||
|
" Display line numbers on the left
|
||||||
|
set number
|
||||||
|
|
||||||
|
" Increase undo limit
|
||||||
|
set history=1000
|
||||||
|
|
||||||
|
" Disable swap files
|
||||||
|
set noswapfile
|
||||||
|
|
||||||
|
" Show lines above and below cursor
|
||||||
|
set scrolloff=5
|
||||||
|
|
||||||
|
" Update every 300 ms
|
||||||
|
set updatetime=300
|
||||||
|
|
||||||
|
|
||||||
|
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||||
|
if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||||
|
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
"---------------
|
||||||
|
" Plugins
|
||||||
|
"---------------
|
||||||
|
call plug#begin()
|
||||||
|
Plug 'preservim/NERDTree'
|
||||||
|
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||||
|
Plug 'ntpeters/vim-better-whitespace'
|
||||||
|
Plug 'mhinz/vim-startify'
|
||||||
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
|
Plug 'cespare/vim-toml', { 'branch': 'main' }
|
||||||
|
Plug 'snakemake/snakemake', {'rtp': 'misc/vim'}
|
||||||
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
|
nnoremap <leader>n :NERDTreeFocus<CR>
|
||||||
|
nnoremap <C-n> :NERDTree<CR>
|
||||||
|
nnoremap <C-t> :NERDTreeToggle<CR>
|
||||||
|
nnoremap <C-f> :NERDTreeFind<CR>
|
||||||
|
|
||||||
|
let g:NERDTreeGitStatusUseNerdFonts = 1 " you should install nerdfonts by yourself. default: 0
|
||||||
|
|
||||||
|
"---------------
|
||||||
|
"COC Config
|
||||||
|
"---------------
|
||||||
|
|
||||||
|
" Use tab for trigger completion with characters ahead and navigate.
|
||||||
|
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||||
|
" other plugin before putting this into your config.
|
||||||
|
inoremap <silent><expr> <TAB>
|
||||||
|
\ pumvisible() ? "\<C-n>" :
|
||||||
|
\ <SID>check_back_space() ? "\<TAB>" :
|
||||||
|
\ coc#refresh()
|
||||||
|
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||||
|
|
||||||
|
function! s:check_back_space() abort
|
||||||
|
let col = col('.') - 1
|
||||||
|
return !col || getline('.')[col - 1] =~# '\s'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
"---------------
|
||||||
|
"Gitgutter
|
||||||
|
"---------------
|
||||||
|
"turn off background of git sign column
|
||||||
|
highlight! link SignColumn LineNr
|
3
home/private_dot_config/nvim/lua/configs/startup.lua
Normal file
3
home/private_dot_config/nvim/lua/configs/startup.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
local settings = require"startup.themes.startify"
|
||||||
|
|
||||||
|
return settings
|
12
home/private_dot_config/nvim/lua/keybindings.lua
Normal file
12
home/private_dot_config/nvim/lua/keybindings.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
-- Map a key with optional options
|
||||||
|
function map(mode, keys, action, options)
|
||||||
|
if options == nil then
|
||||||
|
options = {}
|
||||||
|
end
|
||||||
|
vim.api.nvim_set_keymap(mode,keys,action,options)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
map('i','jk','<Esc>',{noremap=true})
|
||||||
|
map('v','jk','<Esc>',{noremap=true})
|
||||||
|
|
93
home/private_dot_config/nvim/lua/plugins.lua
Normal file
93
home/private_dot_config/nvim/lua/plugins.lua
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
-- LOAD THE PLUGINS
|
||||||
|
|
||||||
|
-- install packer on the fly
|
||||||
|
-- local fn = vim.Fn
|
||||||
|
-- local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||||
|
-- if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
|
-- packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
|
||||||
|
|
||||||
|
return require('packer').startup(function(use)
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
|
use 'preservim/NERDTree'
|
||||||
|
|
||||||
|
use {
|
||||||
|
'goolord/alpha-nvim',
|
||||||
|
requires = { 'kyazdani42/nvim-web-devicons' },
|
||||||
|
config = function ()
|
||||||
|
require'alpha'.setup(require'alpha.themes.startify'.opts)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- use {
|
||||||
|
-- 'airblade/vim-gitgutter',
|
||||||
|
-- config = function()
|
||||||
|
-- local cmd = vim.cmd
|
||||||
|
-- cmd [[highlight! link SignColumn LineNr]]
|
||||||
|
-- end
|
||||||
|
-- }
|
||||||
|
--
|
||||||
|
use {
|
||||||
|
'norcalli/nvim-colorizer.lua',
|
||||||
|
conifg = function()
|
||||||
|
require'colorizer'.setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
config = function()
|
||||||
|
require('Comment').setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
config = function()
|
||||||
|
require("which-key").setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"ggandor/lightspeed.nvim"
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
"ntpeters/vim-better-whitespace",
|
||||||
|
config = function()
|
||||||
|
local cmd = vim.cmd
|
||||||
|
cmd [[ let g:strip_whitespace_on_save = 1 ]]
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
requires = {
|
||||||
|
'nvim-lua/plenary.nvim'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('gitsigns').setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- style
|
||||||
|
use 'Mofiqul/dracula.nvim'
|
||||||
|
|
||||||
|
-- language specific plugins
|
||||||
|
-- python
|
||||||
|
use {
|
||||||
|
'snakemake/snakemake',
|
||||||
|
rtp="misc/vim",
|
||||||
|
ft={"Snakefile","snk"}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- toml
|
||||||
|
use 'cespare/vim-toml'
|
||||||
|
vim.g.strip_whitespace_on_save = 1
|
||||||
|
|
||||||
|
if packer_bootstrap then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
||||||
|
end)
|
34
home/private_dot_config/nvim/lua/settings.lua
Normal file
34
home/private_dot_config/nvim/lua/settings.lua
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
-- general settings
|
||||||
|
local o = vim.o
|
||||||
|
local w = vim.wo
|
||||||
|
local b = vim.bo
|
||||||
|
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
|
||||||
|
b.autoindent = true
|
||||||
|
b.expandtab = true
|
||||||
|
b.softtabstop = 4
|
||||||
|
b.shiftwidth = 4
|
||||||
|
|
||||||
|
b.tabstop = 4
|
||||||
|
b.smartindent = true
|
||||||
|
b.modeline = false
|
||||||
|
b.shiftwidth = 4
|
||||||
|
b.tabstop = 4
|
||||||
|
b.smartindent = true
|
||||||
|
b.modeline = false
|
||||||
|
|
||||||
|
o.swapfile = false
|
||||||
|
o.scrolloff = 5
|
||||||
|
o.updatetime = 300
|
||||||
|
|
||||||
|
w.number = true
|
||||||
|
|
||||||
|
if vim.fn.has('multi_byte') == 1 and vim.o.encoding == 'utf-8' then
|
||||||
|
o.listchars = [[tab:▸ ,extends:❯,precedes:❮,nbsp:±,trail:…]]
|
||||||
|
else
|
||||||
|
o.listchars = [[tab:> ,extends:>,precedes:<,nbsp:.,trail:_]]
|
||||||
|
end
|
||||||
|
|
||||||
|
o.timeoutlen = 300
|
||||||
|
|
48
home/private_dot_config/pikaur.conf
Normal file
48
home/private_dot_config/pikaur.conf
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
[sync]
|
||||||
|
alwaysshowpkgorigin = no
|
||||||
|
develpkgsexpiration = -1
|
||||||
|
upgradesorting = versiondiff
|
||||||
|
showdownloadsize = no
|
||||||
|
ignoreoutofdateaurupgrades = no
|
||||||
|
|
||||||
|
[build]
|
||||||
|
keepbuilddir = no
|
||||||
|
keepdevbuilddir = yes
|
||||||
|
keepbuilddeps = no
|
||||||
|
skipfailedbuild = no
|
||||||
|
alwaysusedynamicusers = no
|
||||||
|
ignorearch = no
|
||||||
|
|
||||||
|
[review]
|
||||||
|
noedit = no
|
||||||
|
donteditbydefault = yes
|
||||||
|
nodiff = yes
|
||||||
|
gitdiffargs = --ignore-space-change,--ignore-all-space
|
||||||
|
diffpager = auto
|
||||||
|
hidedifffiles = .SRCINFO
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
version = 10
|
||||||
|
versiondiffold = 11
|
||||||
|
versiondiffnew = 9
|
||||||
|
|
||||||
|
[ui]
|
||||||
|
requireenterconfirm = yes
|
||||||
|
printcommands = no
|
||||||
|
aursearchsorting = hottest
|
||||||
|
displaylastupdated = no
|
||||||
|
groupbyrepository = yes
|
||||||
|
reversesearchsorting = no
|
||||||
|
|
||||||
|
[misc]
|
||||||
|
sudoloopinterval = 59
|
||||||
|
pacmanpath = pacman
|
||||||
|
privilegeescalationtool = sudo
|
||||||
|
|
||||||
|
[network]
|
||||||
|
aururl = https://aur.archlinux.org
|
||||||
|
newsurl = https://www.archlinux.org/feeds/news/
|
||||||
|
socks5proxy =
|
||||||
|
aurhttpproxy =
|
||||||
|
aurhttpsproxy =
|
||||||
|
|
5
home/private_dot_config/rclone/filter-file.txt
Normal file
5
home/private_dot_config/rclone/filter-file.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
- .git/**
|
||||||
|
- .vscode/**
|
||||||
|
- ~$*
|
||||||
|
- node_modules/**
|
||||||
|
+ **
|
55
home/private_dot_config/sheldon/plugins.toml
Normal file
55
home/private_dot_config/sheldon/plugins.toml
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# `sheldon` configuration file
|
||||||
|
# ----------------------------
|
||||||
|
#
|
||||||
|
# You can modify this file directly or you can use one of the following
|
||||||
|
# `sheldon` commands which are provided to assist in editing the config file:
|
||||||
|
#
|
||||||
|
# - `sheldon add` to add a new plugin to the config file
|
||||||
|
# - `sheldon edit` to open up the config file in the default editor
|
||||||
|
# - `sheldon remove` to remove a plugin from the config file
|
||||||
|
#
|
||||||
|
# See the documentation for more https://github.com/rossmacarthur/sheldon#readme
|
||||||
|
|
||||||
|
shell = "zsh"
|
||||||
|
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
|
||||||
|
# oh-my-zsh plugins
|
||||||
|
[plugins.ohmyzsh-plugins]
|
||||||
|
github = 'ohmyzsh/ohmyzsh'
|
||||||
|
dir = 'plugins'
|
||||||
|
use = ['{git,dotenv,extract,tmux}.plugin.zsh']
|
||||||
|
|
||||||
|
[plugins.ohmyzsh-lib]
|
||||||
|
github = 'ohmyzsh/ohmyzsh'
|
||||||
|
dir = "lib"
|
||||||
|
use = ['{completion,clipboard}.zsh']
|
||||||
|
|
||||||
|
[plugins.base16]
|
||||||
|
github = "chriskempson/base16-shell"
|
||||||
|
|
||||||
|
# [plugins.enhancd]
|
||||||
|
# github = "b4b4r07/enhancd"
|
||||||
|
|
||||||
|
[plugins.zsh-defer]
|
||||||
|
github = "romkatv/zsh-defer"
|
||||||
|
|
||||||
|
[plugins.zcolors]
|
||||||
|
github = "marlonrichert/zcolors"
|
||||||
|
|
||||||
|
[plugins.zsh-syntax-highlighting]
|
||||||
|
github = "zsh-users/zsh-syntax-highlighting"
|
||||||
|
apply = ["defer"]
|
||||||
|
|
||||||
|
[plugins.fzf-tab]
|
||||||
|
github = "Aloxaf/fzf-tab"
|
||||||
|
apply = ["defer"]
|
||||||
|
|
||||||
|
[plugins.ohmyzsh]
|
||||||
|
github = 'ohmyzsh/ohmyzsh'
|
||||||
|
dir = 'plugins'
|
||||||
|
use = ['{git,dotenv,extract,tmux}/*.plugin.zsh']
|
||||||
|
|
||||||
|
[templates]
|
||||||
|
defer = { value = 'zsh-defer source "{{ file }}"', each = true }
|
88
home/private_dot_config/starship/config.toml
Normal file
88
home/private_dot_config/starship/config.toml
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
[username]
|
||||||
|
format = "[$user]($style) on "
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "[❯](bold green)[❯](bold yellow)[❯](bold cyan)"
|
||||||
|
# success_symbol = "[⁘](bold green)[⁘](bold yellow)[⁘](bold cyan)"
|
||||||
|
error_symbol = "[✗](bold red) "
|
||||||
|
# ⁘
|
||||||
|
[gcloud]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[rlang]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[localip]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
# nerd font symbols
|
||||||
|
|
||||||
|
[aws]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[buf]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[c]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[conda]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[dart]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
read_only = " "
|
||||||
|
|
||||||
|
[docker_context]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[elixir]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[elm]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[golang]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[haskell]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[hg_branch]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[java]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[julia]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[memory_usage]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[nim]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[nix_shell]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[package]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[python]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[spack]
|
||||||
|
symbol = "🅢 "
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
symbol = " "
|
||||||
|
|
119
home/private_dot_config/starship/plain.toml
Normal file
119
home/private_dot_config/starship/plain.toml
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
[character]
|
||||||
|
success_symbol = "[>](bold green)"
|
||||||
|
error_symbol = "[x](bold red)"
|
||||||
|
vicmd_symbol = "[<](bold green)"
|
||||||
|
|
||||||
|
[git_commit]
|
||||||
|
tag_symbol = " tag "
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
ahead = ">"
|
||||||
|
behind = "<"
|
||||||
|
diverged = "<>"
|
||||||
|
renamed = "r"
|
||||||
|
deleted = "x"
|
||||||
|
|
||||||
|
[aws]
|
||||||
|
symbol = "aws "
|
||||||
|
|
||||||
|
[cobol]
|
||||||
|
symbol = "cobol "
|
||||||
|
|
||||||
|
[conda]
|
||||||
|
symbol = "conda "
|
||||||
|
|
||||||
|
[crystal]
|
||||||
|
symbol = "cr "
|
||||||
|
|
||||||
|
[cmake]
|
||||||
|
symbol = "cmake "
|
||||||
|
|
||||||
|
[dart]
|
||||||
|
symbol = "dart "
|
||||||
|
|
||||||
|
[deno]
|
||||||
|
symbol = "deno "
|
||||||
|
|
||||||
|
[dotnet]
|
||||||
|
symbol = ".NET "
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
read_only = " ro"
|
||||||
|
|
||||||
|
[docker_context]
|
||||||
|
symbol = "docker "
|
||||||
|
|
||||||
|
[elixir]
|
||||||
|
symbol = "exs "
|
||||||
|
|
||||||
|
[elm]
|
||||||
|
symbol = "elm "
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = "git "
|
||||||
|
|
||||||
|
[golang]
|
||||||
|
symbol = "go "
|
||||||
|
|
||||||
|
[hg_branch]
|
||||||
|
symbol = "hg "
|
||||||
|
|
||||||
|
[java]
|
||||||
|
symbol = "java "
|
||||||
|
|
||||||
|
[julia]
|
||||||
|
symbol = "jl "
|
||||||
|
|
||||||
|
[kotlin]
|
||||||
|
symbol = "kt "
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
symbol = "nodejs "
|
||||||
|
|
||||||
|
[memory_usage]
|
||||||
|
symbol = "memory "
|
||||||
|
|
||||||
|
[nim]
|
||||||
|
symbol = "nim "
|
||||||
|
|
||||||
|
[nix_shell]
|
||||||
|
symbol = "nix "
|
||||||
|
|
||||||
|
[ocaml]
|
||||||
|
symbol = "ml "
|
||||||
|
|
||||||
|
[package]
|
||||||
|
symbol = "pkg "
|
||||||
|
|
||||||
|
[perl]
|
||||||
|
symbol = "pl "
|
||||||
|
|
||||||
|
[php]
|
||||||
|
symbol = "php "
|
||||||
|
|
||||||
|
[pulumi]
|
||||||
|
symbol = "pulumi "
|
||||||
|
|
||||||
|
[purescript]
|
||||||
|
symbol = "purs "
|
||||||
|
|
||||||
|
[python]
|
||||||
|
symbol = "py "
|
||||||
|
|
||||||
|
[ruby]
|
||||||
|
symbol = "rb "
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
symbol = "rs "
|
||||||
|
|
||||||
|
[scala]
|
||||||
|
symbol = "scala "
|
||||||
|
|
||||||
|
[sudo]
|
||||||
|
symbol = "sudo "
|
||||||
|
|
||||||
|
[swift]
|
||||||
|
symbol = "swift "
|
||||||
|
|
||||||
|
[gcloud]
|
||||||
|
disabled = true
|
22
home/private_dot_config/tmux/tmux.conf
Normal file
22
home/private_dot_config/tmux/tmux.conf
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
set -g status-keys vi
|
||||||
|
setw -g mode-keys vi
|
||||||
|
|
||||||
|
set -g prefix C-a
|
||||||
|
unbind C-b
|
||||||
|
bind C-a send-prefix
|
||||||
|
|
||||||
|
# smart pane switching with awareness of vim splits
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
|
||||||
|
# split panes using | and -
|
||||||
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
|
bind - split-window -v -c "#{pane_current_path}"
|
||||||
|
unbind '"'
|
||||||
|
unbind %
|
||||||
|
|
||||||
|
# Set default term to xterm
|
||||||
|
set -g default-terminal "xterm-256color"
|
||||||
|
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
226
home/private_dot_config/wezterm/colors/catppuccin.lua
Normal file
226
home/private_dot_config/wezterm/colors/catppuccin.lua
Normal file
|
@ -0,0 +1,226 @@
|
||||||
|
local wezterm = require "wezterm";
|
||||||
|
|
||||||
|
-- color variant hex codes
|
||||||
|
local colors = {
|
||||||
|
latte = {
|
||||||
|
rosewater = "#dc8a78",
|
||||||
|
flamingo = "#dd7878",
|
||||||
|
pink = "#ea76cb",
|
||||||
|
mauve = "#8839ef",
|
||||||
|
red = "#d20f39",
|
||||||
|
maroon = "#e64553",
|
||||||
|
peach = "#fe640b",
|
||||||
|
yellow = "#df8e1d",
|
||||||
|
green = "#40a02b",
|
||||||
|
teal = "#179299",
|
||||||
|
sky = "#04a5e5",
|
||||||
|
sapphire = "#209fb5",
|
||||||
|
blue = "#1e66f5",
|
||||||
|
lavender = "#7287fd",
|
||||||
|
text = "#4c4f69",
|
||||||
|
subtext1 = "#5c5f77",
|
||||||
|
subtext0 = "#6c6f85",
|
||||||
|
overlay2 = "#7c7f93",
|
||||||
|
overlay1 = "#8c8fa1",
|
||||||
|
overlay0 = "#9ca0b0",
|
||||||
|
surface2 = "#acb0be",
|
||||||
|
surface1 = "#bcc0cc",
|
||||||
|
surface0 = "#ccd0da",
|
||||||
|
crust = "#dce0e8",
|
||||||
|
mantle = "#e6e9ef",
|
||||||
|
base = "#eff1f5"
|
||||||
|
},
|
||||||
|
frappe = {
|
||||||
|
rosewater = "#f2d5cf",
|
||||||
|
flamingo = "#eebebe",
|
||||||
|
pink = "#f4b8e4",
|
||||||
|
mauve = "#ca9ee6",
|
||||||
|
red = "#e78284",
|
||||||
|
maroon = "#ea999c",
|
||||||
|
peach = "#ef9f76",
|
||||||
|
yellow = "#e5c890",
|
||||||
|
green = "#a6d189",
|
||||||
|
teal = "#81c8be",
|
||||||
|
sky = "#99d1db",
|
||||||
|
sapphire = "#85c1dc",
|
||||||
|
blue = "#8caaee",
|
||||||
|
lavender = "#babbf1",
|
||||||
|
text = "#c6d0f5",
|
||||||
|
subtext1 = "#b5bfe2",
|
||||||
|
subtext0 = "#a5adce",
|
||||||
|
overlay2 = "#949cbb",
|
||||||
|
overlay1 = "#838ba7",
|
||||||
|
overlay0 = "#737994",
|
||||||
|
surface2 = "#626880",
|
||||||
|
surface1 = "#51576d",
|
||||||
|
surface0 = "#414559",
|
||||||
|
base = "#303446",
|
||||||
|
mantle = "#292c3c",
|
||||||
|
crust = "#232634"
|
||||||
|
},
|
||||||
|
macchiato = {
|
||||||
|
rosewater = "#f4dbd6",
|
||||||
|
flamingo = "#f0c6c6",
|
||||||
|
pink = "#f5bde6",
|
||||||
|
mauve = "#c6a0f6",
|
||||||
|
red = "#ed8796",
|
||||||
|
maroon = "#ee99a0",
|
||||||
|
peach = "#f5a97f",
|
||||||
|
yellow = "#eed49f",
|
||||||
|
green = "#a6da95",
|
||||||
|
teal = "#8bd5ca",
|
||||||
|
sky = "#91d7e3",
|
||||||
|
sapphire = "#7dc4e4",
|
||||||
|
blue = "#8aadf4",
|
||||||
|
lavender = "#b7bdf8",
|
||||||
|
text = "#cad3f5",
|
||||||
|
subtext1 = "#b8c0e0",
|
||||||
|
subtext0 = "#a5adcb",
|
||||||
|
overlay2 = "#939ab7",
|
||||||
|
overlay1 = "#8087a2",
|
||||||
|
overlay0 = "#6e738d",
|
||||||
|
surface2 = "#5b6078",
|
||||||
|
surface1 = "#494d64",
|
||||||
|
surface0 = "#363a4f",
|
||||||
|
base = "#24273a",
|
||||||
|
mantle = "#1e2030",
|
||||||
|
crust = "#181926"
|
||||||
|
},
|
||||||
|
mocha = {
|
||||||
|
rosewater = "#f5e0dc",
|
||||||
|
flamingo = "#f2cdcd",
|
||||||
|
pink = "#f5c2e7",
|
||||||
|
mauve = "#cba6f7",
|
||||||
|
red = "#f38ba8",
|
||||||
|
maroon = "#eba0ac",
|
||||||
|
peach = "#fab387",
|
||||||
|
yellow = "#f9e2af",
|
||||||
|
green = "#a6e3a1",
|
||||||
|
teal = "#94e2d5",
|
||||||
|
sky = "#89dceb",
|
||||||
|
sapphire = "#74c7ec",
|
||||||
|
blue = "#89b4fa",
|
||||||
|
lavender = "#b4befe",
|
||||||
|
text = "#cdd6f4",
|
||||||
|
subtext1 = "#bac2de",
|
||||||
|
subtext0 = "#a6adc8",
|
||||||
|
overlay2 = "#9399b2",
|
||||||
|
overlay1 = "#7f849c",
|
||||||
|
overlay0 = "#6c7086",
|
||||||
|
surface2 = "#585b70",
|
||||||
|
surface1 = "#45475a",
|
||||||
|
surface0 = "#313244",
|
||||||
|
base = "#1e1e2e",
|
||||||
|
mantle = "#181825",
|
||||||
|
crust = "#11111b"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
local catppuccin = {}
|
||||||
|
function catppuccin.select(palette)
|
||||||
|
return {
|
||||||
|
foreground = colors[palette].text,
|
||||||
|
background = colors[palette].base,
|
||||||
|
cursor_bg = colors[palette].rosewater,
|
||||||
|
cursor_border = colors[palette].rosewater,
|
||||||
|
cursor_fg = colors[palette].base,
|
||||||
|
selection_bg = colors[palette].surface2,
|
||||||
|
selection_fg = colors[palette].text,
|
||||||
|
ansi = {
|
||||||
|
colors[palette].overlay0,
|
||||||
|
colors[palette].red,
|
||||||
|
colors[palette].green,
|
||||||
|
colors[palette].yellow,
|
||||||
|
colors[palette].blue,
|
||||||
|
colors[palette].pink,
|
||||||
|
colors[palette].sky,
|
||||||
|
colors[palette].overlay2
|
||||||
|
},
|
||||||
|
brights = {
|
||||||
|
colors[palette].overlay1,
|
||||||
|
colors[palette].red,
|
||||||
|
colors[palette].green,
|
||||||
|
colors[palette].yellow,
|
||||||
|
colors[palette].blue,
|
||||||
|
colors[palette].pink,
|
||||||
|
colors[palette].sky,
|
||||||
|
colors[palette].text
|
||||||
|
},
|
||||||
|
tab_bar = {
|
||||||
|
background = colors[palette].base,
|
||||||
|
active_tab = {
|
||||||
|
bg_color = colors[palette].surface2,
|
||||||
|
fg_color = colors[palette].text
|
||||||
|
},
|
||||||
|
inactive_tab = {
|
||||||
|
bg_color = colors[palette].base,
|
||||||
|
fg_color = colors[palette].text
|
||||||
|
},
|
||||||
|
inactive_tab_hover = {
|
||||||
|
bg_color = colors[palette].surface2,
|
||||||
|
fg_color = colors[palette].text
|
||||||
|
},
|
||||||
|
new_tab = {
|
||||||
|
bg_color = colors[palette].base,
|
||||||
|
fg_color = colors[palette].text
|
||||||
|
},
|
||||||
|
new_tab_hover = {
|
||||||
|
bg_color = colors[palette].surface2,
|
||||||
|
fg_color = colors[palette].text,
|
||||||
|
italic = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
visual_bell = colors[palette].surface0,
|
||||||
|
indexed = {
|
||||||
|
[16] = colors[palette].peach,
|
||||||
|
[17] = colors[palette].rosewater
|
||||||
|
},
|
||||||
|
scrollbar_thumb = colors[palette].surface2,
|
||||||
|
split = colors[palette].crust,
|
||||||
|
-- nightbuild only
|
||||||
|
compose_cursor = colors[palette].flamingo
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- utility functions for interacting with wezterm API
|
||||||
|
local function scheme_for_appearance(appearance, options)
|
||||||
|
if appearance:find("Dark") then
|
||||||
|
return catppuccin.select(options.sync_flavours.dark)
|
||||||
|
else
|
||||||
|
return catppuccin.select(options.sync_flavours.light)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function catppuccin.setup(options)
|
||||||
|
-- default to not syncing with the OS theme
|
||||||
|
local should_sync = true
|
||||||
|
if options.sync == false then should_sync = false end
|
||||||
|
|
||||||
|
-- default options
|
||||||
|
options = {
|
||||||
|
sync = should_sync,
|
||||||
|
sync_flavours = options.sync_flavours or {
|
||||||
|
light = "latte",
|
||||||
|
dark = "mocha"
|
||||||
|
},
|
||||||
|
flavour = options.flavour or "mocha"
|
||||||
|
}
|
||||||
|
|
||||||
|
-- if sync is enabled, hook into the window-config-reloaded event
|
||||||
|
-- snippet from https://wezfurlong.org/wezterm/config/lua/window/get_appearance.html#windowget_appearance
|
||||||
|
if options.sync then
|
||||||
|
wezterm.on("window-config-reloaded", function(window, pane)
|
||||||
|
local overrides = window:get_config_overrides() or {}
|
||||||
|
local appearance = window:get_appearance()
|
||||||
|
local scheme = scheme_for_appearance(appearance, options)
|
||||||
|
if overrides.background ~= scheme.background then
|
||||||
|
overrides.colors = scheme
|
||||||
|
window:set_config_overrides(overrides)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
return catppuccin.select(options.flavour)
|
||||||
|
end
|
||||||
|
|
||||||
|
return catppuccin
|
11
home/private_dot_config/wezterm/executable_get-key-ref.sh
Normal file
11
home/private_dot_config/wezterm/executable_get-key-ref.sh
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if ! [[ -d wez-ref ]]; then
|
||||||
|
git clone git@github.com:wez/wezterm.git wez-ref --depth 1
|
||||||
|
else
|
||||||
|
cd wez-ref
|
||||||
|
git pull
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat wez-ref/docs/config/lua/keyassignment/* >keys-ref.md
|
151
home/private_dot_config/wezterm/keys.lua
Normal file
151
home/private_dot_config/wezterm/keys.lua
Normal file
|
@ -0,0 +1,151 @@
|
||||||
|
local wezterm = require("wezterm")
|
||||||
|
local act = wezterm.action
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.keys = {
|
||||||
|
{ key = "C", mods = "CTRL|SHIFT", action = act.CopyTo "ClipboardAndPrimarySelection" },
|
||||||
|
-- paste from the clipboard
|
||||||
|
{ key = "V", mods = "CTRL|SHIFT", action = act.PasteFrom "Clipboard" },
|
||||||
|
-- paste from the primary selection
|
||||||
|
{ key = "V", mods = "CTRL|SHIFT", action = act.PasteFrom "PrimarySelection" },
|
||||||
|
-- change font size
|
||||||
|
{ key = "-", mods = "CTRL", action = "DecreaseFontSize" },
|
||||||
|
{ key = "+", mods = "CTRL", action = "IncreaseFontSize" },
|
||||||
|
-- { key = "Space", mods = "CTRL|SHIFT", action = "QuickSelect" },
|
||||||
|
{ key = "Space", mods = "CTRL|SHIFT", action = "ActivateCopyMode" },
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-- M.key_tables = {
|
||||||
|
-- copy_mode = {
|
||||||
|
-- { key = "c", mods = "CTRL", action = wezterm.action { CopyMode = "Close" } },
|
||||||
|
-- { key = "g", mods = "CTRL", action = wezterm.action { CopyMode = "Close" } },
|
||||||
|
-- { key = "q", mods = "NONE", action = wezterm.action { CopyMode = "Close" } },
|
||||||
|
-- { key = "Escape", mods = "NONE", action = wezterm.action { CopyMode = "Close" } },
|
||||||
|
|
||||||
|
-- { key = "h", mods = "NONE", action = wezterm.action { CopyMode = "MoveLeft" } },
|
||||||
|
-- { key = "j", mods = "NONE", action = wezterm.action { CopyMode = "MoveDown" } },
|
||||||
|
-- { key = "k", mods = "NONE", action = wezterm.action { CopyMode = "MoveUp" } },
|
||||||
|
-- { key = "l", mods = "NONE", action = wezterm.action { CopyMode = "MoveRight" } },
|
||||||
|
|
||||||
|
-- { key = "LeftArrow", mods = "NONE", action = wezterm.action { CopyMode = "MoveLeft" } },
|
||||||
|
-- { key = "DownArrow", mods = "NONE", action = wezterm.action { CopyMode = "MoveDown" } },
|
||||||
|
-- { key = "UpArrow", mods = "NONE", action = wezterm.action { CopyMode = "MoveUp" } },
|
||||||
|
-- { key = "RightArrow", mods = "NONE", action = wezterm.action { CopyMode = "MoveRight" } },
|
||||||
|
|
||||||
|
-- { key = "RightArrow", mods = "ALT", action = wezterm.action { CopyMode = "MoveForwardWord" } },
|
||||||
|
-- { key = "f", mods = "ALT", action = wezterm.action { CopyMode = "MoveForwardWord" } },
|
||||||
|
-- { key = "Tab", mods = "NONE", action = wezterm.action { CopyMode = "MoveForwardWord" } },
|
||||||
|
-- { key = "w", mods = "NONE", action = wezterm.action { CopyMode = "MoveForwardWord" } },
|
||||||
|
|
||||||
|
-- { key = "LeftArrow", mods = "ALT", action = wezterm.action { CopyMode = "MoveBackwardWord" } },
|
||||||
|
-- { key = "b", mods = "ALT", action = wezterm.action { CopyMode = "MoveBackwardWord" } },
|
||||||
|
-- { key = "Tab", mods = "SHIFT", action = wezterm.action { CopyMode = "MoveBackwardWord" } },
|
||||||
|
-- { key = "b", mods = "NONE", action = wezterm.action { CopyMode = "MoveBackwardWord" } },
|
||||||
|
|
||||||
|
-- { key = "0", mods = "NONE", action = wezterm.action { CopyMode = "MoveToStartOfLine" } },
|
||||||
|
-- { key = "Enter", mods = "NONE", action = wezterm.action { CopyMode = "MoveToStartOfNextLine" } },
|
||||||
|
-- { key = "$", mods = "NONE", action = wezterm.action { CopyMode = "MoveToEndOfLineContent" } },
|
||||||
|
-- { key = "$", mods = "SHIFT", action = wezterm.action { CopyMode = "MoveToEndOfLineContent" } },
|
||||||
|
|
||||||
|
-- { key = "m", mods = "ALT", action = wezterm.action { CopyMode = "MoveToStartOfLineContent" } },
|
||||||
|
-- { key = "^", mods = "NONE", action = wezterm.action { CopyMode = "MoveToStartOfLineContent" } },
|
||||||
|
-- { key = "^", mods = "SHIFT", action = wezterm.action { CopyMode = "MoveToStartOfLineContent" } },
|
||||||
|
|
||||||
|
-- { key = " ", mods = "NONE", action = wezterm.action { CopyMode = "ToggleSelectionByCell" } },
|
||||||
|
-- { key = "v", mods = "NONE", action = wezterm.action { CopyMode = "ToggleSelectionByCell" } },
|
||||||
|
-- { key = "v", mods = "CTRL", action = wezterm.action { CopyMode = { SetSelectionMode = "Block" } } },
|
||||||
|
|
||||||
|
-- { key = "G", mods = "NONE", action = wezterm.action { CopyMode = "MoveToScrollbackBottom" } },
|
||||||
|
-- { key = "G", mods = "SHIFT", action = wezterm.action { CopyMode = "MoveToScrollbackBottom" } },
|
||||||
|
-- { key = "g", mods = "NONE", action = wezterm.action { CopyMode = "MoveToScrollbackTop" } },
|
||||||
|
|
||||||
|
-- { key = "H", mods = "NONE", action = wezterm.action { CopyMode = "MoveToViewportTop" } },
|
||||||
|
-- { key = "H", mods = "SHIFT", action = wezterm.action { CopyMode = "MoveToViewportTop" } },
|
||||||
|
-- { key = "M", mods = "NONE", action = wezterm.action { CopyMode = "MoveToViewportMiddle" } },
|
||||||
|
-- { key = "M", mods = "SHIFT", action = wezterm.action { CopyMode = "MoveToViewportMiddle" } },
|
||||||
|
-- { key = "L", mods = "NONE", action = wezterm.action { CopyMode = "MoveToViewportBottom" } },
|
||||||
|
-- { key = "L", mods = "SHIFT", action = wezterm.action { CopyMode = "MoveToViewportBottom" } },
|
||||||
|
|
||||||
|
-- { key = "PageUp", mods = "NONE", action = wezterm.action { CopyMode = "PageUp" } },
|
||||||
|
-- { key = "PageDown", mods = "NONE", action = wezterm.action { CopyMode = "PageDown" } },
|
||||||
|
|
||||||
|
-- { key = "b", mods = "CTRL", action = wezterm.action { CopyMode = "PageUp" } },
|
||||||
|
-- { key = "f", mods = "CTRL", action = wezterm.action { CopyMode = "PageDown" } },
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
|
||||||
|
|
||||||
|
M.key_tables = {
|
||||||
|
copy_mode = {
|
||||||
|
{key="c", mods="CTRL", action=wezterm.action{CopyMode="Close"}},
|
||||||
|
{key="g", mods="CTRL", action=wezterm.action{CopyMode="Close"}},
|
||||||
|
{key="q", mods="NONE", action=wezterm.action{CopyMode="Close"}},
|
||||||
|
{key="Escape", mods="NONE", action=wezterm.action{CopyMode="Close"}},
|
||||||
|
|
||||||
|
{key="h", mods="NONE", action=wezterm.action{CopyMode="MoveLeft"}},
|
||||||
|
{key="j", mods="NONE", action=wezterm.action{CopyMode="MoveDown"}},
|
||||||
|
{key="k", mods="NONE", action=wezterm.action{CopyMode="MoveUp"}},
|
||||||
|
{key="l", mods="NONE", action=wezterm.action{CopyMode="MoveRight"}},
|
||||||
|
|
||||||
|
{key="LeftArrow", mods="NONE", action=wezterm.action{CopyMode="MoveLeft"}},
|
||||||
|
{key="DownArrow", mods="NONE", action=wezterm.action{CopyMode="MoveDown"}},
|
||||||
|
{key="UpArrow", mods="NONE", action=wezterm.action{CopyMode="MoveUp"}},
|
||||||
|
{key="RightArrow", mods="NONE", action=wezterm.action{CopyMode="MoveRight"}},
|
||||||
|
|
||||||
|
{key="RightArrow", mods="ALT", action=wezterm.action{CopyMode="MoveForwardWord"}},
|
||||||
|
{key="f", mods="ALT", action=wezterm.action{CopyMode="MoveForwardWord"}},
|
||||||
|
{key="Tab", mods="NONE", action=wezterm.action{CopyMode="MoveForwardWord"}},
|
||||||
|
{key="w", mods="NONE", action=wezterm.action{CopyMode="MoveForwardWord"}},
|
||||||
|
|
||||||
|
{key="LeftArrow", mods="ALT", action=wezterm.action{CopyMode="MoveBackwardWord"}},
|
||||||
|
{key="b", mods="ALT", action=wezterm.action{CopyMode="MoveBackwardWord"}},
|
||||||
|
{key="Tab", mods="SHIFT", action=wezterm.action{CopyMode="MoveBackwardWord"}},
|
||||||
|
{key="b", mods="NONE", action=wezterm.action{CopyMode="MoveBackwardWord"}},
|
||||||
|
|
||||||
|
{key="0", mods="NONE", action=wezterm.action{CopyMode="MoveToStartOfLine"}},
|
||||||
|
{key="Enter", mods="NONE", action=wezterm.action{CopyMode="MoveToStartOfNextLine"}},
|
||||||
|
{key="$", mods="NONE", action=wezterm.action{CopyMode="MoveToEndOfLineContent"}},
|
||||||
|
{key="$", mods="SHIFT", action=wezterm.action{CopyMode="MoveToEndOfLineContent"}},
|
||||||
|
|
||||||
|
{key="m", mods="ALT", action=wezterm.action{CopyMode="MoveToStartOfLineContent"}},
|
||||||
|
{key="^", mods="NONE", action=wezterm.action{CopyMode="MoveToStartOfLineContent"}},
|
||||||
|
{key="^", mods="SHIFT", action=wezterm.action{CopyMode="MoveToStartOfLineContent"}},
|
||||||
|
|
||||||
|
{key=" ", mods="NONE", action=wezterm.action{CopyMode={SetSelectionMode="Cell"}}},
|
||||||
|
{key="v", mods="NONE", action=wezterm.action{CopyMode={SetSelectionMode="Cell"}}},
|
||||||
|
{key="V", mods="NONE", action=wezterm.action{CopyMode={SetSelectionMode="Line"}}},
|
||||||
|
{key="V", mods="SHIFT", action=wezterm.action{CopyMode={SetSelectionMode="Line"}}},
|
||||||
|
{key="v", mods="CTRL", action=wezterm.action{CopyMode={SetSelectionMode="Block"}}},
|
||||||
|
|
||||||
|
{key="G", mods="NONE", action=wezterm.action{CopyMode="MoveToScrollbackBottom"}},
|
||||||
|
{key="G", mods="SHIFT", action=wezterm.action{CopyMode="MoveToScrollbackBottom"}},
|
||||||
|
{key="g", mods="NONE", action=wezterm.action{CopyMode="MoveToScrollbackTop"}},
|
||||||
|
|
||||||
|
{key="H", mods="NONE", action=wezterm.action{CopyMode="MoveToViewportTop"}},
|
||||||
|
{key="H", mods="SHIFT", action=wezterm.action{CopyMode="MoveToViewportTop"}},
|
||||||
|
{key="M", mods="NONE", action=wezterm.action{CopyMode="MoveToViewportMiddle"}},
|
||||||
|
{key="M", mods="SHIFT", action=wezterm.action{CopyMode="MoveToViewportMiddle"}},
|
||||||
|
{key="L", mods="NONE", action=wezterm.action{CopyMode="MoveToViewportBottom"}},
|
||||||
|
{key="L", mods="SHIFT", action=wezterm.action{CopyMode="MoveToViewportBottom"}},
|
||||||
|
|
||||||
|
{key="o", mods="NONE", action=wezterm.action{CopyMode="MoveToSelectionOtherEnd"}},
|
||||||
|
{key="O", mods="NONE", action=wezterm.action{CopyMode="MoveToSelectionOtherEndHoriz"}},
|
||||||
|
{key="O", mods="SHIFT", action=wezterm.action{CopyMode="MoveToSelectionOtherEndHoriz"}},
|
||||||
|
|
||||||
|
{key="PageUp", mods="NONE", action=wezterm.action{CopyMode="PageUp"}},
|
||||||
|
{key="PageDown", mods="NONE", action=wezterm.action{CopyMode="PageDown"}},
|
||||||
|
|
||||||
|
{key="b", mods="CTRL", action=wezterm.action{CopyMode="PageUp"}},
|
||||||
|
{key="f", mods="CTRL", action=wezterm.action{CopyMode="PageDown"}},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return M
|
32
home/private_dot_config/wezterm/wezterm.lua
Normal file
32
home/private_dot_config/wezterm/wezterm.lua
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
local wezterm = require("wezterm")
|
||||||
|
local catppuccin = require("colors/catppuccin").setup{}
|
||||||
|
local keys = require("keys")
|
||||||
|
-- add wezterm to title for wm usage
|
||||||
|
wezterm.on("format-window-title",
|
||||||
|
function()
|
||||||
|
return " - Wezterm"
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
local padding = 10
|
||||||
|
|
||||||
|
return {
|
||||||
|
window_background_opacity = 0.9,
|
||||||
|
window_padding = {
|
||||||
|
left = padding,
|
||||||
|
right = padding,
|
||||||
|
top = padding,
|
||||||
|
bottom = padding,
|
||||||
|
},
|
||||||
|
font = wezterm.font("MonoLisa Nerd Font"),
|
||||||
|
adjust_window_size_when_changing_font_size = false,
|
||||||
|
colors = catppuccin,
|
||||||
|
use_fancy_tab_bar = false,
|
||||||
|
hide_tab_bar_if_only_one_tab = true,
|
||||||
|
tab_bar_at_bottom = true,
|
||||||
|
disable_default_key_bindings = true,
|
||||||
|
bold_brightens_ansi_colors = true,
|
||||||
|
default_gui_startup_args = {"start","--always-new-process"},
|
||||||
|
keys = keys.keys,
|
||||||
|
key_tables = keys.key_tables,
|
||||||
|
}
|
607
home/private_dot_config/zellij/config.yaml
Normal file
607
home/private_dot_config/zellij/config.yaml
Normal file
|
@ -0,0 +1,607 @@
|
||||||
|
---
|
||||||
|
# Configuration for zellij.
|
||||||
|
|
||||||
|
# In order to troubleshoot your configuration try using the following command:
|
||||||
|
# `zellij setup --check`
|
||||||
|
# It should show current config locations and features that are enabled.
|
||||||
|
|
||||||
|
keybinds:
|
||||||
|
unbind: true
|
||||||
|
normal:
|
||||||
|
- action: [SwitchToMode: Locked,]
|
||||||
|
key: [Ctrl: 'g',]
|
||||||
|
- action: [SwitchToMode: Pane,]
|
||||||
|
key: [Ctrl: 'p',]
|
||||||
|
- action: [SwitchToMode: Resize,]
|
||||||
|
key: [Ctrl: 'n',]
|
||||||
|
- action: [SwitchToMode: Tab,]
|
||||||
|
key: [Ctrl: 't',]
|
||||||
|
- action: [SwitchToMode: Scroll,]
|
||||||
|
key: [Ctrl: 's',]
|
||||||
|
- action: [SwitchToMode: Session,]
|
||||||
|
key: [Ctrl: 'o',]
|
||||||
|
- action: [SwitchToMode: Move,]
|
||||||
|
key: [Ctrl: 'h',]
|
||||||
|
- action: [SwitchToMode: Tmux,]
|
||||||
|
key: [Ctrl: 'b',]
|
||||||
|
- action: [Quit,]
|
||||||
|
key: [Ctrl: 'q',]
|
||||||
|
- action: [NewPane: ]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left]
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right ]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up, ]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
# uncomment this and adjust key if using copy_on_select=false
|
||||||
|
# - action: [Copy: ]
|
||||||
|
# key: [ Alt: 'c']
|
||||||
|
locked:
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 'g',]
|
||||||
|
resize:
|
||||||
|
- action: [SwitchToMode: Locked,]
|
||||||
|
key: [Ctrl: 'g']
|
||||||
|
- action: [SwitchToMode: Pane,]
|
||||||
|
key: [Ctrl: 'p',]
|
||||||
|
- action: [SwitchToMode: Tab,]
|
||||||
|
key: [Ctrl: 't',]
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 'n', Char: "\n", Char: ' ', Esc]
|
||||||
|
- action: [SwitchToMode: Scroll,]
|
||||||
|
key: [Ctrl: 's']
|
||||||
|
- action: [SwitchToMode: Session,]
|
||||||
|
key: [Ctrl: 'o',]
|
||||||
|
- action: [SwitchToMode: Move,]
|
||||||
|
key: [Ctrl: 'h',]
|
||||||
|
- action: [SwitchToMode: Tmux,]
|
||||||
|
key: [Ctrl: 'b',]
|
||||||
|
- action: [Quit]
|
||||||
|
key: [Ctrl: 'q']
|
||||||
|
- action: [Resize: Left,]
|
||||||
|
key: [Char: 'h', Left,]
|
||||||
|
- action: [Resize: Down,]
|
||||||
|
key: [Char: 'j', Down,]
|
||||||
|
- action: [Resize: Up,]
|
||||||
|
key: [Char: 'k', Up, ]
|
||||||
|
- action: [Resize: Right,]
|
||||||
|
key: [Char: 'l', Right,]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [Char: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Char: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [Char: '-']
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left]
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
pane:
|
||||||
|
- action: [SwitchToMode: Locked,]
|
||||||
|
key: [Ctrl: 'g']
|
||||||
|
- action: [SwitchToMode: Resize,]
|
||||||
|
key: [Ctrl: 'n',]
|
||||||
|
- action: [SwitchToMode: Tab,]
|
||||||
|
key: [Ctrl: 't',]
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 'p', Char: "\n", Char: ' ', Esc]
|
||||||
|
- action: [SwitchToMode: Scroll,]
|
||||||
|
key: [Ctrl: 's']
|
||||||
|
- action: [SwitchToMode: Session,]
|
||||||
|
key: [Ctrl: 'o',]
|
||||||
|
- action: [SwitchToMode: Move,]
|
||||||
|
key: [Ctrl: 'h',]
|
||||||
|
- action: [SwitchToMode: Tmux,]
|
||||||
|
key: [Ctrl: 'b',]
|
||||||
|
- action: [Quit,]
|
||||||
|
key: [Ctrl: 'q',]
|
||||||
|
- action: [MoveFocus: Left,]
|
||||||
|
key: [ Char: 'h', Left,]
|
||||||
|
- action: [MoveFocus: Right,]
|
||||||
|
key: [ Char: 'l', Right,]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Char: 'j', Down,]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Char: 'k', Up,]
|
||||||
|
- action: [SwitchFocus,]
|
||||||
|
key: [Char: 'p']
|
||||||
|
- action: [NewPane: , SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'n',]
|
||||||
|
- action: [NewPane: Down, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'd',]
|
||||||
|
- action: [NewPane: Right, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'r',]
|
||||||
|
- action: [CloseFocus, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'x',]
|
||||||
|
- action: [ToggleFocusFullscreen, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'f',]
|
||||||
|
- action: [TogglePaneFrames, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'z',]
|
||||||
|
- action: [ToggleFloatingPanes, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'w']
|
||||||
|
- action: [TogglePaneEmbedOrFloating, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'e']
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them!
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
- action: [SwitchToMode: RenamePane, PaneNameInput: [0],]
|
||||||
|
key: [Char: 'c']
|
||||||
|
move:
|
||||||
|
- action: [SwitchToMode: Locked,]
|
||||||
|
key: [Ctrl: 'g']
|
||||||
|
- action: [SwitchToMode: Pane,]
|
||||||
|
key: [Ctrl: 'p',]
|
||||||
|
- action: [SwitchToMode: Tab,]
|
||||||
|
key: [Ctrl: 't',]
|
||||||
|
- action: [SwitchToMode: Resize,]
|
||||||
|
key: [Ctrl: 'n',]
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 'h', Char: "\n", Char: ' ', Esc]
|
||||||
|
- action: [SwitchToMode: Scroll,]
|
||||||
|
key: [Ctrl: 's']
|
||||||
|
- action: [SwitchToMode: Session,]
|
||||||
|
key: [Ctrl: 'o',]
|
||||||
|
- action: [Quit]
|
||||||
|
key: [Ctrl: 'q']
|
||||||
|
- action: [MovePane: ,]
|
||||||
|
key: [Char: 'n', Char: "\t",]
|
||||||
|
- action: [MovePane: Left,]
|
||||||
|
key: [Char: 'h', Left,]
|
||||||
|
- action: [MovePane: Down,]
|
||||||
|
key: [Char: 'j', Down,]
|
||||||
|
- action: [MovePane: Up,]
|
||||||
|
key: [Char: 'k', Up, ]
|
||||||
|
- action: [MovePane: Right,]
|
||||||
|
key: [Char: 'l', Right,]
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them!
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
tab:
|
||||||
|
- action: [SwitchToMode: Locked,]
|
||||||
|
key: [Ctrl: 'g']
|
||||||
|
- action: [SwitchToMode: Pane,]
|
||||||
|
key: [Ctrl: 'p',]
|
||||||
|
- action: [SwitchToMode: Resize,]
|
||||||
|
key: [Ctrl: 'n',]
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 't', Char: "\n", Char: ' ', Esc]
|
||||||
|
- action: [SwitchToMode: Scroll,]
|
||||||
|
key: [Ctrl: 's']
|
||||||
|
- action: [SwitchToMode: Move,]
|
||||||
|
key: [Ctrl: 'h',]
|
||||||
|
- action: [SwitchToMode: Tmux,]
|
||||||
|
key: [Ctrl: 'b',]
|
||||||
|
- action: [SwitchToMode: Session,]
|
||||||
|
key: [Ctrl: 'o',]
|
||||||
|
- action: [SwitchToMode: RenameTab, TabNameInput: [0],]
|
||||||
|
key: [Char: 'r']
|
||||||
|
- action: [Quit,]
|
||||||
|
key: [Ctrl: 'q',]
|
||||||
|
- action: [GoToPreviousTab,]
|
||||||
|
key: [ Char: 'h', Left, Up, Char: 'k',]
|
||||||
|
- action: [GoToNextTab,]
|
||||||
|
key: [ Char: 'l', Right,Down, Char: 'j']
|
||||||
|
- action: [NewTab: , SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'n',]
|
||||||
|
- action: [CloseTab, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'x',]
|
||||||
|
- action: [ToggleActiveSyncTab, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 's']
|
||||||
|
- action: [GoToTab: 1, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '1',]
|
||||||
|
- action: [GoToTab: 2, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '2',]
|
||||||
|
- action: [GoToTab: 3, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '3',]
|
||||||
|
- action: [GoToTab: 4, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '4',]
|
||||||
|
- action: [GoToTab: 5, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '5',]
|
||||||
|
- action: [GoToTab: 6, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '6',]
|
||||||
|
- action: [GoToTab: 7, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '7',]
|
||||||
|
- action: [GoToTab: 8, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '8',]
|
||||||
|
- action: [GoToTab: 9, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: '9',]
|
||||||
|
- action: [ToggleTab]
|
||||||
|
key: [ Char: "\t" ]
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them!
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
scroll:
|
||||||
|
- action: [EditScrollback, SwitchToMode: Normal]
|
||||||
|
key: [Char: 'e']
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 's', Char: ' ', Char: "\n", Esc]
|
||||||
|
- action: [SwitchToMode: Tab,]
|
||||||
|
key: [Ctrl: 't',]
|
||||||
|
- action: [SwitchToMode: Locked,]
|
||||||
|
key: [Ctrl: 'g',]
|
||||||
|
- action: [SwitchToMode: Pane,]
|
||||||
|
key: [Ctrl: 'p',]
|
||||||
|
- action: [SwitchToMode: Move,]
|
||||||
|
key: [Ctrl: 'h',]
|
||||||
|
- action: [SwitchToMode: Tmux,]
|
||||||
|
key: [Ctrl: 'b',]
|
||||||
|
- action: [SwitchToMode: Session,]
|
||||||
|
key: [Ctrl: 'o',]
|
||||||
|
- action: [SwitchToMode: Resize,]
|
||||||
|
key: [Ctrl: 'n',]
|
||||||
|
- action: [ScrollToBottom, SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 'c',]
|
||||||
|
- action: [Quit,]
|
||||||
|
key: [Ctrl: 'q',]
|
||||||
|
- action: [ScrollDown,]
|
||||||
|
key: [Char: 'j', Down,]
|
||||||
|
- action: [ScrollUp,]
|
||||||
|
key: [Char: 'k', Up,]
|
||||||
|
- action: [PageScrollDown,]
|
||||||
|
key: [Ctrl: 'f', PageDown, Right, Char: 'l',]
|
||||||
|
- action: [PageScrollUp,]
|
||||||
|
key: [Ctrl: 'b', PageUp, Left, Char: 'h',]
|
||||||
|
- action: [HalfPageScrollDown,]
|
||||||
|
key: [Char: 'd',]
|
||||||
|
- action: [HalfPageScrollUp,]
|
||||||
|
key: [Char: 'u',]
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left] # The Alt: Left etc. variants are temporary hacks and will be removed in the future - please do not rely on them!
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
# uncomment this and adjust key if using copy_on_select=false
|
||||||
|
# - action: [Copy: ]
|
||||||
|
# key: [ Alt: 'c']
|
||||||
|
renametab:
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Char: "\n", Ctrl: 'c', Esc]
|
||||||
|
- action: [TabNameInput: [27] , SwitchToMode: Tab,]
|
||||||
|
key: [Esc,]
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left]
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
renamepane:
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Char: "\n", Ctrl: 'c', Esc]
|
||||||
|
- action: [PaneNameInput: [27] , SwitchToMode: Pane,]
|
||||||
|
key: [Esc,]
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left]
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
session:
|
||||||
|
- action: [SwitchToMode: Locked,]
|
||||||
|
key: [Ctrl: 'g']
|
||||||
|
- action: [SwitchToMode: Resize,]
|
||||||
|
key: [Ctrl: 'n',]
|
||||||
|
- action: [SwitchToMode: Pane,]
|
||||||
|
key: [Ctrl: 'p',]
|
||||||
|
- action: [SwitchToMode: Move,]
|
||||||
|
key: [Ctrl: 'h',]
|
||||||
|
- action: [SwitchToMode: Tmux,]
|
||||||
|
key: [Ctrl: 'b',]
|
||||||
|
- action: [SwitchToMode: Tab,]
|
||||||
|
key: [Ctrl: 't',]
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc]
|
||||||
|
- action: [SwitchToMode: Scroll,]
|
||||||
|
key: [Ctrl: 's']
|
||||||
|
- action: [Quit,]
|
||||||
|
key: [Ctrl: 'q',]
|
||||||
|
- action: [Detach,]
|
||||||
|
key: [Char: 'd',]
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left]
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
tmux:
|
||||||
|
- action: [SwitchToMode: Locked,]
|
||||||
|
key: [Ctrl: 'g']
|
||||||
|
- action: [SwitchToMode: Resize,]
|
||||||
|
key: [Ctrl: 'n',]
|
||||||
|
- action: [SwitchToMode: Pane,]
|
||||||
|
key: [Ctrl: 'p',]
|
||||||
|
- action: [SwitchToMode: Move,]
|
||||||
|
key: [Ctrl: 'h',]
|
||||||
|
- action: [SwitchToMode: Tab,]
|
||||||
|
key: [Ctrl: 't',]
|
||||||
|
- action: [SwitchToMode: Normal,]
|
||||||
|
key: [Ctrl: 'o', Char: "\n", Char: ' ', Esc]
|
||||||
|
- action: [SwitchToMode: Scroll,]
|
||||||
|
key: [Ctrl: 's']
|
||||||
|
- action: [SwitchToMode: Scroll,]
|
||||||
|
key: [ Char: '[']
|
||||||
|
- action: [Quit,]
|
||||||
|
key: [Ctrl: 'q',]
|
||||||
|
- action: [Write: [2,], SwitchToMode: Normal]
|
||||||
|
key: [Ctrl: 'b']
|
||||||
|
- action: [NewPane: Down, SwitchToMode: Normal,]
|
||||||
|
key: [Char: "\"",]
|
||||||
|
- action: [NewPane: Right, SwitchToMode: Normal,]
|
||||||
|
key: [Char: '%',]
|
||||||
|
- action: [ToggleFocusFullscreen, SwitchToMode: Normal,]
|
||||||
|
key: [Char: 'z',]
|
||||||
|
- action: [NewTab: , SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'c',]
|
||||||
|
- action: [SwitchToMode: RenameTab, TabNameInput: [0],]
|
||||||
|
key: [Char: ',']
|
||||||
|
- action: [GoToPreviousTab, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'p']
|
||||||
|
- action: [GoToNextTab, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'n']
|
||||||
|
- action: [MoveFocus: Left, SwitchToMode: Normal,]
|
||||||
|
key: [ Left,]
|
||||||
|
- action: [MoveFocus: Right, SwitchToMode: Normal,]
|
||||||
|
key: [ Right,]
|
||||||
|
- action: [MoveFocus: Down, SwitchToMode: Normal,]
|
||||||
|
key: [ Down,]
|
||||||
|
- action: [MoveFocus: Up, SwitchToMode: Normal,]
|
||||||
|
key: [ Up,]
|
||||||
|
- action: [MoveFocus: Left, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'h']
|
||||||
|
- action: [MoveFocus: Right, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'l']
|
||||||
|
- action: [MoveFocus: Down, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'j']
|
||||||
|
- action: [MoveFocus: Up, SwitchToMode: Normal,]
|
||||||
|
key: [ Char: 'k']
|
||||||
|
- action: [NewPane: ,]
|
||||||
|
key: [ Alt: 'n',]
|
||||||
|
- action: [MoveFocusOrTab: Left,]
|
||||||
|
key: [ Alt: 'h', Alt: Left]
|
||||||
|
- action: [MoveFocusOrTab: Right,]
|
||||||
|
key: [ Alt: 'l', Alt: Right]
|
||||||
|
- action: [MoveFocus: Down,]
|
||||||
|
key: [ Alt: 'j', Alt: Down]
|
||||||
|
- action: [MoveFocus: Up,]
|
||||||
|
key: [ Alt: 'k', Alt: Up]
|
||||||
|
- action: [FocusNextPane,]
|
||||||
|
key: [ Char: 'o']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '=']
|
||||||
|
- action: [Resize: Increase,]
|
||||||
|
key: [ Alt: '+']
|
||||||
|
- action: [Resize: Decrease,]
|
||||||
|
key: [ Alt: '-']
|
||||||
|
- action: [Detach,]
|
||||||
|
key: [Char: 'd',]
|
||||||
|
plugins:
|
||||||
|
- path: tab-bar
|
||||||
|
tag: tab-bar
|
||||||
|
- path: status-bar
|
||||||
|
tag: status-bar
|
||||||
|
- path: strider
|
||||||
|
tag: strider
|
||||||
|
- path: compact-bar
|
||||||
|
tag: compact-bar
|
||||||
|
|
||||||
|
# Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
|
||||||
|
# eg. when terminal window with an active zellij session is closed
|
||||||
|
# Options:
|
||||||
|
# - detach (Default)
|
||||||
|
# - quit
|
||||||
|
#on_force_close: quit
|
||||||
|
|
||||||
|
# Send a request for a simplified ui (without arrow fonts) to plugins
|
||||||
|
# Options:
|
||||||
|
# - true
|
||||||
|
# - false (Default)
|
||||||
|
#simplified_ui: true
|
||||||
|
|
||||||
|
# Choose the path to the default shell that zellij will use for opening new panes
|
||||||
|
# Default: $SHELL
|
||||||
|
# default_shell: fish
|
||||||
|
|
||||||
|
# Toggle between having pane frames around the panes
|
||||||
|
# Options:
|
||||||
|
# - true (default)
|
||||||
|
# - false
|
||||||
|
pane_frames: false
|
||||||
|
|
||||||
|
# Choose the theme that is specified in the themes section.
|
||||||
|
# For some examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
|
||||||
|
# Default: default
|
||||||
|
#theme: default
|
||||||
|
|
||||||
|
# Choose the mode that zellij uses when starting up.
|
||||||
|
# Default: normal
|
||||||
|
#default_mode: locked
|
||||||
|
|
||||||
|
# Toggle enabling the mouse mode.
|
||||||
|
# On certain configurations, or terminals this could
|
||||||
|
# potentially interfere with copying text.
|
||||||
|
# Options:
|
||||||
|
# - true (default)
|
||||||
|
# - false
|
||||||
|
#mouse_mode: false
|
||||||
|
|
||||||
|
# Configure the scroll back buffer size
|
||||||
|
# This is the number of lines zellij stores for each pane in the scroll back
|
||||||
|
# buffer. Excess number of lines are discarded in a FIFO fashion.
|
||||||
|
# Valid values: positive integers
|
||||||
|
# Default value: 10000
|
||||||
|
#scroll_buffer_size: 10000
|
||||||
|
|
||||||
|
# Provide a command to execute when copying text. The text will be piped to
|
||||||
|
# the stdin of the program to perform the copy. This can be used with
|
||||||
|
# terminal emulators which do not support the OSC 52 ANSI control sequence
|
||||||
|
# that will be used by default if this option is not set.
|
||||||
|
# Examples:
|
||||||
|
#copy_command: "xclip -selection clipboard" # x11
|
||||||
|
#copy_command: "wl-copy" # wayland
|
||||||
|
#copy_command: "pbcopy" # osx
|
||||||
|
|
||||||
|
# Choose the destination for copied text
|
||||||
|
# Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
|
||||||
|
# Does not apply when using copy_command.
|
||||||
|
# Options:
|
||||||
|
# - system (default)
|
||||||
|
# - primary
|
||||||
|
#copy_clipboard: primary
|
||||||
|
|
||||||
|
# Enable or disable automatic copy (and clear) of selection when releasing mouse
|
||||||
|
#copy_on_select: true
|
||||||
|
|
||||||
|
# Path to the default editor to use to edit pane scrollbuffer
|
||||||
|
# scrollback_editor: /usr/bin/nano
|
||||||
|
|
||||||
|
theme: catppuccin
|
||||||
|
themes:
|
||||||
|
catppuccin:
|
||||||
|
bg:
|
||||||
|
- 48
|
||||||
|
- 45
|
||||||
|
- 65
|
||||||
|
black:
|
||||||
|
- 22
|
||||||
|
- 19
|
||||||
|
- 32
|
||||||
|
blue:
|
||||||
|
- 150
|
||||||
|
- 205
|
||||||
|
- 251
|
||||||
|
cyan:
|
||||||
|
- 26
|
||||||
|
- 24
|
||||||
|
- 38
|
||||||
|
fg:
|
||||||
|
- 217
|
||||||
|
- 224
|
||||||
|
- 238
|
||||||
|
gray:
|
||||||
|
- 87
|
||||||
|
- 82
|
||||||
|
- 104
|
||||||
|
green:
|
||||||
|
- 171
|
||||||
|
- 233
|
||||||
|
- 179
|
||||||
|
magenta:
|
||||||
|
- 245
|
||||||
|
- 194
|
||||||
|
- 231
|
||||||
|
orange:
|
||||||
|
- 248
|
||||||
|
- 189
|
||||||
|
- 150
|
||||||
|
red:
|
||||||
|
- 242
|
||||||
|
- 143
|
||||||
|
- 173
|
||||||
|
white:
|
||||||
|
- 217
|
||||||
|
- 224
|
||||||
|
- 238
|
||||||
|
yellow:
|
||||||
|
- 250
|
||||||
|
- 227
|
||||||
|
- 176
|
31
home/private_dot_vimrc
Normal file
31
home/private_dot_vimrc
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
" Custom Mappings
|
||||||
|
imap jk <Esc>
|
||||||
|
vmap jk <Esc>
|
||||||
|
"---------------
|
||||||
|
" Tabs
|
||||||
|
"---------------
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set noexpandtab
|
||||||
|
|
||||||
|
" Use case insensitive search, except when using capital letters
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
|
||||||
|
" When opening a new line and no filetype-specific indenting is enabled, keep
|
||||||
|
" the same indent as the line you're currently on. Useful for READMEs, etc.
|
||||||
|
set autoindent
|
||||||
|
|
||||||
|
" Display line numbers on the left
|
||||||
|
set number
|
||||||
|
|
||||||
|
" Increase undo limit
|
||||||
|
set history=1000
|
||||||
|
|
||||||
|
" Disable swap files
|
||||||
|
set noswapfile
|
||||||
|
|
||||||
|
" Attempt to show end of paragraph
|
||||||
|
set display+=lastline
|
||||||
|
|
38
info/pkgs.yml
Normal file
38
info/pkgs.yml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
arch:
|
||||||
|
# utils
|
||||||
|
- zsh
|
||||||
|
- nano
|
||||||
|
- vim
|
||||||
|
- curl
|
||||||
|
- wget
|
||||||
|
- git
|
||||||
|
- coreutils
|
||||||
|
- unzip
|
||||||
|
- openssh
|
||||||
|
- tmux
|
||||||
|
# system
|
||||||
|
- bluez-utils
|
||||||
|
- dhcpcd
|
||||||
|
# environment
|
||||||
|
- xorg-server
|
||||||
|
- xorg-apps
|
||||||
|
- xorg-xinit
|
||||||
|
- xf86-video-vesa
|
||||||
|
- lightdm
|
||||||
|
- rofi
|
||||||
|
- dunst
|
||||||
|
# tools
|
||||||
|
- alacritty
|
||||||
|
- vivaldi
|
||||||
|
aur:
|
||||||
|
# tools
|
||||||
|
- visual-studio-code-bin
|
||||||
|
# environment
|
||||||
|
- lightdm-mini-greeter
|
||||||
|
- leftwm
|
||||||
|
- leftwm-theme-git
|
||||||
|
- picom-git
|
||||||
|
- polybar
|
||||||
|
# fun
|
||||||
|
- macchina
|
||||||
|
|
77
info/tools.yml
Normal file
77
info/tools.yml
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
|
||||||
|
tool: &default
|
||||||
|
asset: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
# environment
|
||||||
|
sheldon:
|
||||||
|
user: rossmacarthur
|
||||||
|
starship:
|
||||||
|
user: starship
|
||||||
|
asset: starship-x86_64-unknown-linux-gnu.tar.gz
|
||||||
|
|
||||||
|
# general
|
||||||
|
lsd:
|
||||||
|
<<: *default
|
||||||
|
user: Peltoche
|
||||||
|
ripgrep:
|
||||||
|
user: BurntSushi
|
||||||
|
to: rg
|
||||||
|
fd:
|
||||||
|
<<: *default
|
||||||
|
user: sharkdp
|
||||||
|
bat:
|
||||||
|
<<: *default
|
||||||
|
user: sharkdp
|
||||||
|
just:
|
||||||
|
user: casey
|
||||||
|
zoxide:
|
||||||
|
user: ajeetdsouza
|
||||||
|
gum:
|
||||||
|
user: charmbracelet
|
||||||
|
asset: linux_x86_64.tar.gz
|
||||||
|
custom_flags: "--asset ^.sbom"
|
||||||
|
|
||||||
|
# system monitoring
|
||||||
|
bottom:
|
||||||
|
asset: x86_64-unknown-linux-gnu.tar.gz
|
||||||
|
user: ClementTsang
|
||||||
|
file: btm
|
||||||
|
to: btm
|
||||||
|
|
||||||
|
# git
|
||||||
|
lazygit:
|
||||||
|
user: jesseduffield
|
||||||
|
cli:
|
||||||
|
user: cli
|
||||||
|
asset: linux_amd64.tar.gz
|
||||||
|
to: gh
|
||||||
|
glab:
|
||||||
|
user: profclems
|
||||||
|
asset: Linux_x86_64.tar.gz
|
||||||
|
|
||||||
|
#node
|
||||||
|
fnm:
|
||||||
|
user: Schniz
|
||||||
|
|
||||||
|
# editing
|
||||||
|
neovim:
|
||||||
|
user: neovim
|
||||||
|
to: nvim
|
||||||
|
sh:
|
||||||
|
user: mvdan
|
||||||
|
to: shfmt
|
||||||
|
|
||||||
|
|
||||||
|
# file management
|
||||||
|
gdu:
|
||||||
|
user: dundee
|
||||||
|
to: gdu
|
||||||
|
# download-only: true
|
||||||
|
# post-download: |
|
||||||
|
# tar -xzf gdu_linux_amd64.tgz
|
||||||
|
# mv gdu_linux_amd64 $EGET_BIN/gdu
|
||||||
|
# rm gdu_linux_amd64.tgz
|
||||||
|
|
||||||
|
lf:
|
||||||
|
user: gokcehan
|
||||||
|
|
69
lib/alias.zsh
Executable file
69
lib/alias.zsh
Executable file
|
@ -0,0 +1,69 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# system usage
|
||||||
|
#########################################
|
||||||
|
alias reload="source ~/.zshrc"
|
||||||
|
alias rr="rm -rf"
|
||||||
|
#########################################
|
||||||
|
|
||||||
|
#ls type aliases
|
||||||
|
#########################################
|
||||||
|
#alias ls='ls -F'
|
||||||
|
alias l='ls -lh --color=auto'
|
||||||
|
alias ll="ls -lhA"
|
||||||
|
alias left='ls -t -1'
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias lsl="ls -lhFA | less"
|
||||||
|
#########################################
|
||||||
|
|
||||||
|
# List declared aliases, functions, paths
|
||||||
|
#########################################
|
||||||
|
alias aliases="alias | sed 's/=.*//'"
|
||||||
|
alias functions="declare -f | grep '^[a-z].* ()' | sed 's/{$//'"
|
||||||
|
alias paths='echo -e ${PATH//:/\\n}'
|
||||||
|
#########################################
|
||||||
|
|
||||||
|
# program dependent aliases
|
||||||
|
#########################################
|
||||||
|
alias code2="code-insiders"
|
||||||
|
# ls -> lsd | swap ls for ls-deluxe
|
||||||
|
if is-executable lsd; then
|
||||||
|
|
||||||
|
is-tty && alias lsd="lsd --icon never"
|
||||||
|
alias ls='lsd'
|
||||||
|
alias l='lsd -l'
|
||||||
|
alias la='lsd -a'
|
||||||
|
alias lla='lsd -la'
|
||||||
|
alias lt='lsd --tree --depth=3'
|
||||||
|
alias lr='lsd -R'
|
||||||
|
|
||||||
|
fi
|
||||||
|
#lazygit
|
||||||
|
is-executable lazygit && alias lg=lazygit
|
||||||
|
# source custom tmux.conf with older tmux
|
||||||
|
alias tmux="tmux -f ~/.config/tmux/tmux.conf"
|
||||||
|
alias rc="rclone --filter-from ~/.config/rclone/filter-file.txt"
|
||||||
|
# prefer nvim if installed
|
||||||
|
if is-executable lvim; then
|
||||||
|
alias vim=lvim
|
||||||
|
elif is-executable nvim; then
|
||||||
|
alias vim=nvim
|
||||||
|
fi
|
||||||
|
# gdu defualts
|
||||||
|
is-executable gdu && alias gdu -I '.*node_modules' -H
|
||||||
|
# more fzf
|
||||||
|
alias fzf-bat="fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'"
|
||||||
|
alias vivaldi="vivaldi-stable"
|
||||||
|
#zellij
|
||||||
|
if is-executable zellij; then
|
||||||
|
|
||||||
|
alias zs="zellij -s"
|
||||||
|
alias zl="zellij ls"
|
||||||
|
alias za="zellij a"
|
||||||
|
|
||||||
|
fi
|
||||||
|
#zenith
|
||||||
|
alias zenith="zenith -d 0 -n 0"
|
||||||
|
# pdm
|
||||||
|
alias pdm-start='eval "$(pdm shell)"'
|
||||||
|
##########################################
|
154
lib/completions/_just
Executable file
154
lib/completions/_just
Executable file
|
@ -0,0 +1,154 @@
|
||||||
|
#compdef just
|
||||||
|
|
||||||
|
autoload -U is-at-least
|
||||||
|
|
||||||
|
_just() {
|
||||||
|
typeset -A opt_args
|
||||||
|
typeset -a _arguments_options
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
if is-at-least 5.2; then
|
||||||
|
_arguments_options=(-s -S -C)
|
||||||
|
else
|
||||||
|
_arguments_options=(-s -C)
|
||||||
|
fi
|
||||||
|
|
||||||
|
local context curcontext="$curcontext" state line
|
||||||
|
local common=(
|
||||||
|
'--chooser=[Override binary invoked by `--choose`]' \
|
||||||
|
'--color=[Print colorful output]: :(auto always never)' \
|
||||||
|
'--dump-format=[Dump justfile as <FORMAT>]: :(just json)' \
|
||||||
|
'--list-heading=[Print <TEXT> before list]' \
|
||||||
|
'--list-prefix=[Print <TEXT> before each list item]' \
|
||||||
|
'-f+[Use <JUSTFILE> as justfile]' \
|
||||||
|
'--justfile=[Use <JUSTFILE> as justfile]' \
|
||||||
|
'*--set[Override <VARIABLE> with <VALUE>]: :_just_variables' \
|
||||||
|
'--shell=[Invoke <SHELL> to run recipes]' \
|
||||||
|
'*--shell-arg=[Invoke shell with <SHELL-ARG> as an argument]' \
|
||||||
|
'-d+[Use <WORKING-DIRECTORY> as working directory. --justfile must also be set]' \
|
||||||
|
'--working-directory=[Use <WORKING-DIRECTORY> as working directory. --justfile must also be set]' \
|
||||||
|
'-c+[Run an arbitrary command with the working directory, `.env`, overrides, and exports set]' \
|
||||||
|
'--command=[Run an arbitrary command with the working directory, `.env`, overrides, and exports set]' \
|
||||||
|
'--completions=[Print shell completion script for <SHELL>]: :(zsh bash fish powershell elvish)' \
|
||||||
|
'-s+[Show information about <RECIPE>]: :_just_commands' \
|
||||||
|
'--show=[Show information about <RECIPE>]: :_just_commands' \
|
||||||
|
'(--dotenv-path)--dotenv-filename=[Search for environment file named <DOTENV-FILENAME> instead of `.env`]' \
|
||||||
|
'--dotenv-path=[Load environment file at <DOTENV-PATH> instead of searching for one]' \
|
||||||
|
'--check[Run `--fmt` in '\''check'\'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.]' \
|
||||||
|
'(-q --quiet)--dry-run[Print what just would do without doing it]' \
|
||||||
|
'--highlight[Highlight echoed recipe lines in bold]' \
|
||||||
|
'--no-dotenv[Don'\''t load `.env` file]' \
|
||||||
|
'--no-highlight[Don'\''t highlight echoed recipe lines in bold]' \
|
||||||
|
'(--dry-run)-q[Suppress all output]' \
|
||||||
|
'(--dry-run)--quiet[Suppress all output]' \
|
||||||
|
'--shell-command[Invoke <COMMAND> with the shell used to run recipe lines and backticks]' \
|
||||||
|
'--clear-shell-args[Clear shell arguments]' \
|
||||||
|
'-u[Return list and summary entries in source order]' \
|
||||||
|
'--unsorted[Return list and summary entries in source order]' \
|
||||||
|
'--unstable[Enable unstable features]' \
|
||||||
|
'*-v[Use verbose output]' \
|
||||||
|
'*--verbose[Use verbose output]' \
|
||||||
|
'--changelog[Print changelog]' \
|
||||||
|
'--choose[Select one or more recipes to run using a binary. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`]' \
|
||||||
|
'--dump[Print justfile]' \
|
||||||
|
'-e[Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`]' \
|
||||||
|
'--edit[Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`]' \
|
||||||
|
'--evaluate[Evaluate and print all variables. If a variable name is given as an argument, only print that variable'\''s value.]' \
|
||||||
|
'--fmt[Format and overwrite justfile]' \
|
||||||
|
'--init[Initialize new justfile in project root]' \
|
||||||
|
'-l[List available recipes and their arguments]' \
|
||||||
|
'--list[List available recipes and their arguments]' \
|
||||||
|
'--summary[List names of available recipes]' \
|
||||||
|
'--variables[List names of variables]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'-V[Print version information]' \
|
||||||
|
'--version[Print version information]' \
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments "${_arguments_options[@]}" $common \
|
||||||
|
'1: :_just_commands' \
|
||||||
|
'*: :->args' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
args)
|
||||||
|
curcontext="${curcontext%:*}-${words[2]}:"
|
||||||
|
|
||||||
|
local lastarg=${words[${#words}]}
|
||||||
|
local recipe
|
||||||
|
|
||||||
|
local cmds; cmds=(
|
||||||
|
${(s: :)$(_call_program commands just --summary)}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Find first recipe name
|
||||||
|
for ((i = 2; i < $#words; i++ )) do
|
||||||
|
if [[ ${cmds[(I)${words[i]}]} -gt 0 ]]; then
|
||||||
|
recipe=${words[i]}
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $lastarg = */* ]]; then
|
||||||
|
# Arguments contain slash would be recognised as a file
|
||||||
|
_arguments -s -S $common '*:: :_files'
|
||||||
|
elif [[ $lastarg = *=* ]]; then
|
||||||
|
# Arguments contain equal would be recognised as a variable
|
||||||
|
_message "value"
|
||||||
|
elif [[ $recipe ]]; then
|
||||||
|
# Show usage message
|
||||||
|
_message "`just --show $recipe`"
|
||||||
|
# Or complete with other commands
|
||||||
|
#_arguments -s -S $common '*:: :_just_commands'
|
||||||
|
else
|
||||||
|
_arguments -s -S $common '*:: :_just_commands'
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_just_commands] )) ||
|
||||||
|
_just_commands() {
|
||||||
|
[[ $PREFIX = -* ]] && return 1
|
||||||
|
integer ret=1
|
||||||
|
local variables; variables=(
|
||||||
|
${(s: :)$(_call_program commands just --variables)}
|
||||||
|
)
|
||||||
|
local commands; commands=(
|
||||||
|
${${${(M)"${(f)$(_call_program commands just --list)}":# *}/ ##/}/ ##/:Args: }
|
||||||
|
)
|
||||||
|
|
||||||
|
if compset -P '*='; then
|
||||||
|
case "${${words[-1]%=*}#*=}" in
|
||||||
|
*) _message 'value' && ret=0 ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
_describe -t variables 'variables' variables -qS "=" && ret=0
|
||||||
|
_describe -t commands 'just commands' commands "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_just_variables] )) ||
|
||||||
|
_just_variables() {
|
||||||
|
[[ $PREFIX = -* ]] && return 1
|
||||||
|
integer ret=1
|
||||||
|
local variables; variables=(
|
||||||
|
${(s: :)$(_call_program commands just --variables)}
|
||||||
|
)
|
||||||
|
|
||||||
|
if compset -P '*='; then
|
||||||
|
case "${${words[-1]%=*}#*=}" in
|
||||||
|
*) _message 'value' && ret=0 ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
_describe -t variables 'variables' variables && ret=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_just "$@"
|
81
lib/completions/_lsd
Executable file
81
lib/completions/_lsd
Executable file
|
@ -0,0 +1,81 @@
|
||||||
|
#compdef lsd
|
||||||
|
|
||||||
|
autoload -U is-at-least
|
||||||
|
|
||||||
|
_lsd() {
|
||||||
|
typeset -A opt_args
|
||||||
|
typeset -a _arguments_options
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
if is-at-least 5.2; then
|
||||||
|
_arguments_options=(-s -S -C)
|
||||||
|
else
|
||||||
|
_arguments_options=(-s -C)
|
||||||
|
fi
|
||||||
|
|
||||||
|
local context curcontext="$curcontext" state line
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*--color=[When to use terminal colours]: :(always auto never)' \
|
||||||
|
'*--icon=[When to print the icons]: :(always auto never)' \
|
||||||
|
'*--icon-theme=[Whether to use fancy or unicode icons]: :(fancy unicode)' \
|
||||||
|
'--config-file=[Provide a custom lsd configuration file]' \
|
||||||
|
'*--depth=[Stop recursing into directories after reaching specified depth]' \
|
||||||
|
'*--size=[How to display size]: :(default short bytes)' \
|
||||||
|
'*--date=[How to display date \[possible values: date, relative, +date-time-format\]]' \
|
||||||
|
'*--sort=[sort by WORD instead of name]: :(size time version extension)' \
|
||||||
|
'*--group-dirs=[Sort the directories then the files]: :(none first last)' \
|
||||||
|
'*--blocks=[Specify the blocks that will be displayed and in what order]: :(permission user group size date name inode links)' \
|
||||||
|
'*-I+[Do not display files/directories with names matching the glob pattern(s). More than one can be specified by repeating the argument]' \
|
||||||
|
'*--ignore-glob=[Do not display files/directories with names matching the glob pattern(s). More than one can be specified by repeating the argument]' \
|
||||||
|
'*-a[Do not ignore entries starting with .]' \
|
||||||
|
'*--all[Do not ignore entries starting with .]' \
|
||||||
|
'*-A[Do not list implied . and ..]' \
|
||||||
|
'*--almost-all[Do not list implied . and ..]' \
|
||||||
|
'*-F[Append indicator (one of */=>@|) at the end of the file names]' \
|
||||||
|
'*--classify[Append indicator (one of */=>@|) at the end of the file names]' \
|
||||||
|
'*-l[Display extended file metadata as a table]' \
|
||||||
|
'*--long[Display extended file metadata as a table]' \
|
||||||
|
'--ignore-config[Ignore the configuration file]' \
|
||||||
|
'*-1[Display one entry per line]' \
|
||||||
|
'*--oneline[Display one entry per line]' \
|
||||||
|
'(--tree)*-R[Recurse into directories]' \
|
||||||
|
'(--tree)*--recursive[Recurse into directories]' \
|
||||||
|
'*-h[For ls compatibility purposes ONLY, currently set by default]' \
|
||||||
|
'*--human-readable[For ls compatibility purposes ONLY, currently set by default]' \
|
||||||
|
'(-R --recursive)*--tree[Recurse into directories and present the result as a tree]' \
|
||||||
|
'(--depth -R --recursive)-d[Display directories themselves, and not their contents (recursively when used with --tree)]' \
|
||||||
|
'(--depth -R --recursive)--directory-only[Display directories themselves, and not their contents (recursively when used with --tree)]' \
|
||||||
|
'*--total-size[Display the total size of directories]' \
|
||||||
|
'*-t[Sort by time modified]' \
|
||||||
|
'*--timesort[Sort by time modified]' \
|
||||||
|
'*-S[Sort by size]' \
|
||||||
|
'*--sizesort[Sort by size]' \
|
||||||
|
'*-X[Sort by file extension]' \
|
||||||
|
'*--extensionsort[Sort by file extension]' \
|
||||||
|
'*-v[Natural sort of (version) numbers within text]' \
|
||||||
|
'*--versionsort[Natural sort of (version) numbers within text]' \
|
||||||
|
'*-r[Reverse the order of the sort]' \
|
||||||
|
'*--reverse[Reverse the order of the sort]' \
|
||||||
|
'--classic[Enable classic mode (display output similar to ls)]' \
|
||||||
|
'*--no-symlink[Do not display symlink target]' \
|
||||||
|
'*-i[Display the index number of each file]' \
|
||||||
|
'*--inode[Display the index number of each file]' \
|
||||||
|
'*-L[When showing file information for a symbolic link, show information for the file the link references rather than for the link itself]' \
|
||||||
|
'*--dereference[When showing file information for a symbolic link, show information for the file the link references rather than for the link itself]' \
|
||||||
|
'--help[Prints help information]' \
|
||||||
|
'-V[Prints version information]' \
|
||||||
|
'--version[Prints version information]' \
|
||||||
|
'::FILE:_files' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_lsd_commands] )) ||
|
||||||
|
_lsd_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
|
||||||
|
)
|
||||||
|
_describe -t commands 'lsd commands' commands "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
_lsd "$@"
|
449
lib/completions/_pdm
Executable file
449
lib/completions/_pdm
Executable file
|
@ -0,0 +1,449 @@
|
||||||
|
#compdef pdm
|
||||||
|
|
||||||
|
PDM_PYTHON="/home/daylin/projects/github/forks/pdm/venv/bin/python"
|
||||||
|
PDM_PIP_INDEXES=($(command ${PDM_PYTHON} -m pdm config pypi.url))
|
||||||
|
|
||||||
|
_pdm() {
|
||||||
|
emulate -L zsh -o extended_glob
|
||||||
|
|
||||||
|
typeset -A opt_args
|
||||||
|
local context state state_descr line
|
||||||
|
|
||||||
|
local curcontext=$curcontext ret=1
|
||||||
|
local -a arguments=(
|
||||||
|
{-h,--help}'[Show help message and exit]'
|
||||||
|
{-v,--verbose}'[Show detailed output]'
|
||||||
|
)
|
||||||
|
local sub_commands=(
|
||||||
|
'add:Add package(s) to pyproject.toml and install them'
|
||||||
|
'build:Build artifacts for distribution'
|
||||||
|
'cache:Control the caches of PDM'
|
||||||
|
'completion:Generate completion scripts for the given shell'
|
||||||
|
'config:Display the current configuration'
|
||||||
|
'export:Export the locked packages set to other formats'
|
||||||
|
'import:Import project metadata from other formats'
|
||||||
|
'info:Show the project information'
|
||||||
|
'init:Initialize a pyproject.toml for PDM'
|
||||||
|
'install:Install dependencies from lock file'
|
||||||
|
'list:List packages installed in the current working set'
|
||||||
|
'lock:Resolve and lock dependencies'
|
||||||
|
'plugin:Manage the PDM plugins'
|
||||||
|
'remove:Remove packages from pyproject.toml'
|
||||||
|
'run:Run commands or scripts with local packages loaded'
|
||||||
|
'search:Search for PyPI packages'
|
||||||
|
'show:Show the package information'
|
||||||
|
'sync:Synchronize the current working set with lock file'
|
||||||
|
'update:Update package(s) in pyproject.toml'
|
||||||
|
'use:Use the given python version or path as base interpreter'
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments -s -C -A '-*' \
|
||||||
|
$arguments \
|
||||||
|
{-c,--config}'[Specify another config file path(env var: PDM_CONFIG_FILE)]' \
|
||||||
|
{-V,--version}'[Show the version and exit]' \
|
||||||
|
{-I,--ignore-python}'[Ignore the Python path saved in the pdm.toml config]' \
|
||||||
|
'--pep582=[Print the command line to be eval by the shell]:shell:(zsh bash fish tcsh csh)' \
|
||||||
|
'*:: :->_subcmds' \
|
||||||
|
&& return 0
|
||||||
|
|
||||||
|
if (( CURRENT == 1 )); then
|
||||||
|
_describe -t commands 'pdm subcommand' sub_commands
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
curcontext=${curcontext%:*}:$words[1]
|
||||||
|
|
||||||
|
case $words[1] in
|
||||||
|
add)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-d,--dev}'[Add packages into dev dependencies]'
|
||||||
|
{-G,--group}'[Specify the target dependency group to add into]:group:_pdm_groups'
|
||||||
|
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
|
||||||
|
'--no-sync[Only write pyproject.toml and do not sync the working set]'
|
||||||
|
'--save-compatible[Save compatible version specifiers]'
|
||||||
|
'--save-wildcard[Save wildcard version specifiers]'
|
||||||
|
'--save-exact[Save exact version specifiers]'
|
||||||
|
'--save-minimum[Save minimum version specifiers]'
|
||||||
|
'--update-reuse[Reuse pinned versions already present in lock file if possible]'
|
||||||
|
'--update-eager[Try to update the packages and their dependencies recursively]'
|
||||||
|
'--no-editable[Install non-editable versions for all packages]'
|
||||||
|
"--no-self[Don't install the project itself]"
|
||||||
|
{-u,--unconstrained}'[Ignore the version constraint of packages]'
|
||||||
|
{--pre,--prerelease}'[Allow prereleases to be pinned]'
|
||||||
|
{-e+,--editable+}'[Specify editable packages]:packages'
|
||||||
|
"--no-isolation[do not isolate the build in a clean environment]"
|
||||||
|
"--dry-run[Show the difference only without modifying the lockfile content]"
|
||||||
|
'*:packages:_pdm_pip_packages'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
build)
|
||||||
|
arguments+=(
|
||||||
|
"--no-sdist[Don't build source tarballs]"
|
||||||
|
"--no-wheel[Don't build wheels]"
|
||||||
|
{-d+,--dest+}'[Target directory to put artifacts]:directory:_files -/'
|
||||||
|
'--no-clean[Do not clean the target directory]'
|
||||||
|
{-C,--config-setting}'[Pass options to the backend. options with a value must be specified after "=": "--config-setting=--opt(=value)" or "-C--opt(=value)"]'
|
||||||
|
"--no-isolation[do not isolate the build in a clean environment]"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
cache)
|
||||||
|
_arguments -C \
|
||||||
|
$arguments \
|
||||||
|
': :->command' \
|
||||||
|
'*:: :->args' && ret=0
|
||||||
|
case $state in
|
||||||
|
command)
|
||||||
|
local -a actions=(
|
||||||
|
"clear:Clean all the files under cache directory"
|
||||||
|
"remove:Remove files matching the given pattern"
|
||||||
|
"list:List the built wheels stored in the cache"
|
||||||
|
"info:Show the info and current size of caches"
|
||||||
|
)
|
||||||
|
_describe -t command 'pdm cache actions' actions && ret=0
|
||||||
|
;;
|
||||||
|
args)
|
||||||
|
case $words[1] in
|
||||||
|
clear)
|
||||||
|
compadd -X type 'hashes' 'http' 'wheels' 'metadata' && ret=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_message "pattern" && ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
return $ret
|
||||||
|
;;
|
||||||
|
config)
|
||||||
|
_arguments -s \
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]' \
|
||||||
|
{-l,--local}"[Set config in the project's local configuration file]" \
|
||||||
|
{-d,--delete}'[Unset a configuration key]' \
|
||||||
|
'1:key:->keys' \
|
||||||
|
'2:value:_files' && return 0
|
||||||
|
if [[ $state == keys ]]; then
|
||||||
|
local l mbegin mend match keys=()
|
||||||
|
for l in ${(f)"$(command ${PDM_PYTHON} -m pdm config)"}; do
|
||||||
|
if [[ $l == (#b)" "#(*)" = "(*) ]]; then
|
||||||
|
keys+=("$match[1]:$match[2]")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
_describe -t key "key" keys && return 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
export)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-f+,--format+}"[Specify the export file format]:format:(pipfile poetry flit requirements setuppy)"
|
||||||
|
"--without-hashes[Don't include artifact hashes]"
|
||||||
|
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
|
||||||
|
{-o+,--output+}"[Write output to the given file, or print to stdout if not given]:output file:_files"
|
||||||
|
{-G+,--group+}'[Select group of optional-dependencies or dev-dependencies(with -d). Can be supplied multiple times, use ":all" to include all groups under the
|
||||||
|
same species]:group:_pdm_groups'
|
||||||
|
{-d,--dev}"[Select dev dependencies]"
|
||||||
|
{--prod,--production}"[Unselect dev dependencies]"
|
||||||
|
"--no-default[Don't include dependencies from the default group]"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
import)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-f+,--format+}"[Specify the file format explicitly]:format:(pipfile poetry flit requirements)"
|
||||||
|
'1:filename:_files'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
info)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
'--python[Show the interpreter path]'
|
||||||
|
'--where[Show the project root path]'
|
||||||
|
'--env[Show PEP 508 environment markers]'
|
||||||
|
'--packages[Show the packages root]'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
init)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-n,--non-interactive}"[Don't ask questions but use default values]"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
install)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-G+,--group+}'[Select group of optional-dependencies or dev-dependencies(with -d). Can be supplied multiple times, use ":all" to include all groups under the
|
||||||
|
same species]:group:_pdm_groups'
|
||||||
|
{-d,--dev}"[Select dev dependencies]"
|
||||||
|
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
|
||||||
|
{--prod,--production}"[Unselect dev dependencies]"
|
||||||
|
"--no-lock[Don't do lock if lock file is not found or outdated]"
|
||||||
|
"--no-default[Don\'t include dependencies from the default group]"
|
||||||
|
'--no-editable[Install non-editable versions for all packages]'
|
||||||
|
"--no-self[Don't install the project itself]"
|
||||||
|
"--no-isolation[do not isolate the build in a clean environment]"
|
||||||
|
"--dry-run[Show the difference only without modifying the lock file content]"
|
||||||
|
"--check[Check if the lock file is up to date and fail otherwise]"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
list)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-r,--reverse}'[Reverse the dependency graph]'
|
||||||
|
'--json[Show the installed dependencies in JSON document format]'
|
||||||
|
'--graph[Display a graph of dependencies]'
|
||||||
|
"--freeze[Show the installed dependencies as pip's requirements.txt format]"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
lock)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
|
||||||
|
"--no-isolation[Do not isolate the build in a clean environment]"
|
||||||
|
"--refresh[Don't update pinned versions, only refresh the lock file]"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
plugin)
|
||||||
|
_arguments -C \
|
||||||
|
$arguments \
|
||||||
|
': :->command' \
|
||||||
|
'*:: :->args' && ret=0
|
||||||
|
case $state in
|
||||||
|
command)
|
||||||
|
local -a actions=(
|
||||||
|
"add:Install new plugins with PDM"
|
||||||
|
"remove:Remove plugins from PDM's environment"
|
||||||
|
"list:List all plugins installed with PDM"
|
||||||
|
)
|
||||||
|
_describe -t command 'pdm plugin actions' actions && ret=0
|
||||||
|
;;
|
||||||
|
args)
|
||||||
|
case $words[1] in
|
||||||
|
add)
|
||||||
|
arguments+=(
|
||||||
|
'--pip-args[Arguments that will be passed to pip install]:pip args:'
|
||||||
|
'*:packages:_pdm_pip_packages'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
remove)
|
||||||
|
arguments+=(
|
||||||
|
'--pip-args[Arguments that will be passed to pip uninstall]:pip args:'
|
||||||
|
{-y,--yes}'[Answer yes on the question]'
|
||||||
|
'*:packages:_pdm_pip_packages'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
return $ret
|
||||||
|
;;
|
||||||
|
remove)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-G,--group}'[Specify the target dependency group to remove from]:group:_pdm_groups'
|
||||||
|
{-d,--dev}"[Remove packages from dev dependencies]"
|
||||||
|
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
|
||||||
|
"--no-sync[Only write pyproject.toml and do not uninstall packages]"
|
||||||
|
'--no-editable[Install non-editable versions for all packages]'
|
||||||
|
"--no-self[Don't install the project itself]"
|
||||||
|
"--no-isolation[do not isolate the build in a clean environment]"
|
||||||
|
"--dry-run[Show the difference only without modifying the lockfile content]"
|
||||||
|
"*:packages:_pdm_packages"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
run)
|
||||||
|
_arguments -s \
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]' \
|
||||||
|
{-l,--list}'[Show all available scripts defined in pyproject.toml]' \
|
||||||
|
{-s,--site-packages}'[Load site-packages from the selected interpreter]' \
|
||||||
|
'(-)1:command:->command' \
|
||||||
|
'*:arguments: _normal ' && return 0
|
||||||
|
if [[ $state == command ]]; then
|
||||||
|
_command_names -e
|
||||||
|
local local_commands=($(_pdm_scripts))
|
||||||
|
_describe "local command" local_commands
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
search)
|
||||||
|
arguments+=(
|
||||||
|
'1:query string:'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
show)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
'--name[Show name]'
|
||||||
|
'--version[Show version]'
|
||||||
|
'--summary[Show summary]'
|
||||||
|
'--license[Show license]'
|
||||||
|
'--platform[Show platform]'
|
||||||
|
'--keywords[Show keywords]'
|
||||||
|
'1:package:'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
sync)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-G+,--group+}'[Select group of optional-dependencies or dev-dependencies(with -d). Can be supplied multiple times, use ":all" to include all groups under the
|
||||||
|
same species]:group:_pdm_groups'
|
||||||
|
{-d,--dev}"[Select dev dependencies]"
|
||||||
|
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
|
||||||
|
{--prod,--production}"[Unselect dev dependencies]"
|
||||||
|
'--dry-run[Only prints actions without actually running them]'
|
||||||
|
{-r,--reinstall}"[Force reinstall existing dependencies]"
|
||||||
|
'--clean[Clean unused packages]'
|
||||||
|
"--no-clean[Don't clean unused packages]"
|
||||||
|
"--no-default[Don\'t include dependencies from the default group]"
|
||||||
|
'--no-editable[Install non-editable versions for all packages]'
|
||||||
|
"--no-self[Don't install the project itself]"
|
||||||
|
"--no-isolation[do not isolate the build in a clean environment]"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
update)
|
||||||
|
arguments+=(
|
||||||
|
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
|
||||||
|
{-G+,--group+}'[Select group of optional-dependencies or dev-dependencies(with -d). Can be supplied multiple times, use ":all" to include all groups under the
|
||||||
|
same species]:group:_pdm_groups'
|
||||||
|
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
|
||||||
|
'--save-compatible[Save compatible version specifiers]'
|
||||||
|
'--save-wildcard[Save wildcard version specifiers]'
|
||||||
|
'--save-exact[Save exact version specifiers]'
|
||||||
|
'--save-minimum[Save minimum version specifiers]'
|
||||||
|
'--update-reuse[Reuse pinned versions already present in lock file if possible]'
|
||||||
|
'--update-eager[Try to update the packages and their dependencies recursively]'
|
||||||
|
'--no-editable[Install non-editable versions for all packages]'
|
||||||
|
"--no-self[Don't install the project itself]"
|
||||||
|
"--no-sync[Only update lock file but do not sync packages]"
|
||||||
|
{-u,--unconstrained}'[Ignore the version constraint of packages]'
|
||||||
|
{--pre,--prerelease}'[Allow prereleases to be pinned]'
|
||||||
|
{-d,--dev}'[Select dev dependencies]'
|
||||||
|
{--prod,--production}"[Unselect dev dependencies]"
|
||||||
|
"--no-default[Don\'t include dependencies from the default group]"
|
||||||
|
{-t,--top}'[Only update those list in pyproject.toml]'
|
||||||
|
"--dry-run[Show the difference only without modifying the lockfile content]"
|
||||||
|
"--outdated[Show the difference only without modifying the lockfile content]"
|
||||||
|
"--no-isolation[do not isolate the build in a clean environment]"
|
||||||
|
"*:packages:_pdm_packages"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
use)
|
||||||
|
arguments+=(
|
||||||
|
{-f,--first}'[Select the first matched interpreter]'
|
||||||
|
{-i,--ignore-remembered}'[Ignore the remembered selection]'
|
||||||
|
'*:python:_files'
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
_arguments -s $arguments && ret=0
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
_pdm_groups() {
|
||||||
|
if [[ ! -f pyproject.toml ]]; then
|
||||||
|
_message "not a pdm project"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local l groups=() in_groups=0
|
||||||
|
while IFS= read -r l; do
|
||||||
|
case $l in
|
||||||
|
"["project.optional-dependencies"]") in_groups=1 ;;
|
||||||
|
"["tool.pdm.dev-dependencies"]") in_groups=1 ;;
|
||||||
|
"["*"]") in_groups=0 ;;
|
||||||
|
*"= [")
|
||||||
|
if (( in_groups )); then
|
||||||
|
groups+=$l[(w)1]
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done <pyproject.toml
|
||||||
|
compadd -X groups -a groups
|
||||||
|
}
|
||||||
|
|
||||||
|
_get_packages_with_python() {
|
||||||
|
command ${PDM_PYTHON} - << EOF
|
||||||
|
import os, re, tomli
|
||||||
|
PACKAGE_REGEX = re.compile(r'^[A-Za-z][A-Za-z0-9._-]*')
|
||||||
|
def get_packages(lines):
|
||||||
|
return [PACKAGE_REGEX.match(line).group() for line in lines]
|
||||||
|
|
||||||
|
with open('pyproject.toml', 'rb') as f:
|
||||||
|
data = tomli.load(f)
|
||||||
|
packages = get_packages(data.get('project', {}).get('dependencies', []))
|
||||||
|
for reqs in data.get('project', {}).get('optional-dependencies', {}).values():
|
||||||
|
packages.extend(get_packages(reqs))
|
||||||
|
for reqs in data.get('tool', {}).get('pdm', {}).get('dev-dependencies', {}).values():
|
||||||
|
packages.extend(get_packages(reqs))
|
||||||
|
print(*set(packages))
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
_pdm_scripts() {
|
||||||
|
local scripts=() package_dir=$($PDM_PYTHON -m pdm info --packages)
|
||||||
|
if [[ -f pyproject.toml ]]; then
|
||||||
|
local l in_scripts=0
|
||||||
|
while IFS= read -r l; do
|
||||||
|
case $l in
|
||||||
|
"["tool.pdm.scripts"]") in_scripts=1 ;;
|
||||||
|
"["*"]") in_scripts=0 ;;
|
||||||
|
*"= "*)
|
||||||
|
if (( in_scripts )); then
|
||||||
|
scripts+=$l[(w)1]
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done < pyproject.toml
|
||||||
|
fi
|
||||||
|
if [[ $package_dir != "None" ]]; then
|
||||||
|
scripts+=($package_dir/bin/*(N:t))
|
||||||
|
fi
|
||||||
|
echo $scripts
|
||||||
|
}
|
||||||
|
|
||||||
|
_pdm_packages() {
|
||||||
|
if [[ ! -f pyproject.toml ]]; then
|
||||||
|
_message "not a pdm project"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local packages=(${=$(_get_packages_with_python)})
|
||||||
|
compadd -X packages -a packages
|
||||||
|
}
|
||||||
|
|
||||||
|
_pdm_caching_policy() {
|
||||||
|
[[ ! -f $1 && -n "$1"(Nm+28) ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
_pdm_pip_packages_update() {
|
||||||
|
typeset -g _pdm_packages
|
||||||
|
if _cache_invalid pdm_packages || ! _retrieve_cache pdm_packages; then
|
||||||
|
local index
|
||||||
|
for index in $PDM_PIP_INDEXES; do
|
||||||
|
_pdm_packages+=($(command curl -sL $index | command sed -nE '/<a href/ s/.*>(.+)<.*/\1/p'))
|
||||||
|
done
|
||||||
|
_store_cache pdm_packages _pdm_packages
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_pdm_pip_packages() {
|
||||||
|
if (( ! $+commands[curl] || ! $+commands[sed] )); then
|
||||||
|
_message "package name"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local update_policy
|
||||||
|
zstyle ":completion:${curcontext%:}:" use-cache on
|
||||||
|
zstyle -s ":completion:${curcontext%:}:" cache-policy update_policy
|
||||||
|
if [[ -z $update_policy ]]; then
|
||||||
|
zstyle ":completion:${curcontext%:}:" cache-policy _pdm_caching_policy
|
||||||
|
fi
|
||||||
|
|
||||||
|
local -a _pdm_packages
|
||||||
|
_pdm_pip_packages_update
|
||||||
|
compadd -X packages -a _pdm_packages
|
||||||
|
}
|
||||||
|
|
||||||
|
_pdm "$@"
|
||||||
|
|
172
lib/completions/_sheldon
Executable file
172
lib/completions/_sheldon
Executable file
|
@ -0,0 +1,172 @@
|
||||||
|
#compdef sheldon
|
||||||
|
|
||||||
|
autoload -U is-at-least
|
||||||
|
|
||||||
|
_sheldon() {
|
||||||
|
typeset -A opt_args
|
||||||
|
typeset -a _arguments_options
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
if is-at-least 5.2; then
|
||||||
|
_arguments_options=(-s -S -C)
|
||||||
|
else
|
||||||
|
_arguments_options=(-s -C)
|
||||||
|
fi
|
||||||
|
|
||||||
|
local context curcontext="$curcontext" state line
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--color=[Output coloring: always, auto, or never]:WHEN: ' \
|
||||||
|
'--home=[The home directory]:PATH: ' \
|
||||||
|
'--config-dir=[The configuration directory]:PATH: ' \
|
||||||
|
'--data-dir=[The data directory]:PATH: ' \
|
||||||
|
'--config-file=[The config file]:PATH: ' \
|
||||||
|
'--lock-file=[The lock file]:PATH: ' \
|
||||||
|
'--clone-dir=[The directory where git sources are cloned to]:PATH: ' \
|
||||||
|
'--download-dir=[The directory where remote sources are downloaded to]:PATH: ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'-V[Print version information]' \
|
||||||
|
'--version[Print version information]' \
|
||||||
|
'-q[Suppress any informational output]' \
|
||||||
|
'--quiet[Suppress any informational output]' \
|
||||||
|
'-v[Use verbose output]' \
|
||||||
|
'--verbose[Use verbose output]' \
|
||||||
|
":: :_sheldon_commands" \
|
||||||
|
"*::: :->sheldon" \
|
||||||
|
&& ret=0
|
||||||
|
case $state in
|
||||||
|
(sheldon)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:sheldon-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(init)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--shell=[The type of shell, accepted values are: bash, zsh]:SHELL: ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(add)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--git=[Add a clonable Git repository]:URL: ' \
|
||||||
|
'--gist=[Add a clonable Gist snippet]:ID: ' \
|
||||||
|
'--github=[Add a clonable GitHub repository]:REPO: ' \
|
||||||
|
'--remote=[Add a downloadable file]:URL: ' \
|
||||||
|
'--local=[Add a local directory]:DIR: ' \
|
||||||
|
'(--git --remote --local)--proto=[The Git protocol for a Gist or GitHub plugin]:PROTO: ' \
|
||||||
|
'--branch=[Checkout the tip of a branch]:BRANCH: ' \
|
||||||
|
'--rev=[Checkout a specific commit]:SHA: ' \
|
||||||
|
'--tag=[Checkout a specific tag]:TAG: ' \
|
||||||
|
'--dir=[Which sub directory to use in this plugin]:PATH: ' \
|
||||||
|
'*--use=[Which files to use in this plugin]:MATCH: ' \
|
||||||
|
'*--apply=[Templates to apply to this plugin]:TEMPLATE: ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':name -- A unique name for this plugin:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(edit)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(remove)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':name -- A unique name for this plugin:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(lock)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--update[Update all plugin sources]' \
|
||||||
|
'(--update)--reinstall[Reinstall all plugin sources]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(source)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--relock[Regenerate the lock file]' \
|
||||||
|
'--update[Update all plugin sources (implies --relock)]' \
|
||||||
|
'(--update)--reinstall[Reinstall all plugin sources (implies --relock)]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(completions)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--shell=[The type of shell, accepted values are: bash, zsh]:SHELL: ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(version)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_sheldon_commands] )) ||
|
||||||
|
_sheldon_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'init:Initialize a new config file' \
|
||||||
|
'add:Add a new plugin to the config file' \
|
||||||
|
'edit:Open up the config file in the default editor' \
|
||||||
|
'remove:Remove a plugin from the config file' \
|
||||||
|
'lock:Install the plugins sources and generate the lock file' \
|
||||||
|
'source:Generate and print out the script' \
|
||||||
|
'completions:Generate completions for the given shell' \
|
||||||
|
'version:Prints detailed version information' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'sheldon commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_sheldon__add_commands] )) ||
|
||||||
|
_sheldon__add_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'sheldon add commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_sheldon__completions_commands] )) ||
|
||||||
|
_sheldon__completions_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'sheldon completions commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_sheldon__edit_commands] )) ||
|
||||||
|
_sheldon__edit_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'sheldon edit commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_sheldon__init_commands] )) ||
|
||||||
|
_sheldon__init_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'sheldon init commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_sheldon__lock_commands] )) ||
|
||||||
|
_sheldon__lock_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'sheldon lock commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_sheldon__remove_commands] )) ||
|
||||||
|
_sheldon__remove_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'sheldon remove commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_sheldon__source_commands] )) ||
|
||||||
|
_sheldon__source_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'sheldon source commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_sheldon__version_commands] )) ||
|
||||||
|
_sheldon__version_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'sheldon version commands' commands "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
_sheldon "$@"
|
60
lib/completions/_task
Executable file
60
lib/completions/_task
Executable file
|
@ -0,0 +1,60 @@
|
||||||
|
#compdef task
|
||||||
|
|
||||||
|
local context state state_descr line
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
# Listing commands from Taskfile.yml
|
||||||
|
function __task_list() {
|
||||||
|
local -a scripts cmd
|
||||||
|
local -i enabled=0
|
||||||
|
local taskfile item task desc
|
||||||
|
|
||||||
|
cmd=(task)
|
||||||
|
taskfile="${(v)opt_args[(i)-t|--taskfile]}"
|
||||||
|
|
||||||
|
if [[ -n "$taskfile" && -f "$taskfile" ]]; then
|
||||||
|
enabled=1
|
||||||
|
cmd+=(--taskfile "$taskfile")
|
||||||
|
else
|
||||||
|
for taskfile in Taskfile{,.dist}.{yaml,yml}; do
|
||||||
|
if [[ -f "$taskfile" ]]; then
|
||||||
|
enabled=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
(( enabled )) || return 0
|
||||||
|
|
||||||
|
scripts=()
|
||||||
|
for item in "${(@)${(f)$("${cmd[@]}" --list-all)}[2,-1]#\* }"; do
|
||||||
|
task="${item%%:[[:space:]]*}"
|
||||||
|
desc="${item##[^[:space:]]##[[:space:]]##}"
|
||||||
|
scripts+=( "${task//:/\\:}:$desc" )
|
||||||
|
done
|
||||||
|
_describe 'Task to run' scripts
|
||||||
|
}
|
||||||
|
|
||||||
|
_arguments \
|
||||||
|
'(-C --concurrency)'{-C,--concurrency}'[limit number of concurrent tasks]: ' \
|
||||||
|
'(-p --parallel)'{-p,--parallel}'[run command-line tasks in parallel]' \
|
||||||
|
'(-f --force)'{-f,--force}'[run even if task is up-to-date]' \
|
||||||
|
'(-c --color)'{-c,--color}'[colored output]' \
|
||||||
|
'(-d --dir)'{-d,--dir}'[dir to run in]:execution dir:_dirs' \
|
||||||
|
'(--dry)--dry[dry-run mode, compile and print tasks only]' \
|
||||||
|
'(-o --output)'{-o,--output}'[set output style]:style:(interleaved group prefixed)' \
|
||||||
|
'(--output-group-begin)--output-group-begin[message template before grouped output]:template text: ' \
|
||||||
|
'(--output-group-end)--output-group-end[message template after grouped output]:template text: ' \
|
||||||
|
'(-s --silent)'{-s,--silent}'[disable echoing]' \
|
||||||
|
'(--status)--status[exit non-zero if supplied tasks not up-to-date]' \
|
||||||
|
'(--summary)--summary[show summary\: field from tasks instead of running them]' \
|
||||||
|
'(-t --taskfile)'{-t,--taskfile}'[specify a different taskfile]:taskfile:_files' \
|
||||||
|
'(-v --verbose)'{-v,--verbose}'[verbose mode]' \
|
||||||
|
'(-w --watch)'{-w,--watch}'[watch-mode for given tasks, re-run when inputs change]' \
|
||||||
|
+ '(operation)' \
|
||||||
|
{-l,--list}'[list describable tasks]' \
|
||||||
|
{-a,--list-all}'[list all tasks]' \
|
||||||
|
{-i,--init}'[create new Taskfile.yaml]' \
|
||||||
|
'(-*)'{-h,--help}'[show help]' \
|
||||||
|
'(-*)--version[show version and exit]' \
|
||||||
|
'*: :__task_list'
|
245
lib/completions/_zellij
Executable file
245
lib/completions/_zellij
Executable file
|
@ -0,0 +1,245 @@
|
||||||
|
#compdef zellij
|
||||||
|
|
||||||
|
autoload -U is-at-least
|
||||||
|
|
||||||
|
_zellij() {
|
||||||
|
typeset -A opt_args
|
||||||
|
typeset -a _arguments_options
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
if is-at-least 5.2; then
|
||||||
|
_arguments_options=(-s -S -C)
|
||||||
|
else
|
||||||
|
_arguments_options=(-s -C)
|
||||||
|
fi
|
||||||
|
|
||||||
|
local context curcontext="$curcontext" state line
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--max-panes=[Maximum panes on screen, caution: opening more panes will close old ones]:MAX_PANES: ' \
|
||||||
|
'--data-dir=[Change where zellij looks for layouts and plugins]:DATA_DIR: ' \
|
||||||
|
'--server=[Run server listening at the specified socket path]:SERVER: ' \
|
||||||
|
'-s+[Specify name of a new session]:SESSION: ' \
|
||||||
|
'--session=[Specify name of a new session]:SESSION: ' \
|
||||||
|
'-l+[Name of a predefined layout inside the layout directory or the path to a layout file]:LAYOUT: ' \
|
||||||
|
'--layout=[Name of a predefined layout inside the layout directory or the path to a layout file]:LAYOUT: ' \
|
||||||
|
'-c+[Change where zellij looks for the configuration file]:CONFIG: ' \
|
||||||
|
'--config=[Change where zellij looks for the configuration file]:CONFIG: ' \
|
||||||
|
'--config-dir=[Change where zellij looks for the configuration directory]:CONFIG_DIR: ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'-V[Print version information]' \
|
||||||
|
'--version[Print version information]' \
|
||||||
|
'-d[]' \
|
||||||
|
'--debug[]' \
|
||||||
|
":: :_zellij_commands" \
|
||||||
|
"*::: :->zellij" \
|
||||||
|
&& ret=0
|
||||||
|
case $state in
|
||||||
|
(zellij)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:zellij-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(options)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--simplified-ui=[Allow plugins to use a more simplified layout that is compatible with more fonts (true or false)]:SIMPLIFIED_UI: ' \
|
||||||
|
'--theme=[Set the default theme]:THEME: ' \
|
||||||
|
'--default-mode=[Set the default mode]:DEFAULT_MODE:((normal\:"In `Normal` mode, input is always written to the terminal, except for the shortcuts leading to other modes"
|
||||||
|
locked\:"In `Locked` mode, input is always written to the terminal and all shortcuts are disabled except the one leading back to normal mode"
|
||||||
|
resize\:"`Resize` mode allows resizing the different existing panes"
|
||||||
|
pane\:"`Pane` mode allows creating and closing panes, as well as moving between them"
|
||||||
|
tab\:"`Tab` mode allows creating and closing tabs, as well as moving between them"
|
||||||
|
scroll\:"`Scroll` mode allows scrolling up and down within a pane"
|
||||||
|
rename-tab\:"`RenameTab` mode allows assigning a new name to a tab"
|
||||||
|
rename-pane\:"`RenamePane` mode allows assigning a new name to a pane"
|
||||||
|
session\:"`Session` mode allows detaching sessions"
|
||||||
|
move\:"`Move` mode allows moving the different existing panes within a tab"
|
||||||
|
prompt\:"`Prompt` mode allows interacting with active prompts"
|
||||||
|
tmux\:"`Tmux` mode allows for basic tmux keybindings functionality"))' \
|
||||||
|
'--default-shell=[Set the default shell]:DEFAULT_SHELL: ' \
|
||||||
|
'--layout-dir=[Set the layout_dir, defaults to subdirectory of config dir]:LAYOUT_DIR: ' \
|
||||||
|
'--mouse-mode=[Set the handling of mouse events (true or false) Can be temporarily bypassed by the \[SHIFT\] key]:MOUSE_MODE: ' \
|
||||||
|
'--pane-frames=[Set display of the pane frames (true or false)]:PANE_FRAMES: ' \
|
||||||
|
'--mirror-session=[Mirror session when multiple users are connected (true or false)]:MIRROR_SESSION: ' \
|
||||||
|
'--on-force-close=[Set behaviour on force close (quit or detach)]:ON_FORCE_CLOSE:(quit detach)' \
|
||||||
|
'--scroll-buffer-size=[]:SCROLL_BUFFER_SIZE: ' \
|
||||||
|
'--copy-command=[Switch to using a user supplied command for clipboard instead of OSC52]:COPY_COMMAND: ' \
|
||||||
|
'(--copy-command)--copy-clipboard=[OSC52 destination clipboard]:COPY_CLIPBOARD:(system primary)' \
|
||||||
|
'--copy-on-select=[Automatically copy when selecting text (true or false)]:COPY_ON_SELECT: ' \
|
||||||
|
'--scrollback-editor=[Explicit full path to open the scrollback editor (default is $EDITOR or $VISUAL)]:SCROLLBACK_EDITOR: ' \
|
||||||
|
'(--mouse-mode)--disable-mouse-mode[Disable handling of mouse events]' \
|
||||||
|
'(--pane-frames)--no-pane-frames[Disable display of pane frames]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(setup)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--dump-layout=[Dump the specified layout file to stdout]:DUMP_LAYOUT: ' \
|
||||||
|
'--generate-completion=[Generates completion for the specified shell]:SHELL: ' \
|
||||||
|
'--generate-auto-start=[Generates auto-start script for the specified shell]:SHELL: ' \
|
||||||
|
'--dump-config[Dump the default configuration file to stdout]' \
|
||||||
|
'--clean[Disables loading of configuration file at default location, loads the defaults that zellij ships with]' \
|
||||||
|
'--check[Checks the configuration of zellij and displays currently used directories]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(list-sessions)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(attach)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--index=[Number of the session index in the active sessions ordered creation date]:INDEX: ' \
|
||||||
|
'-c[Create a session if one does not exist]' \
|
||||||
|
'--create[Create a session if one does not exist]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'::session-name -- Name of the session to attach to:' \
|
||||||
|
":: :_zellij__attach_commands" \
|
||||||
|
"*::: :->attach" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(attach)
|
||||||
|
words=($line[2] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:zellij-attach-command-$line[2]:"
|
||||||
|
case $line[2] in
|
||||||
|
(options)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--simplified-ui=[Allow plugins to use a more simplified layout that is compatible with more fonts (true or false)]:SIMPLIFIED_UI: ' \
|
||||||
|
'--theme=[Set the default theme]:THEME: ' \
|
||||||
|
'--default-mode=[Set the default mode]:DEFAULT_MODE:((normal\:"In `Normal` mode, input is always written to the terminal, except for the shortcuts leading to other modes"
|
||||||
|
locked\:"In `Locked` mode, input is always written to the terminal and all shortcuts are disabled except the one leading back to normal mode"
|
||||||
|
resize\:"`Resize` mode allows resizing the different existing panes"
|
||||||
|
pane\:"`Pane` mode allows creating and closing panes, as well as moving between them"
|
||||||
|
tab\:"`Tab` mode allows creating and closing tabs, as well as moving between them"
|
||||||
|
scroll\:"`Scroll` mode allows scrolling up and down within a pane"
|
||||||
|
rename-tab\:"`RenameTab` mode allows assigning a new name to a tab"
|
||||||
|
rename-pane\:"`RenamePane` mode allows assigning a new name to a pane"
|
||||||
|
session\:"`Session` mode allows detaching sessions"
|
||||||
|
move\:"`Move` mode allows moving the different existing panes within a tab"
|
||||||
|
prompt\:"`Prompt` mode allows interacting with active prompts"
|
||||||
|
tmux\:"`Tmux` mode allows for basic tmux keybindings functionality"))' \
|
||||||
|
'--default-shell=[Set the default shell]:DEFAULT_SHELL: ' \
|
||||||
|
'--layout-dir=[Set the layout_dir, defaults to subdirectory of config dir]:LAYOUT_DIR: ' \
|
||||||
|
'--mouse-mode=[Set the handling of mouse events (true or false) Can be temporarily bypassed by the \[SHIFT\] key]:MOUSE_MODE: ' \
|
||||||
|
'--pane-frames=[Set display of the pane frames (true or false)]:PANE_FRAMES: ' \
|
||||||
|
'--mirror-session=[Mirror session when multiple users are connected (true or false)]:MIRROR_SESSION: ' \
|
||||||
|
'--on-force-close=[Set behaviour on force close (quit or detach)]:ON_FORCE_CLOSE:(quit detach)' \
|
||||||
|
'--scroll-buffer-size=[]:SCROLL_BUFFER_SIZE: ' \
|
||||||
|
'--copy-command=[Switch to using a user supplied command for clipboard instead of OSC52]:COPY_COMMAND: ' \
|
||||||
|
'(--copy-command)--copy-clipboard=[OSC52 destination clipboard]:COPY_CLIPBOARD:(system primary)' \
|
||||||
|
'--copy-on-select=[Automatically copy when selecting text (true or false)]:COPY_ON_SELECT: ' \
|
||||||
|
'--scrollback-editor=[Explicit full path to open the scrollback editor (default is $EDITOR or $VISUAL)]:SCROLLBACK_EDITOR: ' \
|
||||||
|
'(--mouse-mode)--disable-mouse-mode[Disable handling of mouse events]' \
|
||||||
|
'(--pane-frames)--no-pane-frames[Disable display of pane frames]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(kill-session)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'::target-session -- Name of target session:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(kill-all-sessions)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-y[Automatic yes to prompts]' \
|
||||||
|
'--yes[Automatic yes to prompts]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_zellij_commands] )) ||
|
||||||
|
_zellij_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'options:Change the behaviour of zellij' \
|
||||||
|
'setup:Setup zellij and check its configuration' \
|
||||||
|
'list-sessions:List active sessions' \
|
||||||
|
'ls:List active sessions' \
|
||||||
|
'attach:Attach to a session' \
|
||||||
|
'a:Attach to a session' \
|
||||||
|
'kill-session:Kill the specific session' \
|
||||||
|
'k:Kill the specific session' \
|
||||||
|
'kill-all-sessions:Kill all sessions' \
|
||||||
|
'ka:Kill all sessions' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'zellij commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__attach_commands] )) ||
|
||||||
|
_zellij__attach_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'options:Change the behaviour of zellij' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'zellij attach commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__attach__help_commands] )) ||
|
||||||
|
_zellij__attach__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'zellij attach help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__help_commands] )) ||
|
||||||
|
_zellij__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'zellij help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__kill-all-sessions_commands] )) ||
|
||||||
|
_zellij__kill-all-sessions_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'zellij kill-all-sessions commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__kill-session_commands] )) ||
|
||||||
|
_zellij__kill-session_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'zellij kill-session commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__list-sessions_commands] )) ||
|
||||||
|
_zellij__list-sessions_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'zellij list-sessions commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__attach__options_commands] )) ||
|
||||||
|
_zellij__attach__options_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'zellij attach options commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__options_commands] )) ||
|
||||||
|
_zellij__options_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'zellij options commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_zellij__setup_commands] )) ||
|
||||||
|
_zellij__setup_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'zellij setup commands' commands "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
_zellij "$@"
|
19
lib/completions/update.sh
Executable file
19
lib/completions/update.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
gen() {
|
||||||
|
if is-executable $1; then
|
||||||
|
echo "$1 updated"
|
||||||
|
"$@" >"_$argv[1]"
|
||||||
|
else
|
||||||
|
echo "skipping $1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "GENERATING COMPLETION SCRIPTS"
|
||||||
|
echo "-----------------------------"
|
||||||
|
gen sheldon completions --shell zsh
|
||||||
|
gen just --completions zsh
|
||||||
|
gen zellij setup --generate-completion zsh
|
||||||
|
|
||||||
|
echo "FETCHING COMPLETION SCRIPTS"
|
||||||
|
wget -O _task https://raw.githubusercontent.com/go-task/task/master/completion/zsh/_task
|
23
lib/conda.zsh
Executable file
23
lib/conda.zsh
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
# Updated to use $HOME
|
||||||
|
|
||||||
|
# >>> conda initialize >>>
|
||||||
|
# !! Contents within this block are managed by 'conda init' !!
|
||||||
|
__conda_setup="$('$HOME/mambaforge/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
eval "$__conda_setup"
|
||||||
|
else
|
||||||
|
if [ -f "$HOME/mambaforge/etc/profile.d/conda.sh" ]; then
|
||||||
|
. "$HOME/mambaforge/etc/profile.d/conda.sh"
|
||||||
|
else
|
||||||
|
export PATH="$HOME/mambaforge/bin:$PATH"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
unset __conda_setup
|
||||||
|
|
||||||
|
if [ -f "$HOME/mambaforge/etc/profile.d/mamba.sh" ]; then
|
||||||
|
. "$HOME/mambaforge/etc/profile.d/mamba.sh"
|
||||||
|
fi
|
||||||
|
# <<< conda initialize <<<
|
||||||
|
|
||||||
|
! is-tty && [ -d "$HOME/mambaforge/envs/dev" ] && conda activate dev
|
9
lib/custom.zsh
Executable file
9
lib/custom.zsh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# env variables
|
||||||
|
if ! [ $(cat /etc/hostname)=="thinkpad" ]; then
|
||||||
|
export BROWSER=/mnt/c/Users/daylin/AppData/Local/Vivaldi/Application/vivaldi.exe
|
||||||
|
else
|
||||||
|
export BROWSER=vivaldi-stable
|
||||||
|
fi
|
||||||
|
# aliases
|
111
lib/env.zsh
Executable file
111
lib/env.zsh
Executable file
|
@ -0,0 +1,111 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# XDG
|
||||||
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||||
|
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.local/cache}"
|
||||||
|
|
||||||
|
export HISTFILE=~/.zsh_history
|
||||||
|
export HISTSIZE=32768
|
||||||
|
export HISTFILESIZE="${HISTSIZE}"
|
||||||
|
export SAVEHIST=4096
|
||||||
|
export HISTCONTROL=ignoredups:erasedups
|
||||||
|
export LESS='-R'
|
||||||
|
export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:"
|
||||||
|
|
||||||
|
# add completions to fpath
|
||||||
|
fpath=($DOTFILES_DIR/lib/completions $fpath)
|
||||||
|
|
||||||
|
# Append to the history file, rather than overwriting it
|
||||||
|
setopt APPEND_HISTORY
|
||||||
|
|
||||||
|
# Disable autocd
|
||||||
|
unsetopt autocd
|
||||||
|
|
||||||
|
# Vim Settings
|
||||||
|
# export VIMINIT='source $MYVIMRC'
|
||||||
|
# export MYVIMRC='$DOTFILES_DIR/lib/.vimrc'
|
||||||
|
|
||||||
|
if is-executable lvim; then
|
||||||
|
export EDITOR=lvim
|
||||||
|
elif is-executable nvim; then
|
||||||
|
export EDITOR=nvim
|
||||||
|
else
|
||||||
|
export EDITOR=vim
|
||||||
|
fi
|
||||||
|
|
||||||
|
# spelling correction
|
||||||
|
# setopt CORRECT
|
||||||
|
# setopt CORRECT_ALL
|
||||||
|
|
||||||
|
# Setup fzf
|
||||||
|
# ---------
|
||||||
|
if [[ $PATH != *$HOME/.fzf/bin* ]]; then
|
||||||
|
export PATH="${PATH:+${PATH}:}$HOME/.fzf/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if is-executable fzf; then
|
||||||
|
source $DOTFILES_DIR/lib/fzf.zsh
|
||||||
|
fi
|
||||||
|
# ---------
|
||||||
|
|
||||||
|
# Add lfcd command
|
||||||
|
# ----------------
|
||||||
|
if is-executable lf; then
|
||||||
|
source "$XDG_CONFIG_HOME/lf/lfcd.sh"
|
||||||
|
fi
|
||||||
|
# ----------------
|
||||||
|
|
||||||
|
if is-executable fnm; then
|
||||||
|
eval "$(fnm env)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if is-executable bat; then
|
||||||
|
export BAT_THEME=Catppuccin
|
||||||
|
export BAT_STYLE=header,numbers,grid
|
||||||
|
fi
|
||||||
|
|
||||||
|
if is-executable zoxide; then
|
||||||
|
export _ZO_FZF_OPTS="--preview 'command lsd --tree --color always --icon always {2..}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export ENHANCD_DOT_ARG="up"
|
||||||
|
|
||||||
|
if is-tty; then
|
||||||
|
export STARSHIP_CONFIG=~/.config/starship/plain.toml
|
||||||
|
else
|
||||||
|
export STARSHIP_CONFIG=~/.config/starship/config.toml
|
||||||
|
fi
|
||||||
|
|
||||||
|
export EGET_BIN=$HOME/bin
|
||||||
|
|
||||||
|
# for dotenv
|
||||||
|
export ZSH_DOTENV_ALLOWED_LIST=$HOME/.cache/dotenv-allowed.list
|
||||||
|
export ZSH_DOTENV_DISALLOWED_LIST=$HOME/.cache/dotenv-disallowed.list
|
||||||
|
|
||||||
|
# mamba
|
||||||
|
export MAMBA_NO_BANNER=1
|
||||||
|
|
||||||
|
# shiv
|
||||||
|
if is-executable shiv; then
|
||||||
|
export SHIV_ROOT=$HOME/.local/share/shiv
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
if [ -d "$HOME/.pyenv" ]; then
|
||||||
|
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
|
||||||
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
eval "$(pyenv init -)"
|
||||||
|
eval "$(pyenv virtualenv-init -)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
export PNPM_HOME="/home/daylin/.local/share/pnpm"
|
||||||
|
export PATH="$PNPM_HOME:$PATH"
|
||||||
|
# pnpm end
|
||||||
|
|
||||||
|
if [ -d "$HOME/.pkgs/google-cloud-sdk" ]; then
|
||||||
|
source /home/daylin/.pkgs/google-cloud-sdk/completion.zsh.inc
|
||||||
|
source /home/daylin/.pkgs/google-cloud-sdk/path.zsh.inc
|
||||||
|
fi
|
81
lib/function.zsh
Executable file
81
lib/function.zsh
Executable file
|
@ -0,0 +1,81 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
function cl() {
|
||||||
|
DIR="$*"
|
||||||
|
# if no DIR given, go home
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
DIR=$HOME
|
||||||
|
fi
|
||||||
|
builtin cd "${DIR}" &&
|
||||||
|
# use your preferred ls command
|
||||||
|
ls -F --color=auto
|
||||||
|
}
|
||||||
|
|
||||||
|
#delete and reclone remote repo
|
||||||
|
reclone() {
|
||||||
|
basename=${PWD##*/}
|
||||||
|
remoteurl=$(git remote get-url --push origin)
|
||||||
|
cd ..
|
||||||
|
echo $basename
|
||||||
|
echo $remoteurl
|
||||||
|
rm -rf $basename
|
||||||
|
git clone $remoteurl
|
||||||
|
cd $basename
|
||||||
|
}
|
||||||
|
|
||||||
|
# snakemake use all cores by default
|
||||||
|
sm() {
|
||||||
|
if [[ $* == *"-j"* || $* == *"--jobs"* || $* == *"--cores"* ]]; then
|
||||||
|
snakemake $@
|
||||||
|
else
|
||||||
|
snakemake -j all $@
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function gi() {
|
||||||
|
curl -sL "https://www.toptal.com/developers/gitignore/api/$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# make pdfs or svgs from vegalite json's
|
||||||
|
mkvegapdf() {
|
||||||
|
vl2vg $1 | vg2pdf >$2
|
||||||
|
}
|
||||||
|
|
||||||
|
mkvegasvg() {
|
||||||
|
vl2vg $1 | vg2svg >$2
|
||||||
|
}
|
||||||
|
|
||||||
|
# quick and dirty pdf generation from simple md
|
||||||
|
md2pdf() {
|
||||||
|
root=$1
|
||||||
|
# get extension and root path: https://stackoverflow.com/a/40928328
|
||||||
|
fname="${root#.}"
|
||||||
|
fname="${root%"$fname"}${fname%.*}"
|
||||||
|
ext="${root#"$fname"}"
|
||||||
|
echo "converting $root to pdf"
|
||||||
|
|
||||||
|
if [[ $ext != ".md" ]]; then
|
||||||
|
echo "error! expected a markdown file"
|
||||||
|
echo "unrecognized extension: $ext"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
pandoc -V geometry:a5paper -V geometry:margin=.5in --dpi=300 -o ${fname}.pdf $root
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
py2nb2html() {
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo "No arguments provided"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
pyfile=$1
|
||||||
|
shift
|
||||||
|
echo "generating html file for $pyfile"
|
||||||
|
jupytext --to notebook -o - $pyfile | jupyter nbconvert --execute --to html --stdin $@
|
||||||
|
}
|
||||||
|
|
||||||
|
alias bathelp='bat --plain --language=help'
|
||||||
|
help() {
|
||||||
|
"$@" --help 2>&1 | bathelp
|
||||||
|
}
|
67
lib/fzf.zsh
Executable file
67
lib/fzf.zsh
Executable file
|
@ -0,0 +1,67 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# Auto-completion
|
||||||
|
# ---------------
|
||||||
|
[[ $- == *i* ]] && source "$HOME/.fzf/shell/completion.zsh" 2>/dev/null
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
# ------------
|
||||||
|
source "$HOME/.fzf/shell/key-bindings.zsh"
|
||||||
|
|
||||||
|
# dracula
|
||||||
|
# FZF_COLORS="
|
||||||
|
# --color=dark
|
||||||
|
# --color=fg:-1,bg:-1,hl:#5fff87,fg+:-1,bg+:-1,hl+:#ffaf5f
|
||||||
|
# --color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7
|
||||||
|
# "
|
||||||
|
|
||||||
|
# catppuccin
|
||||||
|
FZF_COLORS="
|
||||||
|
--color=bg+:#302D41,bg:#1E1E2E,spinner:#F8BD96,hl:#F28FAD
|
||||||
|
--color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96
|
||||||
|
--color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD
|
||||||
|
"
|
||||||
|
|
||||||
|
FZF_LAYOUT="
|
||||||
|
--height=40%
|
||||||
|
--border=rounded
|
||||||
|
--margin=0,5,5%
|
||||||
|
--layout=reverse
|
||||||
|
"
|
||||||
|
|
||||||
|
export FZF_DEFAULT_OPTS=${FZF_COLORS}${FZF_LAYOUT}
|
||||||
|
|
||||||
|
export FZF_CTRL_GENERAL="--height=100% --margin=0,0,0"
|
||||||
|
|
||||||
|
#adapted from https://github.com/zimfw/fzf/blob/master/init.zsh
|
||||||
|
if [ -x "$(command -v fd)" ]; then
|
||||||
|
export FZF_DEFAULT_COMMAND="command fd --type file --exclude ".git/" --hidden --no-ignore"
|
||||||
|
_fzf_compgen_path() {
|
||||||
|
command fd --type file --exclude ".git/" --hidden --no-ignore "${1}"
|
||||||
|
}
|
||||||
|
elif [ -x "$(command -v rg)" ]; then
|
||||||
|
export FZF_DEFAULT_COMMAND="command rg -uu -g '!.git' --files"
|
||||||
|
_fzf_compgen_path() {
|
||||||
|
command rg -uu -g '!.git' --files "${1}"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x "$(command -v bat)" ]; then
|
||||||
|
export FZF_CTRL_T_OPTS="
|
||||||
|
--preview 'command bat --style numbers --color=always --line-range :500 {}'
|
||||||
|
--preview-window up,70%,border-rounded
|
||||||
|
${FZF_CTRL_GENERAL}
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export FZF_ALT_C_OPTS="
|
||||||
|
--height 60%
|
||||||
|
--preview 'lsd --tree --color always --icon always {}'
|
||||||
|
--preview-window right,60%,border-rounded
|
||||||
|
"
|
||||||
|
|
||||||
|
# [[ -v FZF_CTRL_T_COMMAND ]] && && export FZF_CTRL_T_COMMAND=${FZF_DEFAULT_COMMAND}
|
||||||
|
[[ -z $FZF_CTRL_T_COMMAND ]] && export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
||||||
|
|
||||||
|
# fix spacing on fzf-tab to show max options
|
||||||
|
zstyle ':fzf-tab:*' fzf-pad 4
|
36
lib/path.zsh
Executable file
36
lib/path.zsh
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# Start with system path
|
||||||
|
# Retrieve it from getconf, otherwise it's just current $PATH
|
||||||
|
prepend-path() {
|
||||||
|
[ -d $1 ] && PATH="$1:$PATH"
|
||||||
|
}
|
||||||
|
|
||||||
|
is-executable getconf && PATH=$($(command -v getconf) PATH)
|
||||||
|
|
||||||
|
# Prepend new items to path (if directory exists)
|
||||||
|
prepend-path "/bin"
|
||||||
|
prepend-path "/usr/bin"
|
||||||
|
prepend-path "/usr/local/bin"
|
||||||
|
PATH="$DOTFILES_DIR/bin:$PATH"
|
||||||
|
PATH="$HOME/bin:$PATH"
|
||||||
|
PATH="$HOME/.local/bin:$PATH"
|
||||||
|
PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
PATH="$PATH:/usr/local/go/bin"
|
||||||
|
PATH="/usr/local/texlive/2021/bin/x86_64-linux:$PATH"
|
||||||
|
PATH="$HOME/go/bin:$PATH"
|
||||||
|
# prepend-path "/sbin"
|
||||||
|
# prepend-path "/usr/sbin"
|
||||||
|
# prepend-path "/usr/local/sbin"
|
||||||
|
|
||||||
|
# Remove duplicates (preserving prepended items)
|
||||||
|
# Source: http://unix.stackexchange.com/a/40755
|
||||||
|
|
||||||
|
PATH=$(echo -n $PATH | awk -v RS=: '{ if (!arr[$0]++) {printf("%s%s",!ln++?"":":",$0)}}')
|
||||||
|
PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')"
|
||||||
|
|
||||||
|
# PATH=$(printf %s "$PATH" |
|
||||||
|
# awk -vRS=: -vORS= '!a[$0]++ {if (NR>1) printf(":"); printf("%s", $0) }')
|
||||||
|
# # Wrap up
|
||||||
|
|
||||||
|
export PATH
|
28
lib/prompt.zsh
Executable file
28
lib/prompt.zsh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
|
||||||
|
if is-executable sheldon; then
|
||||||
|
eval "$(sheldon -q --config-file ~/.config/sheldon/plugins.toml source)"
|
||||||
|
else
|
||||||
|
echo "no sheldon = no shell extensions loaded"
|
||||||
|
fi
|
||||||
|
|
||||||
|
is-executable zoxide && eval eval "$(zoxide init zsh --cmd cd)"
|
||||||
|
|
||||||
|
if is-executable starship; then
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
else
|
||||||
|
echo "no starship = dumber prompt"
|
||||||
|
|
||||||
|
autoload -Uz vcs_info
|
||||||
|
precmd() {
|
||||||
|
vcs_info
|
||||||
|
}
|
||||||
|
|
||||||
|
zstyle ':vcs_info:git:*' formats '%b '
|
||||||
|
|
||||||
|
setopt PROMPT_SUBST
|
||||||
|
PROMPT='%F{green}%*%f %F{blue}%~%f %F{red}${vcs_info_msg_0_}%f$ '
|
||||||
|
fi
|
|
@ -1 +0,0 @@
|
||||||
test
|
|
53
vscode/spec.md
Normal file
53
vscode/spec.md
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# VS Code Extensions
|
||||||
|
|
||||||
|
## general
|
||||||
|
ms-vscode-remote.remote-ssh
|
||||||
|
ms-vscode-remote.remote-ssh-edit
|
||||||
|
ms-vscode-remote.remote-wsl
|
||||||
|
vscodevim.vim
|
||||||
|
|
||||||
|
## misc-tools
|
||||||
|
Shan.code-settings-sync
|
||||||
|
janisdd.vscode-edit-csv
|
||||||
|
naumovs.color-highlight
|
||||||
|
davidhouchin.whitespace-plus
|
||||||
|
dlasagno.rasi
|
||||||
|
antfu.slidev
|
||||||
|
|
||||||
|
## web-dev
|
||||||
|
bradlc.vscode-tailwindcss
|
||||||
|
ritwickdey.liveserver
|
||||||
|
esbenp.prettier-vscode
|
||||||
|
|
||||||
|
## styling
|
||||||
|
johnpapa.vscode-peacock
|
||||||
|
PKief.material-icon-theme
|
||||||
|
Thomaz.preparing
|
||||||
|
catppuccin.catppuccin-vsc
|
||||||
|
|
||||||
|
## code-help
|
||||||
|
metaseed.metajump
|
||||||
|
christian-kohler.path-intellisense
|
||||||
|
aaron-bond.better-comments
|
||||||
|
streetsidesoftware.code-spell-checker
|
||||||
|
eamodio.gitlens
|
||||||
|
vsls-contrib.gistfs
|
||||||
|
mhutchie.git-graph
|
||||||
|
|
||||||
|
## python
|
||||||
|
ms-python.python
|
||||||
|
ms-toolsai.jupyter
|
||||||
|
ms-python.vscode-pylance
|
||||||
|
ms-toolsai.jupyter-keymap
|
||||||
|
ms-toolsai.jupyter-renderers
|
||||||
|
njpwerner.autodocstring
|
||||||
|
quarto.quarto
|
||||||
|
|
||||||
|
## language-support
|
||||||
|
budparr.language-hugo-vscode
|
||||||
|
skellock.just
|
||||||
|
snakemake.snakemake-lang
|
||||||
|
voorjaar.windicss-intellisense
|
||||||
|
eww-yuck.yuck
|
||||||
|
bungcip.better-toml
|
||||||
|
|
206
vscode/vsext
Executable file
206
vscode/vsext
Executable file
|
@ -0,0 +1,206 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import shlex
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
from shutil import which
|
||||||
|
|
||||||
|
|
||||||
|
def is_tool(name):
|
||||||
|
"""Check whether `name` is on PATH and marked as executable."""
|
||||||
|
if not which(name):
|
||||||
|
print(f"ERROR: {name} is not found in your PATH")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def run(cmd, capture=True, returncode=False):
|
||||||
|
result = subprocess.run(
|
||||||
|
shlex.split(cmd),
|
||||||
|
stdout=subprocess.PIPE if capture else None,
|
||||||
|
text=True,
|
||||||
|
shell=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
if returncode:
|
||||||
|
return result.returncode
|
||||||
|
elif capture:
|
||||||
|
return result.stdout.strip()
|
||||||
|
|
||||||
|
|
||||||
|
class Gum:
|
||||||
|
def __init__(self):
|
||||||
|
is_tool("gum")
|
||||||
|
|
||||||
|
def confirm(self, question):
|
||||||
|
return not run(
|
||||||
|
"gum confirm "
|
||||||
|
"--selected.bold "
|
||||||
|
"--selected.background 11 "
|
||||||
|
"--selected.foreground 8 "
|
||||||
|
f"'{question}'",
|
||||||
|
returncode=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
def color(self, text, color):
|
||||||
|
return run(f'gum style --foreground {color} "{text}"')
|
||||||
|
|
||||||
|
def header(self, text, color=11):
|
||||||
|
run(
|
||||||
|
"gum style "
|
||||||
|
"--foreground 212 --border-foreground 212 --border rounded "
|
||||||
|
'--align center --width 30 --margin "1 4" '
|
||||||
|
f"'{self.color(text,color)}'",
|
||||||
|
capture=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
def choose(self, options):
|
||||||
|
if isinstance(options, str):
|
||||||
|
options = options.split("")
|
||||||
|
if isinstance(options, list):
|
||||||
|
options = "".join([f"'{i}'" for i in options])
|
||||||
|
return run(f"gum choose {options}")
|
||||||
|
|
||||||
|
def input(self, placeholder, value):
|
||||||
|
run(
|
||||||
|
"gum input" + f"--placeholder {placeholder}"
|
||||||
|
if placeholder
|
||||||
|
else "" + f"--value {value}"
|
||||||
|
if value
|
||||||
|
else ""
|
||||||
|
)
|
||||||
|
|
||||||
|
def spinner(self, placeholder, cmd):
|
||||||
|
run(f"gum spin -s points --title '{placeholder}'" + cmd)
|
||||||
|
|
||||||
|
|
||||||
|
gum = Gum()
|
||||||
|
|
||||||
|
|
||||||
|
def pprint(text, color):
|
||||||
|
print(gum.color(text, color))
|
||||||
|
|
||||||
|
|
||||||
|
def parse_exts(mdfile):
|
||||||
|
|
||||||
|
with Path(mdfile).open("r") as f:
|
||||||
|
md = f.read()
|
||||||
|
md = md.split("##")[1:]
|
||||||
|
exts = {}
|
||||||
|
all = []
|
||||||
|
for section in md:
|
||||||
|
head = section.splitlines()[0].strip()
|
||||||
|
exts[head] = []
|
||||||
|
for line in section.splitlines()[1:]:
|
||||||
|
if line == "":
|
||||||
|
continue
|
||||||
|
exts[head].append(line.strip())
|
||||||
|
all.append(line.strip())
|
||||||
|
|
||||||
|
return exts, sorted(all)
|
||||||
|
|
||||||
|
|
||||||
|
class SubcommandHelpFormatter(argparse.RawDescriptionHelpFormatter):
|
||||||
|
def _format_action(self, action):
|
||||||
|
parts = super(argparse.RawDescriptionHelpFormatter, self)._format_action(action)
|
||||||
|
if action.nargs == argparse.PARSER:
|
||||||
|
parts = "\n".join(parts.split("\n")[1:])
|
||||||
|
return parts
|
||||||
|
|
||||||
|
|
||||||
|
def get_args():
|
||||||
|
|
||||||
|
p = argparse.ArgumentParser(formatter_class=SubcommandHelpFormatter)
|
||||||
|
sp = p.add_subparsers(title="commands", metavar="", dest="command",required=True)
|
||||||
|
check = sp.add_parser(
|
||||||
|
"check",
|
||||||
|
help="check the extensions which have already been installed",
|
||||||
|
aliases = ['c']
|
||||||
|
)
|
||||||
|
install = sp.add_parser(
|
||||||
|
"install",
|
||||||
|
help="install the extensions from the spec",
|
||||||
|
aliases =['i']
|
||||||
|
)
|
||||||
|
install.add_argument(
|
||||||
|
"-f", "--force", help="force the installation of exts", action="store_true"
|
||||||
|
)
|
||||||
|
remove = sp.add_parser(
|
||||||
|
"remove",
|
||||||
|
help="remove all extra packages",
|
||||||
|
aliases = ['r']
|
||||||
|
)
|
||||||
|
|
||||||
|
p.add_argument(
|
||||||
|
"-s",
|
||||||
|
"--spec",
|
||||||
|
help="mardown spec list (default ~/.dotfiles/vscode/spec.md)",
|
||||||
|
default=Path.home() / ".dotfiles" / "vscode" / "spec.md",
|
||||||
|
)
|
||||||
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
# p.print_usage()
|
||||||
|
p.print_help()
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
return p.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
def get_extra_exts(spec, installed):
|
||||||
|
# sanitize lists
|
||||||
|
spec = [ext.lower() for ext in spec]
|
||||||
|
installed = [ext.lower() for ext in installed]
|
||||||
|
|
||||||
|
return [ext for ext in spec if ext not in installed], [
|
||||||
|
ext for ext in installed if ext not in spec
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def code(flag, exts, force=False):
|
||||||
|
cmd = "code " + " ".join([f"{flag} {ext}" for ext in exts])
|
||||||
|
if force:
|
||||||
|
cmd +=" --force"
|
||||||
|
run(cmd, capture=False)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
args = get_args()
|
||||||
|
gum.header("VS Code Extensions Installer")
|
||||||
|
|
||||||
|
spec_sections, spec_list = parse_exts(args.spec)
|
||||||
|
|
||||||
|
not_installed, extra_installed = get_extra_exts(
|
||||||
|
spec_list, run("code --list-extensions").splitlines()
|
||||||
|
)
|
||||||
|
|
||||||
|
if args.command == "check" or args.command == "c":
|
||||||
|
|
||||||
|
for head, exts in spec_sections.items():
|
||||||
|
pprint(f"## {head}", 11)
|
||||||
|
for ext in exts:
|
||||||
|
if ext.lower() in not_installed:
|
||||||
|
pprint(ext, 9)
|
||||||
|
else:
|
||||||
|
print(ext)
|
||||||
|
if extra_installed:
|
||||||
|
pprint("\nExtra installed extensions:", 11)
|
||||||
|
print("\n".join(extra_installed))
|
||||||
|
|
||||||
|
elif args.command == "install" or args.command =='i':
|
||||||
|
|
||||||
|
pprint("Installing extensions from spec list", 11)
|
||||||
|
code("--install-extension", spec_list, args.force)
|
||||||
|
|
||||||
|
elif args.command == "remove" or args.command == "r":
|
||||||
|
pprint("Removing extensions I don't know about", 11)
|
||||||
|
|
||||||
|
print("\n".join(extra_installed) + "\n")
|
||||||
|
|
||||||
|
if gum.confirm(f"Remove the above {len(extra_installed)} packages"):
|
||||||
|
print("bye bye packages")
|
||||||
|
code("--uninstall-extension", extra_installed)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in a new issue