From 10742107d0bbbe1e4f25e87c23ca6561c4b4d55e Mon Sep 17 00:00:00 2001 From: Nathan Steel Date: Fri, 16 Feb 2024 12:34:36 +0000 Subject: [PATCH] Change dotfiles to work with stow apt install stow then run ./stow_script.sh from the directory --- .bash_aliases => bash/.bash_aliases | 0 .bashrc => bash/.bashrc | 0 .inputrc => bash/.inputrc | 0 .tjs_aliases => bash/.tjs_aliases | 0 {.config => compton/.config}/compton.conf | 0 .gitconfig => git/.gitconfig | 0 {.config => mpv/.config}/mpv/mpv.conf | 0 {.newsboat => newsboat/.newsboat}/config | 0 {.newsboat => newsboat/.newsboat}/urls | 0 {.config => nvim/.config}/nvim/init.vim | 0 ssh/.ssh/config | 39 +++++++++++++++++++++++ stow_script.sh | 21 ++++++++++++ .tmux.conf => tmux/.tmux.conf | 0 .vimrc => vim/.vimrc | 0 .xinitrc => xinit/.xinitrc | 0 .zshrc => zsh/.zshrc | 0 16 files changed, 60 insertions(+) rename .bash_aliases => bash/.bash_aliases (100%) rename .bashrc => bash/.bashrc (100%) rename .inputrc => bash/.inputrc (100%) rename .tjs_aliases => bash/.tjs_aliases (100%) rename {.config => compton/.config}/compton.conf (100%) rename .gitconfig => git/.gitconfig (100%) rename {.config => mpv/.config}/mpv/mpv.conf (100%) rename {.newsboat => newsboat/.newsboat}/config (100%) rename {.newsboat => newsboat/.newsboat}/urls (100%) rename {.config => nvim/.config}/nvim/init.vim (100%) create mode 100644 ssh/.ssh/config create mode 100755 stow_script.sh rename .tmux.conf => tmux/.tmux.conf (100%) rename .vimrc => vim/.vimrc (100%) rename .xinitrc => xinit/.xinitrc (100%) rename .zshrc => zsh/.zshrc (100%) diff --git a/.bash_aliases b/bash/.bash_aliases similarity index 100% rename from .bash_aliases rename to bash/.bash_aliases diff --git a/.bashrc b/bash/.bashrc similarity index 100% rename from .bashrc rename to bash/.bashrc diff --git a/.inputrc b/bash/.inputrc similarity index 100% rename from .inputrc rename to bash/.inputrc diff --git a/.tjs_aliases b/bash/.tjs_aliases similarity index 100% rename from .tjs_aliases rename to bash/.tjs_aliases diff --git a/.config/compton.conf b/compton/.config/compton.conf similarity index 100% rename from .config/compton.conf rename to compton/.config/compton.conf diff --git a/.gitconfig b/git/.gitconfig similarity index 100% rename from .gitconfig rename to git/.gitconfig diff --git a/.config/mpv/mpv.conf b/mpv/.config/mpv/mpv.conf similarity index 100% rename from .config/mpv/mpv.conf rename to mpv/.config/mpv/mpv.conf diff --git a/.newsboat/config b/newsboat/.newsboat/config similarity index 100% rename from .newsboat/config rename to newsboat/.newsboat/config diff --git a/.newsboat/urls b/newsboat/.newsboat/urls similarity index 100% rename from .newsboat/urls rename to newsboat/.newsboat/urls diff --git a/.config/nvim/init.vim b/nvim/.config/nvim/init.vim similarity index 100% rename from .config/nvim/init.vim rename to nvim/.config/nvim/init.vim diff --git a/ssh/.ssh/config b/ssh/.ssh/config new file mode 100644 index 0000000..4d652a1 --- /dev/null +++ b/ssh/.ssh/config @@ -0,0 +1,39 @@ +Host truenas + Hostname 192.168.0.100 + User nathan + Port 2020 + +Host red + Hostname 192.168.0.200 + User nathan + Port 2020 + +Host lilman + Hostname 192.168.0.220 + User nathan + Port 2020 + +Host opnsense + Hostname 192.168.0.221 + User nathan + Port 2020 + +Host truenas + Hostname 192.168.0.222 + User nathan + Port 2020 + +Host wireguard + Hostname 192.168.0.223 + User nathan + Port 2020 + +Host racknerd + Hostname racknerd.aney.co.uk + User nathan + Port 2020 + +Host alphavps + Hostname alphavps.aney.co.uk + User nathan + Port 2020 diff --git a/stow_script.sh b/stow_script.sh new file mode 100755 index 0000000..e164aa8 --- /dev/null +++ b/stow_script.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +DIRS=$(ls -d */) +#stow -d + +# First make hidden files not wildcardable +shopt -u dotglob + +# Loop the directories +for i in "${DIRS[@]}" +do + echo $i + # Stow adopt, like -d, but it replaces the content in stow dir with + # what already exists + stow --adopt $i +done + +# Now to revert the --adopt, and make it act like -d +# !Make sure there's nothing new/uncommited in dotfiles dir first +#git --reset hard + diff --git a/.tmux.conf b/tmux/.tmux.conf similarity index 100% rename from .tmux.conf rename to tmux/.tmux.conf diff --git a/.vimrc b/vim/.vimrc similarity index 100% rename from .vimrc rename to vim/.vimrc diff --git a/.xinitrc b/xinit/.xinitrc similarity index 100% rename from .xinitrc rename to xinit/.xinitrc diff --git a/.zshrc b/zsh/.zshrc similarity index 100% rename from .zshrc rename to zsh/.zshrc