From beba66ee8c880b330d578555fbab4fa573b1a650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Fernando=20Carri=C3=B3n?= Date: Sun, 29 Sep 2024 17:12:14 +0000 Subject: [PATCH] support directory pre-creation --- etc/any/bash.dirs | 1 + etc/linux-gnu/bash.dirs | 1 + etc/linux-gnu/systemd.dirs | 1 + home/any/gpg.dirs | 1 + home/any/kitty.dirs | 1 + home/any/scripts.dirs | 1 + home/any/ssh.dirs | 1 + home/any/tmux.dirs | 1 + home/any/vim.dirs | 6 ++++++ home/any/vim/.config/nvim | 1 - .../{.vim => .config/nvim}/autoload/plug.vim | 0 .../nvim}/autoload/plug.vim.old | 0 home/any/vim/{.vim => .config/nvim}/bak.vimrc | 0 .../{.vim => .config/nvim}/coc-settings.json | 0 .../{.vim => .config/nvim}/colors/Czar.vim | 0 .../{.vim => .config/nvim}/colors/inkpot.vim | 0 .../{.vim => .config/nvim}/colors/srcery.vim | 0 .../nvim}/colors/synthwave.vim | 0 .../nvim}/colors/twilight.vim | 0 home/any/vim/{.vim => .config/nvim}/init.vim | 0 .../{.vim => .config/nvim}/spell/en.utf-8.add | 0 .../nvim}/spell/en.utf-8.add.spl | Bin home/any/vim/{.vim => .config/nvim}/vimrc | 0 .../nvim}/vimrc.d/todo-comments.lua | 0 .../nvim}/vimrc.d/treesitter.lua | 0 .../nvim}/vimrc.d/venv-selector.lua | 0 .../{.vim => .config/nvim}/vimrc.d/zls.lua | 0 home/any/vim/.vim | 1 + home/any/vim/.vim/.gitignore | 2 -- home/any/vim/.vim/plugged/.gitkeep | 0 home/any/vim/.vim/tmp/.gitignore | 6 ------ home/any/vim/.vim/tmp/backup/.gitkeep | 0 home/any/vim/.vim/tmp/swap/.gitkeep | 0 home/any/vim/.vim/tmp/undo/.gitkeep | 0 home/darwin/karabiner.dirs | 1 + home/linux-gnu/dunst.dirs | 1 + home/linux-gnu/fonts.dirs | 2 ++ .../fonts/.local/share/fonts/Misc/.uuid | 1 - .../fonts/.local/share/fonts/NerdFonts/.uuid | 1 - home/linux-gnu/gnome-extensions.dirs | 1 + home/linux-gnu/i3.dirs | 2 ++ home/linux-gnu/systemd.dirs | 1 + home/linux-gnu/wordgrinder.dirs | 1 + stowall.sh | 18 ++++++++++++------ 44 files changed, 36 insertions(+), 17 deletions(-) create mode 100644 etc/any/bash.dirs create mode 100644 etc/linux-gnu/bash.dirs create mode 100644 etc/linux-gnu/systemd.dirs create mode 100644 home/any/gpg.dirs create mode 100644 home/any/kitty.dirs create mode 100644 home/any/scripts.dirs create mode 100644 home/any/ssh.dirs create mode 100644 home/any/tmux.dirs create mode 100644 home/any/vim.dirs delete mode 120000 home/any/vim/.config/nvim rename home/any/vim/{.vim => .config/nvim}/autoload/plug.vim (100%) rename home/any/vim/{.vim => .config/nvim}/autoload/plug.vim.old (100%) rename home/any/vim/{.vim => .config/nvim}/bak.vimrc (100%) rename home/any/vim/{.vim => .config/nvim}/coc-settings.json (100%) rename home/any/vim/{.vim => .config/nvim}/colors/Czar.vim (100%) rename home/any/vim/{.vim => .config/nvim}/colors/inkpot.vim (100%) rename home/any/vim/{.vim => .config/nvim}/colors/srcery.vim (100%) rename home/any/vim/{.vim => .config/nvim}/colors/synthwave.vim (100%) rename home/any/vim/{.vim => .config/nvim}/colors/twilight.vim (100%) rename home/any/vim/{.vim => .config/nvim}/init.vim (100%) rename home/any/vim/{.vim => .config/nvim}/spell/en.utf-8.add (100%) rename home/any/vim/{.vim => .config/nvim}/spell/en.utf-8.add.spl (100%) rename home/any/vim/{.vim => .config/nvim}/vimrc (100%) rename home/any/vim/{.vim => .config/nvim}/vimrc.d/todo-comments.lua (100%) rename home/any/vim/{.vim => .config/nvim}/vimrc.d/treesitter.lua (100%) rename home/any/vim/{.vim => .config/nvim}/vimrc.d/venv-selector.lua (100%) rename home/any/vim/{.vim => .config/nvim}/vimrc.d/zls.lua (100%) create mode 120000 home/any/vim/.vim delete mode 100644 home/any/vim/.vim/.gitignore delete mode 100644 home/any/vim/.vim/plugged/.gitkeep delete mode 100644 home/any/vim/.vim/tmp/.gitignore delete mode 100644 home/any/vim/.vim/tmp/backup/.gitkeep delete mode 100644 home/any/vim/.vim/tmp/swap/.gitkeep delete mode 100644 home/any/vim/.vim/tmp/undo/.gitkeep create mode 100644 home/darwin/karabiner.dirs create mode 100644 home/linux-gnu/dunst.dirs create mode 100644 home/linux-gnu/fonts.dirs delete mode 100644 home/linux-gnu/fonts/.local/share/fonts/Misc/.uuid delete mode 100644 home/linux-gnu/fonts/.local/share/fonts/NerdFonts/.uuid create mode 100644 home/linux-gnu/gnome-extensions.dirs create mode 100644 home/linux-gnu/i3.dirs create mode 100644 home/linux-gnu/systemd.dirs create mode 100644 home/linux-gnu/wordgrinder.dirs diff --git a/etc/any/bash.dirs b/etc/any/bash.dirs new file mode 100644 index 0000000..eaa4c52 --- /dev/null +++ b/etc/any/bash.dirs @@ -0,0 +1 @@ +bashrc.d diff --git a/etc/linux-gnu/bash.dirs b/etc/linux-gnu/bash.dirs new file mode 100644 index 0000000..628ad79 --- /dev/null +++ b/etc/linux-gnu/bash.dirs @@ -0,0 +1 @@ +profile.d diff --git a/etc/linux-gnu/systemd.dirs b/etc/linux-gnu/systemd.dirs new file mode 100644 index 0000000..6d89474 --- /dev/null +++ b/etc/linux-gnu/systemd.dirs @@ -0,0 +1 @@ +systemd/system/getty.target.wants diff --git a/home/any/gpg.dirs b/home/any/gpg.dirs new file mode 100644 index 0000000..f977ea6 --- /dev/null +++ b/home/any/gpg.dirs @@ -0,0 +1 @@ +.gnupg diff --git a/home/any/kitty.dirs b/home/any/kitty.dirs new file mode 100644 index 0000000..b9d7647 --- /dev/null +++ b/home/any/kitty.dirs @@ -0,0 +1 @@ +.config/kitty diff --git a/home/any/scripts.dirs b/home/any/scripts.dirs new file mode 100644 index 0000000..36fde5b --- /dev/null +++ b/home/any/scripts.dirs @@ -0,0 +1 @@ +.local/bin diff --git a/home/any/ssh.dirs b/home/any/ssh.dirs new file mode 100644 index 0000000..b045421 --- /dev/null +++ b/home/any/ssh.dirs @@ -0,0 +1 @@ +.ssh diff --git a/home/any/tmux.dirs b/home/any/tmux.dirs new file mode 100644 index 0000000..52bbc36 --- /dev/null +++ b/home/any/tmux.dirs @@ -0,0 +1 @@ +.tmux diff --git a/home/any/vim.dirs b/home/any/vim.dirs new file mode 100644 index 0000000..9ddcb65 --- /dev/null +++ b/home/any/vim.dirs @@ -0,0 +1,6 @@ +.config/nvim/autoload +.config/nvim/colors +.config/nvim/plugged +.config/nvim/session +.config/nvim/spell +.config/nvim/tmp diff --git a/home/any/vim/.config/nvim b/home/any/vim/.config/nvim deleted file mode 120000 index 815cbcc..0000000 --- a/home/any/vim/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -../.vim \ No newline at end of file diff --git a/home/any/vim/.vim/autoload/plug.vim b/home/any/vim/.config/nvim/autoload/plug.vim similarity index 100% rename from home/any/vim/.vim/autoload/plug.vim rename to home/any/vim/.config/nvim/autoload/plug.vim diff --git a/home/any/vim/.vim/autoload/plug.vim.old b/home/any/vim/.config/nvim/autoload/plug.vim.old similarity index 100% rename from home/any/vim/.vim/autoload/plug.vim.old rename to home/any/vim/.config/nvim/autoload/plug.vim.old diff --git a/home/any/vim/.vim/bak.vimrc b/home/any/vim/.config/nvim/bak.vimrc similarity index 100% rename from home/any/vim/.vim/bak.vimrc rename to home/any/vim/.config/nvim/bak.vimrc diff --git a/home/any/vim/.vim/coc-settings.json b/home/any/vim/.config/nvim/coc-settings.json similarity index 100% rename from home/any/vim/.vim/coc-settings.json rename to home/any/vim/.config/nvim/coc-settings.json diff --git a/home/any/vim/.vim/colors/Czar.vim b/home/any/vim/.config/nvim/colors/Czar.vim similarity index 100% rename from home/any/vim/.vim/colors/Czar.vim rename to home/any/vim/.config/nvim/colors/Czar.vim diff --git a/home/any/vim/.vim/colors/inkpot.vim b/home/any/vim/.config/nvim/colors/inkpot.vim similarity index 100% rename from home/any/vim/.vim/colors/inkpot.vim rename to home/any/vim/.config/nvim/colors/inkpot.vim diff --git a/home/any/vim/.vim/colors/srcery.vim b/home/any/vim/.config/nvim/colors/srcery.vim similarity index 100% rename from home/any/vim/.vim/colors/srcery.vim rename to home/any/vim/.config/nvim/colors/srcery.vim diff --git a/home/any/vim/.vim/colors/synthwave.vim b/home/any/vim/.config/nvim/colors/synthwave.vim similarity index 100% rename from home/any/vim/.vim/colors/synthwave.vim rename to home/any/vim/.config/nvim/colors/synthwave.vim diff --git a/home/any/vim/.vim/colors/twilight.vim b/home/any/vim/.config/nvim/colors/twilight.vim similarity index 100% rename from home/any/vim/.vim/colors/twilight.vim rename to home/any/vim/.config/nvim/colors/twilight.vim diff --git a/home/any/vim/.vim/init.vim b/home/any/vim/.config/nvim/init.vim similarity index 100% rename from home/any/vim/.vim/init.vim rename to home/any/vim/.config/nvim/init.vim diff --git a/home/any/vim/.vim/spell/en.utf-8.add b/home/any/vim/.config/nvim/spell/en.utf-8.add similarity index 100% rename from home/any/vim/.vim/spell/en.utf-8.add rename to home/any/vim/.config/nvim/spell/en.utf-8.add diff --git a/home/any/vim/.vim/spell/en.utf-8.add.spl b/home/any/vim/.config/nvim/spell/en.utf-8.add.spl similarity index 100% rename from home/any/vim/.vim/spell/en.utf-8.add.spl rename to home/any/vim/.config/nvim/spell/en.utf-8.add.spl diff --git a/home/any/vim/.vim/vimrc b/home/any/vim/.config/nvim/vimrc similarity index 100% rename from home/any/vim/.vim/vimrc rename to home/any/vim/.config/nvim/vimrc diff --git a/home/any/vim/.vim/vimrc.d/todo-comments.lua b/home/any/vim/.config/nvim/vimrc.d/todo-comments.lua similarity index 100% rename from home/any/vim/.vim/vimrc.d/todo-comments.lua rename to home/any/vim/.config/nvim/vimrc.d/todo-comments.lua diff --git a/home/any/vim/.vim/vimrc.d/treesitter.lua b/home/any/vim/.config/nvim/vimrc.d/treesitter.lua similarity index 100% rename from home/any/vim/.vim/vimrc.d/treesitter.lua rename to home/any/vim/.config/nvim/vimrc.d/treesitter.lua diff --git a/home/any/vim/.vim/vimrc.d/venv-selector.lua b/home/any/vim/.config/nvim/vimrc.d/venv-selector.lua similarity index 100% rename from home/any/vim/.vim/vimrc.d/venv-selector.lua rename to home/any/vim/.config/nvim/vimrc.d/venv-selector.lua diff --git a/home/any/vim/.vim/vimrc.d/zls.lua b/home/any/vim/.config/nvim/vimrc.d/zls.lua similarity index 100% rename from home/any/vim/.vim/vimrc.d/zls.lua rename to home/any/vim/.config/nvim/vimrc.d/zls.lua diff --git a/home/any/vim/.vim b/home/any/vim/.vim new file mode 120000 index 0000000..35dbcb1 --- /dev/null +++ b/home/any/vim/.vim @@ -0,0 +1 @@ +.config/nvim \ No newline at end of file diff --git a/home/any/vim/.vim/.gitignore b/home/any/vim/.vim/.gitignore deleted file mode 100644 index d92a93d..0000000 --- a/home/any/vim/.vim/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -plugged/* -!plugged/.gitkeep diff --git a/home/any/vim/.vim/plugged/.gitkeep b/home/any/vim/.vim/plugged/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/home/any/vim/.vim/tmp/.gitignore b/home/any/vim/.vim/tmp/.gitignore deleted file mode 100644 index 8c24a47..0000000 --- a/home/any/vim/.vim/tmp/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -backup/* -!backup/.gitkeep -swap/* -!swap/.gitkeep -undo/* -!undo/.gitkeep diff --git a/home/any/vim/.vim/tmp/backup/.gitkeep b/home/any/vim/.vim/tmp/backup/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/home/any/vim/.vim/tmp/swap/.gitkeep b/home/any/vim/.vim/tmp/swap/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/home/any/vim/.vim/tmp/undo/.gitkeep b/home/any/vim/.vim/tmp/undo/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/home/darwin/karabiner.dirs b/home/darwin/karabiner.dirs new file mode 100644 index 0000000..1b0656c --- /dev/null +++ b/home/darwin/karabiner.dirs @@ -0,0 +1 @@ +.config/karabiner diff --git a/home/linux-gnu/dunst.dirs b/home/linux-gnu/dunst.dirs new file mode 100644 index 0000000..45754cd --- /dev/null +++ b/home/linux-gnu/dunst.dirs @@ -0,0 +1 @@ +.confg/dunst diff --git a/home/linux-gnu/fonts.dirs b/home/linux-gnu/fonts.dirs new file mode 100644 index 0000000..2f0c442 --- /dev/null +++ b/home/linux-gnu/fonts.dirs @@ -0,0 +1,2 @@ +.local/share/fonts/Misc +.local/share/fonts/NerdFonts diff --git a/home/linux-gnu/fonts/.local/share/fonts/Misc/.uuid b/home/linux-gnu/fonts/.local/share/fonts/Misc/.uuid deleted file mode 100644 index 0494145..0000000 --- a/home/linux-gnu/fonts/.local/share/fonts/Misc/.uuid +++ /dev/null @@ -1 +0,0 @@ -6b030113-c86d-47e3-a99e-db6536d5d1e0 \ No newline at end of file diff --git a/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/.uuid b/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/.uuid deleted file mode 100644 index 0c3af9b..0000000 --- a/home/linux-gnu/fonts/.local/share/fonts/NerdFonts/.uuid +++ /dev/null @@ -1 +0,0 @@ -4e8c22c3-bce7-43f0-92f0-d9ff358052b4 \ No newline at end of file diff --git a/home/linux-gnu/gnome-extensions.dirs b/home/linux-gnu/gnome-extensions.dirs new file mode 100644 index 0000000..41eda71 --- /dev/null +++ b/home/linux-gnu/gnome-extensions.dirs @@ -0,0 +1 @@ +.local/share/gnome-shell/extensions diff --git a/home/linux-gnu/i3.dirs b/home/linux-gnu/i3.dirs new file mode 100644 index 0000000..3bbbcbe --- /dev/null +++ b/home/linux-gnu/i3.dirs @@ -0,0 +1,2 @@ +.config/i3 +.config/i3status diff --git a/home/linux-gnu/systemd.dirs b/home/linux-gnu/systemd.dirs new file mode 100644 index 0000000..0769483 --- /dev/null +++ b/home/linux-gnu/systemd.dirs @@ -0,0 +1 @@ +.config/systemd/user/default.target.wants diff --git a/home/linux-gnu/wordgrinder.dirs b/home/linux-gnu/wordgrinder.dirs new file mode 100644 index 0000000..2d3e6c6 --- /dev/null +++ b/home/linux-gnu/wordgrinder.dirs @@ -0,0 +1 @@ +.wordgrinder diff --git a/stowall.sh b/stowall.sh index a46b88e..9495a22 100755 --- a/stowall.sh +++ b/stowall.sh @@ -1,22 +1,28 @@ #!/usr/bin/env bash -mkdir -p $HOME/.ssh > /dev/null 2>&1 -mkdir -p $HOME/.gnupg > /dev/null 2>&1 -chmod 700 $HOME/.gnupg -mkdir -p $HOME/.local/bin - -#set -x shopt -s extglob for x in home/{any,"${OSTYPE%%+([[:digit:].])}"}/* do + if [[ -f ${x}.dirs ]] + then + cat ${x}.dirs | xargs -I {} mkdir -p $HOME/{} + fi if [[ -d $x ]] then stow -t $HOME -d $(dirname $x) $(basename $x) fi done +chmod 700 $HOME/.gnupg + +sudo chown root:root -R etc/*/*/ + for x in etc/{any,"${OSTYPE%%+([[:digit:].])}"}/* do + if [[ -f ${x}.dirs ]] + then + cat ${x}.dirs | xargs -I {} sudo mkdir -p /etc/{} + fi if [[ -d $x ]] then sudo stow -t /etc -d $(dirname $x) $(basename $x)