From a11005f07a2dceea7e62783c3cbd542e3de0f66a Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Thu, 20 Apr 2023 08:59:51 +0200 Subject: [PATCH] zshrc.d added --- .gitignore | 3 +++ zshrc | 13 +++++-------- zshrc.d/__available__/aliases.zsh | 17 +++++++++++++++++ zshrc.d/__available__/aliases_extended.zsh | 4 ++++ zshrc.d/__available__/bin.zsh | 4 ++++ zshrc.d/__available__/neofetch.zsh | 3 +++ zshrc.d/__available__/powerline.zsh | 4 ++++ 7 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 zshrc.d/__available__/aliases.zsh create mode 100644 zshrc.d/__available__/aliases_extended.zsh create mode 100644 zshrc.d/__available__/bin.zsh create mode 100644 zshrc.d/__available__/neofetch.zsh create mode 100644 zshrc.d/__available__/powerline.zsh diff --git a/.gitignore b/.gitignore index 24c6aa9..97236a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# zshrc.d +zshrc.d/*.zsh + # ---> Linux *~ diff --git a/zshrc b/zshrc index 84c1857..edc02d2 100644 --- a/zshrc +++ b/zshrc @@ -256,14 +256,11 @@ if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999' fi -if [ ! `which powerline-daemon` == "" ]; then - powerline-daemon -q - . /usr/share/powerline/bindings/zsh/powerline.zsh -fi - -if [ ! `which neofetch` == "" ]; then - neofetch -fi +# You may want to put all your additions into a folder file like +# ~/.config_files/zshrc.d, instead of adding them here directly. +for file in ~/.config_files/zshrc.d/*.zsh; do + source "$file" +done # enable command-not-found if installed if [ -f /etc/zsh_command_not_found ]; then diff --git a/zshrc.d/__available__/aliases.zsh b/zshrc.d/__available__/aliases.zsh new file mode 100644 index 0000000..651fd50 --- /dev/null +++ b/zshrc.d/__available__/aliases.zsh @@ -0,0 +1,17 @@ +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + alias dir='dir -lh --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' +alias less='less -iS' diff --git a/zshrc.d/__available__/aliases_extended.zsh b/zshrc.d/__available__/aliases_extended.zsh new file mode 100644 index 0000000..374c3d5 --- /dev/null +++ b/zshrc.d/__available__/aliases_extended.zsh @@ -0,0 +1,4 @@ +# some more ls aliases +alias dd='dd status=progress' +alias dd_status="watch -n5 'sudo kill -USR1 $(pgrep ^dd)'" +alias ssh='ssh -X' diff --git a/zshrc.d/__available__/bin.zsh b/zshrc.d/__available__/bin.zsh new file mode 100644 index 0000000..3d44fc0 --- /dev/null +++ b/zshrc.d/__available__/bin.zsh @@ -0,0 +1,4 @@ +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi diff --git a/zshrc.d/__available__/neofetch.zsh b/zshrc.d/__available__/neofetch.zsh new file mode 100644 index 0000000..e791355 --- /dev/null +++ b/zshrc.d/__available__/neofetch.zsh @@ -0,0 +1,3 @@ +if [ ! `which neofetch` == "" ]; then + neofetch +fi diff --git a/zshrc.d/__available__/powerline.zsh b/zshrc.d/__available__/powerline.zsh new file mode 100644 index 0000000..05e6596 --- /dev/null +++ b/zshrc.d/__available__/powerline.zsh @@ -0,0 +1,4 @@ +if [ ! `which powerline-daemon` == "" ]; then + powerline-daemon -q + . /usr/share/powerline/bindings/zsh/powerline.zsh +fi