From 4a70ca8c2fd6ff241912449af1baac6dd4714273 Mon Sep 17 00:00:00 2001 From: the_4n0nym0u53 Date: Fri, 24 Dec 2021 01:16:07 +0100 Subject: [PATCH] Adjust some more things. --- README.md | 8 +++++--- install.sh | 17 +++++++++-------- zsh/.config/zsh/.zshenv | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 033fd83..2b5bcab 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,11 @@ $ chmod +x install.sh $ ./install.sh ``` -This configuration depends on the following packages: +This configuration depends on the following packages\*: - `alacritty` - `artix-backgrounds` -- `doas`\* +- `doas`\*\* - `git` - `grimshot` - `ivpn` (daemon + CLI) @@ -36,7 +36,9 @@ This configuration depends on the following packages: - `wl-clipboard` - `zsh` -\* If you prefer `sudo`, then change all instances of `doas` to `sudo`. +\* Feel free to change anything to your liking. + +\*\* If you prefer `sudo`, then change all instances of `doas` to `sudo`. Also, you need to make `doas`/`sudo` rules that allow you to execute `ivpn-service`, `poweroff`, `reboot` and `pkill ivpn-service` without a password, otherwise the keybindings and scripts for those won't work. diff --git a/install.sh b/install.sh index 2a053c1..dde2fff 100755 --- a/install.sh +++ b/install.sh @@ -1,20 +1,21 @@ #!/bin/sh echo -e "Configuring directories..." -mkdir -p $HOME/.config/zsh # Symlink only the individual files instead of the entire directory DOTDIR=$(cd -- "$(dirname -- $0)" &> /dev/null && pwd) +ZDOTDIR="$HOME/.config/zsh" +mkdir -p $ZDOTDIR # Symlink only the individual files instead of the entire directory sleep 0.5 echo -e "Creating the symlinks with stow..." stow -d $DOTDIR -t $HOME alacritty \ - mako \ - nvim \ - scripts \ - sway \ - swaylock \ - waybar \ - zsh + mako \ + nvim \ + scripts \ + sway \ + swaylock \ + waybar \ + zsh sleep 0.5 echo -e "Making scripts executable..." diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 159bc41..6e46893 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -1,6 +1,6 @@ # PATH export PATH="$PATH:$HOME/bin:$HOME/.local/bin" -command -v go > /dev/null 2>&1 && export PATH="$PATH:$(go env GOPATH)" +(( ${+commands[go]} )) && export PATH="$PATH:$(go env GOPATH)" # Essentials export LANG="en_DK.UTF-8" @@ -8,4 +8,4 @@ export EDITOR="nvim" export PAGER="more" # Secret variables -[[ -f $HOME/.config/zsh/.env ]] && source $HOME/.config/zsh/.env +[[ -f $ZDOTDIR/.env ]] && source $ZDOTDIR/.env