Updated bootstrap with modular bootstrap approach for multiOS
This commit is contained in:
parent
2f1d42b863
commit
89d89f7b33
5 changed files with 66 additions and 29 deletions
|
@ -1,36 +1,24 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Because Git submodule commands cannot operate without a work tree, they must
|
# Save this file as ~/.config/yadm/bootstrap and make it executable. It will
|
||||||
# be run from within $HOME (assuming this is the root of your dotfiles)
|
# execute all executable files (excluding templates and editor backups) in the
|
||||||
cd "$HOME"
|
# ~/.config/yadm/bootstrap.d directory when run.
|
||||||
|
|
||||||
#echo "Init submodules"
|
set -eu
|
||||||
#yadm submodule update --recursive --init
|
|
||||||
|
|
||||||
echo "Install a few things:"
|
# Directory to look for bootstrap executables in
|
||||||
mkdir "$HOME/bin"
|
BOOTSTRAP_D="${BASH_SOURCE[0]}.d"
|
||||||
echo "+ ZIM"
|
|
||||||
rm -f ".zimrc" ".zlogin" ".zshenv" ".zshrc"
|
|
||||||
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
|
|
||||||
yadm checkout -- "$HOME/.zimrc"
|
|
||||||
yadm checkout -- "$HOME/.zlogin"
|
|
||||||
yadm checkout -- "$HOME/.zshrc"
|
|
||||||
zsh -i -c "zimfw install"
|
|
||||||
echo "+ TMux Plugin Manager"
|
|
||||||
mkdir -p "$HOME/.tmux/plugins"
|
|
||||||
git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm"
|
|
||||||
echo "+ SpaceVim"
|
|
||||||
curl -sLf https://spacevim.org/install.sh | bash
|
|
||||||
|
|
||||||
if [[ -f /etc/os-release ]]; then
|
if [[ ! -d "$BOOTSTRAP_D" ]]; then
|
||||||
source /etc/os-release
|
echo "Error: bootstrap directory '$BOOTSTRAP_D' not found" >&2
|
||||||
|
exit 1
|
||||||
if [[ "$ID" == "linuxmint" ]]; then
|
|
||||||
gsettings set org.cinnamon.desktop.keybindings.wm activate-window-menu '[]'
|
|
||||||
gsettings set org.cinnamon.desktop.keybindings.wm switch-group '[]'
|
|
||||||
elif [[ "$ID" == "ubuntu" ]]; then
|
|
||||||
gsettings set org.gnome.desktop.wm.keybindings activate-window-menu '[]'
|
|
||||||
gsettings set org.gnome.desktop.wm.keybindings switch-group '[]'
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
find "$BOOTSTRAP_D" -type f | sort | while IFS= read -r bootstrap; do
|
||||||
|
if [[ -x "$bootstrap" && ! "$bootstrap" =~ "##" && ! "$bootstrap" =~ "~$" ]]; then
|
||||||
|
if ! "$bootstrap"; then
|
||||||
|
echo "Error: bootstrap '$bootstrap' failed" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
1
.config/yadm/bootstrap.d/gnome
Symbolic link
1
.config/yadm/bootstrap.d/gnome
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
gnome##os.Linux
|
25
.config/yadm/bootstrap.d/gnome##os.Linux
Executable file
25
.config/yadm/bootstrap.d/gnome##os.Linux
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ -f /etc/os-release ]]; then
|
||||||
|
source /etc/os-release
|
||||||
|
|
||||||
|
if [[ "$ID" == "fedora" ]]; then
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings activate-window-menu '[]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings switch-group '[]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings switch-group-backward '[]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up '[]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down '[]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings maximize '[]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings unmaximize '[<Primary><Super>BackSpace]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings activate-window-menu '[]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings cycle-panels '[]'
|
||||||
|
#gsettings set org.gnome.desktop.wm.keybindings cycle-panels-backward '[]'
|
||||||
|
dconf load / < "$HOME/.config/yadm/fedora.dconf"
|
||||||
|
elif [[ "$ID" == "linuxmint" ]]; then
|
||||||
|
gsettings set org.cinnamon.desktop.keybindings.wm activate-window-menu '[]'
|
||||||
|
gsettings set org.cinnamon.desktop.keybindings.wm switch-group '[]'
|
||||||
|
elif [[ "$ID" == "ubuntu" ]]; then
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings activate-window-menu '[]'
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-group '[]'
|
||||||
|
fi
|
||||||
|
fi
|
23
.config/yadm/bootstrap.d/shell
Executable file
23
.config/yadm/bootstrap.d/shell
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Because Git submodule commands cannot operate without a work tree, they must
|
||||||
|
# be run from within $HOME (assuming this is the root of your dotfiles)
|
||||||
|
cd "$HOME"
|
||||||
|
|
||||||
|
#echo "Init submodules"
|
||||||
|
#yadm submodule update --recursive --init
|
||||||
|
|
||||||
|
echo "Install a few things:"
|
||||||
|
mkdir "$HOME/bin"
|
||||||
|
echo "+ ZIM"
|
||||||
|
rm -f ".zimrc" ".zlogin" ".zshenv" ".zshrc"
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
|
||||||
|
yadm checkout -- "$HOME/.zimrc"
|
||||||
|
yadm checkout -- "$HOME/.zlogin"
|
||||||
|
yadm checkout -- "$HOME/.zshrc"
|
||||||
|
zsh -i -c "zimfw install"
|
||||||
|
echo "+ TMux Plugin Manager"
|
||||||
|
mkdir -p "$HOME/.tmux/plugins"
|
||||||
|
git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm"
|
||||||
|
echo "+ SpaceVim"
|
||||||
|
curl -sLf https://spacevim.org/install.sh | bash
|
0
.config/yadm/fedora.dconf
Normal file
0
.config/yadm/fedora.dconf
Normal file
Loading…
Reference in a new issue