From f0098cbd8239b3d5863149d29f9c84c836d2d505 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Mon, 20 May 2024 09:38:35 +0700 Subject: [PATCH] feat: Initial bootstrap scripting Currently only creating a symbolic link for x* configs --- .xinitrc | 1 - .xprofile | 1 - README.md | 5 +++++ bootstrap | 12 ++++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) delete mode 120000 .xinitrc delete mode 120000 .xprofile create mode 100755 bootstrap diff --git a/.xinitrc b/.xinitrc deleted file mode 120000 index d7cb191..0000000 --- a/.xinitrc +++ /dev/null @@ -1 +0,0 @@ -/home/ziro/.config/xinitrc \ No newline at end of file diff --git a/.xprofile b/.xprofile deleted file mode 120000 index 17ad269..0000000 --- a/.xprofile +++ /dev/null @@ -1 +0,0 @@ -/home/ziro/.config/xprofile \ No newline at end of file diff --git a/README.md b/README.md index d7e311e..82d640e 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,13 @@ My Setup: > [!WARNING] > This section is still WIP! +> [!TIP] +> It's recommended to [configure zsh to follow XDG directory specs](#zsh-setup) before proceeding. + First time setup only: run `./pre-bootstrap` then follow the instruction. (Or run `./pre-bootstrap - > ~/.config/zsh/include/dotfiles`) +Then run `./bootstrap`. + ## Recommended Project/Software - TBSM - Fonts diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..e684c10 --- /dev/null +++ b/bootstrap @@ -0,0 +1,12 @@ +#!/bin/zsh + +[ $ZI_DOTFILES ] || { >&2 echo "Please run pre-bootstrap first!"; exit 1; } + +[ -d $ZI_DOTFILES ] || { >&2 echo "Invalid dotfiles path, please re-run pre-bootstrap!"; exit 1; } + +link_x_configs() { + ln -si $ZI_DOTFILES/.config/xinitrc $HOME/.xinitrc + ln -si $ZI_DOTFILES/.config/xprofile $HOME/.xprofile +} + +link_x_configs