diff --git a/@base/bootstrap.sh b/@base/bootstrap.sh new file mode 100755 index 0000000..30ccd0a --- /dev/null +++ b/@base/bootstrap.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +__bootstrap() { + local bkp=( + ~/.profile + ~/.pathrc + ~/.bashrc + ~/.bash_profile + ~/.zshrc + ~/.zshenv + ~/.zprofile + ~/.gitconfig + ~/.git/config + ~/.vimrc + ~/.vim/vimrc + ) + + local file + local BKP_DIR=~/.local/share/dotfiles.bkp + mkdir -p "$BKP_DIR" + for file in "$bkp[@]"; do + if [[ -f "$file" ]] && [[ ! -L "$file" ]]; then + echo -n "BKP $file" + { set -v; + cp "$file" "$BKP_DIR"; + } + fi + done +} + +__bootstrap +unset -f __bootstrap diff --git a/@base/finish.sh b/@base/finish.sh new file mode 100755 index 0000000..1785c9d --- /dev/null +++ b/@base/finish.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +if [ -s ~/.config/zsh ] && [ -n "${SHELL##*zsh*}" ]; then + echo -e "To use ZSH as default shell please do:\n" + echo -n "$(tput bold)$(tput setf 4)" + echo -e " chsh -s $(which zsh)" + echo -e " env zsh" + echo -e " source ~/.zshrc\n" + echo -n "$(tput srg0)" + echo -e "Alternativelly the .bashrc file provided by @zsh.bootstrap should be used" +fi diff --git a/@default/%minimal/formulae.brew b/@default/%minimal/formulae.brew new file mode 120000 index 0000000..2dec670 --- /dev/null +++ b/@default/%minimal/formulae.brew @@ -0,0 +1 @@ +../../@minimal/formulae.brew \ No newline at end of file diff --git a/@default/%minimal/packages.apt b/@default/%minimal/packages.apt new file mode 120000 index 0000000..b01b9da --- /dev/null +++ b/@default/%minimal/packages.apt @@ -0,0 +1 @@ +../../@minimal/packages.apt \ No newline at end of file diff --git a/@default/%minimal/packages.pacman b/@default/%minimal/packages.pacman new file mode 120000 index 0000000..02eae97 --- /dev/null +++ b/@default/%minimal/packages.pacman @@ -0,0 +1 @@ +../../@minimal/packages.pacman \ No newline at end of file diff --git a/@default/@base b/@default/@base new file mode 120000 index 0000000..7b6da91 --- /dev/null +++ b/@default/@base @@ -0,0 +1 @@ +../@base \ No newline at end of file diff --git a/@default/formulae.brew b/@default/formulae.brew new file mode 100644 index 0000000..44d8984 --- /dev/null +++ b/@default/formulae.brew @@ -0,0 +1,2 @@ +dos2unix +hunspell diff --git a/python-pkglist.txt b/@default/packages.pipx similarity index 68% rename from python-pkglist.txt rename to @default/packages.pipx index c5ae7e5..9d95f08 100644 --- a/python-pkglist.txt +++ b/@default/packages.pipx @@ -1,8 +1,9 @@ flake8 gitlint +howdoi +httpie isort -neovim -neovim-remote +pre-commit proselint ptpython pylint @@ -10,5 +11,8 @@ pyscaffold rstcheck sphinx thefuck +tldr +tmuxp +vim-vint vint yamllint diff --git a/@full/%minimal/formulae.brew b/@full/%minimal/formulae.brew new file mode 120000 index 0000000..2dec670 --- /dev/null +++ b/@full/%minimal/formulae.brew @@ -0,0 +1 @@ +../../@minimal/formulae.brew \ No newline at end of file diff --git a/@full/%minimal/packages.apt b/@full/%minimal/packages.apt new file mode 120000 index 0000000..b01b9da --- /dev/null +++ b/@full/%minimal/packages.apt @@ -0,0 +1 @@ +../../@minimal/packages.apt \ No newline at end of file diff --git a/@full/%minimal/packages.pacman b/@full/%minimal/packages.pacman new file mode 120000 index 0000000..02eae97 --- /dev/null +++ b/@full/%minimal/packages.pacman @@ -0,0 +1 @@ +../../@minimal/packages.pacman \ No newline at end of file diff --git a/@full/bootstrap.sh b/@full/bootstrap.sh new file mode 100644 index 0000000..51f823d --- /dev/null +++ b/@full/bootstrap.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +__bootstrap() { + local HERE="$(pwd)" + cd $(dirname "${BASH_SOURCE[0]}") || exit 1 + find .. -maxdepth 1 -type d \ + | xargs -n1 realpath \ + | xargs -n1 basename \ + | grep -vE '^[.+@%]' \ + | tee > ./+local-layers.stow + cd "$HERE" || exit 1 +} + +__bootstrap +unset -f __bootstrap diff --git a/@full/formulae.brew b/@full/formulae.brew new file mode 100644 index 0000000..4a59b54 --- /dev/null +++ b/@full/formulae.brew @@ -0,0 +1 @@ +pandoc diff --git a/@full/packages.apt b/@full/packages.apt new file mode 100644 index 0000000..b47d162 --- /dev/null +++ b/@full/packages.apt @@ -0,0 +1,5 @@ +python3 +python3-dev +python3-lxml +python3-pip +python3-venv diff --git a/pacman-pkglist-native.txt b/@full/packages.pacman similarity index 100% rename from pacman-pkglist-native.txt rename to @full/packages.pacman diff --git a/pacman-pkglist-foreign.txt b/@full/packages.trizen similarity index 84% rename from pacman-pkglist-foreign.txt rename to @full/packages.trizen index a4014ea..5f020b5 100644 --- a/pacman-pkglist-foreign.txt +++ b/@full/packages.trizen @@ -1,4 +1,4 @@ -neovim-gtk +# neovim-gtk # neovim-qt pulseaudio-ctl redpen diff --git a/@minimal/@base b/@minimal/@base new file mode 120000 index 0000000..7b6da91 --- /dev/null +++ b/@minimal/@base @@ -0,0 +1 @@ +../@base \ No newline at end of file diff --git a/@minimal/formulae.brew b/@minimal/formulae.brew new file mode 100644 index 0000000..97ed9c0 --- /dev/null +++ b/@minimal/formulae.brew @@ -0,0 +1,5 @@ +autojump +fd +fzy +neovim +ripgrep diff --git a/@minimal/layers.stow b/@minimal/layers.stow index aabfbdc..8b9a5af 100644 --- a/@minimal/layers.stow +++ b/@minimal/layers.stow @@ -2,4 +2,6 @@ git vim rsync tmux -zsh.minimal +zsh.common +%zsh.minimal +%zsh.bootstrap diff --git a/@minimal/packages.apt b/@minimal/packages.apt index 18e128d..dc12025 100644 --- a/@minimal/packages.apt +++ b/@minimal/packages.apt @@ -1,11 +1,14 @@ +build-essential +ctags curl -exuberant-ctags +git hwinfo jq +nmap silversearcher-ag stow tmux tree +vim wget zsh -vim diff --git a/@minimal/packages.pacman b/@minimal/packages.pacman new file mode 100644 index 0000000..e69de29 diff --git a/@wsl/%default/packages.pipx b/@wsl/%default/packages.pipx new file mode 120000 index 0000000..52b4bbb --- /dev/null +++ b/@wsl/%default/packages.pipx @@ -0,0 +1 @@ +../../@default/packages.pipx \ No newline at end of file diff --git a/@wsl/layers.stow b/@wsl/layers.stow index d009c1a..bbd4252 100644 --- a/@wsl/layers.stow +++ b/@wsl/layers.stow @@ -1,6 +1 @@ -git -vim -rsync -tmux -zsh.minimal -wsl +%dircolors diff --git a/minimal.apt b/minimal.apt deleted file mode 100644 index 18e128d..0000000 --- a/minimal.apt +++ /dev/null @@ -1,11 +0,0 @@ -curl -exuberant-ctags -hwinfo -jq -silversearcher-ag -stow -tmux -tree -wget -zsh -vim diff --git a/minimal.stow b/minimal.stow deleted file mode 100644 index aabfbdc..0000000 --- a/minimal.stow +++ /dev/null @@ -1,5 +0,0 @@ -git -vim -rsync -tmux -zsh.minimal diff --git a/wsl.stow b/wsl.stow deleted file mode 100644 index d009c1a..0000000 --- a/wsl.stow +++ /dev/null @@ -1,6 +0,0 @@ -git -vim -rsync -tmux -zsh.minimal -wsl diff --git a/wsl/.bashrc b/wsl/.bashrc deleted file mode 100644 index 8073a98..0000000 --- a/wsl/.bashrc +++ /dev/null @@ -1,18 +0,0 @@ -set bell-style visible - -## Expand PATH if custom program is needed -# case ":$PATH:" in -# *":$HOME/.local/bin:"*) :;; # already there -# *) PATH="$HOME/.local/bin:$PATH";; -# esac - -# Launch ZSH -if [ -t 1 ]; then - # Hack to start Windows Terminal App on WSL ~ - if [[ ! -v _start_home ]]; then - cd ~ || return - export _start_home=$(pwd) - fi - # Replace bash process with zsh - exec zsh -fi