diff options
author | Toby Vincent <tobyv13@gmail.com> | 2022-03-25 23:38:13 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2022-03-25 23:38:13 -0500 |
commit | e6051a38a672182c7f7dfa083ca1e72b97803c94 (patch) | |
tree | 734e251bab033169399432fe1c93fc879dfab578 | |
parent | bb375ba979dfc0c575443f8309ee52d0fd446a26 (diff) |
feat: migrated to gnu stow
-rw-r--r-- | .stowrc | 4 | ||||
-rw-r--r-- | alacritty/.config/alacritty/alacritty.yml (renamed from alacritty/alacritty.yml) | 0 | ||||
-rw-r--r-- | alacritty/.config/alacritty/colors.yml (renamed from alacritty/colors.yml) | 0 | ||||
-rw-r--r-- | alacritty/.config/alacritty/fonts.yml (renamed from alacritty/fonts.yml) | 0 | ||||
-rw-r--r-- | bash/.bashrc (renamed from bashrc) | 7 | ||||
l--------- | bash/.config/bash/aliases.sh | 1 | ||||
l--------- | bash/.config/bash/env.sh | 1 | ||||
-rw-r--r-- | bat/.config/bat/config (renamed from bat.conf) | 0 | ||||
-rwxr-xr-x | bin/fzf-tmux | 234 | ||||
-rw-r--r-- | git.md (renamed from docs/git.md) | 0 | ||||
-rw-r--r-- | git/.gitconfig (renamed from gitconfig) | 0 | ||||
-rw-r--r-- | gnupg/.gnupg/gpg-agent.conf (renamed from gnupg/gpg-agent.conf) | 0 | ||||
-rwxr-xr-x | gnupg/.gnupg/gpg.conf (renamed from gnupg/gpg.conf) | 0 | ||||
-rwxr-xr-x | gnupg/.gnupg/scdaemon.conf (renamed from gnupg/scdaemon.conf) | 0 | ||||
-rw-r--r-- | gnupg/.gnupg/trustfile.txt (renamed from gnupg/trustfile.txt) | 0 | ||||
-rwxr-xr-x | install | 15 | ||||
-rw-r--r-- | install.conf.yaml | 185 | ||||
-rwxr-xr-x | installers/docker-compose.sh | 10 | ||||
-rw-r--r-- | justfile | 105 | ||||
-rw-r--r-- | navi.yaml | 32 | ||||
-rw-r--r-- | nvim/.config/nvim/init.lua (renamed from nvim/init.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/autocommands.lua (renamed from nvim/lua/autocommands.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/icons.lua (renamed from nvim/lua/icons.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/mappings.lua (renamed from nvim/lua/mappings.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/options.lua (renamed from nvim/lua/options.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins.lua (renamed from nvim/lua/plugins.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/alpha.lua (renamed from nvim/lua/plugins/alpha.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/blankline.lua (renamed from nvim/lua/plugins/blankline.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/bufferline.lua (renamed from nvim/lua/plugins/bufferline.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/cmp.lua (renamed from nvim/lua/plugins/cmp.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/dap.lua (renamed from nvim/lua/plugins/dap.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/git-blame.lua (renamed from nvim/lua/plugins/git-blame.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/git-worktree.lua (renamed from nvim/lua/plugins/git-worktree.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/gitsigns.lua (renamed from nvim/lua/plugins/gitsigns.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/lsp-installer.lua (renamed from nvim/lua/plugins/lsp-installer.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/lsp-signature.lua (renamed from nvim/lua/plugins/lsp-signature.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/lspconfig.lua (renamed from nvim/lua/plugins/lspconfig.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/lspkind.lua (renamed from nvim/lua/plugins/lspkind.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/lspstatus.lua (renamed from nvim/lua/plugins/lspstatus.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/lualine.lua (renamed from nvim/lua/plugins/lualine.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/luasnip.lua (renamed from nvim/lua/plugins/luasnip.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/neogit.lua (renamed from nvim/lua/plugins/neogit.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/null-ls.lua (renamed from nvim/lua/plugins/null-ls.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/nvim-tree.lua (renamed from nvim/lua/plugins/nvim-tree.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/project.lua (renamed from nvim/lua/plugins/project.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/renamer.lua (renamed from nvim/lua/plugins/renamer.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/session_manager.lua (renamed from nvim/lua/plugins/session_manager.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/telescope.lua (renamed from nvim/lua/plugins/telescope.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/treesitter.lua (renamed from nvim/lua/plugins/treesitter.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/plugins/which-key.lua (renamed from nvim/lua/plugins/which-key.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/lua/utils.lua (renamed from nvim/lua/utils.lua) | 0 | ||||
-rw-r--r-- | nvim/.config/nvim/plugin/packer_compiled.lua (renamed from nvim/plugin/packer_compiled.lua) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/discord-relay.sh (renamed from scripts/discord-relay.sh) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/git-split.sh (renamed from scripts/git-split.sh) | 0 | ||||
-rw-r--r-- | scripts/.scripts/gpg-test.sh (renamed from scripts/gpg-test.sh) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/init-git.sh (renamed from scripts/init-git.sh) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/init-latex.sh (renamed from scripts/init-latex.sh) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/install-crate.sh (renamed from scripts/install-crate.sh) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/mega-dl.sh (renamed from scripts/mega-dl.sh) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/mkln.sh (renamed from scripts/mkln.sh) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/socket-relay.sh (renamed from scripts/socket-relay.sh) | 0 | ||||
-rwxr-xr-x | scripts/.scripts/td.sh (renamed from scripts/td.sh) | 0 | ||||
-rwxr-xr-x | scripts/yt.sh | 5 | ||||
-rw-r--r-- | ssh/.ssh/config (renamed from ssh/config) | 0 | ||||
-rw-r--r-- | starship/.config/starship.toml (renamed from starship.toml) | 0 | ||||
-rwxr-xr-x | tmux/.local/bin/tm (renamed from bin/tm) | 0 | ||||
-rwxr-xr-x | tmux/.local/bin/tmux-sessionizer (renamed from bin/tmux-sessionizer) | 2 | ||||
-rwxr-xr-x | tmux/.local/bin/tmux-windowizer (renamed from bin/tmux-windowizer) | 0 | ||||
-rw-r--r-- | tmux/.tmux.conf (renamed from tmux.conf) | 0 | ||||
-rwxr-xr-x | update | 5 | ||||
-rwxr-xr-x | wsl/.config/zsh/gpg.sh (renamed from wsl/gpg.sh) | 0 | ||||
-rw-r--r-- | wsl/.config/zsh/wsl.sh (renamed from wsl/wsl.sh) | 0 | ||||
-rwxr-xr-x | wsl/.ssh/wsl2-ssh-pageant.exe (renamed from ssh/wsl2-ssh-pageant.exe) | bin | 3613696 -> 3613696 bytes | |||
-rwxr-xr-x | wsl/install.sh (renamed from wsl.install) | 2 | ||||
-rwxr-xr-x | wsl/install/winget.json (renamed from winget.json) | 0 | ||||
-rw-r--r-- | wsl/install/wt.json (renamed from wt.json) | 0 | ||||
-rw-r--r-- | yubikey.md (renamed from docs/yubikey.md) | 0 | ||||
-rw-r--r-- | zsh/.config/zsh/aliases.sh (renamed from bash/aliases.sh) | 6 | ||||
-rw-r--r-- | zsh/.config/zsh/env.sh (renamed from bash/env.sh) | 25 | ||||
-rw-r--r-- | zsh/.zshrc | 132 | ||||
-rw-r--r-- | zsh/keybindings.zsh | 116 | ||||
-rw-r--r-- | zshrc | 65 |
82 files changed, 246 insertions, 706 deletions
@@ -0,0 +1,4 @@ +--verbose +--no-folding +--ignore=install +--ignore=install.sh
\ No newline at end of file diff --git a/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 7a2a4f5..7a2a4f5 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml diff --git a/alacritty/colors.yml b/alacritty/.config/alacritty/colors.yml index dbfcd0e..dbfcd0e 100644 --- a/alacritty/colors.yml +++ b/alacritty/.config/alacritty/colors.yml diff --git a/alacritty/fonts.yml b/alacritty/.config/alacritty/fonts.yml index 70c9b2e..70c9b2e 100644 --- a/alacritty/fonts.yml +++ b/alacritty/.config/alacritty/fonts.yml @@ -1,9 +1,10 @@ #!/usr/bin/env bash -comp_dir=${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions +export BASHDOTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/bash +export BASHCOMPDIR=${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions -if [ -d "~/.bash" ]; then for f in ~/.bash/*; do source $f; done; fi -if [ -d "$comp_dir" ]; then for f in "$comp_dir"/*; do source $f; done; fi +if [ -d "$BASHDOTDIR" ]; then for f in $BASHDOTDIR/*; do source $f; done; fi +if [ -d "$BASHCOMPDIR" ]; then for f in $BASHCOMPDIR/*; do source $f; done; fi command -v starship >/dev/null 2>&1 && eval "$(starship init bash)" diff --git a/bash/.config/bash/aliases.sh b/bash/.config/bash/aliases.sh new file mode 120000 index 0000000..4fe3952 --- /dev/null +++ b/bash/.config/bash/aliases.sh @@ -0,0 +1 @@ +/home/tobyv/dotfiles/zsh/.config/zsh/aliases.sh
\ No newline at end of file diff --git a/bash/.config/bash/env.sh b/bash/.config/bash/env.sh new file mode 120000 index 0000000..306408a --- /dev/null +++ b/bash/.config/bash/env.sh @@ -0,0 +1 @@ +/home/tobyv/dotfiles/zsh/.config/zsh/env.sh
\ No newline at end of file diff --git a/bat.conf b/bat/.config/bat/config index df1d2f2..df1d2f2 100644 --- a/bat.conf +++ b/bat/.config/bat/config diff --git a/bin/fzf-tmux b/bin/fzf-tmux deleted file mode 100755 index 7daaf60..0000000 --- a/bin/fzf-tmux +++ /dev/null @@ -1,234 +0,0 @@ -#!/usr/bin/env bash -# fzf-tmux: starts fzf in a tmux pane -# usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS] - -fail() { - echo >&2 "$1" - exit 2 -} - -fzf="$(command -v fzf 2>/dev/null)" || fzf="$(dirname "$0")/fzf" -[[ -x "$fzf" ]] || fail 'fzf executable not found' - -tmux_args=() -args=() -opt="" -skip="" -swap="" -close="" -term="" -[[ -n "$LINES" ]] && lines=$LINES || lines=$(tput lines) || lines=$(tmux display-message -p "#{pane_height}") -[[ -n "$COLUMNS" ]] && columns=$COLUMNS || columns=$(tput cols) || columns=$(tmux display-message -p "#{pane_width}") - -help() { - echo >&2 'usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS] - - LAYOUT OPTIONS: - (default layout: -d 50%) - - Popup window (requires tmux 3.2 or above): - -p [WIDTH[%][,HEIGHT[%]]] (default: 50%) - -w WIDTH[%] - -h HEIGHT[%] - -x COL - -y ROW - - Split pane: - -u [HEIGHT[%]] Split above (up) - -d [HEIGHT[%]] Split below (down) - -l [WIDTH[%]] Split left - -r [WIDTH[%]] Split right -' - exit -} - -while [[ $# -gt 0 ]]; do - arg="$1" - shift - [[ -z "$skip" ]] && case "$arg" in - -) - term=1 - ;; - --help) - help - ;; - --version) - echo "fzf-tmux (with fzf $("$fzf" --version))" - exit - ;; - -p* | -w* | -h* | -x* | -y* | -d* | -u* | -r* | -l*) - if [[ "$arg" =~ ^-[pwhxy] ]]; then - [[ "$opt" =~ "-K -E" ]] || opt="-K -E" - elif [[ "$arg" =~ ^.[lr] ]]; then - opt="-h" - if [[ "$arg" =~ ^.l ]]; then - opt="$opt -d" - swap="; swap-pane -D ; select-pane -L" - close="; tmux swap-pane -D" - fi - else - opt="" - if [[ "$arg" =~ ^.u ]]; then - opt="$opt -d" - swap="; swap-pane -D ; select-pane -U" - close="; tmux swap-pane -D" - fi - fi - if [[ ${#arg} -gt 2 ]]; then - size="${arg:2}" - else - if [[ "$1" =~ ^[0-9%,]+$ ]] || [[ "$1" =~ ^[A-Z]$ ]]; then - size="$1" - shift - else - continue - fi - fi - - if [[ "$arg" =~ ^-p ]]; then - if [[ -n "$size" ]]; then - w=${size%%,*} - h=${size##*,} - opt="$opt -w$w -h$h" - fi - elif [[ "$arg" =~ ^-[whxy] ]]; then - opt="$opt ${arg:0:2}$size" - elif [[ "$size" =~ %$ ]]; then - size=${size:0:((${#size} - 1))} - if [[ -n "$swap" ]]; then - opt="$opt -p $((100 - size))" - else - opt="$opt -p $size" - fi - else - if [[ -n "$swap" ]]; then - if [[ "$arg" =~ ^.l ]]; then - max=$columns - else - max=$lines - fi - size=$((max - size)) - [[ $size -lt 0 ]] && size=0 - opt="$opt -l $size" - else - opt="$opt -l $size" - fi - fi - ;; - --) - # "--" can be used to separate fzf-tmux options from fzf options to - # avoid conflicts - skip=1 - tmux_args=("${args[@]}") - args=() - continue - ;; - *) - args+=("$arg") - ;; - esac - [[ -n "$skip" ]] && args+=("$arg") -done - -if [[ -z "$TMUX" ]]; then - "$fzf" "${args[@]}" - exit $? -fi - -# --height option is not allowed. CTRL-Z is also disabled. -args=("${args[@]}" "--no-height" "--bind=ctrl-z:ignore") - -# Handle zoomed tmux pane without popup options by moving it to a temp window -if [[ ! "$opt" =~ "-K -E" ]] && tmux list-panes -F '#F' | grep -q Z; then - zoomed_without_popup=1 - original_window=$(tmux display-message -p "#{window_id}") - tmp_window=$(tmux new-window -d -P -F "#{window_id}" "bash -c 'while :; do for c in \\| / - '\\;' do sleep 0.2; printf \"\\r\$c fzf-tmux is running\\r\"; done; done'") - tmux swap-pane -t $tmp_window \; select-window -t $tmp_window -fi - -set -e - -# Clean up named pipes on exit -id=$RANDOM -argsf="${TMPDIR:-/tmp}/fzf-args-$id" -fifo1="${TMPDIR:-/tmp}/fzf-fifo1-$id" -fifo2="${TMPDIR:-/tmp}/fzf-fifo2-$id" -fifo3="${TMPDIR:-/tmp}/fzf-fifo3-$id" -tmux_win_opts=($(tmux show-window-options remain-on-exit \; show-window-options synchronize-panes | sed '/ off/d; s/^/set-window-option /; s/$/ \\;/')) -cleanup() { - \rm -f $argsf $fifo1 $fifo2 $fifo3 - - # Restore tmux window options - if [[ "${#tmux_win_opts[@]}" -gt 0 ]]; then - eval "tmux ${tmux_win_opts[*]}" - fi - - # Remove temp window if we were zoomed without popup options - if [[ -n "$zoomed_without_popup" ]]; then - tmux display-message -p "#{window_id}" >/dev/null - tmux swap-pane -t $original_window \; \ - select-window -t $original_window \; \ - kill-window -t $tmp_window \; \ - resize-pane -Z - fi - - if [[ $# -gt 0 ]]; then - trap - EXIT - exit 130 - fi -} -trap 'cleanup 1' SIGUSR1 -trap 'cleanup' EXIT - -envs="export TERM=$TERM " -[[ "$opt" =~ "-K -E" ]] && FZF_DEFAULT_OPTS="--margin 0,1 $FZF_DEFAULT_OPTS" -[[ -n "$FZF_DEFAULT_OPTS" ]] && envs="$envs FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS")" -[[ -n "$FZF_DEFAULT_COMMAND" ]] && envs="$envs FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")" -echo "$envs;" >"$argsf" - -# Build arguments to fzf -opts=$(printf "%q " "${args[@]}") - -pppid=$$ -echo -n "trap 'kill -SIGUSR1 -$pppid' EXIT SIGINT SIGTERM;" >>$argsf -close="; trap - EXIT SIGINT SIGTERM $close" - -export TMUX=$(cut -d , -f 1,2 <<<"$TMUX") -mkfifo -m o+w $fifo2 -if [[ "$opt" =~ "-K -E" ]]; then - cat $fifo2 & - if [[ -n "$term" ]] || [[ -t 0 ]]; then - cat <<<"\"$fzf\" $opts > $fifo2; out=\$? $close; exit \$out" >>$argsf - else - mkfifo $fifo1 - cat <<<"\"$fzf\" $opts < $fifo1 > $fifo2; out=\$? $close; exit \$out" >>$argsf - cat <&0 >$fifo1 & - fi - - # tmux dropped the support for `-K`, `-R` to popup command - # TODO: We can remove this once tmux 3.2 is released - if [[ ! "$(tmux popup --help 2>&1)" =~ '-R shell-command' ]]; then - opt="${opt/-K/}" - else - opt="${opt} -R" - fi - - tmux popup -d "$PWD" "${tmux_args[@]}" $opt "bash $argsf" >/dev/null 2>&1 - exit $? -fi - -mkfifo -m o+w $fifo3 -if [[ -n "$term" ]] || [[ -t 0 ]]; then - cat <<<"\"$fzf\" $opts > $fifo2; echo \$? > $fifo3 $close" >>$argsf -else - mkfifo $fifo1 - cat <<<"\"$fzf\" $opts < $fifo1 > $fifo2; echo \$? > $fifo3 $close" >>$argsf - cat <&0 >$fifo1 & -fi -tmux set-window-option synchronize-panes off \; set-window-option remain-on-exit off \; split-window -c "$PWD" $opt "${tmux_args[@]}" "bash -c 'exec -a fzf bash $argsf'" $swap \ - >/dev/null 2>&1 || { - "$fzf" "${args[@]}" - exit $? -} -cat $fifo2 -exit "$(cat $fifo3)" diff --git a/gitconfig b/git/.gitconfig index c232be3..c232be3 100644 --- a/gitconfig +++ b/git/.gitconfig diff --git a/gnupg/gpg-agent.conf b/gnupg/.gnupg/gpg-agent.conf index 52034d5..52034d5 100644 --- a/gnupg/gpg-agent.conf +++ b/gnupg/.gnupg/gpg-agent.conf diff --git a/gnupg/gpg.conf b/gnupg/.gnupg/gpg.conf index cc4ecce..cc4ecce 100755 --- a/gnupg/gpg.conf +++ b/gnupg/.gnupg/gpg.conf diff --git a/gnupg/scdaemon.conf b/gnupg/.gnupg/scdaemon.conf index dbdae90..dbdae90 100755 --- a/gnupg/scdaemon.conf +++ b/gnupg/.gnupg/scdaemon.conf diff --git a/gnupg/trustfile.txt b/gnupg/.gnupg/trustfile.txt index 969df06..969df06 100644 --- a/gnupg/trustfile.txt +++ b/gnupg/.gnupg/trustfile.txt diff --git a/install b/install deleted file mode 100755 index 5a7e72c..0000000 --- a/install +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -e - -CONFIG="install.conf.yaml" -DOTBOT_DIR="dotbot" - -DOTBOT_BIN="bin/dotbot" -BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -cd "${BASEDIR}" -git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive -git submodule update --init --recursive "${DOTBOT_DIR}" - -"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" diff --git a/install.conf.yaml b/install.conf.yaml deleted file mode 100644 index 44258fe..0000000 --- a/install.conf.yaml +++ /dev/null @@ -1,185 +0,0 @@ -- defaults: - link: - create: true - relink: true - force: true - shell: - quiet: true - stdin: true - -- clean: ["~"] - -- create: - - ~/.local/share/bash-completion/completions - - ~/.local/share/zsh/site-functions - - ~/.bash - - ~/.zsh - -- shell: - - description: Installing submodules - command: git submodule update --init --recursive - - - description: Installing rust - command: - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path && ( - rustup completions bash >~/.local/share/bash-completion/completions/rustup; - rustup completions zsh >~/.local/share/zsh/site-functions/_rustup; - rustup completions bash cargo >~/.local/share/bash-completion/completions/cargo; - rustup completions zsh cargo >~/.local/share/zsh/site-functions/_cargo) - - - description: Installing Starship - command: - target=$(rustc -Vv | grep host | cut -d' ' -f2 | sed s/gnu/musl/ | sed s/armv7/arm/) && - scripts/install-crate.sh --git starship/starship --no-tag --target $target && ( - starship completions bash >~/.local/share/bash-completion/completions/starship; - starship completions zsh >~/.local/share/zsh/site-functions/_starship) - - - description: Installing fzf - command: td=$(mktemp -d) && - arch="$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/armv7l/armv7/)" && - tag="$(curl -sI https://github.com/junegunn/fzf/releases/latest | grep -Po 'tag\/v?\K(\S+)')" && - name="fzf-${tag}-linux_${arch}" && - url="https://github.com/junegunn/fzf/releases/latest/download/${name}.tar.gz" && - curl -sL $url | tar -C $td -xz && - test -x $td/fzf && - rm -f ~/.local/bin/fzf && - install -Dm 755 $td/fzf ~/.local/bin/fzf && - rm -rf $td && ( - curl -sL https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.bash >~/.local/share/bash-completion/completions/fzf; - curl -sL https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.zsh >~/.local/share/zsh/site-functions/_fzf; - curl -sL https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.bash >~/.bash/fzf-key-bindings.sh; - curl -sL https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh >~/.zsh/fzf-key-bindings.zsh; - curl -sL https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f17236/raw/6e5d520bfc96d6b3e42571a54cb4d1ebc8e2dd84/functions.sh | tee -a ~/.zsh/fzf-key-bindings.zsh ~/.bash/fzf-key-bindings.sh; - curl -sL https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f17236/raw/6e5d520bfc96d6b3e42571a54cb4d1ebc8e2dd84/key-binding.bash >>~/.bash/fzf-key-bindings.sh; - curl -sL https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f17236/raw/6e5d520bfc96d6b3e42571a54cb4d1ebc8e2dd84/key-binding.zsh >>~/.bash/fzf-key-bindings.sh; - ) - - # Install manually with cargo see https://github.com/sharkdp/bat/issues/2106 - # - description: Installing bat - # command: - # target=$(rustc -Vv | grep host | cut -d' ' -f2 | sed s/armv7/arm/) && - # scripts/install-crate.sh --git sharkdp/bat --target $target --completion-bash --completion-zsh - - - description: Installing fd - command: - target=$(rustc -Vv | grep host | cut -d' ' -f2 | sed s/armv7/arm/) && - scripts/install-crate.sh --git sharkdp/fd --target $target --completion-bash --completion-zsh - - - description: Installing ripgrep - command: - target=$(rustc -Vv | grep host | cut -d' ' -f2 | sed s/gnu/musl/ | sed s/armv7/arm/) && - scripts/install-crate.sh --git BurntSushi/ripgrep --target $target --completion-bash --completion-zsh - - - description: Installing cheat.sh - command: curl https://cht.sh/:cht.sh >~/.local/bin/cht.sh && - chmod +x ~/.local/bin/cht.sh && ( - curl https://cht.sh/:bash_completion >~/.local/share/bash-completion/completions/cht; - curl https://cheat.sh/:zsh >~/.local/share/zsh/site-functions/_cht) - - - description: Installing gh - command: td=$(mktemp -d) && - arch="$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/armv7l/armv6/)" && - tag="$(curl -sI https://github.com/cli/cli/releases/latest | grep -Po 'tag\/v?\K(\S+)')" && - name="gh_${tag}_linux_${arch}" && - url="https://github.com/cli/cli/releases/latest/download/${name}.tar.gz" && - curl -sL $url | tar -C $td -xz && - test -x $td/$name/bin/gh && - install -Dm 755 $td/$name/bin/gh ~/.local/bin/gh && - rm -rf $td && ( - gh completion --shell bash >~/.local/share/bash-completion/completions/gh; - gh completion --shell zsh >~/.local/share/zsh/site-functions/_gh) - - - description: Installing git-open - command: - curl -sL "https://raw.githubusercontent.com/paulirish/git-open/master/git-open" >~/.local/bin/git-open && - chmod +x ~/.local/bin/git-open; - - - description: Installing git completions - command: \! command -v git &> /dev/null || - url=https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion && ( - curl -sL ${url}.bash >~/.local/share/bash-completion/completions/git; - curl -sL ${url}.zsh >~/.local/share/zsh/site-functions/_git) - - - description: Installing dotnet completions - command: \! command -v dotnet &> /dev/null || - url=https://raw.githubusercontent.com/dotnet/cli/master/scripts/register-completions && ( - curl -sL ${url}.bash >~/.local/share/bash-completion/completions/dotnet; - curl -sL ${url}.zsh >~/.local/share/zsh/site-functions/_dotnet) - - - description: Installing docker completions - command: \! command -v docker &> /dev/null || - url=https://raw.githubusercontent.com/docker/cli/master/contrib/completion && ( - curl -sL ${url}/bash/docker >~/.local/share/bash-completion/completions/docker; - curl -sL ${url}/zsh/_docker >~/.local/share/zsh/site-functions/_docker) - - - description: Installing pandoc completions - command: \! command -v pandoc &> /dev/null || - url=https://raw.githubusercontent.com/srijanshetty/zsh-pandoc-completion/master/_pandoc && ( - pandoc --bash-completion >~/.local/share/bash-completion/completions/docker; - curl -sL ${url} >~/.local/share/zsh/site-functions/_pandoc) - - - description: Installing zsh-autosuggestions - command: repo=https://github.com/zsh-users/zsh-autosuggestions && - target=~/.zsh/zsh-autosuggestions && - git clone $repo $target || - git -C $target pull - - - description: Installing zsh-syntax-highlighting - command: repo=https://github.com/zsh-users/zsh-syntax-highlighting - target=~/.zsh/zsh-syntax-highlighting && - git clone $repo $target || - git -C $target pull - -- link: - # shell - ~/.bashrc: - ~/.bash: - glob: true - path: bash/* - ~/.bash/: - glob: true - if: '[ -n "${WSL_DISTRO_NAME+1}" ]' - path: wsl/* - - ~/.zshrc: - ~/.zshenv: bash/env.sh - ~/.zsh/aliases.sh: bash/aliases.sh - ~/.zsh: - glob: true - path: zsh/* - ~/.zsh/: - glob: true - if: '[ -n "${WSL_DISTRO_NAME+1}" ]' - path: wsl/* - - ~/.config/starship.toml: starship.toml - ~/.config/alacritty: alacritty - ~/.config/bat/config: bat.conf - ~/.gitconfig: - ~/.ssh/config: ssh/config - ~/.tmux.conf: - path: /dev/null - if: "! ln -f tmux.conf ~/.tmux.conf" - ~/.gnupg/: - glob: true - path: gnupg/*.conf - ~/.local/bin: - glob: true - path: bin/* - -- shell: - - description: Installing gpg key - command: gpg --auto-key-locate keyserver --locate-keys tobyv13@gmail.com - - description: Importing GPG trustfile - command: gpg --import-ownertrust gnupg/trustfile.txt - # ISSUE #1 Fails to import key inside of WSL2 - # - description: Importing gpg key (WSL) - # command: \! command -v gpg.exe &> /dev/null || gpg.exe --auto-key-locate keyserver --locate-keys tobyv13@gmail.com - # - description: Importing gpg trustfile (WSL) - # command: \! command -v gpg.exe &> /dev/null || gpg.exe --import-ownertrust gnupg/trustfile.txt - -- shell: - - description: "" - command: if [ -n "${WSL_DISTRO_NAME+1}" ]; then ./wsl.install; fi - stdout: true - # stderr: true diff --git a/installers/docker-compose.sh b/installers/docker-compose.sh deleted file mode 100755 index ff8e0f6..0000000 --- a/installers/docker-compose.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -arch="$(uname -m | sed s/armv7l/armv7/)" -url="https://github.com/docker/compose/releases/latest/download/docker-compose-linux-${arch}" -td=$(mktemp -d) -curl -sL $url -o $td/docker-compose -install -Dm 755 $td/docker-compose ~/.docker/cli-plugins/docker-compose -rm -rf $td @@ -1,22 +1,91 @@ -#!/usr/bin/env just --justfile +# set positional-arguments := true -dotfiles_path := justfile_directory() -comp_dir_zsh := "$HOME/.local/share/zsh/site-functions" -comp_dir_bash := "$HOME/.local/share/bash-completion/completions" +EMAIL := 'tobyv13@gmail.com' +ZSH_COMP_DIR := join(env_var('HOME'), '/.local/share/zsh/site-functions') +BASH_COMP_DIR := join(env_var('HOME'), '/.local/share/bash-completion/completions') -default: - @just --choose +stow: + stow --target={{ env_var('HOME') }} */ -# install completion scripts for just -completion_just: - just --completions zsh > {{comp_dir_zsh}}/_just - just --completions bash > {{comp_dir_bash}}/just - -install_rust: +unstow: + stow --target={{ env_var('HOME') }} --delete */ + +install +TARGETS: + for target in {{TARGETS}}; do just $target; done + +rustup: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path - -completion_rust: - rustup completions bash > {{comp_dir_bash}}/rustup; - rustup completions zsh > {{comp_dir_zsh}}/_rustup; - rustup completions bash cargo > {{comp_dir_bash}}/cargo; - rustup completions zsh cargo > {{comp_dir_zsh}}/_cargo
\ No newline at end of file + rustup completions bash >{{ BASH_COMP_DIR }}/completions/rustup; + rustup completions zsh >{{ ZSH_COMP_DIR }}/_rustup; + rustup completions bash cargo >{{ BASH_COMP_DIR }}/completions/cargo; + rustup completions zsh cargo >{{ ZSH_COMP_DIR }}/_cargo) + +cargo: + command -v cargo || just rustup + command -v cargo-quickinstall || cargo install cargo-quickinstall + +starship: cargo + cargo quickinstall starship --locked + starship completions bash >{{ BASH_COMP_DIR }}/completions/starship; + starship completions zsh >{{ ZSH_COMP_DIR }}/_starship + +# Install manually with cargo see https://github.com/sharkdp/bat/issues/2106 +bat: + cargo quickinstall bat --target {{ arch() }}-unknown-{{ os() }}-mus + curl -sL https://raw.githubusercontent.com/sharkdp/bat/master/assets/completions/bat.bash.in >{{ BASH_COMP_DIR }}/completions/bat + curl -sL https://raw.githubusercontent.com/sharkdp/bat/master/assets/completions/bat.zsh.in >{{ ZSH_COMP_DIR }}/_bat + +fd: + cargo quickinstall fd-find + curl -sL https://raw.githubusercontent.com/sharkdp/fd/master/contrib/completion/_fd >{{ ZSH_COMP_DIR }}/_fd + +ripgrep: + cargo install ripgrep + curl -sL https://raw.githubusercontent.com/BurntSushi/ripgrep/master/complete/_rg >{{ ZSH_COMP_DIR }}/_rg + +chtsh: + curl https://cht.sh/:cht.sh >~/.local/bin/cht.sh + chmod +x ~/.local/bin/cht.sh + curl https://cht.sh/:bash_completion >{{ BASH_COMP_DIR }}/completions/cht + curl https://cheat.sh/:zsh >{{ ZSH_COMP_DIR }}/_cht + +git-open: + curl -sL "https://raw.githubusercontent.com/paulirish/git-open/master/git-open" >~/.local/bin/git-open && + chmod +x ~/.local/bin/git-open; + +gh: + #!/usr/bin/env bash + set -euxo pipefail + td=$(mktemp -d) + arch="$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/armv7l/armv6/)" + tag="$(curl -sI https://github.com/cli/cli/releases/latest | grep -Po 'tag\/v?\K(\S+)')" + name="gh_${tag}_linux_${arch}" + url="https://github.com/cli/cli/releases/latest/download/${name}.tar.gz" + curl -sL $url | tar -C $td -xz + test -x $td/$name/bin/gh + install -Dm 755 $td/$name/bin/gh ~/.local/bin/gh + rm -rf $td + gh completion --shell bash >{{ BASH_COMP_DIR }}/gh + gh completion --shell zsh >{{ ZSH_COMP_DIR }}/_gh + +fzf: + #!/usr/bin/env sh + set -euxo pipefail + td=$(mktemp -d) + tag="$(curl -sI https://github.com/junegunn/fzf/releases/latest | grep -Po 'tag\/v?\K(\S+)')" + alt_arch="$(echo {{arch()}} | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/armv7l/armv7/)" + name="fzf-${tag}-{{ os() }}_${alt_arch}" + url="https://github.com/junegunn/fzf/releases/latest/download/${name}.tar.gz" + curl -sL $url | tar -C $td -xz + test -x $td/fzf + rm -f ~/.local/bin/fzf + install -Dm 755 $td/fzf ~/.local/bin/fzf + rm -rf $td + curl -sL https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.bash >{{ BASH_COMP_DIR }}/completions/fzf + curl -sL https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.zsh >{{ ZSH_COMP_DIR }}/_fzf + curl -sL https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.bash >~/.bash/fzf-key-bindings.sh + curl -sL https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh >~/.zsh/fzf-key-bindings.zsh + +gpg: + gpg --auto-key-locate keyserver --locate-keys {{ EMAIL }} + gpg --import-ownertrust {{ join(env_var('HOME'), '.gnupg/trustfile.txt') }} diff --git a/navi.yaml b/navi.yaml deleted file mode 100644 index 89723f7..0000000 --- a/navi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# THIS IS EXPERIMENTAL -# the config file schema may change at any time - -style: - tag: - color: cyan # text color. possible values: https://bit.ly/3gloNNI - width_percentage: 26 # column width relative to the terminal window - min_width: 20 # minimum column width as number of characters - comment: - color: blue - width_percentage: 42 - min_width: 45 - snippet: - color: white - -finder: - command: fzf # equivalent to the --finder option - # overrides: --tac # equivalent to the --fzf-overrides option - # overrides_var: --tac # equivalent to the --fzf-overrides-var option - -# cheats: - # paths: - # - /path/to/some/dir - # - /path/to/another/dir - # path: /path/to/some/dir # (DEPRECATED) equivalent to the --path option - -# search: - # tags: git,!checkout # equivalent to the --tag-rules option - -shell: - command: zsh # shell used for shell out. possible values: bash, zsh, dash, ... - diff --git a/nvim/init.lua b/nvim/.config/nvim/init.lua index 4671808..4671808 100644 --- a/nvim/init.lua +++ b/nvim/.config/nvim/init.lua diff --git a/nvim/lua/autocommands.lua b/nvim/.config/nvim/lua/autocommands.lua index c87fb70..c87fb70 100644 --- a/nvim/lua/autocommands.lua +++ b/nvim/.config/nvim/lua/autocommands.lua diff --git a/nvim/lua/icons.lua b/nvim/.config/nvim/lua/icons.lua index be868a0..be868a0 100644 --- a/nvim/lua/icons.lua +++ b/nvim/.config/nvim/lua/icons.lua diff --git a/nvim/lua/mappings.lua b/nvim/.config/nvim/lua/mappings.lua index 3b6c7d5..3b6c7d5 100644 --- a/nvim/lua/mappings.lua +++ b/nvim/.config/nvim/lua/mappings.lua diff --git a/nvim/lua/options.lua b/nvim/.config/nvim/lua/options.lua index 6fb959d..6fb959d 100644 --- a/nvim/lua/options.lua +++ b/nvim/.config/nvim/lua/options.lua diff --git a/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index de4c47f..de4c47f 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua diff --git a/nvim/lua/plugins/alpha.lua b/nvim/.config/nvim/lua/plugins/alpha.lua index 87ae48a..87ae48a 100644 --- a/nvim/lua/plugins/alpha.lua +++ b/nvim/.config/nvim/lua/plugins/alpha.lua diff --git a/nvim/lua/plugins/blankline.lua b/nvim/.config/nvim/lua/plugins/blankline.lua index 44f90c8..44f90c8 100644 --- a/nvim/lua/plugins/blankline.lua +++ b/nvim/.config/nvim/lua/plugins/blankline.lua diff --git a/nvim/lua/plugins/bufferline.lua b/nvim/.config/nvim/lua/plugins/bufferline.lua index 105df66..105df66 100644 --- a/nvim/lua/plugins/bufferline.lua +++ b/nvim/.config/nvim/lua/plugins/bufferline.lua diff --git a/nvim/lua/plugins/cmp.lua b/nvim/.config/nvim/lua/plugins/cmp.lua index 1a13863..1a13863 100644 --- a/nvim/lua/plugins/cmp.lua +++ b/nvim/.config/nvim/lua/plugins/cmp.lua diff --git a/nvim/lua/plugins/dap.lua b/nvim/.config/nvim/lua/plugins/dap.lua index f49590e..f49590e 100644 --- a/nvim/lua/plugins/dap.lua +++ b/nvim/.config/nvim/lua/plugins/dap.lua diff --git a/nvim/lua/plugins/git-blame.lua b/nvim/.config/nvim/lua/plugins/git-blame.lua index f0bb678..f0bb678 100644 --- a/nvim/lua/plugins/git-blame.lua +++ b/nvim/.config/nvim/lua/plugins/git-blame.lua diff --git a/nvim/lua/plugins/git-worktree.lua b/nvim/.config/nvim/lua/plugins/git-worktree.lua index 2bc8892..2bc8892 100644 --- a/nvim/lua/plugins/git-worktree.lua +++ b/nvim/.config/nvim/lua/plugins/git-worktree.lua diff --git a/nvim/lua/plugins/gitsigns.lua b/nvim/.config/nvim/lua/plugins/gitsigns.lua index b3c944a..b3c944a 100644 --- a/nvim/lua/plugins/gitsigns.lua +++ b/nvim/.config/nvim/lua/plugins/gitsigns.lua diff --git a/nvim/lua/plugins/lsp-installer.lua b/nvim/.config/nvim/lua/plugins/lsp-installer.lua index 199fd37..199fd37 100644 --- a/nvim/lua/plugins/lsp-installer.lua +++ b/nvim/.config/nvim/lua/plugins/lsp-installer.lua diff --git a/nvim/lua/plugins/lsp-signature.lua b/nvim/.config/nvim/lua/plugins/lsp-signature.lua index 084913c..084913c 100644 --- a/nvim/lua/plugins/lsp-signature.lua +++ b/nvim/.config/nvim/lua/plugins/lsp-signature.lua diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/.config/nvim/lua/plugins/lspconfig.lua index 0635ee8..0635ee8 100644 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/.config/nvim/lua/plugins/lspconfig.lua diff --git a/nvim/lua/plugins/lspkind.lua b/nvim/.config/nvim/lua/plugins/lspkind.lua index b33a24a..b33a24a 100644 --- a/nvim/lua/plugins/lspkind.lua +++ b/nvim/.config/nvim/lua/plugins/lspkind.lua diff --git a/nvim/lua/plugins/lspstatus.lua b/nvim/.config/nvim/lua/plugins/lspstatus.lua index 923209b..923209b 100644 --- a/nvim/lua/plugins/lspstatus.lua +++ b/nvim/.config/nvim/lua/plugins/lspstatus.lua diff --git a/nvim/lua/plugins/lualine.lua b/nvim/.config/nvim/lua/plugins/lualine.lua index 74db5b8..74db5b8 100644 --- a/nvim/lua/plugins/lualine.lua +++ b/nvim/.config/nvim/lua/plugins/lualine.lua diff --git a/nvim/lua/plugins/luasnip.lua b/nvim/.config/nvim/lua/plugins/luasnip.lua index 962dc24..962dc24 100644 --- a/nvim/lua/plugins/luasnip.lua +++ b/nvim/.config/nvim/lua/plugins/luasnip.lua diff --git a/nvim/lua/plugins/neogit.lua b/nvim/.config/nvim/lua/plugins/neogit.lua index ad1f275..ad1f275 100644 --- a/nvim/lua/plugins/neogit.lua +++ b/nvim/.config/nvim/lua/plugins/neogit.lua diff --git a/nvim/lua/plugins/null-ls.lua b/nvim/.config/nvim/lua/plugins/null-ls.lua index e3aa45f..e3aa45f 100644 --- a/nvim/lua/plugins/null-ls.lua +++ b/nvim/.config/nvim/lua/plugins/null-ls.lua diff --git a/nvim/lua/plugins/nvim-tree.lua b/nvim/.config/nvim/lua/plugins/nvim-tree.lua index 2bab234..2bab234 100644 --- a/nvim/lua/plugins/nvim-tree.lua +++ b/nvim/.config/nvim/lua/plugins/nvim-tree.lua diff --git a/nvim/lua/plugins/project.lua b/nvim/.config/nvim/lua/plugins/project.lua index 810d2bd..810d2bd 100644 --- a/nvim/lua/plugins/project.lua +++ b/nvim/.config/nvim/lua/plugins/project.lua diff --git a/nvim/lua/plugins/renamer.lua b/nvim/.config/nvim/lua/plugins/renamer.lua index 2db1899..2db1899 100644 --- a/nvim/lua/plugins/renamer.lua +++ b/nvim/.config/nvim/lua/plugins/renamer.lua diff --git a/nvim/lua/plugins/session_manager.lua b/nvim/.config/nvim/lua/plugins/session_manager.lua index 736e69a..736e69a 100644 --- a/nvim/lua/plugins/session_manager.lua +++ b/nvim/.config/nvim/lua/plugins/session_manager.lua diff --git a/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua index 4376f76..4376f76 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/.config/nvim/lua/plugins/telescope.lua diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua index 95c1aea..95c1aea 100644 --- a/nvim/lua/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua diff --git a/nvim/lua/plugins/which-key.lua b/nvim/.config/nvim/lua/plugins/which-key.lua index b30fd4d..b30fd4d 100644 --- a/nvim/lua/plugins/which-key.lua +++ b/nvim/.config/nvim/lua/plugins/which-key.lua diff --git a/nvim/lua/utils.lua b/nvim/.config/nvim/lua/utils.lua index 14c6e62..14c6e62 100644 --- a/nvim/lua/utils.lua +++ b/nvim/.config/nvim/lua/utils.lua diff --git a/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua index c302f00..c302f00 100644 --- a/nvim/plugin/packer_compiled.lua +++ b/nvim/.config/nvim/plugin/packer_compiled.lua diff --git a/scripts/discord-relay.sh b/scripts/.scripts/discord-relay.sh index 3932908..3932908 100755 --- a/scripts/discord-relay.sh +++ b/scripts/.scripts/discord-relay.sh diff --git a/scripts/git-split.sh b/scripts/.scripts/git-split.sh index ecb2b3a..ecb2b3a 100755 --- a/scripts/git-split.sh +++ b/scripts/.scripts/git-split.sh diff --git a/scripts/gpg-test.sh b/scripts/.scripts/gpg-test.sh index f23b83d..f23b83d 100644 --- a/scripts/gpg-test.sh +++ b/scripts/.scripts/gpg-test.sh diff --git a/scripts/init-git.sh b/scripts/.scripts/init-git.sh index 0a45b90..0a45b90 100755 --- a/scripts/init-git.sh +++ b/scripts/.scripts/init-git.sh diff --git a/scripts/init-latex.sh b/scripts/.scripts/init-latex.sh index 7b8125e..7b8125e 100755 --- a/scripts/init-latex.sh +++ b/scripts/.scripts/init-latex.sh diff --git a/scripts/install-crate.sh b/scripts/.scripts/install-crate.sh index 1c1578a..1c1578a 100755 --- a/scripts/install-crate.sh +++ b/scripts/.scripts/install-crate.sh diff --git a/scripts/mega-dl.sh b/scripts/.scripts/mega-dl.sh index b19be68..b19be68 100755 --- a/scripts/mega-dl.sh +++ b/scripts/.scripts/mega-dl.sh diff --git a/scripts/mkln.sh b/scripts/.scripts/mkln.sh index ef174c2..ef174c2 100755 --- a/scripts/mkln.sh +++ b/scripts/.scripts/mkln.sh diff --git a/scripts/socket-relay.sh b/scripts/.scripts/socket-relay.sh index 436fa54..436fa54 100755 --- a/scripts/socket-relay.sh +++ b/scripts/.scripts/socket-relay.sh diff --git a/scripts/td.sh b/scripts/.scripts/td.sh index 968c98b..968c98b 100755 --- a/scripts/td.sh +++ b/scripts/.scripts/td.sh diff --git a/scripts/yt.sh b/scripts/yt.sh deleted file mode 100755 index e39d6f6..0000000 --- a/scripts/yt.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# originally by Kris Occhipinti -# https://www.youtube.com/watch?v=FsQuGplQvrw - -mpv.exe --ytdl-format=bestvideo+bestaudio/best --fs "$(powershell.exe -c "Get-Clipboard")" diff --git a/ssh/config b/ssh/.ssh/config index 69c94b8..69c94b8 100644 --- a/ssh/config +++ b/ssh/.ssh/config diff --git a/starship.toml b/starship/.config/starship.toml index 8868f01..8868f01 100644 --- a/starship.toml +++ b/starship/.config/starship.toml diff --git a/bin/tm b/tmux/.local/bin/tm index 5c976d3..5c976d3 100755 --- a/bin/tm +++ b/tmux/.local/bin/tm diff --git a/bin/tmux-sessionizer b/tmux/.local/bin/tmux-sessionizer index 020648e..f43cea3 100755 --- a/bin/tmux-sessionizer +++ b/tmux/.local/bin/tmux-sessionizer @@ -3,7 +3,7 @@ if [[ $# -eq 1 ]]; then selected=$1 else - selected=$(cat <(fd . ~/src ~/dkr --exact-depth 1 -td) <(echo $HOME/dotfiles) | sort | + selected=$(cat <(fd . ~/src ~/dkr --exact-depth 1 -td) <(echo $HOME/.dotfiles) | sort | fzf -d/ --with-nth 3.. --preview="tree -a -C -L 1 {}") fi diff --git a/bin/tmux-windowizer b/tmux/.local/bin/tmux-windowizer index 6cee8b0..6cee8b0 100755 --- a/bin/tmux-windowizer +++ b/tmux/.local/bin/tmux-windowizer diff --git a/tmux.conf b/tmux/.tmux.conf index 7af5105..7af5105 100644 --- a/tmux.conf +++ b/tmux/.tmux.conf @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -cd "$(cd $(dirname "$(readlink -fm "$0")") && git rev-parse --show-toplevel)" - -git pull diff --git a/wsl/gpg.sh b/wsl/.config/zsh/gpg.sh index ac0bb4c..ac0bb4c 100755 --- a/wsl/gpg.sh +++ b/wsl/.config/zsh/gpg.sh diff --git a/wsl/wsl.sh b/wsl/.config/zsh/wsl.sh index 80d93af..80d93af 100644 --- a/wsl/wsl.sh +++ b/wsl/.config/zsh/wsl.sh diff --git a/ssh/wsl2-ssh-pageant.exe b/wsl/.ssh/wsl2-ssh-pageant.exe Binary files differindex 7852088..7852088 100755 --- a/ssh/wsl2-ssh-pageant.exe +++ b/wsl/.ssh/wsl2-ssh-pageant.exe diff --git a/wsl.install b/wsl/install.sh index 7c199f3..be920ee 100755 --- a/wsl.install +++ b/wsl/install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -cd "${BASEDIR:-${HOME}/dotfiles}" +cd "${BASEDIR:-${HOME}/.dotfiles}" WINHOME="$(wslpath c:\\Users\\${USER})" diff --git a/winget.json b/wsl/install/winget.json index b583c03..b583c03 100755 --- a/winget.json +++ b/wsl/install/winget.json diff --git a/wt.json b/wsl/install/wt.json index ff53422..ff53422 100644 --- a/wt.json +++ b/wsl/install/wt.json diff --git a/docs/yubikey.md b/yubikey.md index a6adfb4..a6adfb4 100644 --- a/docs/yubikey.md +++ b/yubikey.md diff --git a/bash/aliases.sh b/zsh/.config/zsh/aliases.sh index 2dd1b4e..3e87862 100644 --- a/bash/aliases.sh +++ b/zsh/.config/zsh/aliases.sh @@ -1,5 +1,3 @@ -#!/usr/bin/env bash - alias ls='ls --color=tty' alias l='ls -lah' alias la='ls -lAh' @@ -11,10 +9,6 @@ alias ipa="ip -s -c -h a" alias untar="tar -zxvf" alias td=". td.sh" alias vim=nvim -# scripts -alias dfi=~/dotfiles/install -alias dfu=~/dotfiles/update -alias pluto="ssh root@foundry.tobyvin.com /root/foundry/update-plutonium.sh" #python alias pip=pip3 alias python=python3 diff --git a/bash/env.sh b/zsh/.config/zsh/env.sh index 725e07c..2429dd6 100644 --- a/bash/env.sh +++ b/zsh/.config/zsh/env.sh @@ -1,19 +1,24 @@ -#!/usr/bin/env bash +# XDG +export XDG_CONFIG_HOME=~/.config +export XDG_CACHE_HOME=~/.cache +export XDG_DATA_HOME=~/.local/share +export XDG_RUNTIME_DIR=~/.xdg +# Path +export PATH=$PATH:$HOME/.local/bin +export PATH=$PATH:$HOME/.scripts +export PATH=$PATH:$HOME/.go/bin +export PATH=$PATH:$HOME/.dotnet/tools +export PATH=$PATH:$HOME/.cargo/bin +export PATH=$PATH:/usr/local/texlive/2021/bin/x86_64-linux + +# Misc export EDITOR="$(command -v vim 2>/dev/null || command -v vi)" export VISUAL="code --wait" export GPG_TTY=$(tty) export MANPAGER="sh -c 'col -bx | bat -l man -p'" export MANROFFOPT="-c" +export GOPATH=$HOME/.go export STARSHIP_LOG="error" export FZF_PREVIEW_COMMAND="bat --style=numbers,changes --wrap never --color always {} || cat {} || tree -C {}" export FZF_CTRL_T_OPTS="--min-height 30 --preview-window down:60% --preview-window noborder --preview '($FZF_PREVIEW_COMMAND) 2> /dev/null'" -export GOPATH=$HOME/.go - -export PATH=$PATH:$HOME/dotfiles/bin -export PATH=$PATH:$HOME/.local/bin -export PATH=$PATH:$HOME/.go/bin -export PATH=$PATH:$HOME/.dotnet/tools -export PATH=$PATH:$HOME/.cargo/bin -export PATH=$PATH:$HOME/dotfiles/scripts -export PATH=$PATH:/usr/local/texlive/2021/bin/x86_64-linux diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..6df7443 --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,132 @@ +# Opts +HYPHEN_INSENSITIVE="true" +DISABLE_UPDATE_PROMPT="true" +DISABLE_AUTO_TITLE="true" +HISTFILE=~/.zsh_history +HISTSIZE=10000 +SAVEHIST=10000 + +setopt NO_BEEP +setopt MENU_COMPLETE +setopt auto_pushd # auto push to the directory stack on cd +setopt extended_history # record timestamp of command in HISTFILE +setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE +setopt hist_ignore_dups # ignore duplicated commands history list +setopt hist_ignore_space # ignore commands that start with space +setopt hist_verify # show command with history expansion to user before running it +setopt share_history # share command history data + +# Exports +export ZDOTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/zsh +export FZF_PREVIEW_COMMAND="bat --style=numbers,changes --wrap never --color always {} || cat {} || tree -C {}" +export FZF_DEFAULT_COMMAND="fd --type f || git ls-tree -r --name-only HEAD || rg --files || find ." +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +export FZF_CTRL_T_OPTS="--min-height 30 --preview-window down:60% --preview-window noborder --preview '($FZF_PREVIEW_COMMAND) 2> /dev/null'" +export GOPATH=$HOME/.go +typeset -A ZSH_HIGHLIGHT_STYLES +export ZSH_HIGHLIGHT_STYLES[path]='fg=cyan' +export ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern line) +export ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion) + +# Load ZDOTDIR +for f in $ZDOTDIR/*.*sh; do source $f; done + +# Misc +command -v fd &>/dev/null && _fzf_compgen_path() { + fd --hidden --follow --exclude ".git" . "$1" +} + +command -v fd &>/dev/null && _fzf_compgen_dir() { + fd --type d --hidden --follow --exclude ".git" . "$1" +} + +eval "$(starship init zsh 2>/dev/null)" + +set_win_title() { + local prefix + + if [ "$USER" != "tobyv" ]; then + prefix="${USER} in " + fi + + if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then + prefix="${prefix/in/on}${HOST} in " + fi + + echo -ne "\033]0;${prefix}${PWD/$HOME/~}\007" +} + +precmd_functions+=(set_win_title) + +bindkey '^ ' autosuggest-accept +bindkey '^[[Z' reverse-menu-complete + +# Plugins +function plugin-load { + local repo plugin_name plugin_dir initfile initfiles + export ZPLUGINDIR=${ZPLUGINDIR:-${ZDOTDIR:-$HOME/.config/zsh}/plugins} + for repo in $@; do + plugin_name=${repo:t} + plugin_dir=$ZPLUGINDIR/$plugin_name + initfile=$plugin_dir/$plugin_name.plugin.zsh + + if [[ ! -d $plugin_dir ]]; then + echo "Cloning $repo" + git clone -q --depth 1 --recursive --shallow-submodules https://github.com/$repo $plugin_dir + fi + + if [[ ! -e $initfile ]]; then + initfiles=($plugin_dir/*.plugin.{z,}sh(N) $plugin_dir/*.{z,}sh{-theme,}(N)) + [[ ${#initfiles[@]} -gt 0 ]] || { echo "Plugin has no init file '$repo'." >&2 && continue } + ln -sf "${initfiles[1]}" "$initfile" + fi + + fpath+=$plugin_dir + (( $+functions[zsh-defer] )) && zsh-defer . $initfile || . $initfile + done +} + +repos=( + romkatv/zsh-defer + jirutka/zsh-shift-select + zsh-users/zsh-completions + Aloxaf/fzf-tab + joshskidmore/zsh-fzf-history-search + srijanshetty/zsh-pandoc-completion + zsh-users/zsh-syntax-highlighting + zsh-users/zsh-autosuggestions +) + +plugin-load $repos + +function comp-load { + local comp src name comp_file + export ZCOMPDIR=${ZCOMPDIR:-${XDG_DATA_HOME:-$HOME/.local/share}/zsh/site-functions} + mkdir -p $ZCOMPDIR + for comp in $@; do + src="$(echo $comp | sed 's/[:][^:]*$//')" + name="$(echo $comp | sed 's/.*[:]//' | sed 's/^[^_]/_&/')" + + if [[ -n $name ]]; then + name="$(basename $src | sed 's/^[^_]/_&/')" + fi + + comp_file=$ZCOMPDIR/$name + + if [[ ! -f $comp_file ]]; then + curl -sL https://raw.githubusercontent.com/$src >$comp_file + fi + done + + fpath+=$ZCOMPDIR + + autoload -U compinit + compinit -i + + zstyle ':completion:*' menu select +} + +comps=( + dotnet/cli/master/scripts/register-completions.zsh:_dotnet + docker/cli/master/contrib/completion/zsh/_docker +) diff --git a/zsh/keybindings.zsh b/zsh/keybindings.zsh deleted file mode 100644 index 31b17fd..0000000 --- a/zsh/keybindings.zsh +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env zsh - -r-delregion() { - if ((REGION_ACTIVE)) then - zle kill-region - else - local widget_name=$1 - shift - zle $widget_name -- $@ - fi -} - -r-deselect() { - ((REGION_ACTIVE = 0)) - local widget_name=$1 - shift - zle $widget_name -- $@ -} - -r-select() { - ((REGION_ACTIVE)) || zle set-mark-command - local widget_name=$1 - shift - zle $widget_name -- $@ -} - -r-select-a() { - r-deselect beginning-of-line - r-select end-of-line -} - -r-undo() { - zle undo -} - -r-copy() { - if ((REGION_ACTIVE)) then - zle copy-region-as-kill - printf "$CUTBUFFER" | xclip -i - else - zle kill-whole-line - fi -} - -r-cut() { - if ((REGION_ACTIVE)) then - zle kill-region - else - zle kill-whole-line - fi - printf "$CUTBUFFER" | xclip -i -} - -for key kcap seq mode widget ( - sleft kLFT $'\e[1;2D' select backward-char - sright kRIT $'\e[1;2C' select forward-char - sup kri $'\e[1;2A' select up-line-or-history - sdown kind $'\e[1;2B' select down-line-or-history - - send kEND $'\E[1;2F' select end-of-line - send2 x $'\E[4;2~' select end-of-line - - shome kHOM $'\E[1;2H' select beginning-of-line - shome2 x $'\E[1;2~' select beginning-of-line - - left kcub1 $'\EOD' deselect backward-char - right kcuf1 $'\EOC' deselect forward-char - - end kend $'\EOF' deselect end-of-line - end2 x $'\E4~' deselect end-of-line - - home khome $'\EOH' deselect beginning-of-line - home2 x $'\E1~' deselect beginning-of-line - - csleft x $'\E[1;6D' select backward-word - csright x $'\E[1;6C' select forward-word - csend x $'\E[1;6F' select end-of-line - cshome x $'\E[1;6H' select beginning-of-line - - cleft x $'\E[1;5D' deselect backward-word - cright x $'\E[1;5C' deselect forward-word - - del kdch1 $'\E[3~' delregion delete-char - bs x $'^?' delregion backward-delete-char - - cz x "^Z" undo "" - cc x "^C" copy "" - cx x "^X" cut "" - ca x "^A" select-a "" - ) { - eval "key-$key() { - r-$mode $widget \$@ - }" - zle -N key-$key - bindkey ${terminfo[$kcap]-$seq} key-$key -} - -bindkey '^ ' autosuggest-accept -bindkey '^[[Z' reverse-menu-complete - -# register ctrl+c as interupt -function ctrl_c_intr() { - stty intr \^C <$TTY >$TTY -} - -# register ctrl+y as interupt -function ctrl_y_intr() { - stty intr \^Y <$TTY >$TTY -} - -# make sure we can register hooks -autoload -Uz add-zsh-hook || return - -# register the functions as hooks -add-zsh-hook preexec ctrl_c_intr -add-zsh-hook precmd ctrl_y_intr @@ -1,65 +0,0 @@ -#!/usr/bin/env zsh - -HYPHEN_INSENSITIVE="true" -DISABLE_UPDATE_PROMPT="true" -DISABLE_AUTO_TITLE="true" -HISTFILE=~/.zsh_history -HISTSIZE=10000 -SAVEHIST=10000 - -setopt NO_BEEP -setopt MENU_COMPLETE -setopt auto_pushd # auto push to the directory stack on cd -setopt extended_history # record timestamp of command in HISTFILE -setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE -setopt hist_ignore_dups # ignore duplicated commands history list -setopt hist_ignore_space # ignore commands that start with space -setopt hist_verify # show command with history expansion to user before running it -setopt share_history # share command history data - -typeset -A ZSH_HIGHLIGHT_STYLES -ZSH_HIGHLIGHT_STYLES[path]='fg=cyan' -ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern line) -ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion) - -fpath=(~/.local/share/zsh/site-functions "${fpath[@]}") - -source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh -for f in ~/.zsh/*.*sh; do source $f; done - -# fzf settings -export FZF_DEFAULT_COMMAND="fd --type f || git ls-tree -r --name-only HEAD || rg --files || find ." -export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" - -command -v fd &>/dev/null && _fzf_compgen_path() { - fd --hidden --follow --exclude ".git" . "$1" -} - -command -v fd &>/dev/null && _fzf_compgen_dir() { - fd --type d --hidden --follow --exclude ".git" . "$1" -} - -eval "$(starship init zsh 2>/dev/null)" -eval "$(navi widget zsh 2>/dev/null)" - -set_win_title() { - local prefix - - if [ "$USER" != "tobyv" ]; then - prefix="${USER} in " - fi - - if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then - prefix="${prefix/in/on}${HOST} in " - fi - - echo -ne "\033]0;${prefix}${PWD/$HOME/~}\007" -} - -precmd_functions+=(set_win_title) - -autoload -U compinit -compinit -i - -zstyle ':completion:*' menu select -source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |