diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-03-01 08:37:31 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-03-01 08:37:31 +0100 |
| commit | f56da0d98b2eda083c3b7b1606f804d76a001967 (patch) | |
| tree | 371e1e4538358b28d72f1a84cf3cb3adde5cbbab | |
| parent | 83063410148c8a5492d7225123cd3893dec3c448 (diff) | |
| download | dotfiles-f56da0d98b2eda083c3b7b1606f804d76a001967.tar.gz dotfiles-f56da0d98b2eda083c3b7b1606f804d76a001967.tar.bz2 dotfiles-f56da0d98b2eda083c3b7b1606f804d76a001967.zip | |
Updated rc command to source the program associated with a config file, Added yay config to use doas instead of sudo
| -rw-r--r-- | config/yay/config.json | 5 | ||||
| -rw-r--r-- | config/zsh/aliases.zsh | 31 | ||||
| -rwxr-xr-x | test | 13 |
3 files changed, 38 insertions, 11 deletions
diff --git a/config/yay/config.json b/config/yay/config.json new file mode 100644 index 0000000..ddc64b6 --- /dev/null +++ b/config/yay/config.json @@ -0,0 +1,5 @@ +{ + "sudobin": "doas", + "sudoflags": "", + "sudoloop": false +} diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 8b570f5..2878007 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -4,9 +4,13 @@ alias grep='grep --color=auto' alias tree='tree -C' alias pacman='pacman --color=auto' -alias yay='yay --color=auto' alias valgrindc='colour-valgrind' +alias yay='yay --color=auto' + +# --sudo $(which doas) --sudoloop --sudoflags' + + # common commands alias less='less -N' # enable line number alias v='vim' @@ -121,11 +125,26 @@ rc() { filepath="$(find "$HOME/git/dotfiles" -type f -not -path '*.git/*' | fzf)" && "$EDITOR" "$filepath" filename="$(basename "$filepath")" - # shellcheck source=/dev/null - [ "$filename" = .zshrc ] || - [ "$filename" = aliases.zshrc ] || - [ "$filename" = zprofile ] && - . "$ZDOTDIR/.zshrc" + case "$filename" in + .zshrc|aliases.zsh) + echo 'Reloading zshrc' + # shellcheck source=/dev/null + . "$ZDOTDIR/.zshrc" + ;; + zprofile) + echo 'Reloading zprofile' + # shellcheck source=/dev/null + . "$HOME/.zprofile" + ;; + xmonad.hs) + echo 'Reloading xmonad' + xmonad --recompile && xmonad --restart + ;; + config.py) + echo 'Reloading qutebrowser config' + qutebrowser :config-source + ;; + esac } vf() { f="$(fzf || exit 1)" && "$EDITOR" "$f" ; } @@ -1,8 +1,10 @@ #!/bin/sh +set -o xtrace + ret=0 -echo '-------------------- SHELLCHECK' +# SHELLCHECK shellcheck install || ret=$? shellcheck test || ret=$? shellcheck local/bin/* || ret=$? @@ -11,11 +13,12 @@ shellcheck -s sh config/zsh/aliases.zsh || ret=$? shellcheck -s sh -e SC2155 config/zsh/zprofile || ret=$? shellcheck -s sh config/x11/xinitrc || ret=$? -echo '-------------------- VINT' -vint -s config/vim/vimrc config/vim/pluggins.vim || ret=$? +# VINT +vint -s config/vim/vimrc || ret=$? +vint -s config/vim/pluggins.vim || ret=$? -echo '-------------------- FLAKE8' +# FLAKE8 flake8 --ignore F821,E501,W504,N816 config/qutebrowser/config.py || ret=$? -flake8 --ignore W504 config/python/startup.py || ret=$? +flake8 --ignore W504 config/python/startup.py || ret=$? exit $ret |
