From f793e7aaa00f07551c04e0cf327e6b99bb82111d Mon Sep 17 00:00:00 2001 From: Mari Date: Mon, 19 Jul 2021 01:35:16 -0400 Subject: [PATCH] massive overhaul to switch to zsh --- .gitignore | 1 + .gitmodules | 7 +- bash/bash_aliases.sh | 103 ++++++++++ bash_tmux.sh => bash/bash_tmux.sh | 22 +-- git-aware-prompt => bash/git-aware-prompt | 0 bash_aliases.sh | 140 -------------- per-host/Adversary/.bash_aliases | 4 - per-host/Adversary/.bash_aliases-common | 1 - per-host/Adversary/.inputrc-common | 1 - per-host/Adversary/.ssh/.rc-common | 1 - per-host/Adversary/.ssh/authorized_keys | 1 - per-host/Adversary/.ssh/config | 1 - per-host/Adversary/.ssh/known_hosts | 1 - per-host/Adversary/.ssh/rc | 2 - per-host/Adversary/.tmux.conf | 1 - per-host/Adversary/.tmux.conf-common | 1 - per-host/Adversary/.vimrc | 1 - per-host/Adversary/.vimrc-common | 1 - per-host/EarthDaughter/.bash_aliases | 4 - per-host/EarthDaughter/.bash_aliases-common | 1 - per-host/EarthDaughter/.inputrc-common | 1 - per-host/EarthDaughter/.ssh/.rc-common | 1 - per-host/EarthDaughter/.ssh/authorized_keys | 1 - per-host/EarthDaughter/.ssh/config | 1 - per-host/EarthDaughter/.ssh/known_hosts | 1 - per-host/EarthDaughter/.ssh/rc | 2 - per-host/EarthDaughter/.tmux.conf | 1 - per-host/EarthDaughter/.tmux.conf-common | 1 - per-host/EarthDaughter/.vimrc | 1 - per-host/EarthDaughter/.vimrc-common | 1 - per-host/MoonMother/.bash_aliases | 4 - per-host/MoonMother/.bash_aliases-common | 1 - per-host/MoonMother/.config/nvim | 1 - per-host/MoonMother/.inputrc | 1 - per-host/MoonMother/.inputrc-common | 1 - per-host/MoonMother/.ssh/.rc-common | 1 - per-host/MoonMother/.ssh/authorized_keys | 1 - per-host/MoonMother/.ssh/config | 1 - per-host/MoonMother/.ssh/known_hosts | 1 - per-host/MoonMother/.ssh/rc | 2 - per-host/MoonMother/.tmux.conf | 1 - per-host/MoonMother/.tmux.conf-common | 1 - per-host/MoonMother/.vim | 1 - per-host/MoonMother/.vimrc | 1 - per-host/MoonMother/.vimrc-common | 1 - per-host/blocky-cafe/.bash_aliases | 11 -- per-host/blocky-cafe/.bash_aliases-common | 1 - per-host/blocky-cafe/.config/nvim | 1 - per-host/blocky-cafe/.inputrc | 1 - per-host/blocky-cafe/.inputrc-common | 1 - per-host/blocky-cafe/.ssh/.rc-common | 1 - per-host/blocky-cafe/.ssh/authorized_keys | 1 - per-host/blocky-cafe/.ssh/config | 1 - per-host/blocky-cafe/.ssh/known_hosts | 1 - per-host/blocky-cafe/.ssh/rc | 2 - per-host/blocky-cafe/.tmux.conf | 2 - per-host/blocky-cafe/.tmux.conf-common | 1 - per-host/blocky-cafe/.vim | 1 - per-host/blocky-cafe/.vimrc | 1 - per-host/blocky-cafe/.vimrc-common | 1 - per-host/costadelsol/.bash_aliases | 4 +- per-host/costadelsol/.bash_aliases-common | 1 - per-host/costadelsol/.inputrc-common | 2 +- per-host/costadelsol/.ssh/.rc-common | 1 - per-host/costadelsol/.ssh/authorized_keys | 1 - per-host/costadelsol/.ssh/config | 2 +- .../.ssh/config-common} | 0 per-host/costadelsol/.ssh/known_hosts | 1 - per-host/costadelsol/.ssh/rc | 4 +- per-host/costadelsol/.tmux.conf | 2 +- per-host/costadelsol/.tmux.conf-common | 1 - per-host/costadelsol/.vimrc | 2 +- per-host/costadelsol/.vimrc-common | 1 - per-host/costadelsol/.zshrc | 1 + per-host/crystarium/.bash_aliases | 2 + .../{Adversary => crystarium}/.config/nvim | 0 per-host/{Adversary => crystarium}/.inputrc | 0 per-host/crystarium/.inputrc-common | 1 + per-host/crystarium/.ssh/config | 1 + .../.ssh/config-common} | 0 per-host/crystarium/.ssh/rc | 2 + per-host/crystarium/.tmux.conf | 1 + per-host/{Adversary => crystarium}/.vim | 0 per-host/crystarium/.vimrc | 1 + per-host/crystarium/.zshrc | 1 + per-host/goldsaucer/.bash_aliases | 2 + .../.config/nvim | 0 .../{EarthDaughter => goldsaucer}/.inputrc | 0 per-host/goldsaucer/.inputrc-common | 1 + per-host/goldsaucer/.ssh/config | 1 + .../.ssh/config-common} | 0 per-host/goldsaucer/.ssh/rc | 2 + per-host/goldsaucer/.tmux.conf | 1 + per-host/{EarthDaughter => goldsaucer}/.vim | 0 per-host/goldsaucer/.vimrc | 1 + per-host/goldsaucer/.zshrc | 1 + per-host/gubal/.bash_aliases | 4 +- per-host/gubal/.bash_aliases-common | 1 - per-host/gubal/.inputrc-common | 2 +- per-host/gubal/.ssh/.rc-common | 1 - per-host/gubal/.ssh/authorized_keys | 1 - per-host/gubal/.ssh/config | 2 +- .../.ssh/config-common} | 0 per-host/gubal/.ssh/known_hosts | 1 - per-host/gubal/.ssh/rc | 4 +- per-host/gubal/.tmux.conf | 2 +- per-host/gubal/.tmux.conf-common | 1 - per-host/gubal/.vimrc | 2 +- per-host/gubal/.vimrc-common | 1 - per-host/gubal/.zshrc | 1 + per-host/mari-wovn/.bash_aliases | 176 ------------------ per-host/mari-wovn/.bash_aliases-common | 1 - per-host/mari-wovn/.config/nvim | 1 - per-host/mari-wovn/.inputrc | 1 - per-host/mari-wovn/.inputrc-common | 1 - per-host/mari-wovn/.ssh/.config-common | 1 - per-host/mari-wovn/.ssh/.rc-common | 1 - per-host/mari-wovn/.ssh/authorized_keys | 1 - per-host/mari-wovn/.ssh/config | 4 - per-host/mari-wovn/.ssh/known_hosts | 1 - per-host/mari-wovn/.ssh/rc | 2 - per-host/mari-wovn/.tmux.conf | 1 - per-host/mari-wovn/.tmux.conf-common | 1 - per-host/mari-wovn/.vim | 1 - per-host/mari-wovn/.vimrc | 1 - per-host/mari-wovn/.vimrc-common | 1 - per-host/mordhona/.bash_aliases | 4 +- per-host/mordhona/.bash_aliases-common | 1 - per-host/mordhona/.inputrc-common | 2 +- per-host/mordhona/.ssh/.config-common | 1 - per-host/mordhona/.ssh/.rc-common | 1 - per-host/mordhona/.ssh/authorized_keys | 1 - per-host/mordhona/.ssh/config | 2 +- .../.ssh/config-common} | 0 per-host/mordhona/.ssh/known_hosts | 1 - per-host/mordhona/.ssh/rc | 4 +- per-host/mordhona/.tmux.conf | 2 +- per-host/mordhona/.tmux.conf-common | 1 - per-host/mordhona/.vimrc | 2 +- per-host/mordhona/.vimrc-common | 1 - per-host/mordhona/.zshrc | 1 + per-host/pop-os/.bash_aliases | 4 - per-host/pop-os/.bash_aliases-common | 1 - per-host/pop-os/.config/nvim | 1 - per-host/pop-os/.inputrc | 1 - per-host/pop-os/.inputrc-common | 1 - per-host/pop-os/.ssh/.config-common | 1 - per-host/pop-os/.ssh/.rc-common | 1 - per-host/pop-os/.ssh/authorized_keys | 1 - per-host/pop-os/.ssh/config | 1 - per-host/pop-os/.ssh/known_hosts | 1 - per-host/pop-os/.ssh/rc | 2 - per-host/pop-os/.tmux.conf | 2 - per-host/pop-os/.tmux.conf-common | 1 - per-host/pop-os/.vim | 1 - per-host/pop-os/.vimrc | 1 - per-host/pop-os/.vimrc-common | 1 - per-host/reya-XPS-13-9300/.bash_aliases | 8 - .../reya-XPS-13-9300/.bash_aliases-common | 1 - per-host/reya-XPS-13-9300/.config/nvim | 1 - per-host/reya-XPS-13-9300/.inputrc | 1 - per-host/reya-XPS-13-9300/.inputrc-common | 1 - per-host/reya-XPS-13-9300/.ssh/.config-common | 1 - per-host/reya-XPS-13-9300/.ssh/.rc-common | 1 - .../reya-XPS-13-9300/.ssh/authorized_keys | 1 - per-host/reya-XPS-13-9300/.ssh/config | 1 - per-host/reya-XPS-13-9300/.ssh/known_hosts | 1 - per-host/reya-XPS-13-9300/.ssh/rc | 2 - per-host/reya-XPS-13-9300/.tmux.conf | 1 - per-host/reya-XPS-13-9300/.tmux.conf-common | 1 - per-host/reya-XPS-13-9300/.vim | 1 - per-host/reya-XPS-13-9300/.vimrc | 1 - per-host/reya-XPS-13-9300/.vimrc-common | 1 - per-host/rock64/.bash_aliases | 4 - per-host/rock64/.bash_aliases-common | 1 - per-host/rock64/.config/nvim | 1 - per-host/rock64/.inputrc | 1 - per-host/rock64/.inputrc-common | 1 - per-host/rock64/.ssh/.config-common | 1 - per-host/rock64/.ssh/.rc-common | 1 - per-host/rock64/.ssh/authorized_keys | 1 - per-host/rock64/.ssh/config | 1 - per-host/rock64/.ssh/known_hosts | 1 - per-host/rock64/.ssh/rc | 2 - per-host/rock64/.tmux.conf | 1 - per-host/rock64/.tmux.conf-common | 1 - per-host/rock64/.vim | 1 - per-host/rock64/.vimrc | 1 - per-host/rock64/.vimrc-common | 1 - per-host/template/.bash_aliases | 4 +- per-host/template/.bash_aliases-common | 1 - per-host/template/.inputrc-common | 2 +- per-host/template/.ssh/.config-common | 1 - per-host/template/.ssh/.rc-common | 1 - per-host/template/.ssh/authorized_keys | 1 - per-host/template/.ssh/config | 2 +- .../.ssh/config-common} | 0 per-host/template/.ssh/known_hosts | 1 - per-host/template/.ssh/rc | 4 +- per-host/template/.tmux.conf | 2 +- per-host/template/.tmux.conf-common | 1 - per-host/template/.vimrc | 2 +- per-host/template/.vimrc-common | 1 - per-host/template/.zshrc | 1 + per-host/terraria-server/.bash_aliases | 4 - per-host/terraria-server/.bash_aliases-common | 1 - per-host/terraria-server/.config/nvim | 1 - per-host/terraria-server/.inputrc | 1 - per-host/terraria-server/.inputrc-common | 1 - per-host/terraria-server/.ssh/.config-common | 1 - per-host/terraria-server/.ssh/.rc-common | 1 - per-host/terraria-server/.ssh/authorized_keys | 1 - per-host/terraria-server/.ssh/config | 1 - per-host/terraria-server/.ssh/known_hosts | 1 - per-host/terraria-server/.ssh/rc | 2 - per-host/terraria-server/.tmux.conf | 1 - per-host/terraria-server/.tmux.conf-common | 1 - per-host/terraria-server/.vim | 1 - per-host/terraria-server/.vimrc | 1 - per-host/terraria-server/.vimrc-common | 1 - inputrc => readline/inputrc | 1 - ssh-find-agent | 1 - tmux.conf => tmux/tmux.conf | 3 +- .../tmux.need-reboot.sh | 0 tmux.screen.conf => tmux/tmux.screen.conf | 0 .../tmux.status-helpers.sh | 0 vimrc => vim/vimrc | 2 - zsh/customizations/zsh_aliases.zsh | 48 +++++ zsh/customizations/zsh_tmux.zsh | 33 ++++ ohmyzsh => zsh/ohmyzsh | 0 zshrc => zsh/zshrc.zsh | 13 +- 231 files changed, 256 insertions(+), 588 deletions(-) create mode 100644 bash/bash_aliases.sh rename bash_tmux.sh => bash/bash_tmux.sh (51%) rename git-aware-prompt => bash/git-aware-prompt (100%) delete mode 100644 bash_aliases.sh delete mode 100644 per-host/Adversary/.bash_aliases delete mode 120000 per-host/Adversary/.bash_aliases-common delete mode 120000 per-host/Adversary/.inputrc-common delete mode 120000 per-host/Adversary/.ssh/.rc-common delete mode 120000 per-host/Adversary/.ssh/authorized_keys delete mode 100644 per-host/Adversary/.ssh/config delete mode 120000 per-host/Adversary/.ssh/known_hosts delete mode 100644 per-host/Adversary/.ssh/rc delete mode 100644 per-host/Adversary/.tmux.conf delete mode 120000 per-host/Adversary/.tmux.conf-common delete mode 100644 per-host/Adversary/.vimrc delete mode 120000 per-host/Adversary/.vimrc-common delete mode 100644 per-host/EarthDaughter/.bash_aliases delete mode 120000 per-host/EarthDaughter/.bash_aliases-common delete mode 120000 per-host/EarthDaughter/.inputrc-common delete mode 120000 per-host/EarthDaughter/.ssh/.rc-common delete mode 120000 per-host/EarthDaughter/.ssh/authorized_keys delete mode 100644 per-host/EarthDaughter/.ssh/config delete mode 120000 per-host/EarthDaughter/.ssh/known_hosts delete mode 100644 per-host/EarthDaughter/.ssh/rc delete mode 100644 per-host/EarthDaughter/.tmux.conf delete mode 120000 per-host/EarthDaughter/.tmux.conf-common delete mode 100644 per-host/EarthDaughter/.vimrc delete mode 120000 per-host/EarthDaughter/.vimrc-common delete mode 100644 per-host/MoonMother/.bash_aliases delete mode 120000 per-host/MoonMother/.bash_aliases-common delete mode 120000 per-host/MoonMother/.config/nvim delete mode 100644 per-host/MoonMother/.inputrc delete mode 120000 per-host/MoonMother/.inputrc-common delete mode 120000 per-host/MoonMother/.ssh/.rc-common delete mode 120000 per-host/MoonMother/.ssh/authorized_keys delete mode 100644 per-host/MoonMother/.ssh/config delete mode 120000 per-host/MoonMother/.ssh/known_hosts delete mode 100644 per-host/MoonMother/.ssh/rc delete mode 100644 per-host/MoonMother/.tmux.conf delete mode 120000 per-host/MoonMother/.tmux.conf-common delete mode 120000 per-host/MoonMother/.vim delete mode 100644 per-host/MoonMother/.vimrc delete mode 120000 per-host/MoonMother/.vimrc-common delete mode 100644 per-host/blocky-cafe/.bash_aliases delete mode 120000 per-host/blocky-cafe/.bash_aliases-common delete mode 120000 per-host/blocky-cafe/.config/nvim delete mode 100644 per-host/blocky-cafe/.inputrc delete mode 120000 per-host/blocky-cafe/.inputrc-common delete mode 120000 per-host/blocky-cafe/.ssh/.rc-common delete mode 120000 per-host/blocky-cafe/.ssh/authorized_keys delete mode 100644 per-host/blocky-cafe/.ssh/config delete mode 120000 per-host/blocky-cafe/.ssh/known_hosts delete mode 100644 per-host/blocky-cafe/.ssh/rc delete mode 100644 per-host/blocky-cafe/.tmux.conf delete mode 120000 per-host/blocky-cafe/.tmux.conf-common delete mode 120000 per-host/blocky-cafe/.vim delete mode 100644 per-host/blocky-cafe/.vimrc delete mode 120000 per-host/blocky-cafe/.vimrc-common delete mode 120000 per-host/costadelsol/.bash_aliases-common delete mode 120000 per-host/costadelsol/.ssh/.rc-common delete mode 120000 per-host/costadelsol/.ssh/authorized_keys rename per-host/{Adversary/.ssh/.config-common => costadelsol/.ssh/config-common} (100%) delete mode 120000 per-host/costadelsol/.ssh/known_hosts delete mode 120000 per-host/costadelsol/.tmux.conf-common delete mode 120000 per-host/costadelsol/.vimrc-common create mode 100644 per-host/costadelsol/.zshrc create mode 100644 per-host/crystarium/.bash_aliases rename per-host/{Adversary => crystarium}/.config/nvim (100%) rename per-host/{Adversary => crystarium}/.inputrc (100%) create mode 120000 per-host/crystarium/.inputrc-common create mode 100644 per-host/crystarium/.ssh/config rename per-host/{EarthDaughter/.ssh/.config-common => crystarium/.ssh/config-common} (100%) create mode 100644 per-host/crystarium/.ssh/rc create mode 100644 per-host/crystarium/.tmux.conf rename per-host/{Adversary => crystarium}/.vim (100%) create mode 100644 per-host/crystarium/.vimrc create mode 100644 per-host/crystarium/.zshrc create mode 100644 per-host/goldsaucer/.bash_aliases rename per-host/{EarthDaughter => goldsaucer}/.config/nvim (100%) rename per-host/{EarthDaughter => goldsaucer}/.inputrc (100%) create mode 120000 per-host/goldsaucer/.inputrc-common create mode 100644 per-host/goldsaucer/.ssh/config rename per-host/{MoonMother/.ssh/.config-common => goldsaucer/.ssh/config-common} (100%) create mode 100644 per-host/goldsaucer/.ssh/rc create mode 100644 per-host/goldsaucer/.tmux.conf rename per-host/{EarthDaughter => goldsaucer}/.vim (100%) create mode 100644 per-host/goldsaucer/.vimrc create mode 100644 per-host/goldsaucer/.zshrc delete mode 120000 per-host/gubal/.bash_aliases-common delete mode 120000 per-host/gubal/.ssh/.rc-common delete mode 120000 per-host/gubal/.ssh/authorized_keys rename per-host/{blocky-cafe/.ssh/.config-common => gubal/.ssh/config-common} (100%) delete mode 120000 per-host/gubal/.ssh/known_hosts delete mode 120000 per-host/gubal/.tmux.conf-common delete mode 120000 per-host/gubal/.vimrc-common create mode 100644 per-host/gubal/.zshrc delete mode 100644 per-host/mari-wovn/.bash_aliases delete mode 120000 per-host/mari-wovn/.bash_aliases-common delete mode 120000 per-host/mari-wovn/.config/nvim delete mode 100644 per-host/mari-wovn/.inputrc delete mode 120000 per-host/mari-wovn/.inputrc-common delete mode 120000 per-host/mari-wovn/.ssh/.config-common delete mode 120000 per-host/mari-wovn/.ssh/.rc-common delete mode 120000 per-host/mari-wovn/.ssh/authorized_keys delete mode 100644 per-host/mari-wovn/.ssh/config delete mode 120000 per-host/mari-wovn/.ssh/known_hosts delete mode 100644 per-host/mari-wovn/.ssh/rc delete mode 100644 per-host/mari-wovn/.tmux.conf delete mode 120000 per-host/mari-wovn/.tmux.conf-common delete mode 120000 per-host/mari-wovn/.vim delete mode 100644 per-host/mari-wovn/.vimrc delete mode 120000 per-host/mari-wovn/.vimrc-common delete mode 120000 per-host/mordhona/.bash_aliases-common delete mode 120000 per-host/mordhona/.ssh/.config-common delete mode 120000 per-host/mordhona/.ssh/.rc-common delete mode 120000 per-host/mordhona/.ssh/authorized_keys rename per-host/{costadelsol/.ssh/.config-common => mordhona/.ssh/config-common} (100%) delete mode 120000 per-host/mordhona/.ssh/known_hosts delete mode 120000 per-host/mordhona/.tmux.conf-common delete mode 120000 per-host/mordhona/.vimrc-common create mode 100644 per-host/mordhona/.zshrc delete mode 100644 per-host/pop-os/.bash_aliases delete mode 120000 per-host/pop-os/.bash_aliases-common delete mode 120000 per-host/pop-os/.config/nvim delete mode 100644 per-host/pop-os/.inputrc delete mode 120000 per-host/pop-os/.inputrc-common delete mode 120000 per-host/pop-os/.ssh/.config-common delete mode 120000 per-host/pop-os/.ssh/.rc-common delete mode 120000 per-host/pop-os/.ssh/authorized_keys delete mode 100644 per-host/pop-os/.ssh/config delete mode 120000 per-host/pop-os/.ssh/known_hosts delete mode 100644 per-host/pop-os/.ssh/rc delete mode 100644 per-host/pop-os/.tmux.conf delete mode 120000 per-host/pop-os/.tmux.conf-common delete mode 120000 per-host/pop-os/.vim delete mode 100644 per-host/pop-os/.vimrc delete mode 120000 per-host/pop-os/.vimrc-common delete mode 100644 per-host/reya-XPS-13-9300/.bash_aliases delete mode 120000 per-host/reya-XPS-13-9300/.bash_aliases-common delete mode 120000 per-host/reya-XPS-13-9300/.config/nvim delete mode 100644 per-host/reya-XPS-13-9300/.inputrc delete mode 120000 per-host/reya-XPS-13-9300/.inputrc-common delete mode 120000 per-host/reya-XPS-13-9300/.ssh/.config-common delete mode 120000 per-host/reya-XPS-13-9300/.ssh/.rc-common delete mode 120000 per-host/reya-XPS-13-9300/.ssh/authorized_keys delete mode 100644 per-host/reya-XPS-13-9300/.ssh/config delete mode 120000 per-host/reya-XPS-13-9300/.ssh/known_hosts delete mode 100644 per-host/reya-XPS-13-9300/.ssh/rc delete mode 100644 per-host/reya-XPS-13-9300/.tmux.conf delete mode 120000 per-host/reya-XPS-13-9300/.tmux.conf-common delete mode 120000 per-host/reya-XPS-13-9300/.vim delete mode 100644 per-host/reya-XPS-13-9300/.vimrc delete mode 120000 per-host/reya-XPS-13-9300/.vimrc-common delete mode 100644 per-host/rock64/.bash_aliases delete mode 120000 per-host/rock64/.bash_aliases-common delete mode 120000 per-host/rock64/.config/nvim delete mode 100644 per-host/rock64/.inputrc delete mode 120000 per-host/rock64/.inputrc-common delete mode 120000 per-host/rock64/.ssh/.config-common delete mode 120000 per-host/rock64/.ssh/.rc-common delete mode 120000 per-host/rock64/.ssh/authorized_keys delete mode 100644 per-host/rock64/.ssh/config delete mode 120000 per-host/rock64/.ssh/known_hosts delete mode 100644 per-host/rock64/.ssh/rc delete mode 100644 per-host/rock64/.tmux.conf delete mode 120000 per-host/rock64/.tmux.conf-common delete mode 120000 per-host/rock64/.vim delete mode 100644 per-host/rock64/.vimrc delete mode 120000 per-host/rock64/.vimrc-common delete mode 120000 per-host/template/.bash_aliases-common delete mode 120000 per-host/template/.ssh/.config-common delete mode 120000 per-host/template/.ssh/.rc-common delete mode 120000 per-host/template/.ssh/authorized_keys rename per-host/{gubal/.ssh/.config-common => template/.ssh/config-common} (100%) delete mode 120000 per-host/template/.ssh/known_hosts delete mode 120000 per-host/template/.tmux.conf-common delete mode 120000 per-host/template/.vimrc-common create mode 100644 per-host/template/.zshrc delete mode 100644 per-host/terraria-server/.bash_aliases delete mode 120000 per-host/terraria-server/.bash_aliases-common delete mode 120000 per-host/terraria-server/.config/nvim delete mode 100644 per-host/terraria-server/.inputrc delete mode 120000 per-host/terraria-server/.inputrc-common delete mode 120000 per-host/terraria-server/.ssh/.config-common delete mode 120000 per-host/terraria-server/.ssh/.rc-common delete mode 120000 per-host/terraria-server/.ssh/authorized_keys delete mode 100644 per-host/terraria-server/.ssh/config delete mode 120000 per-host/terraria-server/.ssh/known_hosts delete mode 100644 per-host/terraria-server/.ssh/rc delete mode 100644 per-host/terraria-server/.tmux.conf delete mode 120000 per-host/terraria-server/.tmux.conf-common delete mode 120000 per-host/terraria-server/.vim delete mode 100644 per-host/terraria-server/.vimrc delete mode 120000 per-host/terraria-server/.vimrc-common rename inputrc => readline/inputrc (94%) delete mode 160000 ssh-find-agent rename tmux.conf => tmux/tmux.conf (97%) rename tmux.need-reboot.sh => tmux/tmux.need-reboot.sh (100%) rename tmux.screen.conf => tmux/tmux.screen.conf (100%) rename tmux.status-helpers.sh => tmux/tmux.status-helpers.sh (100%) rename vimrc => vim/vimrc (98%) create mode 100644 zsh/customizations/zsh_aliases.zsh create mode 100644 zsh/customizations/zsh_tmux.zsh rename ohmyzsh => zsh/ohmyzsh (100%) rename zshrc => zsh/zshrc.zsh (92%) diff --git a/.gitignore b/.gitignore index 193f578..b9c144e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.swp /vim/.netrwhist +.last-fetch diff --git a/.gitmodules b/.gitmodules index 46bc35a..1015002 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,14 +4,11 @@ [submodule "vim/bundle/vim-gfm-syntax"] path = vim/bundle/vim-gfm-syntax url = https://github.com/rhysd/vim-gfm-syntax.git -[submodule "ssh-find-agent"] - path = ssh-find-agent - url = https://github.com/wwalker/ssh-find-agent.git [submodule "vim/bundle/ultisnips"] path = vim/bundle/ultisnips url = https://github.com/SirVer/ultisnips.git [submodule "git-aware-prompt"] - path = git-aware-prompt + path = bash/git-aware-prompt url = https://github.com/jimeh/git-aware-prompt.git [submodule "vim/ale"] path = vim/bundle/ale @@ -38,7 +35,7 @@ path = vim/bundle/nerdtree-git-plugin url = https://github.com/Xuyuanp/nerdtree-git-plugin.git [submodule "ohmyzsh"] - path = ohmyzsh + path = zsh/ohmyzsh url = https://github.com/ohmyzsh/ohmyzsh [submodule "vim/bundle/coc.nvim"] path = vim/bundle/coc.nvim diff --git a/bash/bash_aliases.sh b/bash/bash_aliases.sh new file mode 100644 index 0000000..f7214ed --- /dev/null +++ b/bash/bash_aliases.sh @@ -0,0 +1,103 @@ +#!/bin/bash + +# Find the path of the git repository relative to this file. +export __COMMON_CONFIGS=$(readlink -e "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )/..") + +# Install EDITOR +export EDITOR='nvim' +# Set up the vim config path +export VIM_CONFIG_DIR=$__COMMON_CONFIGS/vim + +# Set potentially-destructive commands to use interactive modes +alias rm="rm -i" +alias cp="cp -i" +alias mv="mv -i" + +# Use a larger number of KDF rounds and the secure ed25519 key type by default. +alias ssh-keygen="ssh-keygen -o -a 100 -b 4096 -t ed25519" + +# Reload this file's (and other customizations') aliases. +function reload_bashrc() +{ + . "$HOME"/.bashrc +} + +# Check if the git repository is fully synced. +function __common_configs_in_sync() +{ + ( + # Failure modes, in order: + # exit 9: Problem cd'ing or getting commit hashes - things that should never fail + cd "$__COMMON_CONFIGS" || exit 9 + localCommit=$(git show-ref --verify --hash refs/heads/master) || exit 9 + if [[ $1 == --force-fetch ]] || [[ ! -f .last-fetch ]] || [[ $(date --reference=.last-fetch +%s) -lt $(date --date='5 minutes ago' +%s) ]]; then + git fetch --quiet origin && touch .last-fetch + fi + remoteCommit=$(git show-ref --verify --hash refs/remotes/origin/master) || exit 9 + # exit 1: master is not the commit which is checked out. + [[ $(git symbolic-ref HEAD) == "refs/heads/master" ]] || exit 1 + # exit 2: master and origin/master are different. + [[ $localCommit == $remoteCommit ]] || exit 2 + # exit 3: There are staged changes. + git diff-index --cached --exit-code --quiet HEAD || exit 3 + # exit 4: There are unstaged changes. + git diff-files --exit-code --quiet HEAD || exit 4 + ) +} + +function help_prompt() { + echo '\ Help\ page\ '"$@"'\ ?ltline\ %lt?L/%L.:byte\ %bB?s/%s..?\ (END):?pB\ %pB\\%..(press h for help or q to quit)' +} +function man () +{ + if command man "$@" >&/dev/null; then + command man "$@" + elif builtin help -m "$@" >&/dev/null; then + builtin help -m "$@" | command man -l -r "$(help_prompt "$@")" - + else + command man "$@" + fi +} + +function help () +{ + if builtin help -m "$@" >&/dev/null; then + builtin help -m "$@" | command man -l -r "$(help_prompt "$@")" - + elif command man "$@" >&/dev/null; then + command man "$@" + else + builtin help -m "$@" + fi +} + + +source "$__COMMON_CONFIGS"/bash/bash_tmux.sh + +PROMPT_COMMAND="" +export GITAWAREPROMPT="$__COMMON_CONFIGS"/bash/git-aware-prompt +source "$GITAWAREPROMPT"/main.sh + +function __prettylastexit() { + local exitcode=$? + if [[ -z $exitcode ]]; then + echo "[---]$txtrst " + elif [[ $exitcode == 0 ]]; then + echo "$txtgrn[ OK]$txtrst " + else + printf "$txtred[%3.3s]$txtrst " "$exitcode" + fi +} + +function __prettyconfigstate() { + __common_configs_in_sync + local exitcode=$? + case $exitcode in + 0) ;; + 2) echo; echo "${txtgrn}${txtrst}"; ;; + 3) echo; echo "${txtylw}${txtrst}"; ;; + 4) echo; echo "${txtylw}${txtrst}"; ;; + *) echo; echo "${txtred}$txtrst" ;; + esac +} + +PS1='$(__prettylastexit)\[$bldred\]${debian_chroot:+($debian_chroot)}\[$txtrst\]\[$txtpur\]\u\[$txtrst\]\[$txtylw\]@\[$txtrst\]\[$txtblu\]\h\[$txtrst\]:\[$bldgrn\]\w\[$txtrst\] \[$txtcyn\]$git_branch\[$txtrst\]\[$bldred\]${git_dirty}\[$txtrst\]$(__prettyconfigstate)\n\$ ' diff --git a/bash_tmux.sh b/bash/bash_tmux.sh similarity index 51% rename from bash_tmux.sh rename to bash/bash_tmux.sh index eef4a21..45ef23d 100644 --- a/bash_tmux.sh +++ b/bash/bash_tmux.sh @@ -1,18 +1,18 @@ #!/bin/bash # vim: set filetype=sh: -# tmux configuration files are found alongside this file -export TMUX_CONF_DIR=${TMUX_CONF_DIR:-"$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )"} +# tmux configuration files are found in /tmux +export TMUX_CONF_DIR=${TMUX_CONF_DIR:-$__COMMON_CONFIGS/tmux} # default status script just shows whether a reboot is needed -export TMUX_STATUS_SCRIPT=${TMUX_STATUS_SCRIPT:-"$TMUX_CONF_DIR/.tmux.need-reboot.sh"} +export TMUX_STATUS_SCRIPT=${TMUX_STATUS_SCRIPT:-"$TMUX_CONF_DIR/tmux.need-reboot.sh"} -function tmux_has_main() { - tmux -2 has-session -t "Main Screen" +function tmux_running() { + tmux -2 has-session -t "Nexus" } -function tmux_init_main() { - tmux -2 new-session -d -s "Main Screen" -n "Misc." - tmux -2 new-window -d -t "Main Screen:0" -n "Monitor" "htop" +function tmux_init() { + tmux -2 new-session -d -s "Nexus" -n "Misc." + tmux -2 new-window -d -t "Nexus:0" -n "Monitor" "htop" } function go_tmux () @@ -22,11 +22,11 @@ function go_tmux () return 1; fi echo "Starting tmux..." - tmux_has_main || tmux_init_main || return 1 + tmux_running || tmux_init || return 1 if [[ $1 == "-x" ]]; then - exec tmux -2 attach-session -t "Main Screen" || return 1 + exec tmux -2 attach-session -t "Nexus" || return 1 else - tmux -2 attach-session -t "Main Screen" || return 1 + tmux -2 attach-session -t "Nexus" || return 1 fi } diff --git a/git-aware-prompt b/bash/git-aware-prompt similarity index 100% rename from git-aware-prompt rename to bash/git-aware-prompt diff --git a/bash_aliases.sh b/bash_aliases.sh deleted file mode 100644 index 5d53f63..0000000 --- a/bash_aliases.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/bash -# vim: set filetype=sh: -# link destination: $HOME/.bash_aliases - -# Install EDITOR -export EDITOR='nvim' - -alias rm="rm -i" -alias cp="cp -i" -alias mv="mv -i" - -# Send a bell before the prompt if it has been a long time since the last -# prompt. -# function bell_on_long_running_commands() { -# local NOW=`date -u +%s` -# if [ $(( LASTCMD_FOR_BELLS )) -lt $(( NOW - 15 )) ]; then -# echo -n $'\a' -# fi -# unset LASTCMD_FOR_BELLS; -# } -# function set_last_command_time() { -# if [[ -z "${COMPLINE}" ]] && [[ -z "${LASTCMD_FOR_BELLS}" ]]; then -# LASTCMD_FOR_BELLS=`date -u +%s` -# fi -# } -# trap set_last_command_time DEBUG -# export PROMPT_COMMAND=bell_on_long_running_commands -function bell_after() { - "$@" - local exit="$?" - echo -n $'\a' 1>&2 - return "$exit" -} - -# Reload aliases -function reload_scripts_only() -{ - . "$HOME"/.bashrc -} - -# from https://stackoverflow.com/a/1203628 -# Useful for overriding functions defined in these common scripts -# Usage: copy_func from to -function copy_func() -{ - declare -F $1 > /dev/null || return 1 - eval "$(echo "${2}()"; declare -f ${1} | tail -n +2)" -} - -function sync_git_only() -{ - ( - cd "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )" - if git add . && ! git diff-index --cached --quiet HEAD; then - git commit -am "Autocommitted updated scripts from $(hostname)" - fi - git pull --rebase - git submodule update --init --recursive - ./install.sh - if ! git --no-pager diff --exit-code origin/master master; then - git --no-pager log --reverse origin/master..master - if ! read -p "OK to push these changes? (Y/N) " -N 1 confirm; then - confirm = "N" - fi - echo - if [[ "$confirm" != "Y" ]] && [[ "$confirm" != "y" ]]; then - echo "Not pushing yet." - else - git push - fi - fi - ) -} - -alias ssh-keygen="ssh-keygen -o -a 100 -t ed25519" - -function ssh-authorize-key() { - if [[ ! -r "$1" ]] || ! file -b "$1" | grep -q "^OpenSSH .* public key$"; then - echo "Expected a public key file" - fi - cat "$1" >>~/.ssh/authorized_keys -} - -function bashreload() -{ - reload_scripts_only - sync_git_only - reload_scripts_only -} - -function help_prompt() { - echo '\ Help\ page\ '"$@"'\ ?ltline\ %lt?L/%L.:byte\ %bB?s/%s..?\ (END):?pB\ %pB\\%..(press h for help or q to quit)' -} -function man () -{ - if command man "$@" >&/dev/null; then - command man "$@" - elif builtin help -m "$@" >&/dev/null; then - builtin help -m "$@" | command man -l -r "$(help_prompt "$@")" - - else - command man "$@" - fi -} - -function help () -{ - if builtin help -m "$@" >&/dev/null; then - builtin help "$@" | command man -l -r "$(help_prompt "$@")" - - elif command man "$@" >&/dev/null; then - command man "$@" - else - builtin help -m "$@" - fi - builtin help -m "$@" 2>/dev/null || command man "$@" 2>/dev/null || builtin help -m "$@" -} - - -# This is, almost without fail, the right value. -export DISPLAY="${DISPLAY:-:0.0}" - -COMMON_CONFIGS_PATH="$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )" - -. "$COMMON_CONFIGS_PATH"/bash_tmux.sh - -PROMPT_COMMAND="" -export GITAWAREPROMPT="$COMMON_CONFIGS_PATH"/git-aware-prompt -. "$GITAWAREPROMPT"/main.sh - -function prettylastexit() { - local exitcode=$? - if [[ -z $exitcode ]]; then - echo "[---]$txtrst " - elif [[ $exitcode == 0 ]]; then - echo "$txtgrn[ OK]$txtrst " - else - printf "$txtred[%3.3s]$txtrst " "$exitcode" - fi -} - -PS1='$(prettylastexit)\[$bldred\]${debian_chroot:+($debian_chroot)}\[$txtrst\]\[$txtpur\]\u\[$txtrst\]\[$txtylw\]@\[$txtrst\]\[$txtblu\]\h\[$txtrst\]:\[$bldgrn\]\w\[$txtrst\] \[$txtcyn\]$git_branch\[$txtrst\]\[$bldred\]${git_dirty}\[$txtrst\]\n\$ ' diff --git a/per-host/Adversary/.bash_aliases b/per-host/Adversary/.bash_aliases deleted file mode 100644 index dc004ed..0000000 --- a/per-host/Adversary/.bash_aliases +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -auto_tmux diff --git a/per-host/Adversary/.bash_aliases-common b/per-host/Adversary/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/Adversary/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/Adversary/.inputrc-common b/per-host/Adversary/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/Adversary/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/Adversary/.ssh/.rc-common b/per-host/Adversary/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/Adversary/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/Adversary/.ssh/authorized_keys b/per-host/Adversary/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/Adversary/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/Adversary/.ssh/config b/per-host/Adversary/.ssh/config deleted file mode 100644 index 0d04e94..0000000 --- a/per-host/Adversary/.ssh/config +++ /dev/null @@ -1 +0,0 @@ -Include .config-common diff --git a/per-host/Adversary/.ssh/known_hosts b/per-host/Adversary/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/Adversary/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/Adversary/.ssh/rc b/per-host/Adversary/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/Adversary/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/Adversary/.tmux.conf b/per-host/Adversary/.tmux.conf deleted file mode 100644 index 36fcf47..0000000 --- a/per-host/Adversary/.tmux.conf +++ /dev/null @@ -1 +0,0 @@ -source ~/.tmux.conf-common diff --git a/per-host/Adversary/.tmux.conf-common b/per-host/Adversary/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/Adversary/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/Adversary/.vimrc b/per-host/Adversary/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/Adversary/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/Adversary/.vimrc-common b/per-host/Adversary/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/Adversary/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/EarthDaughter/.bash_aliases b/per-host/EarthDaughter/.bash_aliases deleted file mode 100644 index dc004ed..0000000 --- a/per-host/EarthDaughter/.bash_aliases +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -auto_tmux diff --git a/per-host/EarthDaughter/.bash_aliases-common b/per-host/EarthDaughter/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/EarthDaughter/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/EarthDaughter/.inputrc-common b/per-host/EarthDaughter/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/EarthDaughter/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/EarthDaughter/.ssh/.rc-common b/per-host/EarthDaughter/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/EarthDaughter/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/EarthDaughter/.ssh/authorized_keys b/per-host/EarthDaughter/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/EarthDaughter/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/EarthDaughter/.ssh/config b/per-host/EarthDaughter/.ssh/config deleted file mode 100644 index 0d04e94..0000000 --- a/per-host/EarthDaughter/.ssh/config +++ /dev/null @@ -1 +0,0 @@ -Include .config-common diff --git a/per-host/EarthDaughter/.ssh/known_hosts b/per-host/EarthDaughter/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/EarthDaughter/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/EarthDaughter/.ssh/rc b/per-host/EarthDaughter/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/EarthDaughter/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/EarthDaughter/.tmux.conf b/per-host/EarthDaughter/.tmux.conf deleted file mode 100644 index 36fcf47..0000000 --- a/per-host/EarthDaughter/.tmux.conf +++ /dev/null @@ -1 +0,0 @@ -source ~/.tmux.conf-common diff --git a/per-host/EarthDaughter/.tmux.conf-common b/per-host/EarthDaughter/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/EarthDaughter/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/EarthDaughter/.vimrc b/per-host/EarthDaughter/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/EarthDaughter/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/EarthDaughter/.vimrc-common b/per-host/EarthDaughter/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/EarthDaughter/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/MoonMother/.bash_aliases b/per-host/MoonMother/.bash_aliases deleted file mode 100644 index dc004ed..0000000 --- a/per-host/MoonMother/.bash_aliases +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -auto_tmux diff --git a/per-host/MoonMother/.bash_aliases-common b/per-host/MoonMother/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/MoonMother/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/MoonMother/.config/nvim b/per-host/MoonMother/.config/nvim deleted file mode 120000 index 90f57e4..0000000 --- a/per-host/MoonMother/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../../../nvim \ No newline at end of file diff --git a/per-host/MoonMother/.inputrc b/per-host/MoonMother/.inputrc deleted file mode 100644 index 99cec8e..0000000 --- a/per-host/MoonMother/.inputrc +++ /dev/null @@ -1 +0,0 @@ -$include ~/.inputrc-common diff --git a/per-host/MoonMother/.inputrc-common b/per-host/MoonMother/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/MoonMother/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/MoonMother/.ssh/.rc-common b/per-host/MoonMother/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/MoonMother/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/MoonMother/.ssh/authorized_keys b/per-host/MoonMother/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/MoonMother/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/MoonMother/.ssh/config b/per-host/MoonMother/.ssh/config deleted file mode 100644 index 0d04e94..0000000 --- a/per-host/MoonMother/.ssh/config +++ /dev/null @@ -1 +0,0 @@ -Include .config-common diff --git a/per-host/MoonMother/.ssh/known_hosts b/per-host/MoonMother/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/MoonMother/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/MoonMother/.ssh/rc b/per-host/MoonMother/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/MoonMother/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/MoonMother/.tmux.conf b/per-host/MoonMother/.tmux.conf deleted file mode 100644 index 36fcf47..0000000 --- a/per-host/MoonMother/.tmux.conf +++ /dev/null @@ -1 +0,0 @@ -source ~/.tmux.conf-common diff --git a/per-host/MoonMother/.tmux.conf-common b/per-host/MoonMother/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/MoonMother/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/MoonMother/.vim b/per-host/MoonMother/.vim deleted file mode 120000 index 3a26453..0000000 --- a/per-host/MoonMother/.vim +++ /dev/null @@ -1 +0,0 @@ -../../vim \ No newline at end of file diff --git a/per-host/MoonMother/.vimrc b/per-host/MoonMother/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/MoonMother/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/MoonMother/.vimrc-common b/per-host/MoonMother/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/MoonMother/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/blocky-cafe/.bash_aliases b/per-host/blocky-cafe/.bash_aliases deleted file mode 100644 index cab5e72..0000000 --- a/per-host/blocky-cafe/.bash_aliases +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -copy_func tmux_init_main tmux_init_main_base - -function tmux_init_main() { - tmux_init_main_base - tmux -2 new-window -d -t "Main Screen:1" -n "Server" "~/current-server/mark2/start; ~/current-server/mark2/attach" -} - -auto_tmux diff --git a/per-host/blocky-cafe/.bash_aliases-common b/per-host/blocky-cafe/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/blocky-cafe/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/blocky-cafe/.config/nvim b/per-host/blocky-cafe/.config/nvim deleted file mode 120000 index 90f57e4..0000000 --- a/per-host/blocky-cafe/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../../../nvim \ No newline at end of file diff --git a/per-host/blocky-cafe/.inputrc b/per-host/blocky-cafe/.inputrc deleted file mode 100644 index 99cec8e..0000000 --- a/per-host/blocky-cafe/.inputrc +++ /dev/null @@ -1 +0,0 @@ -$include ~/.inputrc-common diff --git a/per-host/blocky-cafe/.inputrc-common b/per-host/blocky-cafe/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/blocky-cafe/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/blocky-cafe/.ssh/.rc-common b/per-host/blocky-cafe/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/blocky-cafe/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/blocky-cafe/.ssh/authorized_keys b/per-host/blocky-cafe/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/blocky-cafe/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/blocky-cafe/.ssh/config b/per-host/blocky-cafe/.ssh/config deleted file mode 100644 index 0d04e94..0000000 --- a/per-host/blocky-cafe/.ssh/config +++ /dev/null @@ -1 +0,0 @@ -Include .config-common diff --git a/per-host/blocky-cafe/.ssh/known_hosts b/per-host/blocky-cafe/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/blocky-cafe/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/blocky-cafe/.ssh/rc b/per-host/blocky-cafe/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/blocky-cafe/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/blocky-cafe/.tmux.conf b/per-host/blocky-cafe/.tmux.conf deleted file mode 100644 index 52f64e1..0000000 --- a/per-host/blocky-cafe/.tmux.conf +++ /dev/null @@ -1,2 +0,0 @@ -source ~/.tmux.conf-common -set -g base-index 2 diff --git a/per-host/blocky-cafe/.tmux.conf-common b/per-host/blocky-cafe/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/blocky-cafe/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/blocky-cafe/.vim b/per-host/blocky-cafe/.vim deleted file mode 120000 index 3a26453..0000000 --- a/per-host/blocky-cafe/.vim +++ /dev/null @@ -1 +0,0 @@ -../../vim \ No newline at end of file diff --git a/per-host/blocky-cafe/.vimrc b/per-host/blocky-cafe/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/blocky-cafe/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/blocky-cafe/.vimrc-common b/per-host/blocky-cafe/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/blocky-cafe/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/costadelsol/.bash_aliases b/per-host/costadelsol/.bash_aliases index dc004ed..4a05da1 100644 --- a/per-host/costadelsol/.bash_aliases +++ b/per-host/costadelsol/.bash_aliases @@ -1,4 +1,2 @@ #!/bin/bash -. ~/.bash_aliases-common - -auto_tmux +. "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )"/../../bash/bash_aliases.sh diff --git a/per-host/costadelsol/.bash_aliases-common b/per-host/costadelsol/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/costadelsol/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/costadelsol/.inputrc-common b/per-host/costadelsol/.inputrc-common index e2a824e..55d45ef 120000 --- a/per-host/costadelsol/.inputrc-common +++ b/per-host/costadelsol/.inputrc-common @@ -1 +1 @@ -../../inputrc \ No newline at end of file +../../readline/inputrc \ No newline at end of file diff --git a/per-host/costadelsol/.ssh/.rc-common b/per-host/costadelsol/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/costadelsol/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/costadelsol/.ssh/authorized_keys b/per-host/costadelsol/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/costadelsol/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/costadelsol/.ssh/config b/per-host/costadelsol/.ssh/config index 0d04e94..cfdf849 100644 --- a/per-host/costadelsol/.ssh/config +++ b/per-host/costadelsol/.ssh/config @@ -1 +1 @@ -Include .config-common +Include config-common diff --git a/per-host/Adversary/.ssh/.config-common b/per-host/costadelsol/.ssh/config-common similarity index 100% rename from per-host/Adversary/.ssh/.config-common rename to per-host/costadelsol/.ssh/config-common diff --git a/per-host/costadelsol/.ssh/known_hosts b/per-host/costadelsol/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/costadelsol/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/costadelsol/.ssh/rc b/per-host/costadelsol/.ssh/rc index df1a298..24a0d91 100644 --- a/per-host/costadelsol/.ssh/rc +++ b/per-host/costadelsol/.ssh/rc @@ -1,2 +1,2 @@ -#!/bin/sh -. ~/.ssh/.rc-common +#!/bin/bash +. ${BASH_SOURCE[0]}.rc-common diff --git a/per-host/costadelsol/.tmux.conf b/per-host/costadelsol/.tmux.conf index 36fcf47..21ccc48 100644 --- a/per-host/costadelsol/.tmux.conf +++ b/per-host/costadelsol/.tmux.conf @@ -1 +1 @@ -source ~/.tmux.conf-common +source $TMUX_CONF_DIR/tmux.conf diff --git a/per-host/costadelsol/.tmux.conf-common b/per-host/costadelsol/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/costadelsol/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/costadelsol/.vimrc b/per-host/costadelsol/.vimrc index 92430cd..1c85cde 100644 --- a/per-host/costadelsol/.vimrc +++ b/per-host/costadelsol/.vimrc @@ -1 +1 @@ -source ~/.vimrc-common +source $VIM_CONFIG_DIR/vimrc diff --git a/per-host/costadelsol/.vimrc-common b/per-host/costadelsol/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/costadelsol/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/costadelsol/.zshrc b/per-host/costadelsol/.zshrc new file mode 100644 index 0000000..37d1c7b --- /dev/null +++ b/per-host/costadelsol/.zshrc @@ -0,0 +1 @@ +source $(dirname $(readlink -e ${(%):-%N}))/../../zsh/zshrc.zsh diff --git a/per-host/crystarium/.bash_aliases b/per-host/crystarium/.bash_aliases new file mode 100644 index 0000000..4a05da1 --- /dev/null +++ b/per-host/crystarium/.bash_aliases @@ -0,0 +1,2 @@ +#!/bin/bash +. "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )"/../../bash/bash_aliases.sh diff --git a/per-host/Adversary/.config/nvim b/per-host/crystarium/.config/nvim similarity index 100% rename from per-host/Adversary/.config/nvim rename to per-host/crystarium/.config/nvim diff --git a/per-host/Adversary/.inputrc b/per-host/crystarium/.inputrc similarity index 100% rename from per-host/Adversary/.inputrc rename to per-host/crystarium/.inputrc diff --git a/per-host/crystarium/.inputrc-common b/per-host/crystarium/.inputrc-common new file mode 120000 index 0000000..55d45ef --- /dev/null +++ b/per-host/crystarium/.inputrc-common @@ -0,0 +1 @@ +../../readline/inputrc \ No newline at end of file diff --git a/per-host/crystarium/.ssh/config b/per-host/crystarium/.ssh/config new file mode 100644 index 0000000..cfdf849 --- /dev/null +++ b/per-host/crystarium/.ssh/config @@ -0,0 +1 @@ +Include config-common diff --git a/per-host/EarthDaughter/.ssh/.config-common b/per-host/crystarium/.ssh/config-common similarity index 100% rename from per-host/EarthDaughter/.ssh/.config-common rename to per-host/crystarium/.ssh/config-common diff --git a/per-host/crystarium/.ssh/rc b/per-host/crystarium/.ssh/rc new file mode 100644 index 0000000..24a0d91 --- /dev/null +++ b/per-host/crystarium/.ssh/rc @@ -0,0 +1,2 @@ +#!/bin/bash +. ${BASH_SOURCE[0]}.rc-common diff --git a/per-host/crystarium/.tmux.conf b/per-host/crystarium/.tmux.conf new file mode 100644 index 0000000..21ccc48 --- /dev/null +++ b/per-host/crystarium/.tmux.conf @@ -0,0 +1 @@ +source $TMUX_CONF_DIR/tmux.conf diff --git a/per-host/Adversary/.vim b/per-host/crystarium/.vim similarity index 100% rename from per-host/Adversary/.vim rename to per-host/crystarium/.vim diff --git a/per-host/crystarium/.vimrc b/per-host/crystarium/.vimrc new file mode 100644 index 0000000..1c85cde --- /dev/null +++ b/per-host/crystarium/.vimrc @@ -0,0 +1 @@ +source $VIM_CONFIG_DIR/vimrc diff --git a/per-host/crystarium/.zshrc b/per-host/crystarium/.zshrc new file mode 100644 index 0000000..37d1c7b --- /dev/null +++ b/per-host/crystarium/.zshrc @@ -0,0 +1 @@ +source $(dirname $(readlink -e ${(%):-%N}))/../../zsh/zshrc.zsh diff --git a/per-host/goldsaucer/.bash_aliases b/per-host/goldsaucer/.bash_aliases new file mode 100644 index 0000000..4a05da1 --- /dev/null +++ b/per-host/goldsaucer/.bash_aliases @@ -0,0 +1,2 @@ +#!/bin/bash +. "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )"/../../bash/bash_aliases.sh diff --git a/per-host/EarthDaughter/.config/nvim b/per-host/goldsaucer/.config/nvim similarity index 100% rename from per-host/EarthDaughter/.config/nvim rename to per-host/goldsaucer/.config/nvim diff --git a/per-host/EarthDaughter/.inputrc b/per-host/goldsaucer/.inputrc similarity index 100% rename from per-host/EarthDaughter/.inputrc rename to per-host/goldsaucer/.inputrc diff --git a/per-host/goldsaucer/.inputrc-common b/per-host/goldsaucer/.inputrc-common new file mode 120000 index 0000000..55d45ef --- /dev/null +++ b/per-host/goldsaucer/.inputrc-common @@ -0,0 +1 @@ +../../readline/inputrc \ No newline at end of file diff --git a/per-host/goldsaucer/.ssh/config b/per-host/goldsaucer/.ssh/config new file mode 100644 index 0000000..cfdf849 --- /dev/null +++ b/per-host/goldsaucer/.ssh/config @@ -0,0 +1 @@ +Include config-common diff --git a/per-host/MoonMother/.ssh/.config-common b/per-host/goldsaucer/.ssh/config-common similarity index 100% rename from per-host/MoonMother/.ssh/.config-common rename to per-host/goldsaucer/.ssh/config-common diff --git a/per-host/goldsaucer/.ssh/rc b/per-host/goldsaucer/.ssh/rc new file mode 100644 index 0000000..24a0d91 --- /dev/null +++ b/per-host/goldsaucer/.ssh/rc @@ -0,0 +1,2 @@ +#!/bin/bash +. ${BASH_SOURCE[0]}.rc-common diff --git a/per-host/goldsaucer/.tmux.conf b/per-host/goldsaucer/.tmux.conf new file mode 100644 index 0000000..21ccc48 --- /dev/null +++ b/per-host/goldsaucer/.tmux.conf @@ -0,0 +1 @@ +source $TMUX_CONF_DIR/tmux.conf diff --git a/per-host/EarthDaughter/.vim b/per-host/goldsaucer/.vim similarity index 100% rename from per-host/EarthDaughter/.vim rename to per-host/goldsaucer/.vim diff --git a/per-host/goldsaucer/.vimrc b/per-host/goldsaucer/.vimrc new file mode 100644 index 0000000..1c85cde --- /dev/null +++ b/per-host/goldsaucer/.vimrc @@ -0,0 +1 @@ +source $VIM_CONFIG_DIR/vimrc diff --git a/per-host/goldsaucer/.zshrc b/per-host/goldsaucer/.zshrc new file mode 100644 index 0000000..37d1c7b --- /dev/null +++ b/per-host/goldsaucer/.zshrc @@ -0,0 +1 @@ +source $(dirname $(readlink -e ${(%):-%N}))/../../zsh/zshrc.zsh diff --git a/per-host/gubal/.bash_aliases b/per-host/gubal/.bash_aliases index dc004ed..4a05da1 100644 --- a/per-host/gubal/.bash_aliases +++ b/per-host/gubal/.bash_aliases @@ -1,4 +1,2 @@ #!/bin/bash -. ~/.bash_aliases-common - -auto_tmux +. "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )"/../../bash/bash_aliases.sh diff --git a/per-host/gubal/.bash_aliases-common b/per-host/gubal/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/gubal/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/gubal/.inputrc-common b/per-host/gubal/.inputrc-common index e2a824e..55d45ef 120000 --- a/per-host/gubal/.inputrc-common +++ b/per-host/gubal/.inputrc-common @@ -1 +1 @@ -../../inputrc \ No newline at end of file +../../readline/inputrc \ No newline at end of file diff --git a/per-host/gubal/.ssh/.rc-common b/per-host/gubal/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/gubal/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/gubal/.ssh/authorized_keys b/per-host/gubal/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/gubal/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/gubal/.ssh/config b/per-host/gubal/.ssh/config index 0d04e94..cfdf849 100644 --- a/per-host/gubal/.ssh/config +++ b/per-host/gubal/.ssh/config @@ -1 +1 @@ -Include .config-common +Include config-common diff --git a/per-host/blocky-cafe/.ssh/.config-common b/per-host/gubal/.ssh/config-common similarity index 100% rename from per-host/blocky-cafe/.ssh/.config-common rename to per-host/gubal/.ssh/config-common diff --git a/per-host/gubal/.ssh/known_hosts b/per-host/gubal/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/gubal/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/gubal/.ssh/rc b/per-host/gubal/.ssh/rc index df1a298..24a0d91 100644 --- a/per-host/gubal/.ssh/rc +++ b/per-host/gubal/.ssh/rc @@ -1,2 +1,2 @@ -#!/bin/sh -. ~/.ssh/.rc-common +#!/bin/bash +. ${BASH_SOURCE[0]}.rc-common diff --git a/per-host/gubal/.tmux.conf b/per-host/gubal/.tmux.conf index 36fcf47..21ccc48 100644 --- a/per-host/gubal/.tmux.conf +++ b/per-host/gubal/.tmux.conf @@ -1 +1 @@ -source ~/.tmux.conf-common +source $TMUX_CONF_DIR/tmux.conf diff --git a/per-host/gubal/.tmux.conf-common b/per-host/gubal/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/gubal/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/gubal/.vimrc b/per-host/gubal/.vimrc index 92430cd..1c85cde 100644 --- a/per-host/gubal/.vimrc +++ b/per-host/gubal/.vimrc @@ -1 +1 @@ -source ~/.vimrc-common +source $VIM_CONFIG_DIR/vimrc diff --git a/per-host/gubal/.vimrc-common b/per-host/gubal/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/gubal/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/gubal/.zshrc b/per-host/gubal/.zshrc new file mode 100644 index 0000000..37d1c7b --- /dev/null +++ b/per-host/gubal/.zshrc @@ -0,0 +1 @@ +source $(dirname $(readlink -e ${(%):-%N}))/../../zsh/zshrc.zsh diff --git a/per-host/mari-wovn/.bash_aliases b/per-host/mari-wovn/.bash_aliases deleted file mode 100644 index eaba4a5..0000000 --- a/per-host/mari-wovn/.bash_aliases +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -if [[ -f ~/.bash_tools ]]; then - . ~/.bash_tools -fi - -auto_tmux - -function wovn_start() { - ( - # set -o errexit # Can't do this inside a function - set -o nounset - set -o pipefail - branch=${1:?} - branch=${branch#feature/} - tmux -2 new-window -t "Main Screen" -n "$branch" -c ~/equalizer -e BRANCH_NAME="$branch" 'bash -ic "_start_branch \"\$BRANCH_NAME\"; exec bash"' - ) -} - -function _start_branch() { - branch=${1:?} - branch=${branch#feature/} - ( - # set -o errexit # Can't do this inside a function - set -o nounset - set -o pipefail - if [[ ! -d ~/equalizer/"$branch" ]]; then - printf "=== Setting up a branch named ${branch}...\n" - cd ~/equalizer/master || exit "$?" - wovn_pull - if git show-ref --verify --quiet "refs/heads/feature/${branch}"; then - # Local branch exists, but the directory doesn't - printf "=== Checking out the local branch named feature/${branch} in a new working tree at ~/equalizer/${branch}...\n" - elif git show-ref --verify --quiet "refs/remotes/origin/feature/${branch}"; then - # Remote branch exists, but no local branch or directory - printf "=== Checking out the remote branch named feature/${branch} in a new working tree at ~/equalizer/${branch}...\n" - git branch --track "feature/${branch}" "origin/feature/${branch}" || exit "$?" - else - # Neither local nor remote branch exists, so create one. - printf "=== Creating a local and remote branch pair named feature/${branch} and checking it out in a new working tree at ~/equalizer/${branch}...\n" - git branch --no-track "feature/${branch}" "origin/develop_front" || exit "$?" - git push --set-upstream origin "feature/${branch}" - fi - git worktree add ../"${branch}" "feature/${branch}" || exit "$?" - cd ~/equalizer/"${branch}" || exit "$?" - wovn_update || exit "$?" - printf "\a=== Your branch ${branch} is ready!\n" - else - printf "=== Accessing an existing branch named ${branch}...\n" - cd ~/equalizer/"${branch}" || exit "$?" - wovn_check_update || printf "=== Some updates are necessary.\n" - printf "=== Ready to start using branch ${branch}!\n" - fi - ) - if [[ -d ~/equalizer/"$branch" ]]; then - cd ~/equalizer/"${branch}" - else - cd ~/equalizer/ - fi -} - -function get_current_branch_name() { - git symbolic-ref --quiet --short HEAD -} - -function get_remote_branch_name() { - git rev-parse --quiet --abbrev-ref --symbolic-full-name '@{u}' -} - -function wovn_pull() { - ( - printf "=== Updating local tracking branches...\n" - cd ~/equalizer/master || exit "$?" - git pull || exit "$?" - cd ~/equalizer/develop || exit "$?" - git pull || exit "$?" - cd ~/equalizer/develop_front || exit "$?" - git pull || exit "$?" - ) -} - -function wovn_check_update() { - ( - printf "=== Retrieving the latest data from the repository...\n" - cd "$(git rev-parse --show-toplevel)" - git fetch --all || exit "$?" - git log --graph --oneline --no-merges --simplify-by-decoration --decorate-refs=refs/{remotes/origin,heads}/{develop{,_front},master,$(get_current_branch_name)} "^$(git merge-base {master,develop{,_front}}^1)" origin/{develop{_front,},master} $(get_current_branch_name) $(get_remote_branch_name) - { [[ "$(git rev-parse master)" == "$(git rev-parse origin/master)" ]] \ - && [[ "$(git rev-parse develop_front)" == "$(git rev-parse origin/develop_front)" ]] \ - && [[ "$(git rev-parse develop)" == "$(git rev-parse origin/develop)" ]] \ - && git merge-base --is-ancestor origin/develop_front $(get_current_branch_name); } || exit "$?" - ) -} - -function wovn_update() { - ( - cd "$(git rev-parse --show-toplevel)" - # set -o errexit # Can't do this inside a function - set -o nounset - set -o pipefail - wovn_check_update || wovn_pull - printf "=== Updating the branch...\n" - git rebase develop_front || exit "$?" - printf "=== Checking dependencies...\n" - wovn_install - ) -} - -function wovn_install() { - ( - cd "$(git rev-parse --show-toplevel)" - # set -o errexit # Can't do this inside a function - set -o nounset - set -o pipefail - if ! bundle check >&/dev/null; then - printf "=== Installing Ruby dependencies...\n" - bundle install || exit "$?" - fi - if ! yarn install --offline --check-files --no-progress --ignore-optional --non-interactive --silent >&/dev/null; then - printf "=== Installing Javascript dependencies in top level...\n" - yarn install || exit "$?" - fi - cd widget || exit "$?" - if ! yarn install --offline --check-files --no-progress --ignore-optional --non-interactive --silent >&/dev/null; then - printf "=== Installing Javascript dependencies in widget...\n" - yarn install || exit "$?" - yarn build || exit "$?" - fi - cd .. || exit "$?" - cd front || exit "$?" - if ! yarn install --offline --check-files --no-progress --ignore-optional --non-interactive --silent >&/dev/null; then - printf "=== Installing Javascript dependencies in front...\n" - yarn install - fi - ) -} - -function wovn_delete() { - ( - # set -o errexit # Can't do this inside a function - set -o nounset - set -o pipefail - branch=${1:+feature/$1} - branch=${branch:-$(get_current_branch_name)} || exit "$?" - cd ~/equalizer/master - worktree="$(git worktree list --porcelain | grep -B2 ${branch} | cut -d' ' -f2 | head -n1)" || exit "$?" - git worktree remove "$worktree" || exit "$?" - git branch -d "$branch" || exit "$?" - ); local lastexit="$?" - if [[ ! -d "$PWD" ]]; then - cd ~/equalizer - fi - return $lastexit -} -function _list_feature_branches() { - git --git-dir ~/equalizer/master/.git for-each-ref --format '%(refname:short)' refs/heads/ \ - | grep -vF $'develop\ndevelop_front\nmaster' \ - | sed 's#^feature/##' -} - -function _branch_completions() { - if [[ $COMP_CWORD -ne 1 ]]; then - return - fi - COMPREPLY+=($(compgen -W "$(_list_feature_branches)" "${COMP_WORDS[1]}")) -} - -complete -F _branch_completions wovn_start -complete -F _branch_completions wovn_delete - -function front_tests() { - ( - cd "$(git rev-parse --show-toplevel)/front" && npm run test - ) -} diff --git a/per-host/mari-wovn/.bash_aliases-common b/per-host/mari-wovn/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/mari-wovn/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/mari-wovn/.config/nvim b/per-host/mari-wovn/.config/nvim deleted file mode 120000 index 90f57e4..0000000 --- a/per-host/mari-wovn/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../../../nvim \ No newline at end of file diff --git a/per-host/mari-wovn/.inputrc b/per-host/mari-wovn/.inputrc deleted file mode 100644 index 99cec8e..0000000 --- a/per-host/mari-wovn/.inputrc +++ /dev/null @@ -1 +0,0 @@ -$include ~/.inputrc-common diff --git a/per-host/mari-wovn/.inputrc-common b/per-host/mari-wovn/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/mari-wovn/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/mari-wovn/.ssh/.config-common b/per-host/mari-wovn/.ssh/.config-common deleted file mode 120000 index 6e6d201..0000000 --- a/per-host/mari-wovn/.ssh/.config-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/config \ No newline at end of file diff --git a/per-host/mari-wovn/.ssh/.rc-common b/per-host/mari-wovn/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/mari-wovn/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/mari-wovn/.ssh/authorized_keys b/per-host/mari-wovn/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/mari-wovn/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/mari-wovn/.ssh/config b/per-host/mari-wovn/.ssh/config deleted file mode 100644 index 67c10f1..0000000 --- a/per-host/mari-wovn/.ssh/config +++ /dev/null @@ -1,4 +0,0 @@ -Include .config-common -Host * - AddKeysToAgent yes - IdentityFile ~/.ssh/id_ed25519 diff --git a/per-host/mari-wovn/.ssh/known_hosts b/per-host/mari-wovn/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/mari-wovn/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/mari-wovn/.ssh/rc b/per-host/mari-wovn/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/mari-wovn/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/mari-wovn/.tmux.conf b/per-host/mari-wovn/.tmux.conf deleted file mode 100644 index 36fcf47..0000000 --- a/per-host/mari-wovn/.tmux.conf +++ /dev/null @@ -1 +0,0 @@ -source ~/.tmux.conf-common diff --git a/per-host/mari-wovn/.tmux.conf-common b/per-host/mari-wovn/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/mari-wovn/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/mari-wovn/.vim b/per-host/mari-wovn/.vim deleted file mode 120000 index 3a26453..0000000 --- a/per-host/mari-wovn/.vim +++ /dev/null @@ -1 +0,0 @@ -../../vim \ No newline at end of file diff --git a/per-host/mari-wovn/.vimrc b/per-host/mari-wovn/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/mari-wovn/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/mari-wovn/.vimrc-common b/per-host/mari-wovn/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/mari-wovn/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/mordhona/.bash_aliases b/per-host/mordhona/.bash_aliases index ae81942..4a05da1 100644 --- a/per-host/mordhona/.bash_aliases +++ b/per-host/mordhona/.bash_aliases @@ -1,4 +1,2 @@ #!/bin/bash -. ~/.bash_aliases-common - -# [[ $- == *i* ]] && auto_tmux +. "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )"/../../bash/bash_aliases.sh diff --git a/per-host/mordhona/.bash_aliases-common b/per-host/mordhona/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/mordhona/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/mordhona/.inputrc-common b/per-host/mordhona/.inputrc-common index e2a824e..55d45ef 120000 --- a/per-host/mordhona/.inputrc-common +++ b/per-host/mordhona/.inputrc-common @@ -1 +1 @@ -../../inputrc \ No newline at end of file +../../readline/inputrc \ No newline at end of file diff --git a/per-host/mordhona/.ssh/.config-common b/per-host/mordhona/.ssh/.config-common deleted file mode 120000 index 6e6d201..0000000 --- a/per-host/mordhona/.ssh/.config-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/config \ No newline at end of file diff --git a/per-host/mordhona/.ssh/.rc-common b/per-host/mordhona/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/mordhona/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/mordhona/.ssh/authorized_keys b/per-host/mordhona/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/mordhona/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/mordhona/.ssh/config b/per-host/mordhona/.ssh/config index 0d04e94..cfdf849 100644 --- a/per-host/mordhona/.ssh/config +++ b/per-host/mordhona/.ssh/config @@ -1 +1 @@ -Include .config-common +Include config-common diff --git a/per-host/costadelsol/.ssh/.config-common b/per-host/mordhona/.ssh/config-common similarity index 100% rename from per-host/costadelsol/.ssh/.config-common rename to per-host/mordhona/.ssh/config-common diff --git a/per-host/mordhona/.ssh/known_hosts b/per-host/mordhona/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/mordhona/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/mordhona/.ssh/rc b/per-host/mordhona/.ssh/rc index df1a298..24a0d91 100644 --- a/per-host/mordhona/.ssh/rc +++ b/per-host/mordhona/.ssh/rc @@ -1,2 +1,2 @@ -#!/bin/sh -. ~/.ssh/.rc-common +#!/bin/bash +. ${BASH_SOURCE[0]}.rc-common diff --git a/per-host/mordhona/.tmux.conf b/per-host/mordhona/.tmux.conf index 36fcf47..21ccc48 100644 --- a/per-host/mordhona/.tmux.conf +++ b/per-host/mordhona/.tmux.conf @@ -1 +1 @@ -source ~/.tmux.conf-common +source $TMUX_CONF_DIR/tmux.conf diff --git a/per-host/mordhona/.tmux.conf-common b/per-host/mordhona/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/mordhona/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/mordhona/.vimrc b/per-host/mordhona/.vimrc index 92430cd..1c85cde 100644 --- a/per-host/mordhona/.vimrc +++ b/per-host/mordhona/.vimrc @@ -1 +1 @@ -source ~/.vimrc-common +source $VIM_CONFIG_DIR/vimrc diff --git a/per-host/mordhona/.vimrc-common b/per-host/mordhona/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/mordhona/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/mordhona/.zshrc b/per-host/mordhona/.zshrc new file mode 100644 index 0000000..37d1c7b --- /dev/null +++ b/per-host/mordhona/.zshrc @@ -0,0 +1 @@ +source $(dirname $(readlink -e ${(%):-%N}))/../../zsh/zshrc.zsh diff --git a/per-host/pop-os/.bash_aliases b/per-host/pop-os/.bash_aliases deleted file mode 100644 index dc004ed..0000000 --- a/per-host/pop-os/.bash_aliases +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -auto_tmux diff --git a/per-host/pop-os/.bash_aliases-common b/per-host/pop-os/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/pop-os/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/pop-os/.config/nvim b/per-host/pop-os/.config/nvim deleted file mode 120000 index 90f57e4..0000000 --- a/per-host/pop-os/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../../../nvim \ No newline at end of file diff --git a/per-host/pop-os/.inputrc b/per-host/pop-os/.inputrc deleted file mode 100644 index 99cec8e..0000000 --- a/per-host/pop-os/.inputrc +++ /dev/null @@ -1 +0,0 @@ -$include ~/.inputrc-common diff --git a/per-host/pop-os/.inputrc-common b/per-host/pop-os/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/pop-os/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/pop-os/.ssh/.config-common b/per-host/pop-os/.ssh/.config-common deleted file mode 120000 index 6e6d201..0000000 --- a/per-host/pop-os/.ssh/.config-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/config \ No newline at end of file diff --git a/per-host/pop-os/.ssh/.rc-common b/per-host/pop-os/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/pop-os/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/pop-os/.ssh/authorized_keys b/per-host/pop-os/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/pop-os/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/pop-os/.ssh/config b/per-host/pop-os/.ssh/config deleted file mode 100644 index 0d04e94..0000000 --- a/per-host/pop-os/.ssh/config +++ /dev/null @@ -1 +0,0 @@ -Include .config-common diff --git a/per-host/pop-os/.ssh/known_hosts b/per-host/pop-os/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/pop-os/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/pop-os/.ssh/rc b/per-host/pop-os/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/pop-os/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/pop-os/.tmux.conf b/per-host/pop-os/.tmux.conf deleted file mode 100644 index fc4df0c..0000000 --- a/per-host/pop-os/.tmux.conf +++ /dev/null @@ -1,2 +0,0 @@ -source ~/.tmux.conf-common -set-option -g default-shell /usr/bin/zsh diff --git a/per-host/pop-os/.tmux.conf-common b/per-host/pop-os/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/pop-os/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/pop-os/.vim b/per-host/pop-os/.vim deleted file mode 120000 index 3a26453..0000000 --- a/per-host/pop-os/.vim +++ /dev/null @@ -1 +0,0 @@ -../../vim \ No newline at end of file diff --git a/per-host/pop-os/.vimrc b/per-host/pop-os/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/pop-os/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/pop-os/.vimrc-common b/per-host/pop-os/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/pop-os/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.bash_aliases b/per-host/reya-XPS-13-9300/.bash_aliases deleted file mode 100644 index 68f682d..0000000 --- a/per-host/reya-XPS-13-9300/.bash_aliases +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - -auto_tmux diff --git a/per-host/reya-XPS-13-9300/.bash_aliases-common b/per-host/reya-XPS-13-9300/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/reya-XPS-13-9300/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.config/nvim b/per-host/reya-XPS-13-9300/.config/nvim deleted file mode 120000 index 90f57e4..0000000 --- a/per-host/reya-XPS-13-9300/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../../../nvim \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.inputrc b/per-host/reya-XPS-13-9300/.inputrc deleted file mode 100644 index 99cec8e..0000000 --- a/per-host/reya-XPS-13-9300/.inputrc +++ /dev/null @@ -1 +0,0 @@ -$include ~/.inputrc-common diff --git a/per-host/reya-XPS-13-9300/.inputrc-common b/per-host/reya-XPS-13-9300/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/reya-XPS-13-9300/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.ssh/.config-common b/per-host/reya-XPS-13-9300/.ssh/.config-common deleted file mode 120000 index 6e6d201..0000000 --- a/per-host/reya-XPS-13-9300/.ssh/.config-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/config \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.ssh/.rc-common b/per-host/reya-XPS-13-9300/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/reya-XPS-13-9300/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.ssh/authorized_keys b/per-host/reya-XPS-13-9300/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/reya-XPS-13-9300/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.ssh/config b/per-host/reya-XPS-13-9300/.ssh/config deleted file mode 100644 index 0d04e94..0000000 --- a/per-host/reya-XPS-13-9300/.ssh/config +++ /dev/null @@ -1 +0,0 @@ -Include .config-common diff --git a/per-host/reya-XPS-13-9300/.ssh/known_hosts b/per-host/reya-XPS-13-9300/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/reya-XPS-13-9300/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.ssh/rc b/per-host/reya-XPS-13-9300/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/reya-XPS-13-9300/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/reya-XPS-13-9300/.tmux.conf b/per-host/reya-XPS-13-9300/.tmux.conf deleted file mode 100644 index 36fcf47..0000000 --- a/per-host/reya-XPS-13-9300/.tmux.conf +++ /dev/null @@ -1 +0,0 @@ -source ~/.tmux.conf-common diff --git a/per-host/reya-XPS-13-9300/.tmux.conf-common b/per-host/reya-XPS-13-9300/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/reya-XPS-13-9300/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.vim b/per-host/reya-XPS-13-9300/.vim deleted file mode 120000 index 3a26453..0000000 --- a/per-host/reya-XPS-13-9300/.vim +++ /dev/null @@ -1 +0,0 @@ -../../vim \ No newline at end of file diff --git a/per-host/reya-XPS-13-9300/.vimrc b/per-host/reya-XPS-13-9300/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/reya-XPS-13-9300/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/reya-XPS-13-9300/.vimrc-common b/per-host/reya-XPS-13-9300/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/reya-XPS-13-9300/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/rock64/.bash_aliases b/per-host/rock64/.bash_aliases deleted file mode 100644 index dc004ed..0000000 --- a/per-host/rock64/.bash_aliases +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -auto_tmux diff --git a/per-host/rock64/.bash_aliases-common b/per-host/rock64/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/rock64/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/rock64/.config/nvim b/per-host/rock64/.config/nvim deleted file mode 120000 index 90f57e4..0000000 --- a/per-host/rock64/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../../../nvim \ No newline at end of file diff --git a/per-host/rock64/.inputrc b/per-host/rock64/.inputrc deleted file mode 100644 index 99cec8e..0000000 --- a/per-host/rock64/.inputrc +++ /dev/null @@ -1 +0,0 @@ -$include ~/.inputrc-common diff --git a/per-host/rock64/.inputrc-common b/per-host/rock64/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/rock64/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/rock64/.ssh/.config-common b/per-host/rock64/.ssh/.config-common deleted file mode 120000 index 6e6d201..0000000 --- a/per-host/rock64/.ssh/.config-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/config \ No newline at end of file diff --git a/per-host/rock64/.ssh/.rc-common b/per-host/rock64/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/rock64/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/rock64/.ssh/authorized_keys b/per-host/rock64/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/rock64/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/rock64/.ssh/config b/per-host/rock64/.ssh/config deleted file mode 100644 index 0d04e94..0000000 --- a/per-host/rock64/.ssh/config +++ /dev/null @@ -1 +0,0 @@ -Include .config-common diff --git a/per-host/rock64/.ssh/known_hosts b/per-host/rock64/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/rock64/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/rock64/.ssh/rc b/per-host/rock64/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/rock64/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/rock64/.tmux.conf b/per-host/rock64/.tmux.conf deleted file mode 100644 index 36fcf47..0000000 --- a/per-host/rock64/.tmux.conf +++ /dev/null @@ -1 +0,0 @@ -source ~/.tmux.conf-common diff --git a/per-host/rock64/.tmux.conf-common b/per-host/rock64/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/rock64/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/rock64/.vim b/per-host/rock64/.vim deleted file mode 120000 index 3a26453..0000000 --- a/per-host/rock64/.vim +++ /dev/null @@ -1 +0,0 @@ -../../vim \ No newline at end of file diff --git a/per-host/rock64/.vimrc b/per-host/rock64/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/rock64/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/rock64/.vimrc-common b/per-host/rock64/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/rock64/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/template/.bash_aliases b/per-host/template/.bash_aliases index dc004ed..4a05da1 100644 --- a/per-host/template/.bash_aliases +++ b/per-host/template/.bash_aliases @@ -1,4 +1,2 @@ #!/bin/bash -. ~/.bash_aliases-common - -auto_tmux +. "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )"/../../bash/bash_aliases.sh diff --git a/per-host/template/.bash_aliases-common b/per-host/template/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/template/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/template/.inputrc-common b/per-host/template/.inputrc-common index e2a824e..55d45ef 120000 --- a/per-host/template/.inputrc-common +++ b/per-host/template/.inputrc-common @@ -1 +1 @@ -../../inputrc \ No newline at end of file +../../readline/inputrc \ No newline at end of file diff --git a/per-host/template/.ssh/.config-common b/per-host/template/.ssh/.config-common deleted file mode 120000 index 6e6d201..0000000 --- a/per-host/template/.ssh/.config-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/config \ No newline at end of file diff --git a/per-host/template/.ssh/.rc-common b/per-host/template/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/template/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/template/.ssh/authorized_keys b/per-host/template/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/template/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/template/.ssh/config b/per-host/template/.ssh/config index 0d04e94..cfdf849 100644 --- a/per-host/template/.ssh/config +++ b/per-host/template/.ssh/config @@ -1 +1 @@ -Include .config-common +Include config-common diff --git a/per-host/gubal/.ssh/.config-common b/per-host/template/.ssh/config-common similarity index 100% rename from per-host/gubal/.ssh/.config-common rename to per-host/template/.ssh/config-common diff --git a/per-host/template/.ssh/known_hosts b/per-host/template/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/template/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/template/.ssh/rc b/per-host/template/.ssh/rc index df1a298..24a0d91 100644 --- a/per-host/template/.ssh/rc +++ b/per-host/template/.ssh/rc @@ -1,2 +1,2 @@ -#!/bin/sh -. ~/.ssh/.rc-common +#!/bin/bash +. ${BASH_SOURCE[0]}.rc-common diff --git a/per-host/template/.tmux.conf b/per-host/template/.tmux.conf index 36fcf47..21ccc48 100644 --- a/per-host/template/.tmux.conf +++ b/per-host/template/.tmux.conf @@ -1 +1 @@ -source ~/.tmux.conf-common +source $TMUX_CONF_DIR/tmux.conf diff --git a/per-host/template/.tmux.conf-common b/per-host/template/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/template/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/template/.vimrc b/per-host/template/.vimrc index 92430cd..1c85cde 100644 --- a/per-host/template/.vimrc +++ b/per-host/template/.vimrc @@ -1 +1 @@ -source ~/.vimrc-common +source $VIM_CONFIG_DIR/vimrc diff --git a/per-host/template/.vimrc-common b/per-host/template/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/template/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/per-host/template/.zshrc b/per-host/template/.zshrc new file mode 100644 index 0000000..37d1c7b --- /dev/null +++ b/per-host/template/.zshrc @@ -0,0 +1 @@ +source $(dirname $(readlink -e ${(%):-%N}))/../../zsh/zshrc.zsh diff --git a/per-host/terraria-server/.bash_aliases b/per-host/terraria-server/.bash_aliases deleted file mode 100644 index dc004ed..0000000 --- a/per-host/terraria-server/.bash_aliases +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -. ~/.bash_aliases-common - -auto_tmux diff --git a/per-host/terraria-server/.bash_aliases-common b/per-host/terraria-server/.bash_aliases-common deleted file mode 120000 index 2cebbdf..0000000 --- a/per-host/terraria-server/.bash_aliases-common +++ /dev/null @@ -1 +0,0 @@ -../../bash_aliases.sh \ No newline at end of file diff --git a/per-host/terraria-server/.config/nvim b/per-host/terraria-server/.config/nvim deleted file mode 120000 index 90f57e4..0000000 --- a/per-host/terraria-server/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../../../nvim \ No newline at end of file diff --git a/per-host/terraria-server/.inputrc b/per-host/terraria-server/.inputrc deleted file mode 100644 index 99cec8e..0000000 --- a/per-host/terraria-server/.inputrc +++ /dev/null @@ -1 +0,0 @@ -$include ~/.inputrc-common diff --git a/per-host/terraria-server/.inputrc-common b/per-host/terraria-server/.inputrc-common deleted file mode 120000 index e2a824e..0000000 --- a/per-host/terraria-server/.inputrc-common +++ /dev/null @@ -1 +0,0 @@ -../../inputrc \ No newline at end of file diff --git a/per-host/terraria-server/.ssh/.config-common b/per-host/terraria-server/.ssh/.config-common deleted file mode 120000 index 6e6d201..0000000 --- a/per-host/terraria-server/.ssh/.config-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/config \ No newline at end of file diff --git a/per-host/terraria-server/.ssh/.rc-common b/per-host/terraria-server/.ssh/.rc-common deleted file mode 120000 index 450d0b6..0000000 --- a/per-host/terraria-server/.ssh/.rc-common +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/rc \ No newline at end of file diff --git a/per-host/terraria-server/.ssh/authorized_keys b/per-host/terraria-server/.ssh/authorized_keys deleted file mode 120000 index 91ff7ab..0000000 --- a/per-host/terraria-server/.ssh/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/authorized_keys \ No newline at end of file diff --git a/per-host/terraria-server/.ssh/config b/per-host/terraria-server/.ssh/config deleted file mode 100644 index 0d04e94..0000000 --- a/per-host/terraria-server/.ssh/config +++ /dev/null @@ -1 +0,0 @@ -Include .config-common diff --git a/per-host/terraria-server/.ssh/known_hosts b/per-host/terraria-server/.ssh/known_hosts deleted file mode 120000 index 6c3c05e..0000000 --- a/per-host/terraria-server/.ssh/known_hosts +++ /dev/null @@ -1 +0,0 @@ -../../../ssh/known_hosts \ No newline at end of file diff --git a/per-host/terraria-server/.ssh/rc b/per-host/terraria-server/.ssh/rc deleted file mode 100644 index df1a298..0000000 --- a/per-host/terraria-server/.ssh/rc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -. ~/.ssh/.rc-common diff --git a/per-host/terraria-server/.tmux.conf b/per-host/terraria-server/.tmux.conf deleted file mode 100644 index 36fcf47..0000000 --- a/per-host/terraria-server/.tmux.conf +++ /dev/null @@ -1 +0,0 @@ -source ~/.tmux.conf-common diff --git a/per-host/terraria-server/.tmux.conf-common b/per-host/terraria-server/.tmux.conf-common deleted file mode 120000 index d9a5ba4..0000000 --- a/per-host/terraria-server/.tmux.conf-common +++ /dev/null @@ -1 +0,0 @@ -../../tmux.conf \ No newline at end of file diff --git a/per-host/terraria-server/.vim b/per-host/terraria-server/.vim deleted file mode 120000 index 3a26453..0000000 --- a/per-host/terraria-server/.vim +++ /dev/null @@ -1 +0,0 @@ -../../vim \ No newline at end of file diff --git a/per-host/terraria-server/.vimrc b/per-host/terraria-server/.vimrc deleted file mode 100644 index 92430cd..0000000 --- a/per-host/terraria-server/.vimrc +++ /dev/null @@ -1 +0,0 @@ -source ~/.vimrc-common diff --git a/per-host/terraria-server/.vimrc-common b/per-host/terraria-server/.vimrc-common deleted file mode 120000 index 90f52f0..0000000 --- a/per-host/terraria-server/.vimrc-common +++ /dev/null @@ -1 +0,0 @@ -../../vimrc \ No newline at end of file diff --git a/inputrc b/readline/inputrc similarity index 94% rename from inputrc rename to readline/inputrc index f209d45..a8d4676 100644 --- a/inputrc +++ b/readline/inputrc @@ -1,4 +1,3 @@ -# link destination: $HOME/.inputrc $include /etc/inputrc "\C-p":history-search-backward diff --git a/ssh-find-agent b/ssh-find-agent deleted file mode 160000 index d1e030b..0000000 --- a/ssh-find-agent +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d1e030b29984874ec6907818cc8a832fa384d461 diff --git a/tmux.conf b/tmux/tmux.conf similarity index 97% rename from tmux.conf rename to tmux/tmux.conf index 4631068..050ad4e 100644 --- a/tmux.conf +++ b/tmux/tmux.conf @@ -1,4 +1,3 @@ -# link destination: $HOME/.bash_aliases ############## # Key Bindings ############## @@ -15,6 +14,7 @@ bind % split-window -h -c "#{pane_current_path}" ##################### # Terminal Properties ##################### +set-option -g default-shell /bin/zsh set-option -sa terminal-overrides ',xterm:RGB' set-option -g default-terminal screen-256color-bce set-option -sg escape-time 10 @@ -52,7 +52,6 @@ set-option -g history-limit 99999 ############################### # set-option -ug bell-action # set-option -ug default-command -# set-option -ug default-shell # set-option -ug display-panes-color # set-option -ug display-panes-time # set-option -ug display-time diff --git a/tmux.need-reboot.sh b/tmux/tmux.need-reboot.sh similarity index 100% rename from tmux.need-reboot.sh rename to tmux/tmux.need-reboot.sh diff --git a/tmux.screen.conf b/tmux/tmux.screen.conf similarity index 100% rename from tmux.screen.conf rename to tmux/tmux.screen.conf diff --git a/tmux.status-helpers.sh b/tmux/tmux.status-helpers.sh similarity index 100% rename from tmux.status-helpers.sh rename to tmux/tmux.status-helpers.sh diff --git a/vimrc b/vim/vimrc similarity index 98% rename from vimrc rename to vim/vimrc index 7b228a4..a8f01e8 100644 --- a/vimrc +++ b/vim/vimrc @@ -1,5 +1,3 @@ -" link destination: $HOME/.vimrc - " Enable modern Vim features not compatible with Vi spec. set nocompatible diff --git a/zsh/customizations/zsh_aliases.zsh b/zsh/customizations/zsh_aliases.zsh new file mode 100644 index 0000000..10b0290 --- /dev/null +++ b/zsh/customizations/zsh_aliases.zsh @@ -0,0 +1,48 @@ +#!/bin/zsh + +# Install EDITOR +export EDITOR='nvim' +# Set up the vim config path +export VIM_CONFIG_DIR=$__COMMON_CONFIGS/vim + +# Set potentially-destructive commands to use interactive modes +alias rm='rm -i' +alias cp='cp -i' +alias mv='mv -i' + +# Use a larger number of KDF rounds and the secure ed25519 key type by default. +alias ssh-keygen="ssh-keygen -a 100 -b 4096 -t ed25519" + +# Reload this file's (and other customizations') aliases. +function reload_zsh() +{ + source "$HOME"/.zshrc +} + +# Check if the git repository is fully synced. +# Pass --force-fetch to force the fetch to happen, even if one happened recently. +function __common_configs_in_sync() { + ( + # Failure modes, in order: + # exit 9: Problem cd'ing or getting commit hashes - things that should never fail + cd $__COMMON_CONFIGS || exit 9 + localCommit=$(git show-ref --verify --hash refs/heads/master) || exit 9 + if [[ $1 == --force-fetch ]] || [[ ! -f .last-fetch ]] || [[ $(date --reference=.last-fetch +%s) -lt $(date --date='5 minutes ago' +%s) ]]; then + git fetch --quiet origin && touch .last-fetch + fi + remoteCommit=$(git show-ref --verify --hash refs/remotes/origin/master) || exit 9 + # exit 1: master is not the commit which is checked out. + [[ $(git symbolic-ref HEAD) == "refs/heads/master" ]] || exit 1 + # exit 2: master and origin/master are different. + [[ $localCommit == $remoteCommit ]] || exit 2 + # exit 3: There are staged changes. + git diff-index --cached --exit-code --quiet HEAD || exit 3 + # exit 4: There are unstaged changes. + git diff-files --exit-code --quiet HEAD || exit 4 + ) +} + +# Enable built in help in the shell. +export HELPDIR=/usr/share/zsh/help +autoload run-help +alias help=run-help diff --git a/zsh/customizations/zsh_tmux.zsh b/zsh/customizations/zsh_tmux.zsh new file mode 100644 index 0000000..efc4961 --- /dev/null +++ b/zsh/customizations/zsh_tmux.zsh @@ -0,0 +1,33 @@ +export TMUX_CONF_DIR=${TMUX_CONF_DIR:-$__COMMON_CONFIGS/tmux} +export TMUX_STATUS_SCRIPT=${TMUX_STATUS_SCRIPT:-$TMUX_CONF_DIR/tmux.need-reboot.sh} + +function tmux_running() { + tmux -2 has-session -t "Nexus" +} + +function tmux_init() { + tmux -2 new-session -d -s "Nexus" -n "Misc." + tmux -2 new-window -d -t "Nexus:0" -n "Monitor" "htop" +} + +function go_tmux() { + if [[ "$TERM" == screen* ]]; then + >&2 echo "You're already inside a tmux instance!" + return 1 + fi + echo "Starting tmux..." + tmux_running || tmux_init || return + if [[ $1 == "-x" ]]; then + exec tmux -2 attach-session -t "Nexus" || return 1 + else + tmux -2 attach-session -t "Nexus" || return 1 + fi +} + +function auto_tmux () +{ + if [[ -t 1 ]] && [[ -t 0 ]] && [[ -t 2 ]] && [[ "$TERM" != screen* ]] && [[ -z "$ALREADY_TRIED_STARTING_TMUX" ]]; then + ALREADY_TRIED_STARTING_TMUX=true + go_tmux -x + fi +} diff --git a/ohmyzsh b/zsh/ohmyzsh similarity index 100% rename from ohmyzsh rename to zsh/ohmyzsh diff --git a/zshrc b/zsh/zshrc.zsh similarity index 92% rename from zshrc rename to zsh/zshrc.zsh index f0a97a4..4a15281 100644 --- a/zshrc +++ b/zsh/zshrc.zsh @@ -1,14 +1,18 @@ +#!/bin/zsh +# Find the path of the git repository relative to this file. +export __COMMON_CONFIGS=$(readlink -e $(dirname $(readlink -e ${(%):-%N}))/..) + # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH # Path to your oh-my-zsh installation. -export ZSH="/home/reya/.oh-my-zsh" +export ZSH="$__COMMON_CONFIGS/zsh/ohmyzsh" # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="robbyrussell" +ZSH_THEME="agnoster" # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load @@ -61,7 +65,7 @@ ZSH_THEME="robbyrussell" # HIST_STAMPS="mm/dd/yyyy" # Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder +ZSH_CUSTOM=${__COMMON_CONFIGS}/zsh/customizations # Which plugins would you like to load? # Standard plugins can be found in $ZSH/plugins/ @@ -71,9 +75,6 @@ ZSH_THEME="robbyrussell" plugins=(git) source $ZSH/oh-my-zsh.sh - -source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh - # User configuration # export MANPATH="/usr/local/man:$MANPATH"