From 1145ef23e1076ddd8270f637c15e9b1139103daf Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 30 Sep 2024 10:27:39 -0700 Subject: [PATCH 01/93] [zsh] Move ~df to init-env-tilde-paths --- zsh/func/init-env-darwin | 2 -- zsh/func/init-env-tilde-paths | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/func/init-env-darwin b/zsh/func/init-env-darwin index 9d9ac43..166edfe 100644 --- a/zsh/func/init-env-darwin +++ b/zsh/func/init-env-darwin @@ -10,8 +10,6 @@ function init-env-darwin export XCODE_INSTALLS="$XCODE_LIBRARY/Installs" export dd="$XCODE_DERIVED_DATA" fi - - export df=~/.dotfiles } init-env-darwin "$@" diff --git a/zsh/func/init-env-tilde-paths b/zsh/func/init-env-tilde-paths index 9e3f8ef..d6af187 100644 --- a/zsh/func/init-env-tilde-paths +++ b/zsh/func/init-env-tilde-paths @@ -15,6 +15,8 @@ function init-env-tilde-paths c="$candidate_code_path" break done + + export df=~/.dotfiles } init-env-tilde-paths "$@" From be4d690e3297be3375c5a167d1c9e245fee3dd82 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 30 Sep 2024 11:13:10 -0700 Subject: [PATCH 02/93] [zsh] Update all init-rc functions --- zsh/func/{init_rc_aliases => init-rc-aliases} | 4 +- zsh/func/init-rc-app-environments | 13 ++++++ zsh/func/init-rc-completion | 46 +++++++++++++++++++ zsh/func/{init_rc_linux => init-rc-linux} | 4 +- zsh/func/init-rc-ls | 27 +++++++++++ zsh/func/init-rc-prompt | 29 ++++++++++++ zsh/func/init-rc-zle | 17 +++++++ .../{init_zsh_history => init-rc-zsh-history} | 4 +- .../{init_zsh_options => init-rc-zsh-options} | 4 +- zsh/func/init_app_environments | 17 ------- zsh/func/init_configure_ls | 30 ------------ zsh/func/init_rc_configure_completion | 41 ----------------- zsh/func/init_rc_configure_prompt | 24 ---------- zsh/func/init_rc_configure_zle | 20 -------- zsh/func/init_rc_tilde_paths | 12 ----- zshrc | 17 ++++--- 16 files changed, 148 insertions(+), 161 deletions(-) rename zsh/func/{init_rc_aliases => init-rc-aliases} (93%) create mode 100644 zsh/func/init-rc-app-environments create mode 100644 zsh/func/init-rc-completion rename zsh/func/{init_rc_linux => init-rc-linux} (83%) create mode 100644 zsh/func/init-rc-ls create mode 100644 zsh/func/init-rc-prompt create mode 100644 zsh/func/init-rc-zle rename zsh/func/{init_zsh_history => init-rc-zsh-history} (86%) rename zsh/func/{init_zsh_options => init-rc-zsh-options} (83%) delete mode 100644 zsh/func/init_app_environments delete mode 100644 zsh/func/init_configure_ls delete mode 100644 zsh/func/init_rc_configure_completion delete mode 100644 zsh/func/init_rc_configure_prompt delete mode 100644 zsh/func/init_rc_configure_zle delete mode 100644 zsh/func/init_rc_tilde_paths diff --git a/zsh/func/init_rc_aliases b/zsh/func/init-rc-aliases similarity index 93% rename from zsh/func/init_rc_aliases rename to zsh/func/init-rc-aliases index 4e16fa8..c19ee7c 100644 --- a/zsh/func/init_rc_aliases +++ b/zsh/func/init-rc-aliases @@ -3,7 +3,7 @@ autoload binary_exists -function init_rc_aliases +function init-rc-aliases { alias j='jobs' alias h='history' @@ -34,4 +34,4 @@ function init_rc_aliases alias -s jar='java -jar' } -init_rc_aliases "$@" +init-rc-aliases "$@" diff --git a/zsh/func/init-rc-app-environments b/zsh/func/init-rc-app-environments new file mode 100644 index 0000000..e5250c3 --- /dev/null +++ b/zsh/func/init-rc-app-environments @@ -0,0 +1,13 @@ +#!/usr/bin/env zsh +# Eryn Wells + +autoload binary_exists + +function init-rc-app-environments +{ + # Default ledger file + local -r ledger_file="$HOME/Documents/Ledger/personal.ledger" + [[ -f "$ledger_file" ]] && export LEDGER_FILE="$ledger_file" +} + +init-rc-app-environments "$@" diff --git a/zsh/func/init-rc-completion b/zsh/func/init-rc-completion new file mode 100644 index 0000000..f73b06c --- /dev/null +++ b/zsh/func/init-rc-completion @@ -0,0 +1,46 @@ +#!/usr/bin/env zsh +# Eryn Wells + +function init-rc-completion +{ + autoload -Uz compinit + compinit + + # Cache completions + zstyle ':completion::complete:*' use-cache 1 + zstyle ':completion::complete:*' cache-path ~/.zsh/cache + + # Make ls show completion list in color. + # See also: https://github.com/ohmyzsh/ohmyzsh/issues/6060 + if [[ -n "$LS_COLORS" ]]; then + zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} + else + zstyle ':completion:*:default' list-colors \ + 'di=34' 'ln=35' 'so=32' 'pi=33' 'ex=31' 'bd=34;46' 'cd=34;43' 'su=30;41' \ + 'sg=30;46' 'tw=30;42' 'ow=30;43' + fi + + # For rm, cp, and mv don't complete if file is on the line already + zstyle ':completion:*:rm:*' ignore-line yes + zstyle ':completion:*:cp:*' ignore-line yes + zstyle ':completion:*:mv:*' ignore-line yes + + # Remove trailing slashes in directory arguments + zstyle ':completion:*' squeeze-slashes true + + # Never select parent directory + zstyle ':completion:*:cd:*' ignore-parents parent pwd + + # Expand partial paths + zstyle ':completion:*' expand 'yes' + + # Show a pretty menu of killable processes + zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' + zstyle ':completion:*:*:kill:*' menu yes select + + # Complete man pages by section + zstyle ':completion:*:manuals' separate-sections true + zstyle ':completion:*:manuals.*' insert-sections true +} + +init-rc-completion "$@" diff --git a/zsh/func/init_rc_linux b/zsh/func/init-rc-linux similarity index 83% rename from zsh/func/init_rc_linux rename to zsh/func/init-rc-linux index d756389..1f01355 100644 --- a/zsh/func/init_rc_linux +++ b/zsh/func/init-rc-linux @@ -1,11 +1,11 @@ #!/usr/bin/env zsh # Eryn Wells -function init_rc_linux +function init-rc-linux { alias iptls='sudo iptables --line-numbers -nv -L' alias ip6tls='sudo ip6tables --line-numbers -nv -L' alias rlx="xrdb $HOME/.Xdefaults" } -init_rc_linux "$@" +init-rc-linux "$@" diff --git a/zsh/func/init-rc-ls b/zsh/func/init-rc-ls new file mode 100644 index 0000000..0ae4e3b --- /dev/null +++ b/zsh/func/init-rc-ls @@ -0,0 +1,27 @@ +#!/usr/bin/env zsh +# Eryn Wells + +function init-rc-ls +{ + local ls_options='--color=auto' + alias ls="ls $ls_options" + alias la="ls -A $ls_options" + alias ll="ls -l $ls_options" + alias l.="ls -d $ls_options .*" + + local dircolors_bin=$(whence -p dircolors || whence -p gdircolors) + if [[ -n "$dircolors_bin" ]]; then + local dircolors_config + if [[ -f "$HOME/.dircolors/$SYS.cfg" ]]; then + dircolors_file="$HOME/.dircolors/$SYS.cfg" + else + dircolors_file="$HOME/.dircolors/default.cfg" + fi + + if [[ -f "$dircolors_config" ]]; then + eval $($dircolors_bin $dircolors_config) + fi + fi +} + +init-rc-ls "$@" diff --git a/zsh/func/init-rc-prompt b/zsh/func/init-rc-prompt new file mode 100644 index 0000000..98f3ed9 --- /dev/null +++ b/zsh/func/init-rc-prompt @@ -0,0 +1,29 @@ +#!/usr/bin/env zsh +# Eryn Wells + +function init-rc-prompt +{ + local theme=loquacious + + autoload -U add-zsh-hook + autoload -Uz vcs_info + + zstyle ':vcs_info:*' disable p4 bzr cdv darcs mtn svk tla cvs svn + zstyle ':vcs_info:*' enable git + zstyle ':vcs_info:git:general:*' formats '%b' + zstyle ':vcs_info:git-svn:general:*' formats '%b' + + # Export the current Git branch before every prompt. + function _export-gitbranch { + vcs_info general + export gitbranch=${vcs_info_msg_0_} + } + + add-zsh-hook precmd _export-gitbranch + + autoload -U promptinit + promptinit + prompt $theme +} + +init-rc-prompt "$@" diff --git a/zsh/func/init-rc-zle b/zsh/func/init-rc-zle new file mode 100644 index 0000000..37e79e9 --- /dev/null +++ b/zsh/func/init-rc-zle @@ -0,0 +1,17 @@ +#!/usr/bin/env zsh +# Eryn Wells + +function init-rc-zle +{ + case "${ERYN_ZLE_MODE:-emacs}" in + vim) + bindkey -v + zle -A .backward-delete-char vi-backward-delete-char + ;; + emacs) + bindkey -e + ;; + esac +} + +init-rc-zle "$@" diff --git a/zsh/func/init_zsh_history b/zsh/func/init-rc-zsh-history similarity index 86% rename from zsh/func/init_zsh_history rename to zsh/func/init-rc-zsh-history index ad07940..31d021f 100644 --- a/zsh/func/init_zsh_history +++ b/zsh/func/init-rc-zsh-history @@ -1,7 +1,7 @@ #!/usr/bin/env zsh # Eryn Wells -function init_zsh_history +function init-rc-zsh-history { setopt \ APPEND_HISTORY \ @@ -18,4 +18,4 @@ function init_zsh_history HISTFILE="$HOME/.zhistory" } -init_zsh_history "$@" +init-rc-zsh-history "$@" diff --git a/zsh/func/init_zsh_options b/zsh/func/init-rc-zsh-options similarity index 83% rename from zsh/func/init_zsh_options rename to zsh/func/init-rc-zsh-options index 127f842..8240abb 100644 --- a/zsh/func/init_zsh_options +++ b/zsh/func/init-rc-zsh-options @@ -1,7 +1,7 @@ #!/usr/bin/env zsh # Eryn Wells -function init_zsh_options +function init-rc-zsh-options { # Report seconds since shell was invoked in milliseconds typeset -F SECONDS @@ -13,4 +13,4 @@ function init_zsh_options COMPLETE_IN_WORD } -init_zsh_options "$@" +init-rc-zsh-options "$@" diff --git a/zsh/func/init_app_environments b/zsh/func/init_app_environments deleted file mode 100644 index dbd7a51..0000000 --- a/zsh/func/init_app_environments +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -autoload binary_exists - -function init_app_environments -{ - # NetHack options - # use color in the terminal - binary_exists nethack && export NETHACKOPTIONS="color" - - # Default ledger file - local ledgerFile="$HOME/Documents/Ledger/personal.ledger" - [[ -e "$ledgerFile" ]] && LEDGER_FILE="$ledgerFile" -} - -init_app_environments "$@" diff --git a/zsh/func/init_configure_ls b/zsh/func/init_configure_ls deleted file mode 100644 index 1808574..0000000 --- a/zsh/func/init_configure_ls +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -local system_ls=`which ls` -local has_gnu_ls -local ls_options - -if $system_ls --version 2>&1 | grep GNU 1>/dev/null; then - has_gnu_ls=1 - ls_options='--color=auto' -else - has_gnu_ls=0 - ls_options='-G' -fi - -alias ls="$system_ls $ls_options" -alias la="$system_ls -A $ls_options" -alias ll="$system_ls -l $ls_options" -alias l.="$system_ls -d $ls_options .*" - -local dircolors_bin=`whence -p dircolors || whence -p gdircolors` -if [[ $has_gnu_ls -eq 1 && -n "$dircolors_bin" ]]; then - if [[ -e "$HOME/.dircolors/$SYS.cfg" ]]; then - dircolors="$HOME/.dircolors/$SYS.cfg" - else - dircolors="$HOME/.dircolors/default.cfg" - fi - - eval `$dircolors_bin $dircolors` -fi diff --git a/zsh/func/init_rc_configure_completion b/zsh/func/init_rc_configure_completion deleted file mode 100644 index 5b378fa..0000000 --- a/zsh/func/init_rc_configure_completion +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -autoload -Uz compinit -compinit - -# Cache completions -zstyle ':completion::complete:*' use-cache 1 -zstyle ':completion::complete:*' cache-path ~/.zsh/cache - -# Make ls show completion list in color. -# See also: https://github.com/ohmyzsh/ohmyzsh/issues/6060 -if [[ -n "$LS_COLORS" ]]; then - zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} -else - zstyle ':completion:*:default' list-colors \ - 'di=34' 'ln=35' 'so=32' 'pi=33' 'ex=31' 'bd=34;46' 'cd=34;43' 'su=30;41' \ - 'sg=30;46' 'tw=30;42' 'ow=30;43' -fi - -# For rm, cp, and mv don't complete if file is on the line already -zstyle ':completion:*:rm:*' ignore-line yes -zstyle ':completion:*:cp:*' ignore-line yes -zstyle ':completion:*:mv:*' ignore-line yes - -# Remove trailing slashes in directory arguments -zstyle ':completion:*' squeeze-slashes true - -# Never select parent directory -zstyle ':completion:*:cd:*' ignore-parents parent pwd - -# Expand partial paths -zstyle ':completion:*' expand 'yes' - -# Show a pretty menu of killable processes -zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' -zstyle ':completion:*:*:kill:*' menu yes select - -# Complete man pages by section -zstyle ':completion:*:manuals' separate-sections true -zstyle ':completion:*:manuals.*' insert-sections true diff --git a/zsh/func/init_rc_configure_prompt b/zsh/func/init_rc_configure_prompt deleted file mode 100644 index 669bbd4..0000000 --- a/zsh/func/init_rc_configure_prompt +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -local theme=loquacious - -autoload -U add-zsh-hook -autoload -Uz vcs_info - -zstyle ':vcs_info:*' disable p4 bzr cdv darcs mtn svk tla cvs svn -zstyle ':vcs_info:*' enable git -zstyle ':vcs_info:git:general:*' formats '%b' -zstyle ':vcs_info:git-svn:general:*' formats '%b' - -# Export the current Git branch before every prompt. -function export_gitbranch { - vcs_info general - export gitbranch=${vcs_info_msg_0_} -} - -add-zsh-hook precmd export_gitbranch - -autoload -U promptinit -promptinit -prompt $theme diff --git a/zsh/func/init_rc_configure_zle b/zsh/func/init_rc_configure_zle deleted file mode 100644 index f4fc1f1..0000000 --- a/zsh/func/init_rc_configure_zle +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -local mode=emacs - -if [[ -z "$mode" ]]; then - mode=emacs -fi - -function configure_zle_emacs { } -function configure_zle_vim { } - -if [[ $mode == 'vim' ]]; then - bindkey -v - configure_zle_vim - zle -A .backward-delete-char vi-backward-delete-char -elif [[ $mode == 'emacs' ]]; then - bindkey -e - configure_zle_emacs -fi diff --git a/zsh/func/init_rc_tilde_paths b/zsh/func/init_rc_tilde_paths deleted file mode 100644 index ba26585..0000000 --- a/zsh/func/init_rc_tilde_paths +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -for x in "$HOME/Code" "$HOME/Documents/Code"; do - if [[ ! -d "$x" ]]; then - continue - fi - export c="$x" - break -done - -export dd="$HOME/Library/Developer/Xcode/DerivedData" diff --git a/zshrc b/zshrc index ce0e2c1..8f70595 100644 --- a/zshrc +++ b/zshrc @@ -2,15 +2,14 @@ zsh_init_rc_functions=( \ init_rc_fpath_darwin \ - init_rc_aliases \ - init_configure_ls \ - init_rc_tilde_paths \ - init_rc_configure_prompt \ - init_rc_configure_zle \ - init_rc_configure_completion \ - init_zsh_options \ - init_zsh_history \ - init_app_environments \ + init-rc-aliases \ + init-rc-ls \ + init-rc-prompt \ + init-rc-zle \ + init-rc-completion \ + init-rc-zsh-options \ + init-rc-zsh-history \ + init-rc-app-environments \ init-rc-$SYS \ ) From cd21b15b65955b3bc04dd99076453eb3dfe6568b Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 30 Sep 2024 14:45:20 -0700 Subject: [PATCH 03/93] [zsh] Add Python virtual environments configuration to init-env-python --- zsh/func/init-env-python | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zsh/func/init-env-python b/zsh/func/init-env-python index 5f3da27..6286e24 100644 --- a/zsh/func/init-env-python +++ b/zsh/func/init-env-python @@ -1,6 +1,7 @@ # Eryn Wells autoload -Uz prepend_to_path +autoload -Uz update-path function init-env-python { @@ -10,6 +11,9 @@ function init-env-python prepend_to_path "$f/bin" done fi + + export PYTHON_VIRTUAL_ENVS="$HOME/.local/share/python-virtual-environments" + update-path --prepend "$PYTHON_VIRTUAL_ENVS/eryn/bin" } init-env-python "$@" From 4c9e58e179bdccc97681b726000bb578ea8ae6ed Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 1 Oct 2024 10:23:13 -0700 Subject: [PATCH 04/93] Create a `eryn` Python virtual environment in my home directory for local packages --- setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 3447306..1ee8838 100755 --- a/setup.sh +++ b/setup.sh @@ -121,7 +121,10 @@ while getopts "v" arg $@; do esac done -python3 -m pip install --user "$dotfiles_dir/Python/eryntools" +print "Creating Python virtual environment" +local venv_path=~/.local/share/python-virtual-environments/eryn +python3 -m venv --system-site-packages "$venv_path" +"$venv_path/bin/pip" install "$dotfiles_dir/Python/eryntools" if (( $configure_vim )); then print -P "%BConfiguring Vim%b" From 74196601f6a380a2e0960f6bc97669ab64a72fc7 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 18:26:48 -0700 Subject: [PATCH 05/93] Remove Ansible directory --- Ansible/Makefile | 11 --------- Ansible/bootstrap.yml | 53 ---------------------------------------- Ansible/mail.yml | 12 --------- Ansible/requirements.txt | 12 --------- 4 files changed, 88 deletions(-) delete mode 100644 Ansible/Makefile delete mode 100644 Ansible/bootstrap.yml delete mode 100644 Ansible/mail.yml delete mode 100644 Ansible/requirements.txt diff --git a/Ansible/Makefile b/Ansible/Makefile deleted file mode 100644 index 103468e..0000000 --- a/Ansible/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - -init: venv deps - -venv: ./env/bin/pip - python3 -m venv env - -deps: ./env/bin/ansible-playbook - ./env/bin/pip install -r requirements.txt - -freeze: - ./env/bin/pip freeze > requirements.txt diff --git a/Ansible/bootstrap.yml b/Ansible/bootstrap.yml deleted file mode 100644 index 6ee82db..0000000 --- a/Ansible/bootstrap.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -- hosts: localhost - vars: - repo: https://github.com/erynofwales/dotfiles.git - local_repo: ~/.dotfiles - dotfiles: - - Xdefaults - - emacs - - emacs.d - - env - - gdbinit - - gitconfig - - gitignore - - gvimrc - - hgrc - - indent.pro - - muttrc - - nethackrc - - profile - - rc - - screenrc - nvim_conifg: ~/.config/nvim - vim_bundles: - Vundle.vim: https://github.com/gmarik/Vundle.vim.git - tasks: - - name: Pull dotfiles - git: repo={{ repo }} dest={{ local_repo }} - - - name: Link dotfiles - file: src={{ local_repo }}/{{ item }} dest=~/.{{ item }} state=link - with_items: "{{ dotfiles }}" - - - name: Link ~/bin - file: src={{ local_repo }}/bin dest=~/bin state=link - - # Don't show last login when I open a terminal - - name: Touch .hushlogin - file: path=~/.hushlogin state=touch - - # Setup neovim - - name: Create ~/.config - file: path=~/.config state=directory - - name: Symlink vim dir for neovim - file: src={{ local_repo }}/vim dest={{ nvim_config }} - - name: Symlink vimrc for neovim - file: src={{ local_repo }}/vimrc dest={{ nvim_config }}/init.vim - - # Setup vim bundles - - name: Get Vim bundles - git: repo={{ item[1] }} dest={{ local_repo }}/vim/bundle/{{ item[0] }} - with_items: "{{ vim_bundles }}" - - name: Install bundles registered in vim - command: vim +PluginInstall +qall diff --git a/Ansible/mail.yml b/Ansible/mail.yml deleted file mode 100644 index 47d2c65..0000000 --- a/Ansible/mail.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- hosts: localhost - vars: - dotfiles: ~/.dotfiles - packages: [mutt, offlineimap, urlview, w3m] - tasks: - - name: "Install packages: {{ packages|join(', ') }}" - homebrew: name={{ packages }} state=present - - - name: Link mutt config files - file: src={{ dotfiles }}/{{ item }} dest=~/.{{ item }} state=link - with_items: [muttrc, mutt] diff --git a/Ansible/requirements.txt b/Ansible/requirements.txt deleted file mode 100644 index 525aef2..0000000 --- a/Ansible/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -ansible==8.7.0 -ansible-core==2.15.12 -cffi==1.17.0 -cryptography==43.0.0 -importlib-resources==5.0.7 -Jinja2==3.1.4 -MarkupSafe==2.1.5 -packaging==24.1 -passlib==1.7.4 -pycparser==2.22 -PyYAML==6.0.2 -resolvelib==1.0.1 From ae514e9a07c19c5d215b8986621c0dfa5d5596a9 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 18:47:29 -0700 Subject: [PATCH 06/93] Move zsh startup files to the dotfiles role --- zprofile => Ansible/roles/dotfiles/files/zsh/zprofile | 0 zshenv => Ansible/roles/dotfiles/files/zsh/zshenv | 0 zshrc => Ansible/roles/dotfiles/files/zsh/zshrc | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename zprofile => Ansible/roles/dotfiles/files/zsh/zprofile (100%) rename zshenv => Ansible/roles/dotfiles/files/zsh/zshenv (100%) rename zshrc => Ansible/roles/dotfiles/files/zsh/zshrc (100%) diff --git a/zprofile b/Ansible/roles/dotfiles/files/zsh/zprofile similarity index 100% rename from zprofile rename to Ansible/roles/dotfiles/files/zsh/zprofile diff --git a/zshenv b/Ansible/roles/dotfiles/files/zsh/zshenv similarity index 100% rename from zshenv rename to Ansible/roles/dotfiles/files/zsh/zshenv diff --git a/zshrc b/Ansible/roles/dotfiles/files/zsh/zshrc similarity index 100% rename from zshrc rename to Ansible/roles/dotfiles/files/zsh/zshrc From c664ca3b9dea1fae698d8626407a0d89ff080936 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 19:19:29 -0700 Subject: [PATCH 07/93] Move zsh init functions to corresponding directories --- .../roles/dotfiles/files/zsh/init-env-functions}/init-env | 0 .../roles/dotfiles/files/zsh/init-env-functions}/init-env-darwin | 0 .../roles/dotfiles/files/zsh/init-env-functions}/init-env-path | 0 .../dotfiles/files/zsh/init-env-functions}/init-env-playdate | 0 .../roles/dotfiles/files/zsh/init-env-functions}/init-env-python | 0 .../dotfiles/files/zsh/init-env-functions}/init-env-tilde-paths | 0 .../roles/dotfiles/files/zsh/init-env-functions}/init-env-vi | 0 .../roles/dotfiles/files/zsh/init-rc-functions}/init-rc-darwin | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/init-env-functions}/init-env (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/init-env-functions}/init-env-darwin (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/init-env-functions}/init-env-path (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/init-env-functions}/init-env-playdate (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/init-env-functions}/init-env-python (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/init-env-functions}/init-env-tilde-paths (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/init-env-functions}/init-env-vi (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/init-rc-functions}/init-rc-darwin (100%) diff --git a/zsh/func/init-env b/Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env similarity index 100% rename from zsh/func/init-env rename to Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env diff --git a/zsh/func/init-env-darwin b/Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-darwin similarity index 100% rename from zsh/func/init-env-darwin rename to Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-darwin diff --git a/zsh/func/init-env-path b/Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-path similarity index 100% rename from zsh/func/init-env-path rename to Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-path diff --git a/zsh/func/init-env-playdate b/Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-playdate similarity index 100% rename from zsh/func/init-env-playdate rename to Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-playdate diff --git a/zsh/func/init-env-python b/Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-python similarity index 100% rename from zsh/func/init-env-python rename to Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-python diff --git a/zsh/func/init-env-tilde-paths b/Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-tilde-paths similarity index 100% rename from zsh/func/init-env-tilde-paths rename to Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-tilde-paths diff --git a/zsh/func/init-env-vi b/Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-vi similarity index 100% rename from zsh/func/init-env-vi rename to Ansible/roles/dotfiles/files/zsh/init-env-functions/init-env-vi diff --git a/zsh/func/init-rc-darwin b/Ansible/roles/dotfiles/files/zsh/init-rc-functions/init-rc-darwin similarity index 100% rename from zsh/func/init-rc-darwin rename to Ansible/roles/dotfiles/files/zsh/init-rc-functions/init-rc-darwin From 916086b743c3d49a6b01948c03424ad326011d2c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 19:20:41 -0700 Subject: [PATCH 08/93] Tasks to set up ZSH --- Ansible/roles/dotfiles/tasks/zsh.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Ansible/roles/dotfiles/tasks/zsh.yml diff --git a/Ansible/roles/dotfiles/tasks/zsh.yml b/Ansible/roles/dotfiles/tasks/zsh.yml new file mode 100644 index 0000000..9301154 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/zsh.yml @@ -0,0 +1,25 @@ +--- +- name: (ZSH) Link startup files + ansible.builtin.file: + path: ~/.{{ item }} + src: "{{ role_path }}/files/zsh/{{ item }}" + state: link + force: true + loop: + - zshenv + - zshrc + - zprofile + +- name: (ZSH) Link env functions + ansible.builtin.file: + path: ~/.zsh/init-env-functions + src: "{{ role_path }}/files/zsh/init-env-functions" + state: link + force: true + +- name: (ZSH) Link rc functions + ansible.builtin.file: + path: ~/.zsh/init-rc-functions + src: "{{ role_path }}/files/zsh/init-rc-functions" + state: link + force: true From b454868ca8d3d9a0d8871627a7f200db4481074f Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 19:20:58 -0700 Subject: [PATCH 09/93] Run ZSH setup tasks from dotfiles role main.yml --- Ansible/roles/dotfiles/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Ansible/roles/dotfiles/tasks/main.yml diff --git a/Ansible/roles/dotfiles/tasks/main.yml b/Ansible/roles/dotfiles/tasks/main.yml new file mode 100644 index 0000000..3c2ba07 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- name: ZSH + ansible.builtin.include_tasks: zsh.yml From 29e0b21a998d830fbe6b82bb3d8f7c4d2e987393 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 19:21:12 -0700 Subject: [PATCH 10/93] Apply the dotfiles role --- Ansible/local.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Ansible/local.yml diff --git a/Ansible/local.yml b/Ansible/local.yml new file mode 100644 index 0000000..f18a2d6 --- /dev/null +++ b/Ansible/local.yml @@ -0,0 +1,7 @@ +--- +- name: Local + hosts: localhost + tasks: + - name: Set up dotfiles + ansible.builtin.include_role: + name: dotfiles From 65182a7c520a057c3a9af9ec03f010c7b760c9ec Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 19:34:50 -0700 Subject: [PATCH 11/93] Move neovim config to dotfiles role --- .../roles/dotfiles/files/neovim}/UltiSnips/lua.snippets | 0 .../roles/dotfiles/files/neovim}/UltiSnips/python.snippets | 0 .../roles/dotfiles/files/neovim}/after/ftplugin/css.lua | 0 .../roles/dotfiles/files/neovim}/after/ftplugin/gitcommit.vim | 0 .../roles/dotfiles/files/neovim}/after/ftplugin/gohtmltmpl.lua | 0 .../roles/dotfiles/files/neovim}/after/ftplugin/lua.lua | 0 .../roles/dotfiles/files/neovim}/after/ftplugin/python.lua | 0 .../roles/dotfiles/files/neovim}/after/ftplugin/rust.lua | 0 .../roles/dotfiles/files/neovim}/after/ftplugin/zsh.lua | 0 .../roles/dotfiles/files/neovim}/after/plugin/gitgutter.lua | 0 .../roles/dotfiles/files/neovim}/after/plugin/treesitter.lua | 0 .../roles/dotfiles/files/neovim}/after/syntax/css.vim | 0 .../roles/dotfiles/files/neovim}/ftdetect/gohtmltmpl.lua | 0 .../nvim => Ansible/roles/dotfiles/files/neovim}/ftdetect/zsh.lua | 0 {config/nvim => Ansible/roles/dotfiles/files/neovim}/init.lua | 0 .../roles/dotfiles/files/neovim}/lua/autocommands.lua | 0 .../nvim => Ansible/roles/dotfiles/files/neovim}/lua/colors.lua | 0 .../roles/dotfiles/files/neovim}/lua/configuration.lua | 0 .../roles/dotfiles/files/neovim}/lua/diagnostics.lua | 0 {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/gui.lua | 0 {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/keys.lua | 0 {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/lsp.lua | 0 .../roles/dotfiles/files/neovim}/lua/treesitter.lua | 0 .../roles/dotfiles/files/neovim}/syntax/gocsstmpl.vim | 0 24 files changed, 0 insertions(+), 0 deletions(-) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/UltiSnips/lua.snippets (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/UltiSnips/python.snippets (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/ftplugin/css.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/ftplugin/gitcommit.vim (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/ftplugin/gohtmltmpl.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/ftplugin/lua.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/ftplugin/python.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/ftplugin/rust.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/ftplugin/zsh.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/plugin/gitgutter.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/plugin/treesitter.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/after/syntax/css.vim (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/ftdetect/gohtmltmpl.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/ftdetect/zsh.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/init.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/autocommands.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/colors.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/configuration.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/diagnostics.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/gui.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/keys.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/lsp.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/lua/treesitter.lua (100%) rename {config/nvim => Ansible/roles/dotfiles/files/neovim}/syntax/gocsstmpl.vim (100%) diff --git a/config/nvim/UltiSnips/lua.snippets b/Ansible/roles/dotfiles/files/neovim/UltiSnips/lua.snippets similarity index 100% rename from config/nvim/UltiSnips/lua.snippets rename to Ansible/roles/dotfiles/files/neovim/UltiSnips/lua.snippets diff --git a/config/nvim/UltiSnips/python.snippets b/Ansible/roles/dotfiles/files/neovim/UltiSnips/python.snippets similarity index 100% rename from config/nvim/UltiSnips/python.snippets rename to Ansible/roles/dotfiles/files/neovim/UltiSnips/python.snippets diff --git a/config/nvim/after/ftplugin/css.lua b/Ansible/roles/dotfiles/files/neovim/after/ftplugin/css.lua similarity index 100% rename from config/nvim/after/ftplugin/css.lua rename to Ansible/roles/dotfiles/files/neovim/after/ftplugin/css.lua diff --git a/config/nvim/after/ftplugin/gitcommit.vim b/Ansible/roles/dotfiles/files/neovim/after/ftplugin/gitcommit.vim similarity index 100% rename from config/nvim/after/ftplugin/gitcommit.vim rename to Ansible/roles/dotfiles/files/neovim/after/ftplugin/gitcommit.vim diff --git a/config/nvim/after/ftplugin/gohtmltmpl.lua b/Ansible/roles/dotfiles/files/neovim/after/ftplugin/gohtmltmpl.lua similarity index 100% rename from config/nvim/after/ftplugin/gohtmltmpl.lua rename to Ansible/roles/dotfiles/files/neovim/after/ftplugin/gohtmltmpl.lua diff --git a/config/nvim/after/ftplugin/lua.lua b/Ansible/roles/dotfiles/files/neovim/after/ftplugin/lua.lua similarity index 100% rename from config/nvim/after/ftplugin/lua.lua rename to Ansible/roles/dotfiles/files/neovim/after/ftplugin/lua.lua diff --git a/config/nvim/after/ftplugin/python.lua b/Ansible/roles/dotfiles/files/neovim/after/ftplugin/python.lua similarity index 100% rename from config/nvim/after/ftplugin/python.lua rename to Ansible/roles/dotfiles/files/neovim/after/ftplugin/python.lua diff --git a/config/nvim/after/ftplugin/rust.lua b/Ansible/roles/dotfiles/files/neovim/after/ftplugin/rust.lua similarity index 100% rename from config/nvim/after/ftplugin/rust.lua rename to Ansible/roles/dotfiles/files/neovim/after/ftplugin/rust.lua diff --git a/config/nvim/after/ftplugin/zsh.lua b/Ansible/roles/dotfiles/files/neovim/after/ftplugin/zsh.lua similarity index 100% rename from config/nvim/after/ftplugin/zsh.lua rename to Ansible/roles/dotfiles/files/neovim/after/ftplugin/zsh.lua diff --git a/config/nvim/after/plugin/gitgutter.lua b/Ansible/roles/dotfiles/files/neovim/after/plugin/gitgutter.lua similarity index 100% rename from config/nvim/after/plugin/gitgutter.lua rename to Ansible/roles/dotfiles/files/neovim/after/plugin/gitgutter.lua diff --git a/config/nvim/after/plugin/treesitter.lua b/Ansible/roles/dotfiles/files/neovim/after/plugin/treesitter.lua similarity index 100% rename from config/nvim/after/plugin/treesitter.lua rename to Ansible/roles/dotfiles/files/neovim/after/plugin/treesitter.lua diff --git a/config/nvim/after/syntax/css.vim b/Ansible/roles/dotfiles/files/neovim/after/syntax/css.vim similarity index 100% rename from config/nvim/after/syntax/css.vim rename to Ansible/roles/dotfiles/files/neovim/after/syntax/css.vim diff --git a/config/nvim/ftdetect/gohtmltmpl.lua b/Ansible/roles/dotfiles/files/neovim/ftdetect/gohtmltmpl.lua similarity index 100% rename from config/nvim/ftdetect/gohtmltmpl.lua rename to Ansible/roles/dotfiles/files/neovim/ftdetect/gohtmltmpl.lua diff --git a/config/nvim/ftdetect/zsh.lua b/Ansible/roles/dotfiles/files/neovim/ftdetect/zsh.lua similarity index 100% rename from config/nvim/ftdetect/zsh.lua rename to Ansible/roles/dotfiles/files/neovim/ftdetect/zsh.lua diff --git a/config/nvim/init.lua b/Ansible/roles/dotfiles/files/neovim/init.lua similarity index 100% rename from config/nvim/init.lua rename to Ansible/roles/dotfiles/files/neovim/init.lua diff --git a/config/nvim/lua/autocommands.lua b/Ansible/roles/dotfiles/files/neovim/lua/autocommands.lua similarity index 100% rename from config/nvim/lua/autocommands.lua rename to Ansible/roles/dotfiles/files/neovim/lua/autocommands.lua diff --git a/config/nvim/lua/colors.lua b/Ansible/roles/dotfiles/files/neovim/lua/colors.lua similarity index 100% rename from config/nvim/lua/colors.lua rename to Ansible/roles/dotfiles/files/neovim/lua/colors.lua diff --git a/config/nvim/lua/configuration.lua b/Ansible/roles/dotfiles/files/neovim/lua/configuration.lua similarity index 100% rename from config/nvim/lua/configuration.lua rename to Ansible/roles/dotfiles/files/neovim/lua/configuration.lua diff --git a/config/nvim/lua/diagnostics.lua b/Ansible/roles/dotfiles/files/neovim/lua/diagnostics.lua similarity index 100% rename from config/nvim/lua/diagnostics.lua rename to Ansible/roles/dotfiles/files/neovim/lua/diagnostics.lua diff --git a/config/nvim/lua/gui.lua b/Ansible/roles/dotfiles/files/neovim/lua/gui.lua similarity index 100% rename from config/nvim/lua/gui.lua rename to Ansible/roles/dotfiles/files/neovim/lua/gui.lua diff --git a/config/nvim/lua/keys.lua b/Ansible/roles/dotfiles/files/neovim/lua/keys.lua similarity index 100% rename from config/nvim/lua/keys.lua rename to Ansible/roles/dotfiles/files/neovim/lua/keys.lua diff --git a/config/nvim/lua/lsp.lua b/Ansible/roles/dotfiles/files/neovim/lua/lsp.lua similarity index 100% rename from config/nvim/lua/lsp.lua rename to Ansible/roles/dotfiles/files/neovim/lua/lsp.lua diff --git a/config/nvim/lua/treesitter.lua b/Ansible/roles/dotfiles/files/neovim/lua/treesitter.lua similarity index 100% rename from config/nvim/lua/treesitter.lua rename to Ansible/roles/dotfiles/files/neovim/lua/treesitter.lua diff --git a/config/nvim/syntax/gocsstmpl.vim b/Ansible/roles/dotfiles/files/neovim/syntax/gocsstmpl.vim similarity index 100% rename from config/nvim/syntax/gocsstmpl.vim rename to Ansible/roles/dotfiles/files/neovim/syntax/gocsstmpl.vim From f7a29e3c1d41641c443af27717ce867e75522dbb Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 19:37:41 -0700 Subject: [PATCH 12/93] Add vim setup --- .../roles/dotfiles/files/vim/vimrc | 0 Ansible/roles/dotfiles/tasks/main.yml | 3 ++ Ansible/roles/dotfiles/tasks/vim.yml | 30 +++++++++++++++++++ 3 files changed, 33 insertions(+) rename vimrc => Ansible/roles/dotfiles/files/vim/vimrc (100%) create mode 100644 Ansible/roles/dotfiles/tasks/vim.yml diff --git a/vimrc b/Ansible/roles/dotfiles/files/vim/vimrc similarity index 100% rename from vimrc rename to Ansible/roles/dotfiles/files/vim/vimrc diff --git a/Ansible/roles/dotfiles/tasks/main.yml b/Ansible/roles/dotfiles/tasks/main.yml index 3c2ba07..0ca08a1 100644 --- a/Ansible/roles/dotfiles/tasks/main.yml +++ b/Ansible/roles/dotfiles/tasks/main.yml @@ -1,3 +1,6 @@ --- - name: ZSH ansible.builtin.include_tasks: zsh.yml + +- name: Vim + ansible.builtin.include_tasks: vim.yml diff --git a/Ansible/roles/dotfiles/tasks/vim.yml b/Ansible/roles/dotfiles/tasks/vim.yml new file mode 100644 index 0000000..94c6321 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/vim.yml @@ -0,0 +1,30 @@ +--- +- name: (vim) Link plain vim config + ansible.builtin.file: + path: ~/.vimrc + src: "{{ role_path }}/files/vim/vimrc" + state: link + force: true + +- name: (neovim) Create standard config directory + ansible.builtin.file: + path: ~/.config + state: directory + +- name: (neovim) Link config + ansible.builtin.file: + path: ~/.config/nvim + src: "{{ role_path }}/files/neovim" + state: link + force: true + +- name: (neovim) Create .local directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + loop: + - ~/.local/share/nvim + - ~/.local/state/nvim + - ~/.local/state/nvim/backup + - ~/.local/state/nvim/swap + - ~/.local/state/nvim/undo From bc4b9f80892754027ac6bbf5a3d366727b63757e Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 19:48:38 -0700 Subject: [PATCH 13/93] Move git configs into dotfiles role --- .../roles/dotfiles/files/git/gitconfig | 0 .../roles/dotfiles/files/git/gitignore | 0 Ansible/roles/dotfiles/tasks/git.yml | 10 ++++++++++ Ansible/roles/dotfiles/tasks/main.yml | 3 +++ 4 files changed, 13 insertions(+) rename gitconfig => Ansible/roles/dotfiles/files/git/gitconfig (100%) rename gitignore => Ansible/roles/dotfiles/files/git/gitignore (100%) create mode 100644 Ansible/roles/dotfiles/tasks/git.yml diff --git a/gitconfig b/Ansible/roles/dotfiles/files/git/gitconfig similarity index 100% rename from gitconfig rename to Ansible/roles/dotfiles/files/git/gitconfig diff --git a/gitignore b/Ansible/roles/dotfiles/files/git/gitignore similarity index 100% rename from gitignore rename to Ansible/roles/dotfiles/files/git/gitignore diff --git a/Ansible/roles/dotfiles/tasks/git.yml b/Ansible/roles/dotfiles/tasks/git.yml new file mode 100644 index 0000000..b326569 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/git.yml @@ -0,0 +1,10 @@ +--- +- name: (git) Link global git configs + ansible.builtin.file: + path: ~/.{{ item }} + src: "{{ role_path }}/files/git/{{ item }}" + state: link + force: true + loop: + - gitconfig + - gitignore diff --git a/Ansible/roles/dotfiles/tasks/main.yml b/Ansible/roles/dotfiles/tasks/main.yml index 0ca08a1..d2b5810 100644 --- a/Ansible/roles/dotfiles/tasks/main.yml +++ b/Ansible/roles/dotfiles/tasks/main.yml @@ -4,3 +4,6 @@ - name: Vim ansible.builtin.include_tasks: vim.yml + +- name: Git + ansible.builtin.include_tasks: git.yml From 01312752fc40f7a235a72b1ee25035414e140570 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 19:55:27 -0700 Subject: [PATCH 14/93] Move tmux and screen configs to Ansible role --- .../roles/dotfiles/files/screen/screenrc | 0 .../roles/dotfiles/files/tmux/tmux.conf | 0 Ansible/roles/dotfiles/tasks/main.yml | 6 ++++++ Ansible/roles/dotfiles/tasks/shell_utilities.yml | 16 ++++++++++++++++ 4 files changed, 22 insertions(+) rename screenrc => Ansible/roles/dotfiles/files/screen/screenrc (100%) rename tmux.conf => Ansible/roles/dotfiles/files/tmux/tmux.conf (100%) create mode 100644 Ansible/roles/dotfiles/tasks/shell_utilities.yml diff --git a/screenrc b/Ansible/roles/dotfiles/files/screen/screenrc similarity index 100% rename from screenrc rename to Ansible/roles/dotfiles/files/screen/screenrc diff --git a/tmux.conf b/Ansible/roles/dotfiles/files/tmux/tmux.conf similarity index 100% rename from tmux.conf rename to Ansible/roles/dotfiles/files/tmux/tmux.conf diff --git a/Ansible/roles/dotfiles/tasks/main.yml b/Ansible/roles/dotfiles/tasks/main.yml index d2b5810..f8ff950 100644 --- a/Ansible/roles/dotfiles/tasks/main.yml +++ b/Ansible/roles/dotfiles/tasks/main.yml @@ -1,9 +1,15 @@ --- - name: ZSH ansible.builtin.include_tasks: zsh.yml + tags: dotfiles_zsh - name: Vim ansible.builtin.include_tasks: vim.yml + tags: dotfiles_vim - name: Git ansible.builtin.include_tasks: git.yml + tags: dotfiles_git + +- name: Shell utilities + ansible.builtin.include_tasks: shell_utilities.yml diff --git a/Ansible/roles/dotfiles/tasks/shell_utilities.yml b/Ansible/roles/dotfiles/tasks/shell_utilities.yml new file mode 100644 index 0000000..197a1ee --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/shell_utilities.yml @@ -0,0 +1,16 @@ +--- +- name: (tmux) Link tmux.conf + ansible.builtin.file: + path: ~/.tmux.conf + src: "{{ role_path }}/files/tmux/tmux.conf" + state: link + force: true + tags: dotfiles_tmux + +- name: (screen) Link screenrc + ansible.builtin.file: + path: ~/.screenrc + src: "{{ role_path }}/files/screen/screenrc" + state: link + force: true + tags: dotfiles_screen From 398c6f2d18fb5565adeee658f48d416392b60f0f Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 20:08:35 -0700 Subject: [PATCH 15/93] Move the rest of the zsh functions into the dotfiles role --- .../files/zsh/functions}/append_to_path | 0 .../files/zsh/functions}/binary_exists | 0 .../files/zsh/functions}/connect_ssh_agent | 0 .../zsh/functions}/darwin-icloud-drive-path | 0 .../functions}/darwin/darwin-hardware-model | 0 .../zsh/functions}/darwin/darwin-os-build | 0 .../zsh/functions}/darwin/darwin-os-version | 0 .../darwin_configure_screenshots_directory | 0 .../files/zsh/functions}/darwin_init_once | 0 .../files/zsh/functions}/do_init_functions | 0 .../dotfiles/files/zsh/functions}/finder | 0 .../roles/dotfiles/files/zsh/functions}/g | 0 .../files/zsh/functions}/homebrew-prefix | 0 .../files/zsh/functions}/import_cacert | 0 .../zsh/functions}/init_app_environments | 0 .../files/zsh/functions}/init_configure_ls | 0 .../files/zsh/functions}/init_profile_darwin | 0 .../functions}/init_profile_darwin_say_hello | 0 .../files/zsh/functions}/init_rc_aliases | 0 .../functions}/init_rc_configure_completion | 0 .../zsh/functions}/init_rc_configure_prompt | 0 .../zsh/functions}/init_rc_configure_zle | 0 .../files/zsh/functions}/init_rc_fpath_darwin | 0 .../files/zsh/functions}/init_rc_linux | 0 .../files/zsh/functions}/init_rc_tilde_paths | 0 .../files/zsh/functions/init_site_environment | 9 ++++++++ .../zsh/functions/init_website_environment | 9 ++++++++ .../dotfiles/files/zsh/functions}/init_xcode | 0 .../files/zsh/functions}/init_zsh_functions | 0 .../files/zsh/functions}/init_zsh_history | 0 .../files/zsh/functions}/init_zsh_options | 0 .../files/zsh/functions}/list_tmux_sessions | 0 .../dotfiles/files/zsh/functions}/load_module | 0 .../files/zsh/functions}/neovim_init_once | 0 .../dotfiles/files/zsh/functions}/nethack | 0 .../dotfiles/files/zsh/functions}/open-xcode | 0 .../files/zsh/functions}/prepend_to_path | 0 .../files/zsh/functions}/prompt_colorize | 0 .../zsh/functions}/prompt_loquacious_setup | 0 .../files/zsh/functions}/refresh_system_tags | 0 .../files/zsh/functions}/setup-cpython | 0 .../files/zsh/functions}/setup_android | 0 .../dotfiles/files/zsh/functions}/solarized | 0 .../roles/dotfiles/files/zsh/functions}/up | 0 .../dotfiles/files/zsh/functions}/update-path | 0 .../dotfiles/files/zsh/functions/weeknotes | 15 +++++++++++++ Ansible/roles/dotfiles/files/zsh/zshenv | 4 +++- Ansible/roles/dotfiles/tasks/zsh.yml | 22 ++++++++++++------- 48 files changed, 50 insertions(+), 9 deletions(-) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/append_to_path (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/binary_exists (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/connect_ssh_agent (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/darwin-icloud-drive-path (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/darwin/darwin-hardware-model (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/darwin/darwin-os-build (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/darwin/darwin-os-version (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/darwin_configure_screenshots_directory (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/darwin_init_once (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/do_init_functions (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/finder (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/g (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/homebrew-prefix (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/import_cacert (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_app_environments (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_configure_ls (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_profile_darwin (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_profile_darwin_say_hello (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_rc_aliases (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_rc_configure_completion (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_rc_configure_prompt (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_rc_configure_zle (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_rc_fpath_darwin (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_rc_linux (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_rc_tilde_paths (100%) create mode 100644 Ansible/roles/dotfiles/files/zsh/functions/init_site_environment create mode 100644 Ansible/roles/dotfiles/files/zsh/functions/init_website_environment rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_xcode (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_zsh_functions (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_zsh_history (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/init_zsh_options (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/list_tmux_sessions (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/load_module (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/neovim_init_once (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/nethack (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/open-xcode (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/prepend_to_path (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/prompt_colorize (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/prompt_loquacious_setup (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/refresh_system_tags (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/setup-cpython (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/setup_android (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/solarized (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/up (100%) rename {zsh/func => Ansible/roles/dotfiles/files/zsh/functions}/update-path (100%) create mode 100644 Ansible/roles/dotfiles/files/zsh/functions/weeknotes diff --git a/zsh/func/append_to_path b/Ansible/roles/dotfiles/files/zsh/functions/append_to_path similarity index 100% rename from zsh/func/append_to_path rename to Ansible/roles/dotfiles/files/zsh/functions/append_to_path diff --git a/zsh/func/binary_exists b/Ansible/roles/dotfiles/files/zsh/functions/binary_exists similarity index 100% rename from zsh/func/binary_exists rename to Ansible/roles/dotfiles/files/zsh/functions/binary_exists diff --git a/zsh/func/connect_ssh_agent b/Ansible/roles/dotfiles/files/zsh/functions/connect_ssh_agent similarity index 100% rename from zsh/func/connect_ssh_agent rename to Ansible/roles/dotfiles/files/zsh/functions/connect_ssh_agent diff --git a/zsh/func/darwin-icloud-drive-path b/Ansible/roles/dotfiles/files/zsh/functions/darwin-icloud-drive-path similarity index 100% rename from zsh/func/darwin-icloud-drive-path rename to Ansible/roles/dotfiles/files/zsh/functions/darwin-icloud-drive-path diff --git a/zsh/func/darwin/darwin-hardware-model b/Ansible/roles/dotfiles/files/zsh/functions/darwin/darwin-hardware-model similarity index 100% rename from zsh/func/darwin/darwin-hardware-model rename to Ansible/roles/dotfiles/files/zsh/functions/darwin/darwin-hardware-model diff --git a/zsh/func/darwin/darwin-os-build b/Ansible/roles/dotfiles/files/zsh/functions/darwin/darwin-os-build similarity index 100% rename from zsh/func/darwin/darwin-os-build rename to Ansible/roles/dotfiles/files/zsh/functions/darwin/darwin-os-build diff --git a/zsh/func/darwin/darwin-os-version b/Ansible/roles/dotfiles/files/zsh/functions/darwin/darwin-os-version similarity index 100% rename from zsh/func/darwin/darwin-os-version rename to Ansible/roles/dotfiles/files/zsh/functions/darwin/darwin-os-version diff --git a/zsh/func/darwin_configure_screenshots_directory b/Ansible/roles/dotfiles/files/zsh/functions/darwin_configure_screenshots_directory similarity index 100% rename from zsh/func/darwin_configure_screenshots_directory rename to Ansible/roles/dotfiles/files/zsh/functions/darwin_configure_screenshots_directory diff --git a/zsh/func/darwin_init_once b/Ansible/roles/dotfiles/files/zsh/functions/darwin_init_once similarity index 100% rename from zsh/func/darwin_init_once rename to Ansible/roles/dotfiles/files/zsh/functions/darwin_init_once diff --git a/zsh/func/do_init_functions b/Ansible/roles/dotfiles/files/zsh/functions/do_init_functions similarity index 100% rename from zsh/func/do_init_functions rename to Ansible/roles/dotfiles/files/zsh/functions/do_init_functions diff --git a/zsh/func/finder b/Ansible/roles/dotfiles/files/zsh/functions/finder similarity index 100% rename from zsh/func/finder rename to Ansible/roles/dotfiles/files/zsh/functions/finder diff --git a/zsh/func/g b/Ansible/roles/dotfiles/files/zsh/functions/g similarity index 100% rename from zsh/func/g rename to Ansible/roles/dotfiles/files/zsh/functions/g diff --git a/zsh/func/homebrew-prefix b/Ansible/roles/dotfiles/files/zsh/functions/homebrew-prefix similarity index 100% rename from zsh/func/homebrew-prefix rename to Ansible/roles/dotfiles/files/zsh/functions/homebrew-prefix diff --git a/zsh/func/import_cacert b/Ansible/roles/dotfiles/files/zsh/functions/import_cacert similarity index 100% rename from zsh/func/import_cacert rename to Ansible/roles/dotfiles/files/zsh/functions/import_cacert diff --git a/zsh/func/init_app_environments b/Ansible/roles/dotfiles/files/zsh/functions/init_app_environments similarity index 100% rename from zsh/func/init_app_environments rename to Ansible/roles/dotfiles/files/zsh/functions/init_app_environments diff --git a/zsh/func/init_configure_ls b/Ansible/roles/dotfiles/files/zsh/functions/init_configure_ls similarity index 100% rename from zsh/func/init_configure_ls rename to Ansible/roles/dotfiles/files/zsh/functions/init_configure_ls diff --git a/zsh/func/init_profile_darwin b/Ansible/roles/dotfiles/files/zsh/functions/init_profile_darwin similarity index 100% rename from zsh/func/init_profile_darwin rename to Ansible/roles/dotfiles/files/zsh/functions/init_profile_darwin diff --git a/zsh/func/init_profile_darwin_say_hello b/Ansible/roles/dotfiles/files/zsh/functions/init_profile_darwin_say_hello similarity index 100% rename from zsh/func/init_profile_darwin_say_hello rename to Ansible/roles/dotfiles/files/zsh/functions/init_profile_darwin_say_hello diff --git a/zsh/func/init_rc_aliases b/Ansible/roles/dotfiles/files/zsh/functions/init_rc_aliases similarity index 100% rename from zsh/func/init_rc_aliases rename to Ansible/roles/dotfiles/files/zsh/functions/init_rc_aliases diff --git a/zsh/func/init_rc_configure_completion b/Ansible/roles/dotfiles/files/zsh/functions/init_rc_configure_completion similarity index 100% rename from zsh/func/init_rc_configure_completion rename to Ansible/roles/dotfiles/files/zsh/functions/init_rc_configure_completion diff --git a/zsh/func/init_rc_configure_prompt b/Ansible/roles/dotfiles/files/zsh/functions/init_rc_configure_prompt similarity index 100% rename from zsh/func/init_rc_configure_prompt rename to Ansible/roles/dotfiles/files/zsh/functions/init_rc_configure_prompt diff --git a/zsh/func/init_rc_configure_zle b/Ansible/roles/dotfiles/files/zsh/functions/init_rc_configure_zle similarity index 100% rename from zsh/func/init_rc_configure_zle rename to Ansible/roles/dotfiles/files/zsh/functions/init_rc_configure_zle diff --git a/zsh/func/init_rc_fpath_darwin b/Ansible/roles/dotfiles/files/zsh/functions/init_rc_fpath_darwin similarity index 100% rename from zsh/func/init_rc_fpath_darwin rename to Ansible/roles/dotfiles/files/zsh/functions/init_rc_fpath_darwin diff --git a/zsh/func/init_rc_linux b/Ansible/roles/dotfiles/files/zsh/functions/init_rc_linux similarity index 100% rename from zsh/func/init_rc_linux rename to Ansible/roles/dotfiles/files/zsh/functions/init_rc_linux diff --git a/zsh/func/init_rc_tilde_paths b/Ansible/roles/dotfiles/files/zsh/functions/init_rc_tilde_paths similarity index 100% rename from zsh/func/init_rc_tilde_paths rename to Ansible/roles/dotfiles/files/zsh/functions/init_rc_tilde_paths diff --git a/Ansible/roles/dotfiles/files/zsh/functions/init_site_environment b/Ansible/roles/dotfiles/files/zsh/functions/init_site_environment new file mode 100644 index 0000000..b4f382b --- /dev/null +++ b/Ansible/roles/dotfiles/files/zsh/functions/init_site_environment @@ -0,0 +1,9 @@ +#!/usr/bin/env zsh +# Eryn Wells + +function init_site_environments +{ + export ERYNWELLS_ME_SITE="$HOME/Developer/erynwells.me" +} + +init_site_environments "$@" diff --git a/Ansible/roles/dotfiles/files/zsh/functions/init_website_environment b/Ansible/roles/dotfiles/files/zsh/functions/init_website_environment new file mode 100644 index 0000000..e1f791e --- /dev/null +++ b/Ansible/roles/dotfiles/files/zsh/functions/init_website_environment @@ -0,0 +1,9 @@ +#!/usr/bin/env zsh +# Eryn Wells + +function init_website_environments +{ + export ERYNWELLS_ME_SITE="$HOME/Developer/erynwells.me" +} + +init_website_environments "$@" diff --git a/zsh/func/init_xcode b/Ansible/roles/dotfiles/files/zsh/functions/init_xcode similarity index 100% rename from zsh/func/init_xcode rename to Ansible/roles/dotfiles/files/zsh/functions/init_xcode diff --git a/zsh/func/init_zsh_functions b/Ansible/roles/dotfiles/files/zsh/functions/init_zsh_functions similarity index 100% rename from zsh/func/init_zsh_functions rename to Ansible/roles/dotfiles/files/zsh/functions/init_zsh_functions diff --git a/zsh/func/init_zsh_history b/Ansible/roles/dotfiles/files/zsh/functions/init_zsh_history similarity index 100% rename from zsh/func/init_zsh_history rename to Ansible/roles/dotfiles/files/zsh/functions/init_zsh_history diff --git a/zsh/func/init_zsh_options b/Ansible/roles/dotfiles/files/zsh/functions/init_zsh_options similarity index 100% rename from zsh/func/init_zsh_options rename to Ansible/roles/dotfiles/files/zsh/functions/init_zsh_options diff --git a/zsh/func/list_tmux_sessions b/Ansible/roles/dotfiles/files/zsh/functions/list_tmux_sessions similarity index 100% rename from zsh/func/list_tmux_sessions rename to Ansible/roles/dotfiles/files/zsh/functions/list_tmux_sessions diff --git a/zsh/func/load_module b/Ansible/roles/dotfiles/files/zsh/functions/load_module similarity index 100% rename from zsh/func/load_module rename to Ansible/roles/dotfiles/files/zsh/functions/load_module diff --git a/zsh/func/neovim_init_once b/Ansible/roles/dotfiles/files/zsh/functions/neovim_init_once similarity index 100% rename from zsh/func/neovim_init_once rename to Ansible/roles/dotfiles/files/zsh/functions/neovim_init_once diff --git a/zsh/func/nethack b/Ansible/roles/dotfiles/files/zsh/functions/nethack similarity index 100% rename from zsh/func/nethack rename to Ansible/roles/dotfiles/files/zsh/functions/nethack diff --git a/zsh/func/open-xcode b/Ansible/roles/dotfiles/files/zsh/functions/open-xcode similarity index 100% rename from zsh/func/open-xcode rename to Ansible/roles/dotfiles/files/zsh/functions/open-xcode diff --git a/zsh/func/prepend_to_path b/Ansible/roles/dotfiles/files/zsh/functions/prepend_to_path similarity index 100% rename from zsh/func/prepend_to_path rename to Ansible/roles/dotfiles/files/zsh/functions/prepend_to_path diff --git a/zsh/func/prompt_colorize b/Ansible/roles/dotfiles/files/zsh/functions/prompt_colorize similarity index 100% rename from zsh/func/prompt_colorize rename to Ansible/roles/dotfiles/files/zsh/functions/prompt_colorize diff --git a/zsh/func/prompt_loquacious_setup b/Ansible/roles/dotfiles/files/zsh/functions/prompt_loquacious_setup similarity index 100% rename from zsh/func/prompt_loquacious_setup rename to Ansible/roles/dotfiles/files/zsh/functions/prompt_loquacious_setup diff --git a/zsh/func/refresh_system_tags b/Ansible/roles/dotfiles/files/zsh/functions/refresh_system_tags similarity index 100% rename from zsh/func/refresh_system_tags rename to Ansible/roles/dotfiles/files/zsh/functions/refresh_system_tags diff --git a/zsh/func/setup-cpython b/Ansible/roles/dotfiles/files/zsh/functions/setup-cpython similarity index 100% rename from zsh/func/setup-cpython rename to Ansible/roles/dotfiles/files/zsh/functions/setup-cpython diff --git a/zsh/func/setup_android b/Ansible/roles/dotfiles/files/zsh/functions/setup_android similarity index 100% rename from zsh/func/setup_android rename to Ansible/roles/dotfiles/files/zsh/functions/setup_android diff --git a/zsh/func/solarized b/Ansible/roles/dotfiles/files/zsh/functions/solarized similarity index 100% rename from zsh/func/solarized rename to Ansible/roles/dotfiles/files/zsh/functions/solarized diff --git a/zsh/func/up b/Ansible/roles/dotfiles/files/zsh/functions/up similarity index 100% rename from zsh/func/up rename to Ansible/roles/dotfiles/files/zsh/functions/up diff --git a/zsh/func/update-path b/Ansible/roles/dotfiles/files/zsh/functions/update-path similarity index 100% rename from zsh/func/update-path rename to Ansible/roles/dotfiles/files/zsh/functions/update-path diff --git a/Ansible/roles/dotfiles/files/zsh/functions/weeknotes b/Ansible/roles/dotfiles/files/zsh/functions/weeknotes new file mode 100644 index 0000000..9381644 --- /dev/null +++ b/Ansible/roles/dotfiles/files/zsh/functions/weeknotes @@ -0,0 +1,15 @@ +#!/usr/bin/env zsh + +autoload init_website_environment + +function weeknotes +{ + init_website_environment + + YEAR=`date '+%Y'` + WEEK_NUMBER=`date '+%V'` + PAGE_PATH=blog/${YEAR}/weeknotes-${YEAR}w${WEEK_NUMBER}.md + UPCOMING_SUNDAY=`${ERYNWELLS_ME_SITE}/scripts/next_sunday.py` +} + +weeknotes "$@" diff --git a/Ansible/roles/dotfiles/files/zsh/zshenv b/Ansible/roles/dotfiles/files/zsh/zshenv index ead3559..540ecba 100644 --- a/Ansible/roles/dotfiles/files/zsh/zshenv +++ b/Ansible/roles/dotfiles/files/zsh/zshenv @@ -9,7 +9,9 @@ function init-env-fpath { local -r fpath_candidates=( \ "$HOME/.zsh/${SYS}-functions" \ - "$HOME/.zsh/func" \ + "$HOME/.zsh/init-env-functions" \ + "$HOME/.zsh/init-rc-functions" \ + "$HOME/.zsh/functions" \ ) # Process the array in reverse order (`Oa` means "descending index order", diff --git a/Ansible/roles/dotfiles/tasks/zsh.yml b/Ansible/roles/dotfiles/tasks/zsh.yml index 9301154..ef7dd22 100644 --- a/Ansible/roles/dotfiles/tasks/zsh.yml +++ b/Ansible/roles/dotfiles/tasks/zsh.yml @@ -1,5 +1,5 @@ --- -- name: (ZSH) Link startup files +- name: (zsh) Link startup files ansible.builtin.file: path: ~/.{{ item }} src: "{{ role_path }}/files/zsh/{{ item }}" @@ -10,16 +10,22 @@ - zshrc - zprofile -- name: (ZSH) Link env functions +- name: (zsh) Create zsh directories ansible.builtin.file: - path: ~/.zsh/init-env-functions - src: "{{ role_path }}/files/zsh/init-env-functions" - state: link + path: "{{ item }}" + state: directory force: true + loop: + - ~/.zsh + - ~/.zsh/cache -- name: (ZSH) Link rc functions +- name: (zsh) Link function library directories ansible.builtin.file: - path: ~/.zsh/init-rc-functions - src: "{{ role_path }}/files/zsh/init-rc-functions" + path: ~/.zsh/{{ item }} + src: "{{ role_path }}/files/zsh/{{ item }}" state: link force: true + loop: + - init-env-functions + - init-rc-functions + - functions From 6c6c7937c64890d657205faac913deb9602339c4 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 20:19:48 -0700 Subject: [PATCH 16/93] Move mutt config to dotfiles role --- .../roles/dotfiles/files/mutt}/mailcap | 0 .../roles/dotfiles/files/mutt/muttrc | 10 ++++---- .../dotfiles/files/mutt}/view_attachment.sh | 0 Ansible/roles/dotfiles/tasks/main.yml | 3 +++ Ansible/roles/dotfiles/tasks/mutt.yml | 25 +++++++++++++++++++ 5 files changed, 33 insertions(+), 5 deletions(-) rename {mutt => Ansible/roles/dotfiles/files/mutt}/mailcap (100%) rename muttrc => Ansible/roles/dotfiles/files/mutt/muttrc (92%) rename {mutt => Ansible/roles/dotfiles/files/mutt}/view_attachment.sh (100%) create mode 100644 Ansible/roles/dotfiles/tasks/mutt.yml diff --git a/mutt/mailcap b/Ansible/roles/dotfiles/files/mutt/mailcap similarity index 100% rename from mutt/mailcap rename to Ansible/roles/dotfiles/files/mutt/mailcap diff --git a/muttrc b/Ansible/roles/dotfiles/files/mutt/muttrc similarity index 92% rename from muttrc rename to Ansible/roles/dotfiles/files/mutt/muttrc index 6ec822c..19b0b9b 100644 --- a/muttrc +++ b/Ansible/roles/dotfiles/files/mutt/muttrc @@ -19,9 +19,9 @@ set timeout=300 set imap_keepalive=300 # Caching -set header_cache="~/.mutt/cache/headers" -set message_cachedir="~/.mutt/cache/bodies" -set certificate_file="~/.mutt/certificates" +set header_cache="~/.local/state/mutt/cache/headers" +set message_cachedir="~/.local/state/mutt/cache/bodies" +set certificate_file="~/.local/state/mutt/certificates" set use_from=yes set envelope_from=yes @@ -50,14 +50,14 @@ hdr_order Date: From: To: Cc: Subject: # Aliases set reverse_alias=yes -set alias_file="~/.mutt/aliases" +set alias_file="~/.config/mutt/aliases" # Composing and Sending set edit_headers=yes set include=yes # HTML email :( -set mailcap_path="~/.mutt/mailcap" +set mailcap_path="~/.config/mutt/mailcap" auto_view text/html alternative_order text/html text/plain text/enriched diff --git a/mutt/view_attachment.sh b/Ansible/roles/dotfiles/files/mutt/view_attachment.sh similarity index 100% rename from mutt/view_attachment.sh rename to Ansible/roles/dotfiles/files/mutt/view_attachment.sh diff --git a/Ansible/roles/dotfiles/tasks/main.yml b/Ansible/roles/dotfiles/tasks/main.yml index f8ff950..989d436 100644 --- a/Ansible/roles/dotfiles/tasks/main.yml +++ b/Ansible/roles/dotfiles/tasks/main.yml @@ -11,5 +11,8 @@ ansible.builtin.include_tasks: git.yml tags: dotfiles_git +- name: Mutt + ansible.builtin.include_tasks: mutt.yml + - name: Shell utilities ansible.builtin.include_tasks: shell_utilities.yml diff --git a/Ansible/roles/dotfiles/tasks/mutt.yml b/Ansible/roles/dotfiles/tasks/mutt.yml new file mode 100644 index 0000000..6cf777d --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/mutt.yml @@ -0,0 +1,25 @@ +--- +- name: (mutt) Link muttrc + ansible.builtin.file: + path: ~/.muttrc + src: "{{ role_path }}/files/mutt/muttrc" + state: link + force: true + +- name: (mutt) Make mutt config directory + ansible.builtin.file: + path: ~/.config/mutt + state: directory + force: true + +- name: (mutt) Link mailcap + ansible.builtin.file: + path: ~/.config/mutt/mailcap + src: "{{ role_path }}/files/mutt/mailcap" + state: link + force: true + +- name: (mutt) Create local state directory + ansible.builtin.file: + path: ~/.local/state/mutt + state: directory From 2c23fad3e8795a925c0ab7495b1a5eab1c792e3d Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 20:23:18 -0700 Subject: [PATCH 17/93] Move emacs config to dotfiles role --- emacs => Ansible/roles/dotfiles/files/emacs/emacs | 0 Ansible/roles/dotfiles/tasks/emacs.yml | 7 +++++++ Ansible/roles/dotfiles/tasks/main.yml | 5 +++++ 3 files changed, 12 insertions(+) rename emacs => Ansible/roles/dotfiles/files/emacs/emacs (100%) create mode 100644 Ansible/roles/dotfiles/tasks/emacs.yml diff --git a/emacs b/Ansible/roles/dotfiles/files/emacs/emacs similarity index 100% rename from emacs rename to Ansible/roles/dotfiles/files/emacs/emacs diff --git a/Ansible/roles/dotfiles/tasks/emacs.yml b/Ansible/roles/dotfiles/tasks/emacs.yml new file mode 100644 index 0000000..415cf08 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/emacs.yml @@ -0,0 +1,7 @@ +--- +- name: (emacs) Link emacs config + ansible.builtin.file: + path: ~/.emacs + src: "{{ role_path }}/files/emacs/emacs" + state: link + force: true diff --git a/Ansible/roles/dotfiles/tasks/main.yml b/Ansible/roles/dotfiles/tasks/main.yml index 989d436..aa1549c 100644 --- a/Ansible/roles/dotfiles/tasks/main.yml +++ b/Ansible/roles/dotfiles/tasks/main.yml @@ -7,12 +7,17 @@ ansible.builtin.include_tasks: vim.yml tags: dotfiles_vim +- name: Emacs + ansible.builtin.include_tasks: emacs.yml + tags: dotfiles_emacs + - name: Git ansible.builtin.include_tasks: git.yml tags: dotfiles_git - name: Mutt ansible.builtin.include_tasks: mutt.yml + tags: dotfiles_mutt - name: Shell utilities ansible.builtin.include_tasks: shell_utilities.yml From 3b509c45d1a6012bb4a71571404f6e34d55d08c8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 3 Oct 2024 15:37:16 -0500 Subject: [PATCH 18/93] Move nethack config into dotfiles role --- .../roles/dotfiles/files/nethack/nethackrc | 0 Ansible/roles/dotfiles/tasks/main.yml | 3 +++ Ansible/roles/dotfiles/tasks/nethack.yml | 7 +++++++ 3 files changed, 10 insertions(+) rename nethackrc => Ansible/roles/dotfiles/files/nethack/nethackrc (100%) create mode 100644 Ansible/roles/dotfiles/tasks/nethack.yml diff --git a/nethackrc b/Ansible/roles/dotfiles/files/nethack/nethackrc similarity index 100% rename from nethackrc rename to Ansible/roles/dotfiles/files/nethack/nethackrc diff --git a/Ansible/roles/dotfiles/tasks/main.yml b/Ansible/roles/dotfiles/tasks/main.yml index aa1549c..e0d319a 100644 --- a/Ansible/roles/dotfiles/tasks/main.yml +++ b/Ansible/roles/dotfiles/tasks/main.yml @@ -21,3 +21,6 @@ - name: Shell utilities ansible.builtin.include_tasks: shell_utilities.yml + +- name: Nethack + ansible.builtin.include_tasks: nethack.yml diff --git a/Ansible/roles/dotfiles/tasks/nethack.yml b/Ansible/roles/dotfiles/tasks/nethack.yml new file mode 100644 index 0000000..485e20c --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/nethack.yml @@ -0,0 +1,7 @@ +--- +- name: (nethack) Link nethackrc + ansible.builtin.file: + path: ~/.nethackrc + src: "{{ role_path }}/files/nethack/nethackrc" + state: link + force: true From ad6cc90afad177dba35b8cbffd18ff8d3350e583 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 9 Oct 2024 09:48:16 -0700 Subject: [PATCH 19/93] [vim] Move vim state directory to ~/.local/state/vim --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vimrc b/vimrc index bf45210..a0d2aea 100644 --- a/vimrc +++ b/vimrc @@ -6,7 +6,7 @@ source ~/.vimrc.common if !has('nvim') set nocompatible " use enhanced vim features - let s:localdir=expand("~/.local/vim") + let s:localdir=expand("~/.local/state/vim") if !isdirectory(s:localdir) call mkdir(s:localdir, "p") endif From 0a3dd9451a67d735fd7711cfae338f919e329380 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 9 Oct 2024 09:49:40 -0700 Subject: [PATCH 20/93] [nvim] Remove unused _addPathToRuntimePath function --- config/nvim/init.lua | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/config/nvim/init.lua b/config/nvim/init.lua index d57d195..6830c07 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -14,20 +14,6 @@ function gitTopLevelDirectory() return gitRepoTopLevelDirectoryPath end -local function _addPathToRuntimePath(path, options) - if string.len(path) == 0 then - return - end - - if vim.fn.isdirectory(path) == 1 then - if options.prepend then - vim.opt.runtimepath:prepend(path) - else - vim.opt.runtimepath:append(path) - end - end -end - function addGitTopLevelDirectoryToRuntimePath() local gitTopLevelPath = gitTopLevelDirectory() if gitTopLevelPath == nil or string.len(gitTopLevelPath) == 0 then From 202dfdb886ab22608056b451df5489c6b79f874c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 9 Oct 2024 09:50:05 -0700 Subject: [PATCH 21/93] [nvim] Call addGitTopLevelDirectoryToRuntimePath after sourcing common vimrc --- config/nvim/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 6830c07..db2bb03 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -14,6 +14,8 @@ function gitTopLevelDirectory() return gitRepoTopLevelDirectoryPath end +-- Enable per-project (per-git repository) customization of (neo)vim by looking +-- for .vim and .nvim directories in the root of the git repository. function addGitTopLevelDirectoryToRuntimePath() local gitTopLevelPath = gitTopLevelDirectory() if gitTopLevelPath == nil or string.len(gitTopLevelPath) == 0 then @@ -39,13 +41,13 @@ function addGitTopLevelDirectoryToRuntimePath() end end -addGitTopLevelDirectoryToRuntimePath() - vim.cmd [[ source ~/.vimrc.common source ~/.vim/plugins.vim ]] +addGitTopLevelDirectoryToRuntimePath() + require 'autocommands' require 'colors' require 'configuration' From d6bb7ae7266bd3a45578f0b7eefe70d8522e6acb Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 8 Nov 2024 08:24:06 -0800 Subject: [PATCH 22/93] WIP --- Ansible/ansible.cfg | 16 +++++ Ansible/roles/dotfiles/handlers/main.yml | 4 ++ .../roles/dotfiles/tasks/darwin/bootstrap.yml | 3 + .../roles/dotfiles/tasks/darwin/homebrew.yml | 37 ++++++++++ Ansible/roles/dotfiles/tasks/dotfiles.yml | 28 ++++++++ Ansible/roles/dotfiles/tasks/main.yml | 37 ++++------ Ansible/roles/dotfiles/tasks/nethack.yml | 8 +++ Ansible/roles/dotfiles/tasks/packages.yml | 13 ++++ Ansible/roles/dotfiles/tasks/vim.yml | 3 + Ansible/roles/dotfiles/tasks/zsh.yml | 70 +++++++++++-------- Ansible/roles/dotfiles/vars/main.yml | 11 +++ 11 files changed, 179 insertions(+), 51 deletions(-) create mode 100644 Ansible/ansible.cfg create mode 100644 Ansible/roles/dotfiles/handlers/main.yml create mode 100644 Ansible/roles/dotfiles/tasks/darwin/bootstrap.yml create mode 100644 Ansible/roles/dotfiles/tasks/darwin/homebrew.yml create mode 100644 Ansible/roles/dotfiles/tasks/dotfiles.yml create mode 100644 Ansible/roles/dotfiles/tasks/packages.yml create mode 100644 Ansible/roles/dotfiles/vars/main.yml diff --git a/Ansible/ansible.cfg b/Ansible/ansible.cfg new file mode 100644 index 0000000..1f7181c --- /dev/null +++ b/Ansible/ansible.cfg @@ -0,0 +1,16 @@ +[defaults] +bin_ansible_callbacks = True +callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer +remote_user = eryn +roles_path = roles +stdout_callback = community.general.yaml + +[connection] +pipelining = true + +[ssh_connection] +ssh_args = -o ControlMaster=auto -o ControlPersist=60s + +[vault] +username = ansible-infrastructure-vault +keyname = default diff --git a/Ansible/roles/dotfiles/handlers/main.yml b/Ansible/roles/dotfiles/handlers/main.yml new file mode 100644 index 0000000..dfc89e5 --- /dev/null +++ b/Ansible/roles/dotfiles/handlers/main.yml @@ -0,0 +1,4 @@ +--- +- name: Rediscover package manager + ansible.builtin.setup: + gather_subset: pkg_mgr diff --git a/Ansible/roles/dotfiles/tasks/darwin/bootstrap.yml b/Ansible/roles/dotfiles/tasks/darwin/bootstrap.yml new file mode 100644 index 0000000..0474ec1 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/darwin/bootstrap.yml @@ -0,0 +1,3 @@ +--- +- name: (macOS) Configure homebrew + ansible.builtin.include_tasks: homebrew.yml diff --git a/Ansible/roles/dotfiles/tasks/darwin/homebrew.yml b/Ansible/roles/dotfiles/tasks/darwin/homebrew.yml new file mode 100644 index 0000000..2ac20c6 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/darwin/homebrew.yml @@ -0,0 +1,37 @@ +--- +- name: (macOS | homebrew) Does the brew command exist? + ansible.builtin.stat: + path: /opt/homebrew/bin/brew + register: _dotfiles_homebrew_brew + +- name: (macOS | homebrew) Install Homebrew + when: not _dotfiles_homebrew_brew.stat.exists + block: + - name: (macOS | homebrew) Create temporary file for install script + ansible.builtin.tempfile: + state: file + prefix: homebrew-install + register: _dotfiles_homebrew_install_script + + - name: (macOS | homebrew) Set up homebrew + block: + - name: (macOS | homebrew) Fetch install script + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh + dest: "{{ _dotfiles_homebrew_install_script.path }}" + mode: "0644" + + - name: (macOS | homebrew) Run install script + ansible.builtin.command: + cmd: bash {{ _dotfiles_homebrew_install_script.path }} + environment: + NONINTERACTIVE: 1 + + - name: (macOS | homebrew) Gather package manager facts + ansible.builtin.setup: + gather_subset: pkg_mgr + always: + - name: (macOS | homebrew) Remove temporary install script + ansible.builtin.file: + path: "{{ _dotfiles_homebrew_install_script.path }}" + state: absent diff --git a/Ansible/roles/dotfiles/tasks/dotfiles.yml b/Ansible/roles/dotfiles/tasks/dotfiles.yml new file mode 100644 index 0000000..389ab23 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/dotfiles.yml @@ -0,0 +1,28 @@ +--- +- name: (dotfiles) ZSH + ansible.builtin.include_tasks: zsh.yml + tags: [ always, dotfiles_shell, dotfiles_zsh ] + +- name: (dotfiles) Vim + ansible.builtin.include_tasks: vim.yml + tags: [ always, dotfiles_vim ] + +- name: (dotfiles) Emacs + ansible.builtin.include_tasks: emacs.yml + tags: dotfiles_emacs + +- name: (dotfiles) Git + ansible.builtin.include_tasks: git.yml + tags: [ always, dotfiles_git ] + +- name: (dotfiles) Mutt + ansible.builtin.include_tasks: mutt.yml + tags: dotfiles_mutt + +- name: (dotfiles) Shell utilities + ansible.builtin.include_tasks: shell_utilities.yml + tags: dotfiles_shell + +- name: (dotfiles) Nethack + ansible.builtin.include_tasks: nethack.yml + tags: dotfiles_nethack diff --git a/Ansible/roles/dotfiles/tasks/main.yml b/Ansible/roles/dotfiles/tasks/main.yml index e0d319a..91fc42c 100644 --- a/Ansible/roles/dotfiles/tasks/main.yml +++ b/Ansible/roles/dotfiles/tasks/main.yml @@ -1,26 +1,17 @@ --- -- name: ZSH - ansible.builtin.include_tasks: zsh.yml - tags: dotfiles_zsh +- name: Bootstrap system + ansible.builtin.include_tasks: "{{ ansible_facts.os_family | lower }}/bootstrap.yml" -- name: Vim - ansible.builtin.include_tasks: vim.yml - tags: dotfiles_vim +#- name: Install packages +# ansible.builtin.include_tasks: packages.yml -- name: Emacs - ansible.builtin.include_tasks: emacs.yml - tags: dotfiles_emacs - -- name: Git - ansible.builtin.include_tasks: git.yml - tags: dotfiles_git - -- name: Mutt - ansible.builtin.include_tasks: mutt.yml - tags: dotfiles_mutt - -- name: Shell utilities - ansible.builtin.include_tasks: shell_utilities.yml - -- name: Nethack - ansible.builtin.include_tasks: nethack.yml +- name: Link dotfiles + ansible.builtin.include_tasks: dotfiles.yml + tags: + - dotfiles_git + - dotfiles_mutt + - dotfiles_neovim + - dotfiles_nethack + - dotfiles_shell + - dotfiles_vim + - dotfiles_zsh diff --git a/Ansible/roles/dotfiles/tasks/nethack.yml b/Ansible/roles/dotfiles/tasks/nethack.yml index 485e20c..d6e8951 100644 --- a/Ansible/roles/dotfiles/tasks/nethack.yml +++ b/Ansible/roles/dotfiles/tasks/nethack.yml @@ -1,4 +1,12 @@ --- +- name: (nethack) Install nethack package + ansible.builtin.package: + name: nethack + state: present + when: + - dotfiles_install_packages is defined + - "'nethack' in dotfiles_install_packages" + - name: (nethack) Link nethackrc ansible.builtin.file: path: ~/.nethackrc diff --git a/Ansible/roles/dotfiles/tasks/packages.yml b/Ansible/roles/dotfiles/tasks/packages.yml new file mode 100644 index 0000000..0642dc4 --- /dev/null +++ b/Ansible/roles/dotfiles/tasks/packages.yml @@ -0,0 +1,13 @@ +--- +- name: Install packages + become: "{{ _dotfiles_requires_become[ansible_facts.pkg_mgr] | default(true) }}" + vars: + package_names: _dotfiles_package_names[ansible_facts.pkg_mgr] + ansible.builtin.package: + name: > + {{ + package_names[package] | default(package) + for package + in (_dotfiles_core_packages + dotfiles_install_packages) + }} + state: present diff --git a/Ansible/roles/dotfiles/tasks/vim.yml b/Ansible/roles/dotfiles/tasks/vim.yml index 94c6321..e3ff49b 100644 --- a/Ansible/roles/dotfiles/tasks/vim.yml +++ b/Ansible/roles/dotfiles/tasks/vim.yml @@ -7,11 +7,13 @@ force: true - name: (neovim) Create standard config directory + tags: dotfiles_neovim ansible.builtin.file: path: ~/.config state: directory - name: (neovim) Link config + tags: dotfiles_neovim ansible.builtin.file: path: ~/.config/nvim src: "{{ role_path }}/files/neovim" @@ -19,6 +21,7 @@ force: true - name: (neovim) Create .local directories + tags: dotfiles_neovim ansible.builtin.file: path: "{{ item }}" state: directory diff --git a/Ansible/roles/dotfiles/tasks/zsh.yml b/Ansible/roles/dotfiles/tasks/zsh.yml index ef7dd22..c0b8570 100644 --- a/Ansible/roles/dotfiles/tasks/zsh.yml +++ b/Ansible/roles/dotfiles/tasks/zsh.yml @@ -1,31 +1,45 @@ --- -- name: (zsh) Link startup files - ansible.builtin.file: - path: ~/.{{ item }} - src: "{{ role_path }}/files/zsh/{{ item }}" - state: link - force: true - loop: - - zshenv - - zshrc - - zprofile +- name: (zsh) Find zsh binary + ansible.builtin.command: + cmd: sh -c 'which zsh' + register: _dotfiles_which_zsh -- name: (zsh) Create zsh directories - ansible.builtin.file: - path: "{{ item }}" - state: directory - force: true - loop: - - ~/.zsh - - ~/.zsh/cache +- name: (zsh) Configure zsh + when: (_dotfiles_which_zsh | length) > 0 + block: + - name: (zsh) Make zsh my shell + ansible.builtin.user: + name: "{{ ansible_user }}" + shell: "{{ _dotfiles_which_zsh.stdout }}" + state: present -- name: (zsh) Link function library directories - ansible.builtin.file: - path: ~/.zsh/{{ item }} - src: "{{ role_path }}/files/zsh/{{ item }}" - state: link - force: true - loop: - - init-env-functions - - init-rc-functions - - functions + - name: (zsh) Link startup files + ansible.builtin.file: + path: ~/.{{ item }} + src: "{{ role_path }}/files/zsh/{{ item }}" + state: link + force: true + loop: + - zshenv + - zshrc + - zprofile + + - name: (zsh) Create zsh directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + force: true + loop: + - ~/.zsh + - ~/.zsh/cache + + - name: (zsh) Link function library directories + ansible.builtin.file: + path: ~/.zsh/{{ item }} + src: "{{ role_path }}/files/zsh/{{ item }}" + state: link + force: true + loop: + - init-env-functions + - init-rc-functions + - functions diff --git a/Ansible/roles/dotfiles/vars/main.yml b/Ansible/roles/dotfiles/vars/main.yml new file mode 100644 index 0000000..de5b952 --- /dev/null +++ b/Ansible/roles/dotfiles/vars/main.yml @@ -0,0 +1,11 @@ +_dotfiles_core_packages: + - zsh + - git + - tmux + - neovim + +_dotfiles_package_names: + homebrew: + +_dotfiles_requires_become: + homebrew: false From 7d1f5bf0cd354e2369011c9d7f1510b22b260be6 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 2 Oct 2024 18:26:48 -0700 Subject: [PATCH 23/93] Remove Ansible directory --- Ansible/Makefile | 11 --------- Ansible/bootstrap.yml | 53 ---------------------------------------- Ansible/mail.yml | 12 --------- Ansible/requirements.txt | 12 --------- 4 files changed, 88 deletions(-) delete mode 100644 Ansible/Makefile delete mode 100644 Ansible/bootstrap.yml delete mode 100644 Ansible/mail.yml delete mode 100644 Ansible/requirements.txt diff --git a/Ansible/Makefile b/Ansible/Makefile deleted file mode 100644 index 103468e..0000000 --- a/Ansible/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - -init: venv deps - -venv: ./env/bin/pip - python3 -m venv env - -deps: ./env/bin/ansible-playbook - ./env/bin/pip install -r requirements.txt - -freeze: - ./env/bin/pip freeze > requirements.txt diff --git a/Ansible/bootstrap.yml b/Ansible/bootstrap.yml deleted file mode 100644 index 6ee82db..0000000 --- a/Ansible/bootstrap.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -- hosts: localhost - vars: - repo: https://github.com/erynofwales/dotfiles.git - local_repo: ~/.dotfiles - dotfiles: - - Xdefaults - - emacs - - emacs.d - - env - - gdbinit - - gitconfig - - gitignore - - gvimrc - - hgrc - - indent.pro - - muttrc - - nethackrc - - profile - - rc - - screenrc - nvim_conifg: ~/.config/nvim - vim_bundles: - Vundle.vim: https://github.com/gmarik/Vundle.vim.git - tasks: - - name: Pull dotfiles - git: repo={{ repo }} dest={{ local_repo }} - - - name: Link dotfiles - file: src={{ local_repo }}/{{ item }} dest=~/.{{ item }} state=link - with_items: "{{ dotfiles }}" - - - name: Link ~/bin - file: src={{ local_repo }}/bin dest=~/bin state=link - - # Don't show last login when I open a terminal - - name: Touch .hushlogin - file: path=~/.hushlogin state=touch - - # Setup neovim - - name: Create ~/.config - file: path=~/.config state=directory - - name: Symlink vim dir for neovim - file: src={{ local_repo }}/vim dest={{ nvim_config }} - - name: Symlink vimrc for neovim - file: src={{ local_repo }}/vimrc dest={{ nvim_config }}/init.vim - - # Setup vim bundles - - name: Get Vim bundles - git: repo={{ item[1] }} dest={{ local_repo }}/vim/bundle/{{ item[0] }} - with_items: "{{ vim_bundles }}" - - name: Install bundles registered in vim - command: vim +PluginInstall +qall diff --git a/Ansible/mail.yml b/Ansible/mail.yml deleted file mode 100644 index 47d2c65..0000000 --- a/Ansible/mail.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- hosts: localhost - vars: - dotfiles: ~/.dotfiles - packages: [mutt, offlineimap, urlview, w3m] - tasks: - - name: "Install packages: {{ packages|join(', ') }}" - homebrew: name={{ packages }} state=present - - - name: Link mutt config files - file: src={{ dotfiles }}/{{ item }} dest=~/.{{ item }} state=link - with_items: [muttrc, mutt] diff --git a/Ansible/requirements.txt b/Ansible/requirements.txt deleted file mode 100644 index 525aef2..0000000 --- a/Ansible/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -ansible==8.7.0 -ansible-core==2.15.12 -cffi==1.17.0 -cryptography==43.0.0 -importlib-resources==5.0.7 -Jinja2==3.1.4 -MarkupSafe==2.1.5 -packaging==24.1 -passlib==1.7.4 -pycparser==2.22 -PyYAML==6.0.2 -resolvelib==1.0.1 From b233d52b6dd093dcf0ba84c8b60d6a5d5728bd99 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 9 Nov 2024 08:33:55 -0800 Subject: [PATCH 24/93] [nvim] Factor out the map variable in keys.lua --- config/nvim/lua/keys.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/config/nvim/lua/keys.lua b/config/nvim/lua/keys.lua index 1ce1297..7a4a140 100644 --- a/config/nvim/lua/keys.lua +++ b/config/nvim/lua/keys.lua @@ -1,11 +1,12 @@ -- Eryn Wells +local map = vim.keymap.set + local function init_key_opts() vim.g.mapleader = "," end local function window_key_mappings() - local map = vim.keymap.set local options = { silent = true } -- Allow starting commands with ; instead of typing Shift-;. Save lots of keypresses! @@ -29,7 +30,6 @@ end -- local function diagnostic_mappings() - local map = vim.keymap.set local options = { noremap=true, silent=true } -- Basic diagnostic mappings, these will navigate to or display diagnostics @@ -39,8 +39,7 @@ local function diagnostic_mappings() map('n', 'q', vim.diagnostic.setloclist, options) end -local function set_up_local_lsp_mappings(buffer_number) - local map = vim.keymap.set +local function local_lsp_mappings(buffer_number) local options = { noremap=true, silent=true, buffer=buffer_number } map('n', 'ga', vim.lsp.buf.code_action, options) @@ -67,5 +66,5 @@ return { init_key_opts = init_key_opts, init_window_key_mappings = window_key_mappings, init_diagnostic_key_mappings = diagnostic_mappings, - init_lsp_key_mappings = set_up_local_lsp_mappings, + init_lsp_key_mappings = local_lsp_mappings, } From 440efbf8fcb1eb969b9b796cec143675430d4e83 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 9 Nov 2024 08:34:10 -0800 Subject: [PATCH 25/93] [nvim] Install telescope Add these bindings: - find_files to ,ff - live_grep to ,fg - buffers to ,fb - help_tags to ,fh --- config/nvim/init.lua | 1 + config/nvim/lua/keys.lua | 9 +++++++++ vim/plugins.vim | 2 ++ 3 files changed, 12 insertions(+) diff --git a/config/nvim/init.lua b/config/nvim/init.lua index db2bb03..955a32c 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -59,6 +59,7 @@ local keys = require 'keys' keys.init_key_opts() keys.init_window_key_mappings() keys.init_diagnostic_key_mappings() +keys.init_telescope_mappings() local gui = require 'gui' gui.init() diff --git a/config/nvim/lua/keys.lua b/config/nvim/lua/keys.lua index 7a4a140..962f33e 100644 --- a/config/nvim/lua/keys.lua +++ b/config/nvim/lua/keys.lua @@ -62,9 +62,18 @@ local function local_lsp_mappings(buffer_number) end, options) end +local function telescope_mappings() + local builtin = require('telescope.builtin') + map('n', 'ff', builtin.find_files, { desc = 'Telescope find files' }) + map('n', 'fg', builtin.live_grep, { desc = 'Telescope live grep' }) + map('n', 'fb', builtin.buffers, { desc = 'Telescope buffers' }) + map('n', 'fh', builtin.help_tags, { desc = 'Telescope help tags' }) +end + return { init_key_opts = init_key_opts, init_window_key_mappings = window_key_mappings, init_diagnostic_key_mappings = diagnostic_mappings, init_lsp_key_mappings = local_lsp_mappings, + init_telescope_mappings = telescope_mappings, } diff --git a/vim/plugins.vim b/vim/plugins.vim index 2c9d29c..c7d09fc 100644 --- a/vim/plugins.vim +++ b/vim/plugins.vim @@ -36,6 +36,8 @@ Plug 'honza/vim-snippets' Plug 'dracula/vim', {'as': 'dracula'} if has('nvim') + Plug 'nvim-lua/plenary.nvim' + Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' } Plug 'neovim/nvim-lspconfig' Plug 'hrsh7th/cmp-nvim-lsp' Plug 'hrsh7th/cmp-nvim-lsp' From b644323e3154f11edd408de78a84362c8362bee8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 12 Nov 2024 13:32:34 -0800 Subject: [PATCH 26/93] [vim] Remove some unused plugins --- vim/plugins.vim | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vim/plugins.vim b/vim/plugins.vim index c7d09fc..9478c60 100644 --- a/vim/plugins.vim +++ b/vim/plugins.vim @@ -25,19 +25,16 @@ Plug 'PeterRincker/vim-argumentative' " Environment niceties Plug 'scrooloose/nerdtree' -if has('nvim') - Plug 'Mofiqul/dracula.nvim' -endif - " Snippets Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' -Plug 'dracula/vim', {'as': 'dracula'} - if has('nvim') + " Telescope Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' } + + " Language servers Plug 'neovim/nvim-lspconfig' Plug 'hrsh7th/cmp-nvim-lsp' Plug 'hrsh7th/cmp-nvim-lsp' From 070f8f9a71301f943e53f2ea7932bf6b15fff391 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 12 Nov 2024 13:46:59 -0800 Subject: [PATCH 27/93] Remove Dotfiles project I had something in mind for this Xcode project that never panned out. --- Dotfiles/Dotfiles.xcodeproj/project.pbxproj | 320 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../xcshareddata/swiftpm/Package.resolved | 16 - Dotfiles/ShellLog/main.swift | 57 ---- 5 files changed, 408 deletions(-) delete mode 100644 Dotfiles/Dotfiles.xcodeproj/project.pbxproj delete mode 100644 Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 Dotfiles/ShellLog/main.swift diff --git a/Dotfiles/Dotfiles.xcodeproj/project.pbxproj b/Dotfiles/Dotfiles.xcodeproj/project.pbxproj deleted file mode 100644 index 095777f..0000000 --- a/Dotfiles/Dotfiles.xcodeproj/project.pbxproj +++ /dev/null @@ -1,320 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 55; - objects = { - -/* Begin PBXBuildFile section */ - C084FC452797B3C100915D6A /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = C084FC442797B3C100915D6A /* main.swift */; }; - C084FC4B2797B3EC00915D6A /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = C084FC4A2797B3EC00915D6A /* ArgumentParser */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - C084FC3F2797B3C100915D6A /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - C084FC412797B3C100915D6A /* ShellLog */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ShellLog; sourceTree = BUILT_PRODUCTS_DIR; }; - C084FC442797B3C100915D6A /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - C084FC3E2797B3C100915D6A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C084FC4B2797B3EC00915D6A /* ArgumentParser in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - C084FC362797B39E00915D6A = { - isa = PBXGroup; - children = ( - C084FC432797B3C100915D6A /* ShellLog */, - C084FC422797B3C100915D6A /* Products */, - ); - sourceTree = ""; - }; - C084FC422797B3C100915D6A /* Products */ = { - isa = PBXGroup; - children = ( - C084FC412797B3C100915D6A /* ShellLog */, - ); - name = Products; - sourceTree = ""; - }; - C084FC432797B3C100915D6A /* ShellLog */ = { - isa = PBXGroup; - children = ( - C084FC442797B3C100915D6A /* main.swift */, - ); - path = ShellLog; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - C084FC402797B3C100915D6A /* ShellLog */ = { - isa = PBXNativeTarget; - buildConfigurationList = C084FC462797B3C100915D6A /* Build configuration list for PBXNativeTarget "ShellLog" */; - buildPhases = ( - C084FC3D2797B3C100915D6A /* Sources */, - C084FC3E2797B3C100915D6A /* Frameworks */, - C084FC3F2797B3C100915D6A /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ShellLog; - packageProductDependencies = ( - C084FC4A2797B3EC00915D6A /* ArgumentParser */, - ); - productName = ShellLog; - productReference = C084FC412797B3C100915D6A /* ShellLog */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - C084FC372797B39E00915D6A /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1320; - LastUpgradeCheck = 1320; - TargetAttributes = { - C084FC402797B3C100915D6A = { - CreatedOnToolsVersion = 13.2.1; - }; - }; - }; - buildConfigurationList = C084FC3A2797B39E00915D6A /* Build configuration list for PBXProject "Dotfiles" */; - compatibilityVersion = "Xcode 13.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = C084FC362797B39E00915D6A; - packageReferences = ( - C084FC492797B3EC00915D6A /* XCRemoteSwiftPackageReference "swift-argument-parser" */, - ); - productRefGroup = C084FC422797B3C100915D6A /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - C084FC402797B3C100915D6A /* ShellLog */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - C084FC3D2797B3C100915D6A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C084FC452797B3C100915D6A /* main.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - C084FC3B2797B39E00915D6A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Debug; - }; - C084FC3C2797B39E00915D6A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Release; - }; - C084FC472797B3C100915D6A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = 78372RE6B4; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INSTALL_PATH = "$(HOME)/bin"; - MACOSX_DEPLOYMENT_TARGET = 11.6; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - C084FC482797B3C100915D6A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = 78372RE6B4; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INSTALL_PATH = "$(HOME)/bin"; - MACOSX_DEPLOYMENT_TARGET = 11.6; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C084FC3A2797B39E00915D6A /* Build configuration list for PBXProject "Dotfiles" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C084FC3B2797B39E00915D6A /* Debug */, - C084FC3C2797B39E00915D6A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C084FC462797B3C100915D6A /* Build configuration list for PBXNativeTarget "ShellLog" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C084FC472797B3C100915D6A /* Debug */, - C084FC482797B3C100915D6A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - C084FC492797B3EC00915D6A /* XCRemoteSwiftPackageReference "swift-argument-parser" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/apple/swift-argument-parser.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.0.0; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - C084FC4A2797B3EC00915D6A /* ArgumentParser */ = { - isa = XCSwiftPackageProductDependency; - package = C084FC492797B3EC00915D6A /* XCRemoteSwiftPackageReference "swift-argument-parser" */; - productName = ArgumentParser; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = C084FC372797B39E00915D6A /* Project object */; -} diff --git a/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 91fdecb..0000000 --- a/Dotfiles/Dotfiles.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,16 +0,0 @@ -{ - "object": { - "pins": [ - { - "package": "swift-argument-parser", - "repositoryURL": "https://github.com/apple/swift-argument-parser.git", - "state": { - "branch": null, - "revision": "e1465042f195f374b94f915ba8ca49de24300a0d", - "version": "1.0.2" - } - } - ] - }, - "version": 1 -} diff --git a/Dotfiles/ShellLog/main.swift b/Dotfiles/ShellLog/main.swift deleted file mode 100644 index 57334a1..0000000 --- a/Dotfiles/ShellLog/main.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// main.swift -// ShellLog -// -// Created by Eryn Wells on 1/18/22. -// - -import ArgumentParser -import OSLog - -enum Level { - case Debug - case Info - case Warn - case Error -} - -extension Level: ExpressibleByArgument { - init?(argument: String) { - switch (argument) { - case "debug": - self = .Debug - case "info": - self = .Info - case "warn": - self = .Warn - case "error": - self = .Error - default: - return nil - } - } -} - -struct ShellLog: ParsableCommand { - - @Option(name: .shortAndLong, help: "The log level") - var level: Level? - - @Argument() var message: String - - func run() throws { - let log = Logger(subsystem: "me.erynwells.shell", category: "Shell") - switch level { - case .some(.Debug): - log.debug("\(message, privacy: .public)") - case .none, .some(.Info): - log.info("\(message, privacy: .public)") - case .some(.Warn): - log.warning("\(message, privacy: .public)") - case .some(.Error): - log.error("\(message, privacy: .public)") - } - } -} - -ShellLog.main() From 329db6f6de93772a56922657076661c98bf99f34 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 12 Nov 2024 13:47:20 -0800 Subject: [PATCH 28/93] [zsh] Configure ls(1) colors with environment variables instead of aliases ls(1) on macOS and FreeBSD is the BSD version of the utility. As such it can be configured to display directory contents in color using a command line argument (-G) or environment variables (LSCOLORS). Using environment variables is nice because it'll work regardless of the arguments you pass, so there's no need to configure aliases. --- zsh/func/init-rc-ls | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/zsh/func/init-rc-ls b/zsh/func/init-rc-ls index 0ae4e3b..5d2bcbd 100644 --- a/zsh/func/init-rc-ls +++ b/zsh/func/init-rc-ls @@ -3,23 +3,23 @@ function init-rc-ls { - local ls_options='--color=auto' - alias ls="ls $ls_options" alias la="ls -A $ls_options" alias ll="ls -l $ls_options" alias l.="ls -d $ls_options .*" - local dircolors_bin=$(whence -p dircolors || whence -p gdircolors) - if [[ -n "$dircolors_bin" ]]; then - local dircolors_config - if [[ -f "$HOME/.dircolors/$SYS.cfg" ]]; then - dircolors_file="$HOME/.dircolors/$SYS.cfg" - else - dircolors_file="$HOME/.dircolors/default.cfg" - fi + # Enable ls colors + export CLICOLOR=1 COLORTERM=1 - if [[ -f "$dircolors_config" ]]; then - eval $($dircolors_bin $dircolors_config) + # Define colors for ls. See the LSCOLORS documentation in ls(1). + # The default is "exfxcxdxbxegedabagacadah". + export LSCOLORS=Exdxcxfxbxegedabagacadah + + local dircolors_bin=$(whence -p dircolors || whence -p gdircolors) + if [[ -x "$dircolors_bin" ]]; then + if [[ -f "$HOME/.dircolors/$SYS.cfg" ]]; then + eval $dircolors_bin "$HOME/.dircolors/$SYS.cfg" + elif [[ -f "$HOME/.dircolors/default.cfg" ]]; then + eval $dircolors_bin "$HOME/.dircolors/default.cfg" fi fi } From f8c04599c5ae488d5e403216551336c9f3dd30f2 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 5 Dec 2024 11:53:16 -0800 Subject: [PATCH 29/93] [nvim] Treat files with a .make extension as Makefiles --- config/nvim/ftdetect/make.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/nvim/ftdetect/make.lua diff --git a/config/nvim/ftdetect/make.lua b/config/nvim/ftdetect/make.lua new file mode 100644 index 0000000..d398cf8 --- /dev/null +++ b/config/nvim/ftdetect/make.lua @@ -0,0 +1,7 @@ +-- Filetype detection for Makefiles +-- Eryn Wells + +vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, { + pattern = "*.make", + command = "setfiletype make", +}) From e015132f1582aa3b415113459e83f244f942abd8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 13:28:13 -0800 Subject: [PATCH 30/93] [nvim] Move the textwidth back to 80 characters I just prefer this, turns out. --- config/nvim/lua/configuration.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/nvim/lua/configuration.lua b/config/nvim/lua/configuration.lua index ac20607..386aade 100644 --- a/config/nvim/lua/configuration.lua +++ b/config/nvim/lua/configuration.lua @@ -34,7 +34,9 @@ opt.errorbells = false -- Wrap text rather than letting it run offscreen opt.wrap = true opt.linebreak = true -opt.textwidth = 120 +-- Wrap to 80 characters by default +opt.textwidth = 80 +-- Mark columns 80, 90, and 120 opt.colorcolumn = {80, 90, 120} opt.showmatch = true From e0d3364d9ddafb5fa6a749d98e1b74c41278bed3 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 13:28:36 -0800 Subject: [PATCH 31/93] [nvim] Add some helpful comments to configuration.lua --- config/nvim/lua/configuration.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config/nvim/lua/configuration.lua b/config/nvim/lua/configuration.lua index 386aade..1cd045a 100644 --- a/config/nvim/lua/configuration.lua +++ b/config/nvim/lua/configuration.lua @@ -1,6 +1,6 @@ -- Eryn Wells --- [[ Editor Confguration ]] +-- [[ Editor Configuration ]] local opt = vim.opt -- Reread files when they change outside of neovim @@ -38,6 +38,9 @@ opt.linebreak = true opt.textwidth = 80 -- Mark columns 80, 90, and 120 opt.colorcolumn = {80, 90, 120} + +-- Briefly show the matching parenthesis or bracket when typing one of those +-- characters. opt.showmatch = true opt.formatoptions:append("n") @@ -61,13 +64,14 @@ opt.incsearch = true opt.gdefault = true -- Prefer spaces to tabs. Indent tab characters 8 spaces, and soft indent 4 --- spaces. Never write tabs if you can help it, and do some nice things when --- wrapping and joining and copying. +-- spaces. Never write tabs if you can help it. opt.tabstop = 8 opt.shiftwidth = 4 opt.softtabstop = 4 opt.shiftround = true opt.expandtab = true + +-- Do some nice things when wrapping, joining, and copying. opt.joinspaces = false opt.autoindent = true opt.copyindent = true From 2f897bb808ea739469bbdaa17202206536349545 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 13:28:57 -0800 Subject: [PATCH 32/93] [nvim] Move repeated use of vim.fn.stdpath("state") to a local --- config/nvim/lua/configuration.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config/nvim/lua/configuration.lua b/config/nvim/lua/configuration.lua index 1cd045a..0fda9a6 100644 --- a/config/nvim/lua/configuration.lua +++ b/config/nvim/lua/configuration.lua @@ -85,9 +85,10 @@ opt.background = "dark" opt.backup = true opt.undofile = true -opt.backupdir = {vim.fn.stdpath("state") .. "/backup//"} -opt.directory = {vim.fn.stdpath("state") .. "/swap//", "."} -opt.undodir = {vim.fn.stdpath("state") .. "/undo//"} +local statedir = vim.fn.stdpath("state") +opt.backupdir = {statedir .. "/backup//"} +opt.directory = {statedir .. "/swap//", "."} +opt.undodir = {statedir .. "/undo//"} -- Fields to save in the Shada file. Parameters as follows: (see :help shada) -- % number of buffers to save and restore when no file argument is given @@ -98,7 +99,7 @@ opt.undodir = {vim.fn.stdpath("state") .. "/undo//"} -- : maximum number of lines of command history to save -- s shada entries over 100 KiB are skipped opt.shada = {"%100", "'1000", "h", "<1000", ":1000", "s100"} -opt.shadafile = vim.fn.stdpath("state") .. "/shada/default.shada" +opt.shadafile = statedir .. "/shada/default.shada" -- Scroll ahead of the point a bit in each direction opt.scrolloff = 3 From a0f23a108f8734306f79a73c3a0ea205b8317b75 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 13:29:25 -0800 Subject: [PATCH 33/93] [git] Add aliases for `restore --stage` (rs) and `switch --create` (sc) --- gitconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gitconfig b/gitconfig index d77e7a3..2294436 100644 --- a/gitconfig +++ b/gitconfig @@ -61,6 +61,8 @@ f = fetch sup = submodule update --recursive really-clean = clean -fd + rs = restore --stage + sc = switch --create [ui] color = true [diff] From 728cf81a7bd1bc13ab5c7168c9c18e5f1e417647 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 13:22:41 -0800 Subject: [PATCH 34/93] [tmux] Move config to XDG_CONFIG_HOME --- tmux.conf => config/tmux/tmux.conf | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tmux.conf => config/tmux/tmux.conf (100%) diff --git a/tmux.conf b/config/tmux/tmux.conf similarity index 100% rename from tmux.conf rename to config/tmux/tmux.conf From be6b93cdde9ba7fbd36d76f6ba3eb436e439e9a8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 13:33:03 -0800 Subject: [PATCH 35/93] [nvim] Set shiftwidth and softtabstop to 2 spaces for HTML files Never thought I'd be *that* person, but here we are. --- config/nvim/after/ftplugin/html.lua | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 config/nvim/after/ftplugin/html.lua diff --git a/config/nvim/after/ftplugin/html.lua b/config/nvim/after/ftplugin/html.lua new file mode 100644 index 0000000..25913ef --- /dev/null +++ b/config/nvim/after/ftplugin/html.lua @@ -0,0 +1,4 @@ +-- Eryn Wells + +vim.opt_local.shiftwidth = 2 +vim.opt_local.softtabstop = 2 From 72896c3febacb8c1992e61df83ae03d385af3172 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 16:27:22 -0800 Subject: [PATCH 36/93] Ansible: another take a using Ansible to set up dotfiles --- Ansible/facts/dotfiles.fact | 4 +++ Ansible/inventory.yml | 2 ++ Ansible/play-setup.yml | 11 +++++++ Ansible/roles/eryn/tasks/main.yml | 3 ++ Ansible/roles/eryn/tasks/symlink_dotfile.yml | 8 +++++ Ansible/roles/eryn/tasks/zsh.yml | 34 ++++++++++++++++++++ 6 files changed, 62 insertions(+) create mode 100755 Ansible/facts/dotfiles.fact create mode 100644 Ansible/inventory.yml create mode 100644 Ansible/play-setup.yml create mode 100644 Ansible/roles/eryn/tasks/main.yml create mode 100644 Ansible/roles/eryn/tasks/symlink_dotfile.yml create mode 100644 Ansible/roles/eryn/tasks/zsh.yml diff --git a/Ansible/facts/dotfiles.fact b/Ansible/facts/dotfiles.fact new file mode 100755 index 0000000..78714dc --- /dev/null +++ b/Ansible/facts/dotfiles.fact @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh + +dotfiles_root=$(git rev-parse --show-toplevel) +echo "{ \"path\": \"${dotfiles_root}\" }" diff --git a/Ansible/inventory.yml b/Ansible/inventory.yml new file mode 100644 index 0000000..d9c3146 --- /dev/null +++ b/Ansible/inventory.yml @@ -0,0 +1,2 @@ +all: + localhost: diff --git a/Ansible/play-setup.yml b/Ansible/play-setup.yml new file mode 100644 index 0000000..d74b0a7 --- /dev/null +++ b/Ansible/play-setup.yml @@ -0,0 +1,11 @@ +--- +- name: Set up dotfiles + hosts: localhost + connection: local + module_defaults: + ansible.builtin.setup: + fact_path: "./facts" + tasks: + - name: Include eryn role + ansible.builtin.include_role: + name: eryn diff --git a/Ansible/roles/eryn/tasks/main.yml b/Ansible/roles/eryn/tasks/main.yml new file mode 100644 index 0000000..fedd6b6 --- /dev/null +++ b/Ansible/roles/eryn/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- name: Configure ZSH + import_tasks: zsh.yml diff --git a/Ansible/roles/eryn/tasks/symlink_dotfile.yml b/Ansible/roles/eryn/tasks/symlink_dotfile.yml new file mode 100644 index 0000000..1eb89a5 --- /dev/null +++ b/Ansible/roles/eryn/tasks/symlink_dotfile.yml @@ -0,0 +1,8 @@ +--- +- name: "Symlink {{ dotfile_src }}" + ansible.builtin.file: + src: "{{ ansible_local.dotfiles.path }}/{{ dotfile_src }}" + dest: "~/.{{ dotfile_dest | default(dotfile_src) }}" + owner: "{{ ansible_user_id }}" + mode: 0644 + state: link diff --git a/Ansible/roles/eryn/tasks/zsh.yml b/Ansible/roles/eryn/tasks/zsh.yml new file mode 100644 index 0000000..527411b --- /dev/null +++ b/Ansible/roles/eryn/tasks/zsh.yml @@ -0,0 +1,34 @@ +--- +- name: "zsh : Set user shell" + ansible.builtin.user: + name: "{{ ansible_user_id }}" + shell: /bin/zsh + state: present + +- name: "zsh : Symlink startup files" + ansible.builtin.include_tasks: symlink_dotfile.yml + vars: + dotfile_src: "{{ item.src | default(item) }}" + dotfile_dest: "{{ item.dest | default(item) }}" + loop: + - zshenv + - zshrc + - zprofile + +- name: "zsh : Install user functions" + block: + - name: "zsh : Create zsh directory" + ansible.builtin.file: + path: "{{ _zsh_dir }}" + owner: "{{ ansible_user_id }}" + mode: 0755 + state: directory + + - name: "zsh : Symlink functions directory" + ansible.builtin.include_tasks: symlink_dotfile.yml + vars: + dotfile_src: "{{ item }}" + loop: + - zsh/func + vars: + _zsh_dir: "~/.zsh" From baed6171dcd575ee04ba2294105c2bf4b34ea415 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 16:28:36 -0800 Subject: [PATCH 37/93] Ansible: Add XDG facts to the ansible environment --- Ansible/facts/xdg.fact | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Ansible/facts/xdg.fact diff --git a/Ansible/facts/xdg.fact b/Ansible/facts/xdg.fact new file mode 100644 index 0000000..d3ec8dd --- /dev/null +++ b/Ansible/facts/xdg.fact @@ -0,0 +1,5 @@ +{ + "config_home": "~/.config", + "data_home": "~/.local/share", + "state_home": "~/.local/state" +} From d022b579d2f14b182862be75a9b5e2fa09d57785 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 16:34:03 -0800 Subject: [PATCH 38/93] Ansible: Add tasks for setting up neovim and vim --- Ansible/roles/eryn/tasks/main.yml | 5 +++++ Ansible/roles/eryn/tasks/neovim.yml | 10 ++++++++++ Ansible/roles/eryn/tasks/vim.yml | 23 +++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 Ansible/roles/eryn/tasks/neovim.yml create mode 100644 Ansible/roles/eryn/tasks/vim.yml diff --git a/Ansible/roles/eryn/tasks/main.yml b/Ansible/roles/eryn/tasks/main.yml index fedd6b6..fe04720 100644 --- a/Ansible/roles/eryn/tasks/main.yml +++ b/Ansible/roles/eryn/tasks/main.yml @@ -1,3 +1,8 @@ --- - name: Configure ZSH import_tasks: zsh.yml + +- name: Configure vim + import_tasks: vim.yml +- name: Configure neovim + import_tasks: neovim.yml diff --git a/Ansible/roles/eryn/tasks/neovim.yml b/Ansible/roles/eryn/tasks/neovim.yml new file mode 100644 index 0000000..e259a76 --- /dev/null +++ b/Ansible/roles/eryn/tasks/neovim.yml @@ -0,0 +1,10 @@ +--- +- name: "neovim : Install neovim" + ansible.builtin.package: + name: neovim + state: present + +- name: "neovim : Symlink config" + ansible.builtin.include_tasks: symlink_dotfile_directory.yml + vars: + dotfile_src: config/nvim diff --git a/Ansible/roles/eryn/tasks/vim.yml b/Ansible/roles/eryn/tasks/vim.yml new file mode 100644 index 0000000..02f0c3e --- /dev/null +++ b/Ansible/roles/eryn/tasks/vim.yml @@ -0,0 +1,23 @@ +--- +- name: "vim : Symlink config files" + ansible.builtin.include_tasks: symlink_dotfile.yml + vars: + dotfile_src: "{{ item }}" + loop: + - vimrc + - vimrc.common + +# The viminfo file goes here, but vim won't write it if the directory doesn't exist. +- name: "vim : Create vim state directory" + ansible.builtin.file: + path: "{{ ansible_local.xdg.state_home }}/vim" + owner: "{{ ansible_user_id }}" + mode: 0750 + state: directory + +- name: "vim : Symlink runtime directory" + ansible.builtin.include_tasks: symlink_dotfile_directory.yml + vars: + dotfile_src: "{{ item }}" + loop: + - vim From 083961832713115ee4a152881962d94eae194a0c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 16:34:42 -0800 Subject: [PATCH 39/93] Ansible: Symlink dotfile tasks Add a new tasks file for symlinking a directory. Doing it this way instead of stat'ing the file and forking based on its type in symlink_dotfile.yml is more efficient, I think? Clean up file permissions: remove other permissions. Add a variable to toggle skipping symlink errors. --- Ansible/roles/eryn/tasks/symlink_dotfile.yml | 5 +++-- Ansible/roles/eryn/tasks/symlink_dotfile_directory.yml | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 Ansible/roles/eryn/tasks/symlink_dotfile_directory.yml diff --git a/Ansible/roles/eryn/tasks/symlink_dotfile.yml b/Ansible/roles/eryn/tasks/symlink_dotfile.yml index 1eb89a5..f03fbab 100644 --- a/Ansible/roles/eryn/tasks/symlink_dotfile.yml +++ b/Ansible/roles/eryn/tasks/symlink_dotfile.yml @@ -2,7 +2,8 @@ - name: "Symlink {{ dotfile_src }}" ansible.builtin.file: src: "{{ ansible_local.dotfiles.path }}/{{ dotfile_src }}" - dest: "~/.{{ dotfile_dest | default(dotfile_src) }}" + dest: "{{ dotfile_dest | default('~/.' + dotfile_src) }}" owner: "{{ ansible_user_id }}" - mode: 0644 + mode: 0640 state: link + ignore_errors: "{{ eryn_dotfiles_ignore_symlink_errors | default(false) }}" diff --git a/Ansible/roles/eryn/tasks/symlink_dotfile_directory.yml b/Ansible/roles/eryn/tasks/symlink_dotfile_directory.yml new file mode 100644 index 0000000..88da218 --- /dev/null +++ b/Ansible/roles/eryn/tasks/symlink_dotfile_directory.yml @@ -0,0 +1,9 @@ +--- +- name: "Symlink {{ dotfile_src }}" + ansible.builtin.file: + src: "{{ ansible_local.dotfiles.path }}/{{ dotfile_src }}" + dest: "{{ dotfile_dest | default('~/.' + dotfile_src) }}" + owner: "{{ ansible_user_id }}" + mode: 0750 + state: link + ignore_errors: "{{ eryn_dotfiles_ignore_symlink_errors | default(false) }}" From cc42c50438b71fc1e53d4ab3bb54ac0e7e531ffd Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 16:36:55 -0800 Subject: [PATCH 40/93] Ansible: Remove unnecessary _zsh_dir variable from zsh.yml --- Ansible/roles/eryn/tasks/zsh.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Ansible/roles/eryn/tasks/zsh.yml b/Ansible/roles/eryn/tasks/zsh.yml index 527411b..943e435 100644 --- a/Ansible/roles/eryn/tasks/zsh.yml +++ b/Ansible/roles/eryn/tasks/zsh.yml @@ -19,16 +19,14 @@ block: - name: "zsh : Create zsh directory" ansible.builtin.file: - path: "{{ _zsh_dir }}" + path: ~/.zsh owner: "{{ ansible_user_id }}" mode: 0755 state: directory - - name: "zsh : Symlink functions directory" - ansible.builtin.include_tasks: symlink_dotfile.yml + - name: "zsh : Symlink functions directories" + ansible.builtin.include_tasks: symlink_dotfile_directory.yml vars: dotfile_src: "{{ item }}" loop: - zsh/func - vars: - _zsh_dir: "~/.zsh" From 9005e00e4e0ac7655a9af8052bc0a4a0a2315db3 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 16:37:16 -0800 Subject: [PATCH 41/93] Ansible: Create XDG home directories based on xdg facts --- Ansible/roles/eryn/tasks/main.yml | 3 +++ Ansible/roles/eryn/tasks/xdg_home.yml | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Ansible/roles/eryn/tasks/xdg_home.yml diff --git a/Ansible/roles/eryn/tasks/main.yml b/Ansible/roles/eryn/tasks/main.yml index fe04720..5399f4c 100644 --- a/Ansible/roles/eryn/tasks/main.yml +++ b/Ansible/roles/eryn/tasks/main.yml @@ -2,6 +2,9 @@ - name: Configure ZSH import_tasks: zsh.yml +- name: Configure XDG environment + import_tasks: xdg_home.yml + - name: Configure vim import_tasks: vim.yml - name: Configure neovim diff --git a/Ansible/roles/eryn/tasks/xdg_home.yml b/Ansible/roles/eryn/tasks/xdg_home.yml new file mode 100644 index 0000000..df472cd --- /dev/null +++ b/Ansible/roles/eryn/tasks/xdg_home.yml @@ -0,0 +1,12 @@ +--- +- name: Create XDG directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: "{{ ansible_user_id }}" + mode: 0750 + loop: + - "{{ ansible_local.xdg.config_home }}" + - "{{ ansible_local.xdg.data_home }}" + - "{{ ansible_local.xdg.state_home }}" + From b8aac0793e3a5441ad1788278beec8b41f7b3218 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 22:37:52 -0800 Subject: [PATCH 42/93] Ansible: add tasks for setting up git, nethack, and tmux configs --- Ansible/roles/eryn/tasks/git.yml | 8 ++++++++ Ansible/roles/eryn/tasks/main.yml | 12 +++++++++--- Ansible/roles/eryn/tasks/nethack.yml | 5 +++++ Ansible/roles/eryn/tasks/tmux.yml | 5 +++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 Ansible/roles/eryn/tasks/git.yml create mode 100644 Ansible/roles/eryn/tasks/nethack.yml create mode 100644 Ansible/roles/eryn/tasks/tmux.yml diff --git a/Ansible/roles/eryn/tasks/git.yml b/Ansible/roles/eryn/tasks/git.yml new file mode 100644 index 0000000..6b0bf55 --- /dev/null +++ b/Ansible/roles/eryn/tasks/git.yml @@ -0,0 +1,8 @@ +--- +- name: "git : Symlink configs" + ansible.builtin.include_tasks: symlink_dotfile.yml + vars: + dotfile_src: "{{ item }}" + loop: + - gitconfig + - gitignore diff --git a/Ansible/roles/eryn/tasks/main.yml b/Ansible/roles/eryn/tasks/main.yml index 5399f4c..f321cc7 100644 --- a/Ansible/roles/eryn/tasks/main.yml +++ b/Ansible/roles/eryn/tasks/main.yml @@ -1,11 +1,17 @@ --- -- name: Configure ZSH - import_tasks: zsh.yml - - name: Configure XDG environment import_tasks: xdg_home.yml +- name: Configure zsh + import_tasks: zsh.yml + - name: Configure vim import_tasks: vim.yml - name: Configure neovim import_tasks: neovim.yml + +- name: Configure git + import_tasks: git.yml + +- name: Configure tmux + import_tasks: tmux.yml diff --git a/Ansible/roles/eryn/tasks/nethack.yml b/Ansible/roles/eryn/tasks/nethack.yml new file mode 100644 index 0000000..9aa10cb --- /dev/null +++ b/Ansible/roles/eryn/tasks/nethack.yml @@ -0,0 +1,5 @@ +--- +- name: "nethack : Symlink config" + ansible.builtin.include_tasks: symlink_dotfile.yml + vars: + dotfile_src: nethackrc diff --git a/Ansible/roles/eryn/tasks/tmux.yml b/Ansible/roles/eryn/tasks/tmux.yml new file mode 100644 index 0000000..3c5effc --- /dev/null +++ b/Ansible/roles/eryn/tasks/tmux.yml @@ -0,0 +1,5 @@ +--- +- name: "tmux : Symlink config" + ansible.builtin.include_tasks: symlink_dotfile_directory.yml + vars: + dotfile_src: config/tmux From 47a797d6e319bf58201d3bcd3c34de866e11aa9c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 22:38:15 -0800 Subject: [PATCH 43/93] Ansible: Ignore symlink errors in check mode --- Ansible/play-setup.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Ansible/play-setup.yml b/Ansible/play-setup.yml index d74b0a7..dabc7e0 100644 --- a/Ansible/play-setup.yml +++ b/Ansible/play-setup.yml @@ -5,6 +5,8 @@ module_defaults: ansible.builtin.setup: fact_path: "./facts" + vars: + eryn_dotfiles_ignore_symlink_errors: "{{ ansible_check_mode }}" tasks: - name: Include eryn role ansible.builtin.include_role: From 41dc68869a29ac6ce50252fef77b8b500b192a02 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 31 Jan 2025 22:39:04 -0800 Subject: [PATCH 44/93] nvim: Abbreviation for hawaii that includes the 'okina --- config/nvim/after/ftplugin/text.vim | 1 + 1 file changed, 1 insertion(+) create mode 100644 config/nvim/after/ftplugin/text.vim diff --git a/config/nvim/after/ftplugin/text.vim b/config/nvim/after/ftplugin/text.vim new file mode 100644 index 0000000..ee5520d --- /dev/null +++ b/config/nvim/after/ftplugin/text.vim @@ -0,0 +1 @@ +abbr hawaii Hawai‘i From 73ca9454870add59fad4573316a91968f23272e8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 12 Feb 2025 07:51:29 -0800 Subject: [PATCH 45/93] Ansible: Add homebrew, system log, and main tasks for macOS to the eryn role --- Ansible/roles/eryn/tasks/macos/homebrew.yml | 37 +++++++++++++++++++ Ansible/roles/eryn/tasks/macos/main.yml | 6 +++ Ansible/roles/eryn/tasks/macos/system-log.yml | 5 +++ 3 files changed, 48 insertions(+) create mode 100644 Ansible/roles/eryn/tasks/macos/homebrew.yml create mode 100644 Ansible/roles/eryn/tasks/macos/main.yml create mode 100644 Ansible/roles/eryn/tasks/macos/system-log.yml diff --git a/Ansible/roles/eryn/tasks/macos/homebrew.yml b/Ansible/roles/eryn/tasks/macos/homebrew.yml new file mode 100644 index 0000000..4602e09 --- /dev/null +++ b/Ansible/roles/eryn/tasks/macos/homebrew.yml @@ -0,0 +1,37 @@ +--- +- name: "macOS : homebrew : Does the brew command exist?" + ansible.builtin.stat: + path: /opt/homebrew/bin/brew + register: _eryn_homebrew_brew + +- name: "macOS : homebrew : Install Homebrew" + when: not _eryn_homebrew_brew.stat.exists + block: + - name: "macOS : homebrew : Create temporary file for install script" + ansible.builtin.tempfile: + state: file + prefix: homebrew-install + register: _eryn_homebrew_install_script + + - name: "macOS : homebrew : Set up homebrew" + block: + - name: "macOS : homebrew : Fetch install script" + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh + dest: "{{ _eryn_homebrew_install_script.path }}" + mode: "0644" + + - name: "macOS : homebrew : Run install script" + ansible.builtin.command: + cmd: bash {{ _eryn_homebrew_install_script.path }} + environment: + NONINTERACTIVE: 1 + + - name: "macOS : homebrew : Gather package manager facts" + ansible.builtin.setup: + gather_subset: pkg_mgr + always: + - name: "macOS : homebrew : Remove temporary install script" + ansible.builtin.file: + path: "{{ _eryn_homebrew_install_script.path }}" + state: absent diff --git a/Ansible/roles/eryn/tasks/macos/main.yml b/Ansible/roles/eryn/tasks/macos/main.yml new file mode 100644 index 0000000..488728d --- /dev/null +++ b/Ansible/roles/eryn/tasks/macos/main.yml @@ -0,0 +1,6 @@ +--- +- name: "macOS : Configure log utility" + ansible.builtin.import_tasks: macos/system-log.yml + +- name: "macOS : Configure homebrew" + ansible.builtin.import_tasks: macos/homebrew.yml diff --git a/Ansible/roles/eryn/tasks/macos/system-log.yml b/Ansible/roles/eryn/tasks/macos/system-log.yml new file mode 100644 index 0000000..3d646a2 --- /dev/null +++ b/Ansible/roles/eryn/tasks/macos/system-log.yml @@ -0,0 +1,5 @@ +--- +- name: "macOS : log : Symlink config" + ansible.builtin.include_tasks: symlink_dotfile.yml + vars: + dotfile_src: logrc From 7c8d97c25e43d05d45e15c341b0e38073f9ffe24 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 12 Feb 2025 07:51:51 -0800 Subject: [PATCH 46/93] Ansible: Install vim and neovide before setting up vim --- Ansible/roles/eryn/tasks/vim.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Ansible/roles/eryn/tasks/vim.yml b/Ansible/roles/eryn/tasks/vim.yml index 02f0c3e..2763070 100644 --- a/Ansible/roles/eryn/tasks/vim.yml +++ b/Ansible/roles/eryn/tasks/vim.yml @@ -1,4 +1,11 @@ --- +- name: "vim : Install vim" + ansible.builtin.package: + name: + - vim + - neovide + state: present + - name: "vim : Symlink config files" ansible.builtin.include_tasks: symlink_dotfile.yml vars: From 2db42121c97e3350408045a931df678aa3052c49 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 12 Feb 2025 07:52:33 -0800 Subject: [PATCH 47/93] Ansible: Use the fully qualified name of the import_tasks module in main.yml for the eryn role --- Ansible/roles/eryn/tasks/main.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Ansible/roles/eryn/tasks/main.yml b/Ansible/roles/eryn/tasks/main.yml index f321cc7..913d813 100644 --- a/Ansible/roles/eryn/tasks/main.yml +++ b/Ansible/roles/eryn/tasks/main.yml @@ -1,17 +1,21 @@ --- +- name: Configure macOS + ansible.builtin.import_tasks: macos/main.yml + when: ansible_os_family == "macOS" + - name: Configure XDG environment - import_tasks: xdg_home.yml + ansible.builtin.import_tasks: xdg_home.yml - name: Configure zsh - import_tasks: zsh.yml + ansible.builtin.import_tasks: zsh.yml - name: Configure vim - import_tasks: vim.yml + ansible.builtin.import_tasks: vim.yml - name: Configure neovim - import_tasks: neovim.yml + ansible.builtin.import_tasks: neovim.yml - name: Configure git - import_tasks: git.yml + ansible.builtin.import_tasks: git.yml - name: Configure tmux - import_tasks: tmux.yml + ansible.builtin.import_tasks: tmux.yml From e8d08af807854fb033596fe72c90c590ab2365dc Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 12 Feb 2025 07:53:06 -0800 Subject: [PATCH 48/93] zsh: Add my website's scripts directory to $path, assuming it's at ~/Website --- zsh/func/init-env-path | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/func/init-env-path b/zsh/func/init-env-path index f948ed2..18f20bc 100644 --- a/zsh/func/init-env-path +++ b/zsh/func/init-env-path @@ -6,6 +6,7 @@ function init-env-path { path=() update-path \ + "$HOME/Website/scripts" \ "$HOME/bin" \ "$HOME/.local/bin" \ "$HOME/.cargo/bin" \ From 4bd546e64951c0ae6e48b0a52ba8fc5a54283d74 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 18 Feb 2025 13:22:23 -0800 Subject: [PATCH 49/93] Remove vimbundles array from setup.sh This array is no longer used. --- setup.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.sh b/setup.sh index 1ee8838..f2275ba 100755 --- a/setup.sh +++ b/setup.sh @@ -5,9 +5,6 @@ sys=`uname -s | tr A-Z a-z` skipitems=(setup.sh README.md py bin Alfred Colors Dotfiles LaunchAgents Python '.*\.orig' '.*~') -typeset -A vimbundles -vimbundles=(Vundle.vim "https://github.com/gmarik/Vundle.vim.git") - function link { local action local dest From 29fdc610bbd10e3256d9aa31ca150396b0d0b3e0 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 18 Feb 2025 13:27:14 -0800 Subject: [PATCH 50/93] Ansible: download vim-plug from GitHub Use get_url to download vim-plug/plug.vim from GitHub. Create a new eryn_vim_plug_tag variable to control which tag to download. --- Ansible/roles/eryn/defaults/main.yml | 2 ++ Ansible/roles/eryn/tasks/neovim.yml | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 Ansible/roles/eryn/defaults/main.yml diff --git a/Ansible/roles/eryn/defaults/main.yml b/Ansible/roles/eryn/defaults/main.yml new file mode 100644 index 0000000..2c73f2a --- /dev/null +++ b/Ansible/roles/eryn/defaults/main.yml @@ -0,0 +1,2 @@ +--- +eryn_vim_plug_tag: 0.14.0 diff --git a/Ansible/roles/eryn/tasks/neovim.yml b/Ansible/roles/eryn/tasks/neovim.yml index e259a76..777c0bf 100644 --- a/Ansible/roles/eryn/tasks/neovim.yml +++ b/Ansible/roles/eryn/tasks/neovim.yml @@ -4,6 +4,12 @@ name: neovim state: present +- name: "neovim : Download vim-plug from GitHub" + ansible.builtin.get_url: + url: "https://raw.githubusercontent.com/junegunn/vim-plug/{{ eryn_vim_plug_tag }}/plug.vim" + dest: "{{ ansible_local.xdg.data_home }}/nvim/site/autoload/plug.vim" + mode: "0644" + - name: "neovim : Symlink config" ansible.builtin.include_tasks: symlink_dotfile_directory.yml vars: From 687083bf3139ab675850d0a8366b5aeed2e18107 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 19 Feb 2025 13:08:20 -0800 Subject: [PATCH 51/93] Ansible: Add X.org configuration - Detect if X.org is installed with a small fact script - Symlink Xdefaults file if X.org is installed --- Ansible/facts/xorg.fact | 9 +++++++++ Ansible/roles/eryn/handlers/main.yml | 3 +++ Ansible/roles/eryn/tasks/main.yml | 4 ++++ Ansible/roles/eryn/tasks/xorg.yml | 23 +++++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 Ansible/facts/xorg.fact create mode 100644 Ansible/roles/eryn/handlers/main.yml create mode 100644 Ansible/roles/eryn/tasks/xorg.yml diff --git a/Ansible/facts/xorg.fact b/Ansible/facts/xorg.fact new file mode 100644 index 0000000..c450d24 --- /dev/null +++ b/Ansible/facts/xorg.fact @@ -0,0 +1,9 @@ +#!/usr/bin/env zsh + +if which xorg 1>/dev/null 2>&1; then + xorg_exists="true" +else + xorg_exists="false" +fi + +echo "{ \"exists\": ${xorg_exists} }" diff --git a/Ansible/roles/eryn/handlers/main.yml b/Ansible/roles/eryn/handlers/main.yml new file mode 100644 index 0000000..687e9ba --- /dev/null +++ b/Ansible/roles/eryn/handlers/main.yml @@ -0,0 +1,3 @@ +- name: "Rebuild local facts" + ansible.builtin.setup: + gather_subset: [ local ] diff --git a/Ansible/roles/eryn/tasks/main.yml b/Ansible/roles/eryn/tasks/main.yml index 913d813..fa5b40d 100644 --- a/Ansible/roles/eryn/tasks/main.yml +++ b/Ansible/roles/eryn/tasks/main.yml @@ -19,3 +19,7 @@ - name: Configure tmux ansible.builtin.import_tasks: tmux.yml + +- name: Configure X.org + ansible.builtin.import_tasks: xorg.yml + when: ansible_os_family == "Linux" diff --git a/Ansible/roles/eryn/tasks/xorg.yml b/Ansible/roles/eryn/tasks/xorg.yml new file mode 100644 index 0000000..6956952 --- /dev/null +++ b/Ansible/roles/eryn/tasks/xorg.yml @@ -0,0 +1,23 @@ +--- +# TODO: This likely will require a lot more packages to install. IIRC, X.org +# also requires input and video packages to run in a basic state. Not to +# mention, graphics acceleration, window management, etc. + +- name: "Xorg : Install X.org" + ansible.builtin.package: + name: xorg + state: present + notify: Rebuild local facts + +# Make sure local facts are rebuilt so the steps below can correctly detect +# if X.org is present. +- name: "Xorg : Flush handlers" + meta: flush_handlers + +- name: "Xorg : Configure" + when: ansible_local.xorg.exists + block: + - name: "Xorg : Symlink Xdefaults" + ansible.builtin.include_tasks: symlink_dotfile_directory.yml + vars: + dotfile_src: Xdefaults From 6bf81515f663460f9fd9e6b1e2152daf94b0c343 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 20 Feb 2025 08:23:52 -0800 Subject: [PATCH 52/93] Ansible: Write some system-wide defaults for macOS --- Ansible/roles/eryn/handlers/main.yml | 3 ++ Ansible/roles/eryn/tasks/macos/defaults.yml | 48 +++++++++++++++++++++ Ansible/roles/eryn/tasks/macos/main.yml | 3 ++ 3 files changed, 54 insertions(+) create mode 100644 Ansible/roles/eryn/tasks/macos/defaults.yml diff --git a/Ansible/roles/eryn/handlers/main.yml b/Ansible/roles/eryn/handlers/main.yml index 687e9ba..d251ba1 100644 --- a/Ansible/roles/eryn/handlers/main.yml +++ b/Ansible/roles/eryn/handlers/main.yml @@ -1,3 +1,6 @@ - name: "Rebuild local facts" ansible.builtin.setup: gather_subset: [ local ] + +- name: "Reload Dock" + ansible.builtin.command: killall Dock diff --git a/Ansible/roles/eryn/tasks/macos/defaults.yml b/Ansible/roles/eryn/tasks/macos/defaults.yml new file mode 100644 index 0000000..f3d721e --- /dev/null +++ b/Ansible/roles/eryn/tasks/macos/defaults.yml @@ -0,0 +1,48 @@ +--- +- name: "macOS : General : Set localization defaults" + community.general.osx_defaults: + domain: NSGlobalDomain + key: "{{ item.key }}" + type: "{{ item.type | default(omit) }}" + value: "{{ item.value }}" + state: present + loop: + - { name: AppleICUForce24HourTime, value: true, type: bool } + - { name: AppleLanguages, value: [ en-US, es-US, ja-US ], type: array } + - { name: AppleShowScrollBars, value: WhenScrolling } + - { name: InitialKeyRepeat, value: 15, type: int } + - { name: KeyRepeat, value: 2, type: int } + - { name: NSAutomaticCapitalizationEnabled, value: false, type: bool } + - { name: NSAutomaticDashSubstitutionEnabled, value: false, type: bool } + - { name: NSAutomaticPeriodSubstitutionEnabled, value: false, type: bool } + - { name: NSAutomaticQuoteSubstitutionEnabled, value: false, type: bool } + - { name: NSAutomaticSpellingCorrectionEnabled, value: false, type: bool } + - { name: NSAutomaticTextCompletionCollapsed, value: true, type: bool } + - { name: NSAutomaticTextCompletionEnabled, value: true, type: bool } + +- name: "macOS : Dock : Set defaults" + community.general.osx_defaults: + domain: com.apple.Dock + key: "{{ item.key }}" + type: "{{ item.type | default(omit) }}" + value: "{{ item.value }}" + state: present + loop: + - { name: autohide, value: true, type: bool } + - { name: showhidden, value: true, type: bool } + - { name: tilesize, value: 72, type: int } + notify: Reload Dock + +- name: "macOS : TextEdit : Set defaults" + community.general.osx_defaults: + domain: com.apple.TextEdit + key: "{{ item.key }}" + type: "{{ item.type | default(omit) }}" + value: "{{ item.value }}" + state: present + loop: + - { key: IgnoreHTML, value: true, type: bool } + - { key: RichText, value: false, type: bool } + - { key: author, value: "Eryn Wells" } + - { key: NSFixedPitchFontSize, value: 14, type: int } + - { key: NSFixedPitchFontSize, value: 14, type: int } diff --git a/Ansible/roles/eryn/tasks/macos/main.yml b/Ansible/roles/eryn/tasks/macos/main.yml index 488728d..cc189c1 100644 --- a/Ansible/roles/eryn/tasks/macos/main.yml +++ b/Ansible/roles/eryn/tasks/macos/main.yml @@ -1,4 +1,7 @@ --- +- name: "macOS : Configure defaults" + ansible.builtin.import_tasks: macos/defaults.yml + - name: "macOS : Configure log utility" ansible.builtin.import_tasks: macos/system-log.yml From 89fcc479db0ce09a500e78f435fd0fe28b61bdb7 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 20 Feb 2025 13:38:20 -0800 Subject: [PATCH 53/93] Ansible: set exec bit on facts/xorg.fact --- Ansible/facts/xorg.fact | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 Ansible/facts/xorg.fact diff --git a/Ansible/facts/xorg.fact b/Ansible/facts/xorg.fact old mode 100644 new mode 100755 From 891aacb9edacb41b0270a800130373e29d1803b6 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 18 Apr 2025 09:53:32 -0700 Subject: [PATCH 54/93] [tmux] Remove the comma from between the date and time --- config/tmux/tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index efaada8..178c750 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -31,7 +31,7 @@ set -g update-environment "SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION" set -g status-style bg=black set -g status-left " #S " set -g status-left-style bg=green,fg=black -set -g status-right "#[bg=red,fg=white] #h #[bg=blue,fg=white] %a %b %e, %R #[default]" +set -g status-right "#[bg=red,fg=white] #h #[bg=blue,fg=white] %Y-%m-%d %R #[default]" # Start window and pane indexing from 1 instead of 0 set -g base-index 1 From a87f399939778b8ef7acc989f820f4baaaa26b5b Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 18 Apr 2025 09:54:16 -0700 Subject: [PATCH 55/93] [nvim] Set the GUI colorscheme to lunaperche --- config/nvim/lua/gui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nvim/lua/gui.lua b/config/nvim/lua/gui.lua index 8800fb5..1ad4689 100644 --- a/config/nvim/lua/gui.lua +++ b/config/nvim/lua/gui.lua @@ -11,7 +11,7 @@ local function _init_neovide() vim.o.guifont = "InputMonoCondensed:h16" - vim.cmd [[ colorscheme dracula ]] + vim.cmd [[ colorscheme lunaperche ]] end function init_gui() From 2fea369110b102610e5d2dd03a2e28058a0f4e03 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 18 Apr 2025 09:55:11 -0700 Subject: [PATCH 56/93] [nvim] Move setting the GUI font to init_gui() from _init_neovide() Make a font family list that includes Berkeley Mono, SF Mono, and Courier New. --- config/nvim/lua/gui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nvim/lua/gui.lua b/config/nvim/lua/gui.lua index 1ad4689..cd4c95d 100644 --- a/config/nvim/lua/gui.lua +++ b/config/nvim/lua/gui.lua @@ -9,12 +9,12 @@ local function _init_neovide() vim.g.neovide_position_animation_length = 0 vim.g.neovide_scroll_animation_length = 0 - vim.o.guifont = "InputMonoCondensed:h16" vim.cmd [[ colorscheme lunaperche ]] end function init_gui() + vim.o.guifont = "Berkeley Mono,Input Mono Condensed,SF Mono,Courier New:h18" _init_neovide() end From dd6a88d34fd13e0b03a8a22a6dffa60e7ae9b642 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 21 May 2025 10:59:46 -0700 Subject: [PATCH 57/93] [vim] Remove pastetoggle setting from vimrc.common This setting was removed from neovim recently and setting it was causing it to barf. I'm not sure what the replacement is. --- vimrc.common | 2 -- 1 file changed, 2 deletions(-) diff --git a/vimrc.common b/vimrc.common index f748382..fe87b5a 100644 --- a/vimrc.common +++ b/vimrc.common @@ -78,8 +78,6 @@ set copyindent " copy previous indentation on autoindent set scrolloff=3 " scroll 3 lines ahead of point set sidescrolloff=5 " scroll 5 columns ahead of point -set pastetoggle= " toggle paste mode with this - " completion menu set wildmenu set wildmode=longest,list From 31215aadbfc39e9e6ef9ae7834df020fb0107f3a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 21 May 2025 11:02:20 -0700 Subject: [PATCH 58/93] [neovim] Remove an extraneous newline --- config/nvim/lua/gui.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/config/nvim/lua/gui.lua b/config/nvim/lua/gui.lua index cd4c95d..2840a21 100644 --- a/config/nvim/lua/gui.lua +++ b/config/nvim/lua/gui.lua @@ -9,7 +9,6 @@ local function _init_neovide() vim.g.neovide_position_animation_length = 0 vim.g.neovide_scroll_animation_length = 0 - vim.cmd [[ colorscheme lunaperche ]] end From 534d9a102b8f6d91028d702c114f4ce440552f4b Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 3 Jun 2025 13:16:35 -0700 Subject: [PATCH 59/93] [neovim] Give key bindings a little love; add GUI bindings for neovide - Clean up the init interface. Move all the init methods into a single init_all() call. - Add two keybindings for and to move by soft-wrapped lines in Normal mode - Add a few key bindings for the usual shortcuts for cut/copy/paste when in GUI mode. In vim, D is the character that represents the Super/Apple key. So, , , and now do what you'd expect. --- config/nvim/init.lua | 5 +---- config/nvim/lua/gui.lua | 3 +++ config/nvim/lua/keys.lua | 39 ++++++++++++++++++++++++++++++++++----- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 955a32c..8143253 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -56,10 +56,7 @@ require 'treesitter' require 'lsp' local keys = require 'keys' -keys.init_key_opts() -keys.init_window_key_mappings() -keys.init_diagnostic_key_mappings() -keys.init_telescope_mappings() +keys.init() local gui = require 'gui' gui.init() diff --git a/config/nvim/lua/gui.lua b/config/nvim/lua/gui.lua index 2840a21..873fc99 100644 --- a/config/nvim/lua/gui.lua +++ b/config/nvim/lua/gui.lua @@ -5,10 +5,13 @@ local function _init_neovide() return end + -- No use for these animations. vim.g.neovide_cursor_animation_length = 0 vim.g.neovide_position_animation_length = 0 vim.g.neovide_scroll_animation_length = 0 + vim.g.neovide_input_macos_option_key_is_meta = "both" + vim.cmd [[ colorscheme lunaperche ]] end diff --git a/config/nvim/lua/keys.lua b/config/nvim/lua/keys.lua index 962f33e..4eaebbb 100644 --- a/config/nvim/lua/keys.lua +++ b/config/nvim/lua/keys.lua @@ -2,10 +2,33 @@ local map = vim.keymap.set -local function init_key_opts() +local function init_key_options() vim.g.mapleader = "," end +local function navigation_mappings() + local options = { noremap = true } + + -- Navigate by soft-wrapped lines using Alt/Option/Meta + jk + map({'n', 'v'}, '', 'gk', options) + map({'n', 'v'}, '', 'gj', options) +end + +local function clipboard_mappings() + if not vim.fn.has('gui_running') then + return + end + + local options = { noremap = true } + + -- Copy to the system clipboard + map('v', '', '"+y', options) + -- Cut to the system clipboard + map('v', '', '"+x', options) + -- Paste from the system clipboard + map({'i', 'v'}, '', '"+p', options) +end + local function window_key_mappings() local options = { silent = true } @@ -70,10 +93,16 @@ local function telescope_mappings() map('n', 'fh', builtin.help_tags, { desc = 'Telescope help tags' }) end +local function init_all_global_keybindings() + init_key_options() + clipboard_mappings() + window_key_mappings() + navigation_mappings() + diagnostic_mappings() + telescope_mappings() +end + return { - init_key_opts = init_key_opts, - init_window_key_mappings = window_key_mappings, - init_diagnostic_key_mappings = diagnostic_mappings, + init = init_all_global_keybindings, init_lsp_key_mappings = local_lsp_mappings, - init_telescope_mappings = telescope_mappings, } From b3394844f2a5bb72752dabe05cb9f88ba68a2180 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 3 Jun 2025 13:19:03 -0700 Subject: [PATCH 60/93] [neovim] Disable relativenumber -- absolute numbers in the gutter --- config/nvim/lua/configuration.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nvim/lua/configuration.lua b/config/nvim/lua/configuration.lua index 0fda9a6..6fbf469 100644 --- a/config/nvim/lua/configuration.lua +++ b/config/nvim/lua/configuration.lua @@ -16,7 +16,7 @@ opt.splitbelow = true -- Show line numbers opt.number = true -opt.relativenumber = true +opt.relativenumber = false -- Start with ~all folds open. opt.foldlevel = 99 From 9d9475db789f3974e5dc1eaa400b8574aa88c0ac Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 4 Jun 2025 13:07:12 -0700 Subject: [PATCH 61/93] [neovim] Remove javascript and swift LSPs from the ensure_installed list --- config/nvim/after/plugin/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nvim/after/plugin/treesitter.lua b/config/nvim/after/plugin/treesitter.lua index 40a6f9f..4f9ee81 100644 --- a/config/nvim/after/plugin/treesitter.lua +++ b/config/nvim/after/plugin/treesitter.lua @@ -1,7 +1,7 @@ local treesitter_configs = require 'nvim-treesitter.configs' treesitter_configs.setup { - ensure_installed = { "lua", "vim", "javascript", "swift" }, + ensure_installed = { "lua", "vim" }, sync_install = true, auto_install = true, hightlight = { From 03fe14895cb7caf9970384d7220b8194034f8b32 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 4 Jun 2025 13:07:56 -0700 Subject: [PATCH 62/93] [neovim] Add a couple overrides for the zaibatsu colorscheme Improve the contrast of menu chrome with this color scheme. --- config/nvim/lua/colors.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/nvim/lua/colors.lua b/config/nvim/lua/colors.lua index ffdde76..6dc00f9 100644 --- a/config/nvim/lua/colors.lua +++ b/config/nvim/lua/colors.lua @@ -48,4 +48,15 @@ vim.api.nvim_create_autocmd("ColorScheme", { group = colorscheme_group, }) +vim.api.nvim_create_autocmd("ColorScheme", { + pattern = "zaibatsu", + callback = function() + vim.cmd [[ + hi! Pmenu ctermbg=8 + hi! VertSplit ctermbg=8 + ]] + end, + group = colorscheme_group, +}) + vim.cmd [[ color zaibatsu ]] From f7e802d3f3bc22806a3b837da9ca85cffa26b2ca Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 3 Jun 2025 14:59:53 -0700 Subject: [PATCH 63/93] [zsh] bool() function Converts its first argument to a bool return value (0 or 1) and echos "yes" or "no". --- zsh/func/bool | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 zsh/func/bool diff --git a/zsh/func/bool b/zsh/func/bool new file mode 100644 index 0000000..c5bf961 --- /dev/null +++ b/zsh/func/bool @@ -0,0 +1,31 @@ +# Eryn Wells +# vim: set ft=zsh: + +function bool { + if [[ $1 -eq 0 ]]; then + echo "no" + return false + fi + + local lowercase_value=${(L)1} + + if [[ "$lowercase_value" == "yes" ]]; then + echo "yes" + return true + fi + + if [[ "$lowercase_value" == "no" ]]; then + echo "no" + return false + fi + + if [[ "$lowercase_value" =~ '^[0-9]+$' ]]; then + echo "yes" + return true + fi + + echo "no" + return false +} + +bool "$@" From bb82a7ca75bd59af633b8dc9503d360c6b01aa0a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 1 Aug 2025 10:33:03 -0700 Subject: [PATCH 64/93] [nvim] Update format of rust-analyzer LSP config I think the format of the config table for rust-analyzer changed. checkOnSave takes a bool, and a separate check table provides the parameters. --- config/nvim/lua/lsp.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua index 87f964f..0bed968 100644 --- a/config/nvim/lua/lsp.lua +++ b/config/nvim/lua/lsp.lua @@ -115,7 +115,8 @@ lspconfig.rust_analyzer.setup { enable = true, }, }, - checkOnSave = { + checkOnSave = true, + check = { command = 'clippy', extraArgs = { "--", From 6dc9120dd0fd965b970424fab9e57e57ffbb7798 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 1 Aug 2025 10:37:26 -0700 Subject: [PATCH 65/93] [zsh] Update the Usage message of update-path to note the default is exporting the modified variable --- zsh/func/update-path | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/func/update-path b/zsh/func/update-path index 4172df4..624258a 100644 --- a/zsh/func/update-path +++ b/zsh/func/update-path @@ -20,7 +20,8 @@ Arguments --------- %B-e%b | %B--export%b | %B--no-export%b - Export the variable after modification. + Export the variable after modification. The default is to export if the + variable is modified. %B-f%b | %B--force%b Unconditionally add the path, even if it doesn't exist. From fa0e59ea3911a7660c39ac07f994eee23dc4d450 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 1 Aug 2025 10:38:48 -0700 Subject: [PATCH 66/93] [zsh] Autoload the bool function --- zsh/func/bool | 26 +++++++++++++------------- zshrc | 1 + 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/zsh/func/bool b/zsh/func/bool index c5bf961..1fe2567 100644 --- a/zsh/func/bool +++ b/zsh/func/bool @@ -2,30 +2,30 @@ # vim: set ft=zsh: function bool { - if [[ $1 -eq 0 ]]; then - echo "no" - return false + if [[ "$1" =~ '^-?[0-9]+$' ]]; then + if (( $1 == 0 )); then + echo "no" + return 1 + else + echo "yes" + return 0 + fi fi local lowercase_value=${(L)1} - if [[ "$lowercase_value" == "yes" ]]; then + if [[ "$lowercase_value" == "yes" || "$lowercase_value" == "true" ]]; then echo "yes" - return true + return 0 fi - if [[ "$lowercase_value" == "no" ]]; then + if [[ "$lowercase_value" == "no" || "$lowercase_value" == "false" ]]; then echo "no" - return false - fi - - if [[ "$lowercase_value" =~ '^[0-9]+$' ]]; then - echo "yes" - return true + return 1 fi echo "no" - return false + return 1 } bool "$@" diff --git a/zshrc b/zshrc index 8f70595..da1297d 100644 --- a/zshrc +++ b/zshrc @@ -21,6 +21,7 @@ fi do_init_functions zsh_init_rc_functions +autoload -Uz bool autoload -Uz g autoload -Uz nethack autoload -Uz pw From bd05bc392a3cb11696c94a8bf7578d8a03b9c728 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 9 Aug 2025 07:44:55 -0700 Subject: [PATCH 67/93] [vim] Add Meta-O to show open buffers in Neovide --- config/nvim/lua/keys.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/nvim/lua/keys.lua b/config/nvim/lua/keys.lua index 4eaebbb..d83fb21 100644 --- a/config/nvim/lua/keys.lua +++ b/config/nvim/lua/keys.lua @@ -6,7 +6,7 @@ local function init_key_options() vim.g.mapleader = "," end -local function navigation_mappings() +local function text_navigation_mappings() local options = { noremap = true } -- Navigate by soft-wrapped lines using Alt/Option/Meta + jk @@ -87,17 +87,22 @@ end local function telescope_mappings() local builtin = require('telescope.builtin') + map('n', 'ff', builtin.find_files, { desc = 'Telescope find files' }) map('n', 'fg', builtin.live_grep, { desc = 'Telescope live grep' }) map('n', 'fb', builtin.buffers, { desc = 'Telescope buffers' }) map('n', 'fh', builtin.help_tags, { desc = 'Telescope help tags' }) + + if vim.fn.has('gui_running') then + map('n', 'D-O', builtin.buffers, { desc = 'Open existing' }) + end end local function init_all_global_keybindings() init_key_options() clipboard_mappings() window_key_mappings() - navigation_mappings() + text_navigation_mappings() diagnostic_mappings() telescope_mappings() end From e0f813182a5a79ca9a87912d927216e3c9858d33 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 9 Aug 2025 07:45:15 -0700 Subject: [PATCH 68/93] [vim] Configure ts_ls for Typescript and JS --- config/nvim/lua/lsp.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua index 87f964f..885ab76 100644 --- a/config/nvim/lua/lsp.lua +++ b/config/nvim/lua/lsp.lua @@ -76,6 +76,11 @@ lspconfig.eslint.setup { capabilities = cmp_capabilities, } +lspconfig.ts_ls.setup { + on_attach = on_attach, + capabilities = cmp_capabilities, +} + lspconfig.html.setup { on_attach = on_attach, capabilities = cmp_capabilities, From 972d5f452438138fb36cfcee094d596aac219300 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 9 Aug 2025 07:45:52 -0700 Subject: [PATCH 69/93] [vim] Set mode with a string in Ansible tasks file for setting up vim --- Ansible/roles/eryn/tasks/vim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ansible/roles/eryn/tasks/vim.yml b/Ansible/roles/eryn/tasks/vim.yml index 2763070..42346a3 100644 --- a/Ansible/roles/eryn/tasks/vim.yml +++ b/Ansible/roles/eryn/tasks/vim.yml @@ -19,7 +19,7 @@ ansible.builtin.file: path: "{{ ansible_local.xdg.state_home }}/vim" owner: "{{ ansible_user_id }}" - mode: 0750 + mode: "0750" state: directory - name: "vim : Symlink runtime directory" From cf613b301259f925e7d0e5281d3cbd57bae6a4ac Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 11 Aug 2025 17:00:13 -0700 Subject: [PATCH 70/93] [fortune] Add some fortune strings and a Makefile to build indexed string files --- Fortune/Makefile | 16 ++++++++++++++++ Fortune/eryn | 7 +++++++ 2 files changed, 23 insertions(+) create mode 100644 Fortune/Makefile create mode 100644 Fortune/eryn diff --git a/Fortune/Makefile b/Fortune/Makefile new file mode 100644 index 0000000..9a1c213 --- /dev/null +++ b/Fortune/Makefile @@ -0,0 +1,16 @@ + +STRFILE=strfile + +DATFILES=eryn.dat + +.PHONY: all clean + +%.dat: % + $(STRFILE) $^ $@ + +.PHONY: all +all: $(DATFILES) + +.PHONY: clean +clean: + rm -f $(DATFILES) diff --git a/Fortune/eryn b/Fortune/eryn new file mode 100644 index 0000000..1a77ce3 --- /dev/null +++ b/Fortune/eryn @@ -0,0 +1,7 @@ +Please practice this until you can easily do it. + -- Andrej Diamantstein +% +Easy, isn't it? + -- Andrej Diamantstein +% +TWENTY THREE NINETEEN!!!! From 71ab83d8f3611613bcbeb433d7d4086c40764e26 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 11 Aug 2025 17:07:28 -0700 Subject: [PATCH 71/93] [fortune] A few more quotes --- Fortune/eryn | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Fortune/eryn b/Fortune/eryn index 1a77ce3..87f0bc2 100644 --- a/Fortune/eryn +++ b/Fortune/eryn @@ -5,3 +5,12 @@ Easy, isn't it? -- Andrej Diamantstein % TWENTY THREE NINETEEN!!!! +% +You only have to let the soft animal of your body +love what it loves. + -- Mary Oliver, Wild Geese +% +Be a lamp, or a lifeboat, or a ladder +help someone’s soul to heal +Walk out of your house like a shepherd. + -- Rumi, Ode 3090 From 09f098500650653a60f8eefbcb5d4a0386b15b75 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 11 Aug 2025 17:07:39 -0700 Subject: [PATCH 72/93] Ignore Fortune .dat files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 848e7f5..44c1071 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ vim/backup/ zsh/cache/ Ansible/*.retry + +Fortune/*.dat From aefda50590c3275c0bb8a4b8fbb2f76c7f4b19a4 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 11 Aug 2025 17:08:07 -0700 Subject: [PATCH 73/93] [setup.sh] Add some missing items to the skipitems array; skip Fortune --- setup.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index f2275ba..cd03e50 100755 --- a/setup.sh +++ b/setup.sh @@ -3,7 +3,23 @@ dotfiles_dir=$(cd "$(dirname "$0")" && pwd) sys=`uname -s | tr A-Z a-z` -skipitems=(setup.sh README.md py bin Alfred Colors Dotfiles LaunchAgents Python '.*\.orig' '.*~') +skipitems=( \ + '.*\.orig' \ + '.*~' \ + Alfred \ + Ansible \ + bin \ + Colors \ + Dotfiles \ + Fortune \ + LaunchAgents \ + py \ + Python \ + README.md \ + setup.sh \ + Web \ + Xcode \ +) function link { local action From 884fa0a5421cf6c93469249e2d0e85ca9bd84877 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 11 Aug 2025 17:12:14 -0700 Subject: [PATCH 74/93] [setup.sh] Build fortunes file in setup.sh --- setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.sh b/setup.sh index cd03e50..758c4bf 100755 --- a/setup.sh +++ b/setup.sh @@ -54,6 +54,11 @@ function matches_skip_item { return 1 } +function build_fortunes { + echo "Building fortunes file" + (cd Fortune && make) +} + print -P " %BHome:%b $HOME" print -P " %BDotfiles:%b $dotfiles_dir" print -P "%BSkip Items:%b $skipitems\n" @@ -163,4 +168,6 @@ if (( $configure_vim )); then $VIM +PlugInstall +qall fi +build_fortunes + exit 0 From 6b08decfb9724a0ba45bbb4490725fa6517651ec Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 12 Aug 2025 20:37:15 -0700 Subject: [PATCH 75/93] [nvim] Add an app template snippet for Nannou apps (nnapp) --- config/nvim/UltiSnips/rust.snippets | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 config/nvim/UltiSnips/rust.snippets diff --git a/config/nvim/UltiSnips/rust.snippets b/config/nvim/UltiSnips/rust.snippets new file mode 100644 index 0000000..da88543 --- /dev/null +++ b/config/nvim/UltiSnips/rust.snippets @@ -0,0 +1,38 @@ +# rust.snippets +# vim: set ts=8 sw=8 sts=8 noet list: +# Eryn Wells + +snippet nnapp +// Eryn Wells + +use nannou::prelude::*; + +struct Model { + _window: window::Id, +} + +impl Model { + fn new(app: &App) -> Self { + let window = app.new_window().view(view).build().unwrap(); + Self { + _window: window, + } + } + + fn update(app: &App, model: &mut Model, update: Update) { + model.update(app, update) + } + + fn update(&mut self, app: &App, update: Update) { + // TODO: Update the model here. + } +} + +fn view(app: &App, model: &Model, frame: Frame) { + // TODO: Draw the view here. +} + +fn main() { + nannou::app(Model::new).update(update).run(); +} +endsnippet From e8aca4c7da2b74bf2eaa3ee417dea40442ef9e3a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 26 Sep 2025 16:52:45 +0000 Subject: [PATCH 76/93] [zsh] Add user-global node_modules/bin to $path --- zsh/func/init-env-path | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/func/init-env-path b/zsh/func/init-env-path index 18f20bc..705854d 100644 --- a/zsh/func/init-env-path +++ b/zsh/func/init-env-path @@ -9,6 +9,7 @@ function init-env-path "$HOME/Website/scripts" \ "$HOME/bin" \ "$HOME/.local/bin" \ + "$HOME/.local/lib/node_modules/bin" \ "$HOME/.cargo/bin" \ "$HOME/.ghcup/bin" \ "$HOME/.gem/ruby/2.2.0/bin" \ From 0d3b4a232f67a0fd6082f514177cebfce674657a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 18 Jan 2026 08:04:08 -0700 Subject: [PATCH 77/93] Replace `vim` with `neovim` in the README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 58c6084..ce5b5f6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ This is my collection of dotfiles, preserved here for all to see and enjoy. Feel free to copy anything you see here. It would be nice if you added a comment mentioning where you got it. -My environment relies on `zsh`, `vim`, and `git`. +My environment relies on `zsh`, `neovim`, and `git`. + ## Installation From cbebbffee0a7fea43e6d3b73488397e0c4beedc1 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 18 Jan 2026 08:05:33 -0700 Subject: [PATCH 78/93] [zsh] Establish a DOTFILES_HOME variable Look for a config file at ~/.config/dotfiles-home that contains the path to the repo, or check the usual location of ~/.dotfiles. Do this in a shell function in .zshenv so it's repeatable. This needs to be done very early in the init process. --- zsh/func/init-env-tilde-paths | 2 +- zshenv | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/zsh/func/init-env-tilde-paths b/zsh/func/init-env-tilde-paths index d6af187..70acbd3 100644 --- a/zsh/func/init-env-tilde-paths +++ b/zsh/func/init-env-tilde-paths @@ -16,7 +16,7 @@ function init-env-tilde-paths break done - export df=~/.dotfiles + export df="$DOTFILES_HOME" } init-env-tilde-paths "$@" diff --git a/zshenv b/zshenv index ead3559..a322249 100644 --- a/zshenv +++ b/zshenv @@ -5,6 +5,22 @@ unsetopt GLOBAL_RCS export SYS=`uname -s | tr A-Z a-z` +function init-env-dotfiles-path +{ + local dotfiles_config="$HOME/.config/dotfiles-home" + if [[ -f "$dotfiles_config" ]]; then + export DOTFILES_HOME=$(cat "$dotfiles_config") + return + fi + + if [[ -f "$HOME/.dotfiles/setup.sh" ]]; then + export DOTFILES_HOME="$HOME/.dotfiles" + return + fi + + echo "WARNING: Couldn't find path to dotfiles" 1>&2 +} + function init-env-fpath { local -r fpath_candidates=( \ @@ -23,6 +39,7 @@ function init-env-fpath done } +init-env-dotfiles-path init-env-fpath autoload -Uz do_init_functions From 4f06d80da6637462cd2ad4c43587eb9390be1340 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 18 Jan 2026 08:08:00 -0700 Subject: [PATCH 79/93] [zsh] Use DOTFILES_HOME to find zsh functions inside the repo Zsh can find shell functions inside the repo instead using a symlink in $HOME. --- zshenv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshenv b/zshenv index a322249..5d6c1cb 100644 --- a/zshenv +++ b/zshenv @@ -24,8 +24,8 @@ function init-env-dotfiles-path function init-env-fpath { local -r fpath_candidates=( \ - "$HOME/.zsh/${SYS}-functions" \ - "$HOME/.zsh/func" \ + "$DOTFILES_HOME/zsh/${SYS}-functions" \ + "$DOTFILES_HOME/zsh/func" \ ) # Process the array in reverse order (`Oa` means "descending index order", From 91da2fc58383f5be52029ff5b117828eaf764a2a Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 18 Jan 2026 08:40:01 -0700 Subject: [PATCH 80/93] [zsh] A new env init function to set XDG path variables --- zsh/func/init-env-default-xdg-vars | 34 ++++++++++++++++++++++++++++++ zshenv | 1 + 2 files changed, 35 insertions(+) create mode 100644 zsh/func/init-env-default-xdg-vars diff --git a/zsh/func/init-env-default-xdg-vars b/zsh/func/init-env-default-xdg-vars new file mode 100644 index 0000000..ed5bb66 --- /dev/null +++ b/zsh/func/init-env-default-xdg-vars @@ -0,0 +1,34 @@ +#!/usr/bin/env zsh +# Eryn Wells + +# See https://specifications.freedesktop.org/basedir/latest/ for definitions of +# these paths. + + +function init-env-default-xdg-vars +{ + zmodload zsh/zutil + + local -a opt_create + zparseopts -a opt_args -D -E -F - \ + {c,-create,-no-create}=opt_create + + export \ + XDG_BIN_HOME=${XDG_BIN_HOME:-$HOME/.local/bin} \ + XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} \ + XDG_CONFIG_HOME=${XDG_CACHE_HOME:-$HOME/.config} \ + XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} \ + XDG_STATE_HOME=${XDG_DATA_HOME:-$HOME/.local/state} + + if [[ $opt_create[(I)--no-create] -ne 0 ]]; then + mkdir -p -m 0700 \ + $XDG_BIN_HOME \ + $XDG_CACHE_HOME \ + $XDG_CONFIG_HOME \ + $XDG_DATA_HOME \ + $XDG_STATE_HOME + fi +} + + +init-env-default-xdg-vars "$@" diff --git a/zshenv b/zshenv index 5d6c1cb..bea316a 100644 --- a/zshenv +++ b/zshenv @@ -46,6 +46,7 @@ autoload -Uz do_init_functions typeset -a zsh_init_env_functions=( \ init-env \ + init-env-default-xdg-vars \ init-env-path \ init-env-tilde-paths \ init-env-python \ From 7c08c5131f028910dde93c96d5fa2ab74114749f Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 18 Jan 2026 08:43:02 -0700 Subject: [PATCH 81/93] [zsh] Move func/ directory to zsh/functions --- zsh/{func => functions}/append_to_path | 0 zsh/{func => functions}/binary_exists | 0 zsh/{func => functions}/bool | 0 zsh/{func => functions}/connect_ssh_agent | 0 zsh/{func => functions}/darwin-icloud-drive-path | 0 zsh/{func => functions}/darwin/darwin-hardware-model | 0 zsh/{func => functions}/darwin/darwin-os-build | 0 zsh/{func => functions}/darwin/darwin-os-version | 0 zsh/{func => functions}/darwin_configure_screenshots_directory | 0 zsh/{func => functions}/darwin_init_once | 0 zsh/{func => functions}/do_init_functions | 0 zsh/{func => functions}/finder | 0 zsh/{func => functions}/g | 0 zsh/{func => functions}/homebrew-prefix | 0 zsh/{func => functions}/import_cacert | 0 zsh/{func => functions}/init-env | 0 zsh/{func => functions}/init-env-darwin | 0 zsh/{func => functions}/init-env-default-xdg-vars | 0 zsh/{func => functions}/init-env-path | 0 zsh/{func => functions}/init-env-playdate | 0 zsh/{func => functions}/init-env-python | 0 zsh/{func => functions}/init-env-tilde-paths | 0 zsh/{func => functions}/init-env-vi | 0 zsh/{func => functions}/init-rc-aliases | 0 zsh/{func => functions}/init-rc-app-environments | 0 zsh/{func => functions}/init-rc-completion | 0 zsh/{func => functions}/init-rc-darwin | 0 zsh/{func => functions}/init-rc-linux | 0 zsh/{func => functions}/init-rc-ls | 0 zsh/{func => functions}/init-rc-prompt | 0 zsh/{func => functions}/init-rc-zle | 0 zsh/{func => functions}/init-rc-zsh-history | 0 zsh/{func => functions}/init-rc-zsh-options | 0 zsh/{func => functions}/init_profile_darwin | 0 zsh/{func => functions}/init_profile_darwin_say_hello | 0 zsh/{func => functions}/init_rc_fpath_darwin | 0 zsh/{func => functions}/init_xcode | 0 zsh/{func => functions}/init_zsh_functions | 0 zsh/{func => functions}/list_tmux_sessions | 0 zsh/{func => functions}/load_module | 0 zsh/{func => functions}/neovim_init_once | 0 zsh/{func => functions}/nethack | 0 zsh/{func => functions}/open-xcode | 0 zsh/{func => functions}/prepend_to_path | 0 zsh/{func => functions}/prompt_colorize | 0 zsh/{func => functions}/prompt_loquacious_setup | 0 zsh/{func => functions}/refresh_system_tags | 0 zsh/{func => functions}/setup-cpython | 0 zsh/{func => functions}/setup_android | 0 zsh/{func => functions}/solarized | 0 zsh/{func => functions}/up | 0 zsh/{func => functions}/update-path | 0 zshenv | 2 +- 53 files changed, 1 insertion(+), 1 deletion(-) rename zsh/{func => functions}/append_to_path (100%) rename zsh/{func => functions}/binary_exists (100%) rename zsh/{func => functions}/bool (100%) rename zsh/{func => functions}/connect_ssh_agent (100%) rename zsh/{func => functions}/darwin-icloud-drive-path (100%) rename zsh/{func => functions}/darwin/darwin-hardware-model (100%) rename zsh/{func => functions}/darwin/darwin-os-build (100%) rename zsh/{func => functions}/darwin/darwin-os-version (100%) rename zsh/{func => functions}/darwin_configure_screenshots_directory (100%) rename zsh/{func => functions}/darwin_init_once (100%) rename zsh/{func => functions}/do_init_functions (100%) rename zsh/{func => functions}/finder (100%) rename zsh/{func => functions}/g (100%) rename zsh/{func => functions}/homebrew-prefix (100%) rename zsh/{func => functions}/import_cacert (100%) rename zsh/{func => functions}/init-env (100%) rename zsh/{func => functions}/init-env-darwin (100%) rename zsh/{func => functions}/init-env-default-xdg-vars (100%) rename zsh/{func => functions}/init-env-path (100%) rename zsh/{func => functions}/init-env-playdate (100%) rename zsh/{func => functions}/init-env-python (100%) rename zsh/{func => functions}/init-env-tilde-paths (100%) rename zsh/{func => functions}/init-env-vi (100%) rename zsh/{func => functions}/init-rc-aliases (100%) rename zsh/{func => functions}/init-rc-app-environments (100%) rename zsh/{func => functions}/init-rc-completion (100%) rename zsh/{func => functions}/init-rc-darwin (100%) rename zsh/{func => functions}/init-rc-linux (100%) rename zsh/{func => functions}/init-rc-ls (100%) rename zsh/{func => functions}/init-rc-prompt (100%) rename zsh/{func => functions}/init-rc-zle (100%) rename zsh/{func => functions}/init-rc-zsh-history (100%) rename zsh/{func => functions}/init-rc-zsh-options (100%) rename zsh/{func => functions}/init_profile_darwin (100%) rename zsh/{func => functions}/init_profile_darwin_say_hello (100%) rename zsh/{func => functions}/init_rc_fpath_darwin (100%) rename zsh/{func => functions}/init_xcode (100%) rename zsh/{func => functions}/init_zsh_functions (100%) rename zsh/{func => functions}/list_tmux_sessions (100%) rename zsh/{func => functions}/load_module (100%) rename zsh/{func => functions}/neovim_init_once (100%) rename zsh/{func => functions}/nethack (100%) rename zsh/{func => functions}/open-xcode (100%) rename zsh/{func => functions}/prepend_to_path (100%) rename zsh/{func => functions}/prompt_colorize (100%) rename zsh/{func => functions}/prompt_loquacious_setup (100%) rename zsh/{func => functions}/refresh_system_tags (100%) rename zsh/{func => functions}/setup-cpython (100%) rename zsh/{func => functions}/setup_android (100%) rename zsh/{func => functions}/solarized (100%) rename zsh/{func => functions}/up (100%) rename zsh/{func => functions}/update-path (100%) diff --git a/zsh/func/append_to_path b/zsh/functions/append_to_path similarity index 100% rename from zsh/func/append_to_path rename to zsh/functions/append_to_path diff --git a/zsh/func/binary_exists b/zsh/functions/binary_exists similarity index 100% rename from zsh/func/binary_exists rename to zsh/functions/binary_exists diff --git a/zsh/func/bool b/zsh/functions/bool similarity index 100% rename from zsh/func/bool rename to zsh/functions/bool diff --git a/zsh/func/connect_ssh_agent b/zsh/functions/connect_ssh_agent similarity index 100% rename from zsh/func/connect_ssh_agent rename to zsh/functions/connect_ssh_agent diff --git a/zsh/func/darwin-icloud-drive-path b/zsh/functions/darwin-icloud-drive-path similarity index 100% rename from zsh/func/darwin-icloud-drive-path rename to zsh/functions/darwin-icloud-drive-path diff --git a/zsh/func/darwin/darwin-hardware-model b/zsh/functions/darwin/darwin-hardware-model similarity index 100% rename from zsh/func/darwin/darwin-hardware-model rename to zsh/functions/darwin/darwin-hardware-model diff --git a/zsh/func/darwin/darwin-os-build b/zsh/functions/darwin/darwin-os-build similarity index 100% rename from zsh/func/darwin/darwin-os-build rename to zsh/functions/darwin/darwin-os-build diff --git a/zsh/func/darwin/darwin-os-version b/zsh/functions/darwin/darwin-os-version similarity index 100% rename from zsh/func/darwin/darwin-os-version rename to zsh/functions/darwin/darwin-os-version diff --git a/zsh/func/darwin_configure_screenshots_directory b/zsh/functions/darwin_configure_screenshots_directory similarity index 100% rename from zsh/func/darwin_configure_screenshots_directory rename to zsh/functions/darwin_configure_screenshots_directory diff --git a/zsh/func/darwin_init_once b/zsh/functions/darwin_init_once similarity index 100% rename from zsh/func/darwin_init_once rename to zsh/functions/darwin_init_once diff --git a/zsh/func/do_init_functions b/zsh/functions/do_init_functions similarity index 100% rename from zsh/func/do_init_functions rename to zsh/functions/do_init_functions diff --git a/zsh/func/finder b/zsh/functions/finder similarity index 100% rename from zsh/func/finder rename to zsh/functions/finder diff --git a/zsh/func/g b/zsh/functions/g similarity index 100% rename from zsh/func/g rename to zsh/functions/g diff --git a/zsh/func/homebrew-prefix b/zsh/functions/homebrew-prefix similarity index 100% rename from zsh/func/homebrew-prefix rename to zsh/functions/homebrew-prefix diff --git a/zsh/func/import_cacert b/zsh/functions/import_cacert similarity index 100% rename from zsh/func/import_cacert rename to zsh/functions/import_cacert diff --git a/zsh/func/init-env b/zsh/functions/init-env similarity index 100% rename from zsh/func/init-env rename to zsh/functions/init-env diff --git a/zsh/func/init-env-darwin b/zsh/functions/init-env-darwin similarity index 100% rename from zsh/func/init-env-darwin rename to zsh/functions/init-env-darwin diff --git a/zsh/func/init-env-default-xdg-vars b/zsh/functions/init-env-default-xdg-vars similarity index 100% rename from zsh/func/init-env-default-xdg-vars rename to zsh/functions/init-env-default-xdg-vars diff --git a/zsh/func/init-env-path b/zsh/functions/init-env-path similarity index 100% rename from zsh/func/init-env-path rename to zsh/functions/init-env-path diff --git a/zsh/func/init-env-playdate b/zsh/functions/init-env-playdate similarity index 100% rename from zsh/func/init-env-playdate rename to zsh/functions/init-env-playdate diff --git a/zsh/func/init-env-python b/zsh/functions/init-env-python similarity index 100% rename from zsh/func/init-env-python rename to zsh/functions/init-env-python diff --git a/zsh/func/init-env-tilde-paths b/zsh/functions/init-env-tilde-paths similarity index 100% rename from zsh/func/init-env-tilde-paths rename to zsh/functions/init-env-tilde-paths diff --git a/zsh/func/init-env-vi b/zsh/functions/init-env-vi similarity index 100% rename from zsh/func/init-env-vi rename to zsh/functions/init-env-vi diff --git a/zsh/func/init-rc-aliases b/zsh/functions/init-rc-aliases similarity index 100% rename from zsh/func/init-rc-aliases rename to zsh/functions/init-rc-aliases diff --git a/zsh/func/init-rc-app-environments b/zsh/functions/init-rc-app-environments similarity index 100% rename from zsh/func/init-rc-app-environments rename to zsh/functions/init-rc-app-environments diff --git a/zsh/func/init-rc-completion b/zsh/functions/init-rc-completion similarity index 100% rename from zsh/func/init-rc-completion rename to zsh/functions/init-rc-completion diff --git a/zsh/func/init-rc-darwin b/zsh/functions/init-rc-darwin similarity index 100% rename from zsh/func/init-rc-darwin rename to zsh/functions/init-rc-darwin diff --git a/zsh/func/init-rc-linux b/zsh/functions/init-rc-linux similarity index 100% rename from zsh/func/init-rc-linux rename to zsh/functions/init-rc-linux diff --git a/zsh/func/init-rc-ls b/zsh/functions/init-rc-ls similarity index 100% rename from zsh/func/init-rc-ls rename to zsh/functions/init-rc-ls diff --git a/zsh/func/init-rc-prompt b/zsh/functions/init-rc-prompt similarity index 100% rename from zsh/func/init-rc-prompt rename to zsh/functions/init-rc-prompt diff --git a/zsh/func/init-rc-zle b/zsh/functions/init-rc-zle similarity index 100% rename from zsh/func/init-rc-zle rename to zsh/functions/init-rc-zle diff --git a/zsh/func/init-rc-zsh-history b/zsh/functions/init-rc-zsh-history similarity index 100% rename from zsh/func/init-rc-zsh-history rename to zsh/functions/init-rc-zsh-history diff --git a/zsh/func/init-rc-zsh-options b/zsh/functions/init-rc-zsh-options similarity index 100% rename from zsh/func/init-rc-zsh-options rename to zsh/functions/init-rc-zsh-options diff --git a/zsh/func/init_profile_darwin b/zsh/functions/init_profile_darwin similarity index 100% rename from zsh/func/init_profile_darwin rename to zsh/functions/init_profile_darwin diff --git a/zsh/func/init_profile_darwin_say_hello b/zsh/functions/init_profile_darwin_say_hello similarity index 100% rename from zsh/func/init_profile_darwin_say_hello rename to zsh/functions/init_profile_darwin_say_hello diff --git a/zsh/func/init_rc_fpath_darwin b/zsh/functions/init_rc_fpath_darwin similarity index 100% rename from zsh/func/init_rc_fpath_darwin rename to zsh/functions/init_rc_fpath_darwin diff --git a/zsh/func/init_xcode b/zsh/functions/init_xcode similarity index 100% rename from zsh/func/init_xcode rename to zsh/functions/init_xcode diff --git a/zsh/func/init_zsh_functions b/zsh/functions/init_zsh_functions similarity index 100% rename from zsh/func/init_zsh_functions rename to zsh/functions/init_zsh_functions diff --git a/zsh/func/list_tmux_sessions b/zsh/functions/list_tmux_sessions similarity index 100% rename from zsh/func/list_tmux_sessions rename to zsh/functions/list_tmux_sessions diff --git a/zsh/func/load_module b/zsh/functions/load_module similarity index 100% rename from zsh/func/load_module rename to zsh/functions/load_module diff --git a/zsh/func/neovim_init_once b/zsh/functions/neovim_init_once similarity index 100% rename from zsh/func/neovim_init_once rename to zsh/functions/neovim_init_once diff --git a/zsh/func/nethack b/zsh/functions/nethack similarity index 100% rename from zsh/func/nethack rename to zsh/functions/nethack diff --git a/zsh/func/open-xcode b/zsh/functions/open-xcode similarity index 100% rename from zsh/func/open-xcode rename to zsh/functions/open-xcode diff --git a/zsh/func/prepend_to_path b/zsh/functions/prepend_to_path similarity index 100% rename from zsh/func/prepend_to_path rename to zsh/functions/prepend_to_path diff --git a/zsh/func/prompt_colorize b/zsh/functions/prompt_colorize similarity index 100% rename from zsh/func/prompt_colorize rename to zsh/functions/prompt_colorize diff --git a/zsh/func/prompt_loquacious_setup b/zsh/functions/prompt_loquacious_setup similarity index 100% rename from zsh/func/prompt_loquacious_setup rename to zsh/functions/prompt_loquacious_setup diff --git a/zsh/func/refresh_system_tags b/zsh/functions/refresh_system_tags similarity index 100% rename from zsh/func/refresh_system_tags rename to zsh/functions/refresh_system_tags diff --git a/zsh/func/setup-cpython b/zsh/functions/setup-cpython similarity index 100% rename from zsh/func/setup-cpython rename to zsh/functions/setup-cpython diff --git a/zsh/func/setup_android b/zsh/functions/setup_android similarity index 100% rename from zsh/func/setup_android rename to zsh/functions/setup_android diff --git a/zsh/func/solarized b/zsh/functions/solarized similarity index 100% rename from zsh/func/solarized rename to zsh/functions/solarized diff --git a/zsh/func/up b/zsh/functions/up similarity index 100% rename from zsh/func/up rename to zsh/functions/up diff --git a/zsh/func/update-path b/zsh/functions/update-path similarity index 100% rename from zsh/func/update-path rename to zsh/functions/update-path diff --git a/zshenv b/zshenv index bea316a..fd60ea6 100644 --- a/zshenv +++ b/zshenv @@ -25,7 +25,7 @@ function init-env-fpath { local -r fpath_candidates=( \ "$DOTFILES_HOME/zsh/${SYS}-functions" \ - "$DOTFILES_HOME/zsh/func" \ + "$DOTFILES_HOME/zsh/functions" \ ) # Process the array in reverse order (`Oa` means "descending index order", From 1f088a1e8ad2744d2178cb3bf61980368b60b8a1 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 19 Jan 2026 11:29:34 -0700 Subject: [PATCH 82/93] [zsh] Remove init_zsh_functions -- no longer used --- zsh/functions/init_zsh_functions | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 zsh/functions/init_zsh_functions diff --git a/zsh/functions/init_zsh_functions b/zsh/functions/init_zsh_functions deleted file mode 100644 index 5f53b8b..0000000 --- a/zsh/functions/init_zsh_functions +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env zsh -# Eryn Wells - -autoload load_module - -local myfpath="$HOME/.zsh/func" - -for func in $myfpath/*; do - [[ ! -e "$func" || -d "$func" ]] && continue - - local functionName=`basename $func` - [[ "$functionName" =~ "prompt_*" ]] && continue - [[ "$functionName" =~ "init_*" ]] && continue - - autoload -Uz $functionName -done From d5f7b3e04cdbf820c1139a1492e78753b3e4dd8b Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 19 Jan 2026 18:04:17 -0800 Subject: [PATCH 83/93] [git] Remove excludesfile directive This setting has always been the default. Remove it so git just uses its internal default. --- gitconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/gitconfig b/gitconfig index 2294436..0c878ca 100644 --- a/gitconfig +++ b/gitconfig @@ -4,7 +4,6 @@ [core] editor = nvim quotepath = false - excludesfile = ~/.gitignore [color] ui = auto [alias] From e45c1694af34bfb4b3b90606134bdba7e73fefea Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 21 Jan 2026 08:23:44 -0800 Subject: [PATCH 84/93] [git] Move gitconfig and gitignore to git/ --- gitconfig => git/config | 0 gitignore => git/ignore | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename gitconfig => git/config (100%) rename gitignore => git/ignore (100%) diff --git a/gitconfig b/git/config similarity index 100% rename from gitconfig rename to git/config diff --git a/gitignore b/git/ignore similarity index 100% rename from gitignore rename to git/ignore From 5b567ad2ad155d38bc7b9d62ab4babfcbc682ea9 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 24 Jan 2026 15:25:05 -0800 Subject: [PATCH 85/93] [nvim] Move neovim config to /nvim --- {config/nvim => nvim}/UltiSnips/lua.snippets | 0 {config/nvim => nvim}/UltiSnips/python.snippets | 0 {config/nvim => nvim}/UltiSnips/rust.snippets | 0 {config/nvim => nvim}/after/ftplugin/css.lua | 0 {config/nvim => nvim}/after/ftplugin/gitcommit.vim | 0 {config/nvim => nvim}/after/ftplugin/gohtmltmpl.lua | 0 {config/nvim => nvim}/after/ftplugin/html.lua | 0 {config/nvim => nvim}/after/ftplugin/lua.lua | 0 {config/nvim => nvim}/after/ftplugin/python.lua | 0 {config/nvim => nvim}/after/ftplugin/rust.lua | 0 {config/nvim => nvim}/after/ftplugin/text.vim | 0 {config/nvim => nvim}/after/ftplugin/zsh.lua | 0 {config/nvim => nvim}/after/plugin/gitgutter.lua | 0 {config/nvim => nvim}/after/plugin/treesitter.lua | 0 {config/nvim => nvim}/after/syntax/css.vim | 0 {config/nvim => nvim}/ftdetect/gohtmltmpl.lua | 0 {config/nvim => nvim}/ftdetect/make.lua | 0 {config/nvim => nvim}/ftdetect/zsh.lua | 0 {config/nvim => nvim}/init.lua | 0 {config/nvim => nvim}/lua/autocommands.lua | 0 {config/nvim => nvim}/lua/colors.lua | 0 {config/nvim => nvim}/lua/configuration.lua | 0 {config/nvim => nvim}/lua/diagnostics.lua | 0 {config/nvim => nvim}/lua/gui.lua | 0 {config/nvim => nvim}/lua/keys.lua | 0 {config/nvim => nvim}/lua/lsp.lua | 0 {config/nvim => nvim}/lua/treesitter.lua | 0 {config/nvim => nvim}/syntax/gocsstmpl.vim | 0 28 files changed, 0 insertions(+), 0 deletions(-) rename {config/nvim => nvim}/UltiSnips/lua.snippets (100%) rename {config/nvim => nvim}/UltiSnips/python.snippets (100%) rename {config/nvim => nvim}/UltiSnips/rust.snippets (100%) rename {config/nvim => nvim}/after/ftplugin/css.lua (100%) rename {config/nvim => nvim}/after/ftplugin/gitcommit.vim (100%) rename {config/nvim => nvim}/after/ftplugin/gohtmltmpl.lua (100%) rename {config/nvim => nvim}/after/ftplugin/html.lua (100%) rename {config/nvim => nvim}/after/ftplugin/lua.lua (100%) rename {config/nvim => nvim}/after/ftplugin/python.lua (100%) rename {config/nvim => nvim}/after/ftplugin/rust.lua (100%) rename {config/nvim => nvim}/after/ftplugin/text.vim (100%) rename {config/nvim => nvim}/after/ftplugin/zsh.lua (100%) rename {config/nvim => nvim}/after/plugin/gitgutter.lua (100%) rename {config/nvim => nvim}/after/plugin/treesitter.lua (100%) rename {config/nvim => nvim}/after/syntax/css.vim (100%) rename {config/nvim => nvim}/ftdetect/gohtmltmpl.lua (100%) rename {config/nvim => nvim}/ftdetect/make.lua (100%) rename {config/nvim => nvim}/ftdetect/zsh.lua (100%) rename {config/nvim => nvim}/init.lua (100%) rename {config/nvim => nvim}/lua/autocommands.lua (100%) rename {config/nvim => nvim}/lua/colors.lua (100%) rename {config/nvim => nvim}/lua/configuration.lua (100%) rename {config/nvim => nvim}/lua/diagnostics.lua (100%) rename {config/nvim => nvim}/lua/gui.lua (100%) rename {config/nvim => nvim}/lua/keys.lua (100%) rename {config/nvim => nvim}/lua/lsp.lua (100%) rename {config/nvim => nvim}/lua/treesitter.lua (100%) rename {config/nvim => nvim}/syntax/gocsstmpl.vim (100%) diff --git a/config/nvim/UltiSnips/lua.snippets b/nvim/UltiSnips/lua.snippets similarity index 100% rename from config/nvim/UltiSnips/lua.snippets rename to nvim/UltiSnips/lua.snippets diff --git a/config/nvim/UltiSnips/python.snippets b/nvim/UltiSnips/python.snippets similarity index 100% rename from config/nvim/UltiSnips/python.snippets rename to nvim/UltiSnips/python.snippets diff --git a/config/nvim/UltiSnips/rust.snippets b/nvim/UltiSnips/rust.snippets similarity index 100% rename from config/nvim/UltiSnips/rust.snippets rename to nvim/UltiSnips/rust.snippets diff --git a/config/nvim/after/ftplugin/css.lua b/nvim/after/ftplugin/css.lua similarity index 100% rename from config/nvim/after/ftplugin/css.lua rename to nvim/after/ftplugin/css.lua diff --git a/config/nvim/after/ftplugin/gitcommit.vim b/nvim/after/ftplugin/gitcommit.vim similarity index 100% rename from config/nvim/after/ftplugin/gitcommit.vim rename to nvim/after/ftplugin/gitcommit.vim diff --git a/config/nvim/after/ftplugin/gohtmltmpl.lua b/nvim/after/ftplugin/gohtmltmpl.lua similarity index 100% rename from config/nvim/after/ftplugin/gohtmltmpl.lua rename to nvim/after/ftplugin/gohtmltmpl.lua diff --git a/config/nvim/after/ftplugin/html.lua b/nvim/after/ftplugin/html.lua similarity index 100% rename from config/nvim/after/ftplugin/html.lua rename to nvim/after/ftplugin/html.lua diff --git a/config/nvim/after/ftplugin/lua.lua b/nvim/after/ftplugin/lua.lua similarity index 100% rename from config/nvim/after/ftplugin/lua.lua rename to nvim/after/ftplugin/lua.lua diff --git a/config/nvim/after/ftplugin/python.lua b/nvim/after/ftplugin/python.lua similarity index 100% rename from config/nvim/after/ftplugin/python.lua rename to nvim/after/ftplugin/python.lua diff --git a/config/nvim/after/ftplugin/rust.lua b/nvim/after/ftplugin/rust.lua similarity index 100% rename from config/nvim/after/ftplugin/rust.lua rename to nvim/after/ftplugin/rust.lua diff --git a/config/nvim/after/ftplugin/text.vim b/nvim/after/ftplugin/text.vim similarity index 100% rename from config/nvim/after/ftplugin/text.vim rename to nvim/after/ftplugin/text.vim diff --git a/config/nvim/after/ftplugin/zsh.lua b/nvim/after/ftplugin/zsh.lua similarity index 100% rename from config/nvim/after/ftplugin/zsh.lua rename to nvim/after/ftplugin/zsh.lua diff --git a/config/nvim/after/plugin/gitgutter.lua b/nvim/after/plugin/gitgutter.lua similarity index 100% rename from config/nvim/after/plugin/gitgutter.lua rename to nvim/after/plugin/gitgutter.lua diff --git a/config/nvim/after/plugin/treesitter.lua b/nvim/after/plugin/treesitter.lua similarity index 100% rename from config/nvim/after/plugin/treesitter.lua rename to nvim/after/plugin/treesitter.lua diff --git a/config/nvim/after/syntax/css.vim b/nvim/after/syntax/css.vim similarity index 100% rename from config/nvim/after/syntax/css.vim rename to nvim/after/syntax/css.vim diff --git a/config/nvim/ftdetect/gohtmltmpl.lua b/nvim/ftdetect/gohtmltmpl.lua similarity index 100% rename from config/nvim/ftdetect/gohtmltmpl.lua rename to nvim/ftdetect/gohtmltmpl.lua diff --git a/config/nvim/ftdetect/make.lua b/nvim/ftdetect/make.lua similarity index 100% rename from config/nvim/ftdetect/make.lua rename to nvim/ftdetect/make.lua diff --git a/config/nvim/ftdetect/zsh.lua b/nvim/ftdetect/zsh.lua similarity index 100% rename from config/nvim/ftdetect/zsh.lua rename to nvim/ftdetect/zsh.lua diff --git a/config/nvim/init.lua b/nvim/init.lua similarity index 100% rename from config/nvim/init.lua rename to nvim/init.lua diff --git a/config/nvim/lua/autocommands.lua b/nvim/lua/autocommands.lua similarity index 100% rename from config/nvim/lua/autocommands.lua rename to nvim/lua/autocommands.lua diff --git a/config/nvim/lua/colors.lua b/nvim/lua/colors.lua similarity index 100% rename from config/nvim/lua/colors.lua rename to nvim/lua/colors.lua diff --git a/config/nvim/lua/configuration.lua b/nvim/lua/configuration.lua similarity index 100% rename from config/nvim/lua/configuration.lua rename to nvim/lua/configuration.lua diff --git a/config/nvim/lua/diagnostics.lua b/nvim/lua/diagnostics.lua similarity index 100% rename from config/nvim/lua/diagnostics.lua rename to nvim/lua/diagnostics.lua diff --git a/config/nvim/lua/gui.lua b/nvim/lua/gui.lua similarity index 100% rename from config/nvim/lua/gui.lua rename to nvim/lua/gui.lua diff --git a/config/nvim/lua/keys.lua b/nvim/lua/keys.lua similarity index 100% rename from config/nvim/lua/keys.lua rename to nvim/lua/keys.lua diff --git a/config/nvim/lua/lsp.lua b/nvim/lua/lsp.lua similarity index 100% rename from config/nvim/lua/lsp.lua rename to nvim/lua/lsp.lua diff --git a/config/nvim/lua/treesitter.lua b/nvim/lua/treesitter.lua similarity index 100% rename from config/nvim/lua/treesitter.lua rename to nvim/lua/treesitter.lua diff --git a/config/nvim/syntax/gocsstmpl.vim b/nvim/syntax/gocsstmpl.vim similarity index 100% rename from config/nvim/syntax/gocsstmpl.vim rename to nvim/syntax/gocsstmpl.vim From f462cf28a7c65abd4e560a179aec900952117c71 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 24 Jan 2026 16:22:22 -0800 Subject: [PATCH 86/93] [zsh] Move ZSH init files to zsh/ --- zprofile => zsh/zprofile | 0 zshenv => zsh/zshenv | 0 zshrc => zsh/zshrc | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename zprofile => zsh/zprofile (100%) rename zshenv => zsh/zshenv (100%) rename zshrc => zsh/zshrc (100%) diff --git a/zprofile b/zsh/zprofile similarity index 100% rename from zprofile rename to zsh/zprofile diff --git a/zshenv b/zsh/zshenv similarity index 100% rename from zshenv rename to zsh/zshenv diff --git a/zshrc b/zsh/zshrc similarity index 100% rename from zshrc rename to zsh/zshrc From dfd810e0b0240900c27be328d4b47bb034b6e8a2 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 25 Jan 2026 16:23:56 -0800 Subject: [PATCH 87/93] [emacs] Move emacs config to emacs/init.el This file is symlinked to ~/.config/emacs --- emacs => emacs/init.el | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename emacs => emacs/init.el (100%) diff --git a/emacs b/emacs/init.el similarity index 100% rename from emacs rename to emacs/init.el From 70712ad4839b751ebcb7aed18b051649c7620ebf Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 25 Jan 2026 16:24:22 -0800 Subject: [PATCH 88/93] [tmux] Move config to tmux/ --- {config/tmux => tmux}/tmux.conf | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {config/tmux => tmux}/tmux.conf (100%) diff --git a/config/tmux/tmux.conf b/tmux/tmux.conf similarity index 100% rename from config/tmux/tmux.conf rename to tmux/tmux.conf From a11355afc4ac7a02ffb8ccc0c9818458b43a8b39 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 25 Jan 2026 17:44:09 -0800 Subject: [PATCH 89/93] [mutt] Move muttrc to mutt/ --- muttrc => mutt/muttrc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename muttrc => mutt/muttrc (90%) diff --git a/muttrc b/mutt/muttrc similarity index 90% rename from muttrc rename to mutt/muttrc index 6ec822c..14e04f3 100644 --- a/muttrc +++ b/mutt/muttrc @@ -19,9 +19,9 @@ set timeout=300 set imap_keepalive=300 # Caching -set header_cache="~/.mutt/cache/headers" -set message_cachedir="~/.mutt/cache/bodies" -set certificate_file="~/.mutt/certificates" +set header_cache="~/.cache/mutt/headers" +set message_cachedir="~/.cache/mutt/bodies" +set certificate_file="~/.cache/mutt/certificates" set use_from=yes set envelope_from=yes @@ -50,14 +50,14 @@ hdr_order Date: From: To: Cc: Subject: # Aliases set reverse_alias=yes -set alias_file="~/.mutt/aliases" +set alias_file="~/.config/mutt/aliases" # Composing and Sending set edit_headers=yes set include=yes # HTML email :( -set mailcap_path="~/.mutt/mailcap" +set mailcap_path="~/.config/mutt/mailcap" auto_view text/html alternative_order text/html text/plain text/enriched @@ -116,4 +116,4 @@ color quoted1 color37 default color quoted2 color64 default # Solarized (light theme) colors -#source ~/.mutt/mutt-colors-solarized/mutt-colors-solarized-dark-256.muttrc +#source ~/.config/mutt/mutt-colors-solarized/mutt-colors-solarized-dark-256.muttrc From e1886010532c5008e2d0e42c604282e3f23f30da Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 25 Jan 2026 17:44:44 -0800 Subject: [PATCH 90/93] [nvim] Update lsp config after deprecation of lspconfig module --- nvim/after/plugin/treesitter.lua | 4 ++-- nvim/lua/lsp.lua | 30 ++++++++++++++---------------- nvim/lua/treesitter.lua | 2 +- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/nvim/after/plugin/treesitter.lua b/nvim/after/plugin/treesitter.lua index 4f9ee81..f1ebcef 100644 --- a/nvim/after/plugin/treesitter.lua +++ b/nvim/after/plugin/treesitter.lua @@ -1,6 +1,6 @@ -local treesitter_configs = require 'nvim-treesitter.configs' +local treesitter = require 'nvim-treesitter' -treesitter_configs.setup { +treesitter.setup { ensure_installed = { "lua", "vim" }, sync_install = true, auto_install = true, diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua index 8c6f913..0a4277d 100644 --- a/nvim/lua/lsp.lua +++ b/nvim/lua/lsp.lua @@ -3,8 +3,6 @@ local clangd_extensions = require 'clangd_extensions' local cmp = require 'cmp' -local lspconfig = require 'lspconfig' - local keys = require 'keys' cmp.setup { @@ -60,7 +58,7 @@ local function on_attach(client, buffer_number) keys.init_lsp_key_mappings(buffer_number) end -lspconfig.clangd.setup { +vim.lsp.config("clangd", { on_attach = function(client, buffer_number) on_attach(client, buffer_number) @@ -69,24 +67,24 @@ lspconfig.clangd.setup { clangd_inlay_hints.set_inlay_hints() end, capabilities = cmp_capabilities, -} +}) -lspconfig.eslint.setup { +vim.lsp.config("eslint", { on_attach = on_attach, capabilities = cmp_capabilities, -} +}) -lspconfig.ts_ls.setup { +vim.lsp.config("ts_ls", { on_attach = on_attach, capabilities = cmp_capabilities, -} +}) -lspconfig.html.setup { +vim.lsp.config("html", { on_attach = on_attach, capabilities = cmp_capabilities, -} +}) -lspconfig.lua_ls.setup { +vim.lsp.config("lua_ls", { on_attach = on_attach, capabilities = cmp_capabilities, settings = { @@ -101,14 +99,14 @@ lspconfig.lua_ls.setup { }, }, }, -} +}) -lspconfig.pyright.setup { +vim.lsp.config("pyright", { on_attach = on_attach, capabilities = cmp_capabilities, -} +}) -lspconfig.rust_analyzer.setup { +vim.lsp.config("rust_analyzer", { on_attach = function(client, buffer_number) on_attach(client, buffer_number) end, @@ -139,4 +137,4 @@ lspconfig.rust_analyzer.setup { }, }, }, -} +}) diff --git a/nvim/lua/treesitter.lua b/nvim/lua/treesitter.lua index 3c198f1..c9cb59f 100644 --- a/nvim/lua/treesitter.lua +++ b/nvim/lua/treesitter.lua @@ -1,7 +1,7 @@ -- Treesitter configuration -- Eryn Wells -local treesitter = require 'nvim-treesitter.configs' +local treesitter = require 'nvim-treesitter' -- For some reason the Lua linter complains about missing fields here even -- though they're not requried. So, ignore the error. From 3669a7efc038a6f7d9f300e1c8af63674945945c Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 30 Jan 2026 09:57:56 -0800 Subject: [PATCH 91/93] [fortune] Rename bare fortune file with .txt extension; rewrite Makefile as a bmake style Makefile --- Fortune/Makefile | 19 +++++++++---------- Fortune/{eryn => eryn.txt} | 0 2 files changed, 9 insertions(+), 10 deletions(-) rename Fortune/{eryn => eryn.txt} (100%) diff --git a/Fortune/Makefile b/Fortune/Makefile index 9a1c213..859c115 100644 --- a/Fortune/Makefile +++ b/Fortune/Makefile @@ -1,16 +1,15 @@ +# Makefile +# Eryn Wells -STRFILE=strfile +STRFILE != which strfile +DATFILES := eryn.dat -DATFILES=eryn.dat +.SUFFIXES : .dat .txt -.PHONY: all clean +.txt.dat : + $(STRFILE) $(.IMPSRC) $(.TARGET) -%.dat: % - $(STRFILE) $^ $@ +all : $(DATFILES) -.PHONY: all -all: $(DATFILES) - -.PHONY: clean -clean: +clean : .PHONY rm -f $(DATFILES) diff --git a/Fortune/eryn b/Fortune/eryn.txt similarity index 100% rename from Fortune/eryn rename to Fortune/eryn.txt From b36b4ac390885ce459ff244e54f9ba502078d174 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 30 Jan 2026 10:11:20 -0800 Subject: [PATCH 92/93] [zsh] Define the XDG user directories --- zsh/functions/init-env-default-xdg-vars | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/zsh/functions/init-env-default-xdg-vars b/zsh/functions/init-env-default-xdg-vars index ed5bb66..c1f5d63 100644 --- a/zsh/functions/init-env-default-xdg-vars +++ b/zsh/functions/init-env-default-xdg-vars @@ -13,12 +13,24 @@ function init-env-default-xdg-vars zparseopts -a opt_args -D -E -F - \ {c,-create,-no-create}=opt_create + # Base directories export \ XDG_BIN_HOME=${XDG_BIN_HOME:-$HOME/.local/bin} \ XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} \ XDG_CONFIG_HOME=${XDG_CACHE_HOME:-$HOME/.config} \ XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} \ - XDG_STATE_HOME=${XDG_DATA_HOME:-$HOME/.local/state} + XDG_STATE_HOME=${XDG_DATA_HOME:-$HOME/.local/state} \ + XDG_RUNTIME_DIR=${XDG_DATA_HOME:-$HOME/.local/var} + + # User directories + export \ + XDG_DESKTOP_DIR=${XDG_DESKTOP_DIR:-$HOME/Desktop} \ + XDG_DOCUMENTS_DIR=${XDG_DOCUMENTS_DIR:-$HOME/Document} \ + XDG_DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads} \ + XDG_MUSIC_DIR=${XDG_MUSIC_DIR:-$HOME/Music} \ + XDG_PICTURES_DIR=${XDG_PICTURES_DIR:-$HOME/Pictures} \ + XDG_PUBLICSHARE_DIR=${XDG_PUBLICSHARE_DIR:-$HOME/Public} \ + XDG_VIDEOS_DIR=${XDG_VIDEOS_DIR:-$HOME/Video} if [[ $opt_create[(I)--no-create] -ne 0 ]]; then mkdir -p -m 0700 \ From 929f95139172533f29c4d8526f994b94303349a0 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Fri, 30 Jan 2026 10:11:46 -0800 Subject: [PATCH 93/93] [zsh] Move dotfiles config to XDG_CONFIG_HOME/dotfiles/home --- zsh/zshenv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/zshenv b/zsh/zshenv index fd60ea6..452e17e 100644 --- a/zsh/zshenv +++ b/zsh/zshenv @@ -7,7 +7,7 @@ export SYS=`uname -s | tr A-Z a-z` function init-env-dotfiles-path { - local dotfiles_config="$HOME/.config/dotfiles-home" + local dotfiles_config="$HOME/.config/dotfiles/home" if [[ -f "$dotfiles_config" ]]; then export DOTFILES_HOME=$(cat "$dotfiles_config") return