From 1b18fbaa583e282ed59bc26876b6c78f0a28ac38 Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Sat, 10 Aug 2024 11:53:34 -0500 Subject: fix-paths --- common/.clang-format.org | 9 ++++ common/.gitconfig.org | 18 ++++++++ common/.profile.org | 18 ++++++++ common/.zshrc.org | 113 +++++++++++++++++++++++++++++++++++++++++++++++ common/clang-format.org | 9 ---- common/gitconfig.org | 18 -------- common/profile.org | 18 -------- common/zshrc.org | 113 ----------------------------------------------- gentoo/.clang-format.org | 1 + gentoo/.gitconfig.org | 1 + gentoo/.profile.org | 1 + gentoo/.zshrc.org | 1 + gentoo/clang-format.org | 1 - gentoo/gitconfig.org | 1 - gentoo/profile.org | 1 - gentoo/zshrc.org | 1 - macos/.clang-format.org | 1 + macos/.gitconfig.org | 1 + macos/.profile.org | 1 + macos/.zshrc.org | 1 + macos/clang-format.org | 1 - macos/gitconfig.org | 1 - macos/profile.org | 1 - macos/zshrc.org | 1 - 24 files changed, 166 insertions(+), 166 deletions(-) create mode 100644 common/.clang-format.org create mode 100644 common/.gitconfig.org create mode 100644 common/.profile.org create mode 100644 common/.zshrc.org delete mode 100644 common/clang-format.org delete mode 100644 common/gitconfig.org delete mode 100644 common/profile.org delete mode 100644 common/zshrc.org create mode 120000 gentoo/.clang-format.org create mode 120000 gentoo/.gitconfig.org create mode 120000 gentoo/.profile.org create mode 120000 gentoo/.zshrc.org delete mode 120000 gentoo/clang-format.org delete mode 120000 gentoo/gitconfig.org delete mode 120000 gentoo/profile.org delete mode 120000 gentoo/zshrc.org create mode 120000 macos/.clang-format.org create mode 120000 macos/.gitconfig.org create mode 120000 macos/.profile.org create mode 120000 macos/.zshrc.org delete mode 120000 macos/clang-format.org delete mode 120000 macos/gitconfig.org delete mode 120000 macos/profile.org delete mode 120000 macos/zshrc.org diff --git a/common/.clang-format.org b/common/.clang-format.org new file mode 100644 index 0000000..6c38b3b --- /dev/null +++ b/common/.clang-format.org @@ -0,0 +1,9 @@ +#+title: Clang-Format Settings +Use a style similar to Linux kernel style (but with 4-wide indents and spaces over tabs). +#+begin_src yaml :tangle ~/.clang-format +BasedOnStyle: LLVM +IndentWidth: 4 +BreakBeforeBraces: Linux +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false +#+end_src diff --git a/common/.gitconfig.org b/common/.gitconfig.org new file mode 100644 index 0000000..c907204 --- /dev/null +++ b/common/.gitconfig.org @@ -0,0 +1,18 @@ +#+title: Git Configuration +Define my full name and email. +#+begin_src conf :tangle ~/.gitconfig + [user] + name = Jacob Janzen + email = jjanzenn@proton.me +#+end_src +Use =main= over =master=. +#+begin_src conf :tangle ~/.gitconfig + [init] + defaultBranch = main +#+end_src + +Make =pull= rebase on conflict. +#+begin_src conf :tangle ~/.gitconfig + [pull] + rebase = true +#+end_src diff --git a/common/.profile.org b/common/.profile.org new file mode 100644 index 0000000..87bbbaa --- /dev/null +++ b/common/.profile.org @@ -0,0 +1,18 @@ +#+TITLE: =.profile= Settings +* Path +Add items to the path. +#+begin_src sh :tangle ~/.profile +export PATH="$HOME/.local/share/fzf-zsh-plugin/bin:$HOME/node_modules/.bin:$HOME/.emacs.d/bin:$HOME/bin:$HOME/gems/bin:$HOME/.local/bin:$HOME/go/bin:$PATH" +#+end_src + +* SSH Agent +Run =ssh-agent= if =ssh-agent= is not already running on my Gentoo system. Ensure that the authorization socket is available in the shell. +#+begin_src sh :tangle ~/.profile + if [ "$(uname)" = 'Linux' ] && grep 'ID=gentoo' /etc/os-release; then + if [ ! -S ~/.ssh/ssh_auth_sock ]; then + eval `ssh-agent` > /dev/null + ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock + fi + export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock + fi +#+end_src diff --git a/common/.zshrc.org b/common/.zshrc.org new file mode 100644 index 0000000..4ff5524 --- /dev/null +++ b/common/.zshrc.org @@ -0,0 +1,113 @@ +#+title: ZSH Configuration +Set up completions. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + zstyle ':completion:*' completer _expand _complete _ignored _approximate + zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*' + zstyle :compinstall filename '/home/jjanzen/.zshrc' + autoload -U compinit promptinit + compinit + promptinit +#+end_src + +Enable Gentoo completions on my Gentoo system. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + if [ "$(uname)" = 'Linux' ] && grep 'ID=gentoo' /etc/os-release; then + prompt gentoo + fi +#+end_src + +Set up the history with 1000 entries and ignored duplicate commands. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + HISTFILE=~/.histfile + HISTSIZE=1000 + SAVEHIST=1000 + setopt hist_ignore_all_dups +#+end_src + +Enable automatic =cd=. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + setopt autocd +#+end_src + +Enable extended glob. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + setopt extendedglob +#+end_src + +If a glob returns nothing, don't keep the =*=. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + setopt nullglob +#+end_src + +Report the status of background jobs immediately. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + setopt notify +#+end_src + +Disable the beep. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + unsetopt beep +#+end_src + +Use =vi= keybindings. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + bindkey -v +#+end_src + +Use =lesspipe= back end for =less= if it is installed. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + which lesspipe.sh &> /dev/null && export LESSOPEN="|lesspipe.sh %s" +#+end_src + +Use =eza= as my =ls= command if it is installed. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + which eza &> /dev/null && alias ls=eza +#+end_src + +Use Neovim as my =vi= and =vim= application if it is installed. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + which nvim &> /dev/null && alias vi=nvim && alias vim=nvim +#+end_src + +If the Firefox binary is called =firefox-bin=, let =firefox= also run =firefox-bin=. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + which firefox-bin &> /dev/null && alias firefox=firefox-bin +#+end_src + +Lazy =ls= shortcuts. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + alias ll='ls -alF' + alias la='ls -a' + alias l='ls -F' + alias sl='ls' +#+end_src + +*** Prompt +Define function to write out icons for the git status. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + parse_git_dirty() { + git_status="$(git status 2> /dev/null)" + [[ "$git_status" =~ "use \"git push\" to publish your local commits" ]] && echo -n " %F{green}%f" + [[ "$git_status" =~ "Changes to be committed:" ]] && echo -n " %F{magenta}%f" + [[ "$git_status" =~ "Changes not staged for commit:" ]] && echo -n " %F{yellow}%f" + [[ "$git_status" =~ "Untracked files:" ]] && echo -n " %F{red}%f" + } +#+end_src + +Enable git status in the prompt. +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + setopt prompt_subst + autoload -Uz vcs_info + precmd () { vcs_info } + zstyle ':vcs_info:*' formats ' %F{blue}%b%f' # git(main) +#+end_src + +Define the prompt as follows: +- Error code (if applicable) +- Path using =~= for the home directory and truncating if too long +- Git branch +- Git status +- =$= to mark the start of the prompt +#+begin_src sh :tangle ~/.zshrc :mkdirp yes + PS1='%(?..%B%F{red}[%?%\]%f%b )%F{green}%20<...<%~%<<%f$vcs_info_msg_0_$(parse_git_dirty) $ ' +#+end_src diff --git a/common/clang-format.org b/common/clang-format.org deleted file mode 100644 index 6c38b3b..0000000 --- a/common/clang-format.org +++ /dev/null @@ -1,9 +0,0 @@ -#+title: Clang-Format Settings -Use a style similar to Linux kernel style (but with 4-wide indents and spaces over tabs). -#+begin_src yaml :tangle ~/.clang-format -BasedOnStyle: LLVM -IndentWidth: 4 -BreakBeforeBraces: Linux -AllowShortIfStatementsOnASingleLine: false -IndentCaseLabels: false -#+end_src diff --git a/common/gitconfig.org b/common/gitconfig.org deleted file mode 100644 index c907204..0000000 --- a/common/gitconfig.org +++ /dev/null @@ -1,18 +0,0 @@ -#+title: Git Configuration -Define my full name and email. -#+begin_src conf :tangle ~/.gitconfig - [user] - name = Jacob Janzen - email = jjanzenn@proton.me -#+end_src -Use =main= over =master=. -#+begin_src conf :tangle ~/.gitconfig - [init] - defaultBranch = main -#+end_src - -Make =pull= rebase on conflict. -#+begin_src conf :tangle ~/.gitconfig - [pull] - rebase = true -#+end_src diff --git a/common/profile.org b/common/profile.org deleted file mode 100644 index 87bbbaa..0000000 --- a/common/profile.org +++ /dev/null @@ -1,18 +0,0 @@ -#+TITLE: =.profile= Settings -* Path -Add items to the path. -#+begin_src sh :tangle ~/.profile -export PATH="$HOME/.local/share/fzf-zsh-plugin/bin:$HOME/node_modules/.bin:$HOME/.emacs.d/bin:$HOME/bin:$HOME/gems/bin:$HOME/.local/bin:$HOME/go/bin:$PATH" -#+end_src - -* SSH Agent -Run =ssh-agent= if =ssh-agent= is not already running on my Gentoo system. Ensure that the authorization socket is available in the shell. -#+begin_src sh :tangle ~/.profile - if [ "$(uname)" = 'Linux' ] && grep 'ID=gentoo' /etc/os-release; then - if [ ! -S ~/.ssh/ssh_auth_sock ]; then - eval `ssh-agent` > /dev/null - ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock - fi - export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock - fi -#+end_src diff --git a/common/zshrc.org b/common/zshrc.org deleted file mode 100644 index 4ff5524..0000000 --- a/common/zshrc.org +++ /dev/null @@ -1,113 +0,0 @@ -#+title: ZSH Configuration -Set up completions. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - zstyle ':completion:*' completer _expand _complete _ignored _approximate - zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*' - zstyle :compinstall filename '/home/jjanzen/.zshrc' - autoload -U compinit promptinit - compinit - promptinit -#+end_src - -Enable Gentoo completions on my Gentoo system. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - if [ "$(uname)" = 'Linux' ] && grep 'ID=gentoo' /etc/os-release; then - prompt gentoo - fi -#+end_src - -Set up the history with 1000 entries and ignored duplicate commands. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - HISTFILE=~/.histfile - HISTSIZE=1000 - SAVEHIST=1000 - setopt hist_ignore_all_dups -#+end_src - -Enable automatic =cd=. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - setopt autocd -#+end_src - -Enable extended glob. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - setopt extendedglob -#+end_src - -If a glob returns nothing, don't keep the =*=. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - setopt nullglob -#+end_src - -Report the status of background jobs immediately. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - setopt notify -#+end_src - -Disable the beep. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - unsetopt beep -#+end_src - -Use =vi= keybindings. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - bindkey -v -#+end_src - -Use =lesspipe= back end for =less= if it is installed. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - which lesspipe.sh &> /dev/null && export LESSOPEN="|lesspipe.sh %s" -#+end_src - -Use =eza= as my =ls= command if it is installed. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - which eza &> /dev/null && alias ls=eza -#+end_src - -Use Neovim as my =vi= and =vim= application if it is installed. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - which nvim &> /dev/null && alias vi=nvim && alias vim=nvim -#+end_src - -If the Firefox binary is called =firefox-bin=, let =firefox= also run =firefox-bin=. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - which firefox-bin &> /dev/null && alias firefox=firefox-bin -#+end_src - -Lazy =ls= shortcuts. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - alias ll='ls -alF' - alias la='ls -a' - alias l='ls -F' - alias sl='ls' -#+end_src - -*** Prompt -Define function to write out icons for the git status. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - parse_git_dirty() { - git_status="$(git status 2> /dev/null)" - [[ "$git_status" =~ "use \"git push\" to publish your local commits" ]] && echo -n " %F{green}%f" - [[ "$git_status" =~ "Changes to be committed:" ]] && echo -n " %F{magenta}%f" - [[ "$git_status" =~ "Changes not staged for commit:" ]] && echo -n " %F{yellow}%f" - [[ "$git_status" =~ "Untracked files:" ]] && echo -n " %F{red}%f" - } -#+end_src - -Enable git status in the prompt. -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - setopt prompt_subst - autoload -Uz vcs_info - precmd () { vcs_info } - zstyle ':vcs_info:*' formats ' %F{blue}%b%f' # git(main) -#+end_src - -Define the prompt as follows: -- Error code (if applicable) -- Path using =~= for the home directory and truncating if too long -- Git branch -- Git status -- =$= to mark the start of the prompt -#+begin_src sh :tangle ~/.zshrc :mkdirp yes - PS1='%(?..%B%F{red}[%?%\]%f%b )%F{green}%20<...<%~%<<%f$vcs_info_msg_0_$(parse_git_dirty) $ ' -#+end_src diff --git a/gentoo/.clang-format.org b/gentoo/.clang-format.org new file mode 120000 index 0000000..4b4ef61 --- /dev/null +++ b/gentoo/.clang-format.org @@ -0,0 +1 @@ +../common/.clang-format.org \ No newline at end of file diff --git a/gentoo/.gitconfig.org b/gentoo/.gitconfig.org new file mode 120000 index 0000000..b1e9907 --- /dev/null +++ b/gentoo/.gitconfig.org @@ -0,0 +1 @@ +../common/.gitconfig.org \ No newline at end of file diff --git a/gentoo/.profile.org b/gentoo/.profile.org new file mode 120000 index 0000000..6341fcf --- /dev/null +++ b/gentoo/.profile.org @@ -0,0 +1 @@ +../common/.profile.org \ No newline at end of file diff --git a/gentoo/.zshrc.org b/gentoo/.zshrc.org new file mode 120000 index 0000000..ccbdc43 --- /dev/null +++ b/gentoo/.zshrc.org @@ -0,0 +1 @@ +../common/.zshrc.org \ No newline at end of file diff --git a/gentoo/clang-format.org b/gentoo/clang-format.org deleted file mode 120000 index 960b79e..0000000 --- a/gentoo/clang-format.org +++ /dev/null @@ -1 +0,0 @@ -../common/clang-format.org \ No newline at end of file diff --git a/gentoo/gitconfig.org b/gentoo/gitconfig.org deleted file mode 120000 index e4e5534..0000000 --- a/gentoo/gitconfig.org +++ /dev/null @@ -1 +0,0 @@ -../common/gitconfig.org \ No newline at end of file diff --git a/gentoo/profile.org b/gentoo/profile.org deleted file mode 120000 index 7db75e0..0000000 --- a/gentoo/profile.org +++ /dev/null @@ -1 +0,0 @@ -../common/profile.org \ No newline at end of file diff --git a/gentoo/zshrc.org b/gentoo/zshrc.org deleted file mode 120000 index 8a52724..0000000 --- a/gentoo/zshrc.org +++ /dev/null @@ -1 +0,0 @@ -../common/zshrc.org \ No newline at end of file diff --git a/macos/.clang-format.org b/macos/.clang-format.org new file mode 120000 index 0000000..4b4ef61 --- /dev/null +++ b/macos/.clang-format.org @@ -0,0 +1 @@ +../common/.clang-format.org \ No newline at end of file diff --git a/macos/.gitconfig.org b/macos/.gitconfig.org new file mode 120000 index 0000000..b1e9907 --- /dev/null +++ b/macos/.gitconfig.org @@ -0,0 +1 @@ +../common/.gitconfig.org \ No newline at end of file diff --git a/macos/.profile.org b/macos/.profile.org new file mode 120000 index 0000000..6341fcf --- /dev/null +++ b/macos/.profile.org @@ -0,0 +1 @@ +../common/.profile.org \ No newline at end of file diff --git a/macos/.zshrc.org b/macos/.zshrc.org new file mode 120000 index 0000000..ccbdc43 --- /dev/null +++ b/macos/.zshrc.org @@ -0,0 +1 @@ +../common/.zshrc.org \ No newline at end of file diff --git a/macos/clang-format.org b/macos/clang-format.org deleted file mode 120000 index 960b79e..0000000 --- a/macos/clang-format.org +++ /dev/null @@ -1 +0,0 @@ -../common/clang-format.org \ No newline at end of file diff --git a/macos/gitconfig.org b/macos/gitconfig.org deleted file mode 120000 index e4e5534..0000000 --- a/macos/gitconfig.org +++ /dev/null @@ -1 +0,0 @@ -../common/gitconfig.org \ No newline at end of file diff --git a/macos/profile.org b/macos/profile.org deleted file mode 120000 index 7db75e0..0000000 --- a/macos/profile.org +++ /dev/null @@ -1 +0,0 @@ -../common/profile.org \ No newline at end of file diff --git a/macos/zshrc.org b/macos/zshrc.org deleted file mode 120000 index 8a52724..0000000 --- a/macos/zshrc.org +++ /dev/null @@ -1 +0,0 @@ -../common/zshrc.org \ No newline at end of file -- cgit v1.2.3