From 248068c55a2299d43976ee36769668f4af903a11 Mon Sep 17 00:00:00 2001 From: Constantin Simonis Date: Sat, 14 Jun 2025 20:52:55 +0200 Subject: [PATCH] add stow --- .config/.gitignore | 12 +++---- .gitconfig.d/.gitignore | 4 +-- .gitconfig.d/example.gitconfig | 28 ++++++++-------- .gitignore | 31 +++++++++--------- .gitmodules | 18 +++++------ install | 59 +++++++++++++++++----------------- setup | 56 ++++++++++++++++---------------- 7 files changed, 105 insertions(+), 103 deletions(-) diff --git a/.config/.gitignore b/.config/.gitignore index b4282f8..2c83a2a 100644 --- a/.config/.gitignore +++ b/.config/.gitignore @@ -1,7 +1,7 @@ -/* - -!.gitignore -!btop/ -btop/btop.log -!neofetch/ +/* + +!.gitignore +!btop/ +btop/btop.log +!neofetch/ !ssh/ \ No newline at end of file diff --git a/.gitconfig.d/.gitignore b/.gitconfig.d/.gitignore index 3c4f9a3..1fc3f8d 100644 --- a/.gitconfig.d/.gitignore +++ b/.gitconfig.d/.gitignore @@ -1,3 +1,3 @@ -/* -!.gitignore +/* +!.gitignore !example.gitconfig \ No newline at end of file diff --git a/.gitconfig.d/example.gitconfig b/.gitconfig.d/example.gitconfig index 86a14ba..9ba26a3 100644 --- a/.gitconfig.d/example.gitconfig +++ b/.gitconfig.d/example.gitconfig @@ -1,14 +1,14 @@ -[user] - email = user@mail - name = John Doe - signingkey = 1234 -[credential] - helper = store -[push] - autoSetupRemote = true -[core] - autocrlf = true -[pull] - rebase = true -[commit] - gpgsign = true +[user] + email = user@mail + name = John Doe + signingkey = 1234 +[credential] + helper = store +[push] + autoSetupRemote = true +[core] + autocrlf = true +[pull] + rebase = true +[commit] + gpgsign = true diff --git a/.gitignore b/.gitignore index 524fd25..75c6105 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,16 @@ -/* - -!setup -!zsh/ -!.gitignore -!.alias.d/ -!.config/ -!.gitconfig -!.gitconfig.d -!.p10k.zsh -!.zshrc -!.zshenv.template -!.profile -!install -!README.md \ No newline at end of file +/* + +!setup +!zsh/ +!.gitignore +!.alias.d/ +!.config/ +!.gitconfig +!.gitconfig.d +!.p10k.zsh +!.zshrc +!.zshenv.template +!.profile +!install +!README.md +!.stow-ignore-local diff --git a/.gitmodules b/.gitmodules index 159d64d..3b8526e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ -[submodule "zsh/plugins/zsh-autosuggestions"] - path = zsh/plugins/zsh-autosuggestions - url = https://github.com/zsh-users/zsh-autosuggestions -[submodule "zsh/plugins/zsh-syntax-highlighting"] - path = zsh/plugins/zsh-syntax-highlighting - url = https://github.com/zsh-users/zsh-syntax-highlighting -[submodule "zsh/themes/powerlevel10k"] - path = zsh/themes/powerlevel10k - url = https://github.com/romkatv/powerlevel10k +[submodule "zsh/plugins/zsh-autosuggestions"] + path = zsh/plugins/zsh-autosuggestions + url = https://github.com/zsh-users/zsh-autosuggestions +[submodule "zsh/plugins/zsh-syntax-highlighting"] + path = zsh/plugins/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting +[submodule "zsh/themes/powerlevel10k"] + path = zsh/themes/powerlevel10k + url = https://github.com/romkatv/powerlevel10k diff --git a/install b/install index c93eace..0c8e1b7 100755 --- a/install +++ b/install @@ -1,29 +1,30 @@ -#!/usr/bin/env bash - -set -e - -echo -echo "[+] Updating System Packages..." -echo -sudo apt update -qq - -echo -echo "[+] Installing Dependencies..." -echo -sudo apt install -yqq \ - zsh \ - curl \ - exa \ - direnv \ - bat \ - btop - -echo -echo "[+] Installing Oh My Zsh..." -echo - -sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" - -echo "Include $HOME/.config/ssh/*" >> "$HOME/.ssh/config" - -./setup +#!/usr/bin/env bash + +set -e + +echo +echo "[+] Updating System Packages..." +echo +sudo apt update -qq + +echo +echo "[+] Installing Dependencies..." +echo +sudo apt install -yqq \ + zsh \ + curl \ + exa \ + direnv \ + bat \ + btop \ + stow + +echo +echo "[+] Installing Oh My Zsh..." +echo + +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + +echo "Include $HOME/.config/ssh/*" >> "$HOME/.ssh/config" + +./setup diff --git a/setup b/setup index ebf5028..25cb6db 100755 --- a/setup +++ b/setup @@ -1,29 +1,29 @@ -#!/usr/bin/env bash - -set -e - -echo "[+] Cloning submodules..." -git submodule update --init --recursive - -echo "[+] Creating Gitconfigs..." - -( - for config in $PWD/.gitconfig.d/*.gitconfig; do - echo "[include]" - echo " path = $config" - done; -) > "$HOME/.gitconfig" - -echo "[+] Creating symlinks..." - -ln -sf "$PWD/.zshrc" "$HOME/.zshrc" -ln -sf "$PWD/.p10k.zsh" "$HOME/.p10k.zsh" -ln -sf "$PWD/.config" "$HOME/.config" -ln -sf "$PWD/.alias.d" "$HOME/.alias.d" -ln -sf "$PWD/.profile" "$HOME/.profile" - -if [ ! -f "$PWD/.zshenv" ]; then - cp "$PWD/.zshenv.template" "$PWD/.zshenv" -fi - +#!/usr/bin/env bash + +set -e + +echo "[+] Cloning submodules..." +git submodule update --init --recursive + +echo "[+] Creating Gitconfigs..." + +( + for config in $PWD/.gitconfig.d/*.gitconfig; do + echo "[include]" + echo " path = $config" + done; +) > "$HOME/.gitconfig" + +echo "[+] Creating symlinks..." + +ln -sf "$PWD/.zshrc" "$HOME/.zshrc" +ln -sf "$PWD/.p10k.zsh" "$HOME/.p10k.zsh" +ln -sf "$PWD/.config" "$HOME/.config" +ln -sf "$PWD/.alias.d" "$HOME/.alias.d" +ln -sf "$PWD/.profile" "$HOME/.profile" + +if [ ! -f "$PWD/.zshenv" ]; then + cp "$PWD/.zshenv.template" "$PWD/.zshenv" +fi + ln -sf "$PWD/.zshenv" "$HOME/.zshenv" \ No newline at end of file