Browse Source

Fixed zsh config layout

master
Yessiest 2 years ago
parent
commit
5b8054b992
  1. 5
      .zshrc.d/01-local-bin.zsh
  2. 11
      00-ls_colors.zsh
  3. 8
      01-local-bin.zsh
  4. 28
      02-aliases.zsh
  5. 19
      03-completion.zsh
  6. 8
      04-bindings.zsh

5
.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

11
00-ls_colors.zsh

@ -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"

8
01-local-bin.zsh

@ -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

28
02-aliases.zsh

@ -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

19
03-completion.zsh

@ -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}

8
04-bindings.zsh

@ -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
Loading…
Cancel
Save