From 5b8054b9924b586dbf0735c010ccf706d2e4fae1 Mon Sep 17 00:00:00 2001 From: Yessiest Date: Thu, 21 Apr 2022 17:26:57 +0000 Subject: [PATCH] Fixed zsh config layout --- .zshrc.d/01-local-bin.zsh | 5 +++-- 00-ls_colors.zsh | 11 ----------- 01-local-bin.zsh | 8 -------- 02-aliases.zsh | 28 ---------------------------- 03-completion.zsh | 19 ------------------- 04-bindings.zsh | 8 -------- 6 files changed, 3 insertions(+), 76 deletions(-) delete mode 100644 00-ls_colors.zsh delete mode 100644 01-local-bin.zsh delete mode 100644 02-aliases.zsh delete mode 100644 03-completion.zsh delete mode 100644 04-bindings.zsh diff --git a/.zshrc.d/01-local-bin.zsh b/.zshrc.d/01-local-bin.zsh index 84ba7fb..d318f71 100644 --- a/.zshrc.d/01-local-bin.zsh +++ b/.zshrc.d/01-local-bin.zsh @@ -1,7 +1,8 @@ declare -a LOCAL_BINS LOCAL_BINS=( "$HOME/.local/bin" "$HOME/Projects/env/bin" "/usr/local/bin" "/usr/local/sbin" ) -for bin in LOCAL_BINS; do +for bin in $LOCAL_BINS; do if [ -e $bin ]; then - $PATH="$PATH:$bin" + PATH="$PATH:$bin" fi done +export PATH diff --git a/00-ls_colors.zsh b/00-ls_colors.zsh deleted file mode 100644 index c56cd88..0000000 --- a/00-ls_colors.zsh +++ /dev/null @@ -1,11 +0,0 @@ -LS_COLORS="di=01;34" #directory color -LS_COLORS=$LS_COLORS":ln=01;36" #link color -LS_COLORS=$LS_COLORS":so=01;35" #socket color -LS_COLORS=$LS_COLORS":pi=40;33" #pipe color -LS_COLORS=$LS_COLORS":ex=32" #executable color -LS_COLORS=$LS_COLORS":bd=40;33" #block device color -LS_COLORS=$LS_COLORS":cd=40;33;01" #char device color -LS_COLORS=$LS_COLORS":su=37;41" #setuid executable color (i.e. sudo) -LS_COLORS=$LS_COLORS":sg=30;43" #setgid executable color -export LS_COLORS -alias ls="ls --color" diff --git a/01-local-bin.zsh b/01-local-bin.zsh deleted file mode 100644 index d318f71..0000000 --- a/01-local-bin.zsh +++ /dev/null @@ -1,8 +0,0 @@ -declare -a LOCAL_BINS -LOCAL_BINS=( "$HOME/.local/bin" "$HOME/Projects/env/bin" "/usr/local/bin" "/usr/local/sbin" ) -for bin in $LOCAL_BINS; do - if [ -e $bin ]; then - PATH="$PATH:$bin" - fi -done -export PATH diff --git a/02-aliases.zsh b/02-aliases.zsh deleted file mode 100644 index 0684260..0000000 --- a/02-aliases.zsh +++ /dev/null @@ -1,28 +0,0 @@ -# Just a funky little collection of more or less useful aliases - -#Various impractical jokes and tools -if [ -n "$LOCALCITY" ]; then - alias weatherfetch="curl -sf https://wttr.in/$LOCALCITY | head -n 7 && echo ''" -fi -if [ -n "$DESKTOP_SESSION" ]; then - alias linuxver="nohup zenity --info --text=\"Linux version: \\n$(uname -srm)\" > /dev/null" - alias paste="xclip -o -selection clipboard" - alias copy="xclip -o | xclip -i -selection clipboard" -fi -alias vim="nvim" -function nojail() { - PATH=`echo $PATH | sed "s/:\/usr\/local\/bin//g" | sed "s/:\/usr\/local\/sbin//g"` $@ -} - -if which flashplayer > /dev/null; then - function z0rde() { - local id - id="$1" - if [ "$1" == "" ]; then - id="$((1 + $RANDOM % 8000))" - fi - echo $id - flashplayer "https://z0r.de/L/z0r-de_$id.swf" - } -fi - diff --git a/03-completion.zsh b/03-completion.zsh deleted file mode 100644 index f422496..0000000 --- a/03-completion.zsh +++ /dev/null @@ -1,19 +0,0 @@ -autoload -Uz compinit -compinit -# ZSH menu styling -# Enabling completers, cache and menu with selection. -zstyle :compinstall filename '/home/yessiest/.zshrc' -zstyle ':completion:*' completer _extensions _complete _approximate -zstyle ':completion:*' use-cache on -zstyle ':completion:*' cache-path "$HOME/.cache/zsh/.zcompcache" -zstyle ':completion:*' menu select -# Colors for descriptions -zstyle ':completion:*:*:*:*:descriptions' format '%F{green} %d:%f' -zstyle ':completion:*:*:*:*:corrections' format '%F{yellow} %d (errors: %e):%f' -# Custom coloring for options -zstyle ':completion:*:options' list-colors '=(#b)*(-- *)=0=38;5;241' -# Custom coloring for processes -zstyle ':completion:*:processes' list-colors '=(#b) #([0-9]#)*( *[a-z])*=0=38;5;242=32' -# Colors for LS -zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} - diff --git a/04-bindings.zsh b/04-bindings.zsh deleted file mode 100644 index 4fd38c5..0000000 --- a/04-bindings.zsh +++ /dev/null @@ -1,8 +0,0 @@ -# The default text editing behaviour -bindkey "^[[1;5C" forward-word #Ctrl+right goes forwards one word -bindkey "^[[1;5D" backward-word #Ctrl+left goes backwards one word -bindkey "^[[1;3C" forward-word #Alt+right goes forwards one word -bindkey "^[[1;3D" backward-word #Alt+left goes backwards one word -bindkey '^[[H' beginning-of-line #Home goes to the beginning of the line -bindkey '^[[F' end-of-line #End goes to the end of the line -