aboutsummaryrefslogtreecommitdiff
path: root/config/zsh
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-03-01 08:37:31 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-03-01 08:37:31 +0100
commitf56da0d98b2eda083c3b7b1606f804d76a001967 (patch)
tree371e1e4538358b28d72f1a84cf3cb3adde5cbbab /config/zsh
parent83063410148c8a5492d7225123cd3893dec3c448 (diff)
downloaddotfiles-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
Diffstat (limited to 'config/zsh')
-rw-r--r--config/zsh/aliases.zsh31
1 files changed, 25 insertions, 6 deletions
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" ; }