Removed Oh My Zsh! Added .zsh plugin directory
This commit is contained in:
parent
d7caf0b460
commit
36df111e77
@ -1,6 +1,8 @@
|
||||
set $mod Mod4
|
||||
assign [class=Firefox] 2
|
||||
assign [class=libreoffice] 3
|
||||
assign [class=soffice] 3
|
||||
assign [class=Soffice] 3
|
||||
exec --no-startup-id "zsh -c 'xrandr --output LVDS1 --primary || xrandr --output HDMI3 --primary'"
|
||||
bindsym $mod+shift+d exec i3-input -F 'rename workspace to "%s"' -P 'Rename to: '
|
||||
#exec xrandr --output HDMI3 --left-of HDMI1 &
|
||||
|
@ -18,6 +18,6 @@ if [ "$1" = "screensaver" ];then
|
||||
fi
|
||||
if [ "$1" = "wall" ];then
|
||||
#if [[ -d ~/.i3/wallOM ]];then feh --bg-scale "`shuf -n1 -e ~/.i3/wallOM/*`";else feh --bg-scale "`shuf -n1 -e ~/.i3/wall/*`";fi;
|
||||
#feh --bg-scale "$(shuf -n1 -e ~/.i3/wallOM/*)"
|
||||
feh --bg-scale ~/.i3/wall/fbfKNDk.png
|
||||
feh --bg-scale "$(shuf -n1 -e ~/.i3/wallOM/*)"
|
||||
#feh --bg-scale ~/.i3/wall/fbfKNDk.png
|
||||
fi
|
||||
|
@ -1,5 +1,5 @@
|
||||
exec i3
|
||||
exec xrandr --output HDMI1 --mode 1920x1080 --primary --output HDMI3 --mode 1920x1080 --left-of HDMI1
|
||||
exec xrandr --output LVDS1 --primary
|
||||
exec numlockx
|
||||
exec syndaemon -i .5 -d
|
||||
exec xrandr --output HDMI1 --mode 1920x1080 --primary --output HDMI3 --mode 1920x1080 --left-of HDMI1&
|
||||
exec xrandr --output LVDS1 --primary&
|
||||
exec numlockx&
|
||||
exec syndaemon -i .5 -d&
|
||||
|
@ -52,9 +52,9 @@ while getopts ":hbsdpcw" VALUE "$@"; do
|
||||
fi
|
||||
echo "Syncing config files"
|
||||
if which trash >/dev/null; then
|
||||
trash ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc
|
||||
trash ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc
|
||||
else
|
||||
rm ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc
|
||||
rm ~/.gitconfig ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zsh ~/.zshrc ~/.tmux.conf ~/.config/liquidpromptrc
|
||||
fi
|
||||
# Install on all systems
|
||||
ln -s $ABSPATH/tmux/tmux.conf ~/.tmux.conf
|
||||
@ -64,6 +64,7 @@ while getopts ":hbsdpcw" VALUE "$@"; do
|
||||
ln -s $ABSPATH/vimperator/vimPgray.vimp ~/.vimperator/colors/vimPgray.vimp
|
||||
ln -s $ABSPATH/git/gitconfig ~/.gitconfig
|
||||
ln -s $ABSPATH/shells/bashrc ~/.bashrc
|
||||
ln -s $ABSPATH/zsh ~/.zsh
|
||||
if which git >/dev/null; then
|
||||
if which zsh >/dev/null; then
|
||||
ln -s $ABSPATH/shells/zshrc ~/.zshrc
|
||||
|
@ -22,7 +22,7 @@ UXTerm*vt100*internalBorder: 0
|
||||
*VT100*Translations: #override \
|
||||
<Key>Home: string(0x01)\n\
|
||||
<Key>End: string(0x05)\n
|
||||
|
||||
*VT100*translations: #override Shift <Btn1Up>: exec-formatted("firefox", PRIMARY)
|
||||
UXTerm*foreground: #ffffff
|
||||
UXTerm*background: #121212
|
||||
UXTerm*cursorColor: #ffffff
|
||||
|
26
shells/zshrc
26
shells/zshrc
@ -1,4 +1,4 @@
|
||||
export ZSH=~/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh.git
|
||||
export HISTFILE=$HOME/.zsh_history
|
||||
ZSH_THEME="af-magic"
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
@ -17,20 +17,10 @@ setopt APPEND_HISTORY SHARE_HISTORY HISTIGNOREALLDUPS
|
||||
plugins=(wd gem pass pip python sudo vagrant)
|
||||
DISABLE_AUTO_UPDATE="true"
|
||||
source "$HOME/.antigen/antigen.zsh"
|
||||
printf "omg..."
|
||||
antigen bundle stonewareslord/omg
|
||||
#antigen bundle arialdomartini/oh-my-git
|
||||
printf "oh-my-zsh..."
|
||||
antigen use oh-my-zsh
|
||||
#printf "wd..."
|
||||
#antigen bundle wd
|
||||
#printf "gem..."
|
||||
#antigen bundle gem
|
||||
printf "pass..."
|
||||
antigen bundle pass
|
||||
#printf "pip..."
|
||||
#antigen bundle pip
|
||||
#printf "python..."
|
||||
#antigen bundle python
|
||||
printf "sudo..."
|
||||
antigen bundle sudo
|
||||
printf "vagrant..."
|
||||
@ -53,7 +43,7 @@ if [ -f /etc/zsh_command_not_found ] ; then
|
||||
source /etc/zsh_command_not_found
|
||||
fi
|
||||
export DISABLE_AUTO_TITLE=true
|
||||
export PATH="/home/stonewareslord/.autojump/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
|
||||
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
|
||||
export EDITOR='vim'
|
||||
if [ "$(uname)" != "Darwin" ]; then
|
||||
alias ls='ls --color=always -F'
|
||||
@ -61,9 +51,7 @@ fi
|
||||
alias steam='sudo kill -9 `pidof steam`;sudo unshare -n -- sh -c "ifconfig lo up;sudo -u stonewareslord steam" > /dev/null 2>&1 & disown'
|
||||
alias matlab='matlab -glnx86'
|
||||
alias srm='srm -dv'
|
||||
alias ehistory='cat ~/.bash_eternal_history|egrep -iP $@'
|
||||
alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"'
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
alias disphost='export DISPLAY=:0.0'
|
||||
alias ll='ls -AglhF'
|
||||
alias la='ls -A'
|
||||
@ -276,4 +264,12 @@ function k(){
|
||||
fi
|
||||
fi
|
||||
}
|
||||
source ~/.zsh/*.zsh
|
||||
#source /home/stonewareslord/git/sync/zsh/theme-and-appearance.zsh
|
||||
#source /home/stonewareslord/git/sync/zsh/completion.zsh
|
||||
#source /home/stonewareslord/git/sync/zsh/key-bindings.zsh
|
||||
#source /home/stonewareslord/git/sync/zsh/spectrum.zsh
|
||||
|
||||
#source /home/stonewareslord/git/sync/zsh/misc.zsh
|
||||
#source /home/stonewareslord/git/sync/zsh/history.zsh
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
64
zsh/completion.zsh
Normal file
64
zsh/completion.zsh
Normal file
@ -0,0 +1,64 @@
|
||||
# fixme - the load process here seems a bit bizarre
|
||||
|
||||
unsetopt menu_complete # do not autoselect the first completion entry
|
||||
unsetopt flowcontrol
|
||||
setopt auto_menu # show completion menu on succesive tab press
|
||||
setopt complete_in_word
|
||||
setopt always_to_end
|
||||
|
||||
WORDCHARS=''
|
||||
|
||||
zmodload -i zsh/complist
|
||||
|
||||
## case-insensitive (all),partial-word and then substring completion
|
||||
if [ "x$CASE_SENSITIVE" = "xtrue" ]; then
|
||||
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
unset CASE_SENSITIVE
|
||||
else
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
fi
|
||||
|
||||
zstyle ':completion:*' list-colors ''
|
||||
|
||||
# should this be in keybindings?
|
||||
bindkey -M menuselect '^o' accept-and-infer-next-history
|
||||
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
if [ "$OSTYPE[0,7]" = "solaris" ]
|
||||
then
|
||||
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm"
|
||||
else
|
||||
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
|
||||
fi
|
||||
|
||||
# disable named-directories autocompletion
|
||||
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||
|
||||
# Use caching so that commands like apt and dpkg complete are useable
|
||||
zstyle ':completion::complete:*' use-cache 1
|
||||
zstyle ':completion::complete:*' cache-path $ZSH_CACHE_DIR
|
||||
|
||||
# Don't complete uninteresting users
|
||||
zstyle ':completion:*:*:*:users' ignored-patterns \
|
||||
adm amanda apache at avahi avahi-autoipd beaglidx bin cacti canna \
|
||||
clamav daemon dbus distcache dnsmasq dovecot fax ftp games gdm \
|
||||
gkrellmd gopher hacluster haldaemon halt hsqldb ident junkbust kdm \
|
||||
ldap lp mail mailman mailnull man messagebus mldonkey mysql nagios \
|
||||
named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \
|
||||
operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \
|
||||
rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \
|
||||
usbmux uucp vcsa wwwrun xfs '_*'
|
||||
|
||||
# ... unless we really want to.
|
||||
zstyle '*' single-ignored show
|
||||
|
||||
if [ "x$COMPLETION_WAITING_DOTS" = "xtrue" ]; then
|
||||
expand-or-complete-with-dots() {
|
||||
echo -n "\e[31m......\e[0m"
|
||||
zle expand-or-complete
|
||||
zle redisplay
|
||||
}
|
||||
zle -N expand-or-complete-with-dots
|
||||
bindkey "^I" expand-or-complete-with-dots
|
||||
fi
|
22
zsh/history.zsh.bak
Normal file
22
zsh/history.zsh.bak
Normal file
@ -0,0 +1,22 @@
|
||||
## Command history configuration
|
||||
export HISTFILE=$HOME/.zsh_history
|
||||
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
|
||||
# Show history
|
||||
case $HIST_STAMPS in
|
||||
"mm/dd/yyyy") alias history='fc -fl 1' ;;
|
||||
"dd.mm.yyyy") alias history='fc -El 1' ;;
|
||||
"yyyy-mm-dd") alias history='fc -il 1' ;;
|
||||
*) alias history='fc -l 1' ;;
|
||||
esac
|
||||
|
||||
setopt append_history
|
||||
setopt extended_history
|
||||
setopt hist_expire_dups_first
|
||||
setopt hist_ignore_dups # ignore duplication command history list
|
||||
setopt hist_ignore_space
|
||||
setopt hist_verify
|
||||
setopt inc_append_history
|
||||
setopt share_history # share command history data
|
87
zsh/key-bindings.zsh
Normal file
87
zsh/key-bindings.zsh
Normal file
@ -0,0 +1,87 @@
|
||||
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html
|
||||
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins
|
||||
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets
|
||||
|
||||
# Make sure that the terminal is in application mode when zle is active, since
|
||||
# only then values from $terminfo are valid
|
||||
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
|
||||
function zle-line-init() {
|
||||
echoti smkx
|
||||
}
|
||||
function zle-line-finish() {
|
||||
echoti rmkx
|
||||
}
|
||||
zle -N zle-line-init
|
||||
zle -N zle-line-finish
|
||||
fi
|
||||
|
||||
bindkey -e # Use emacs key bindings
|
||||
|
||||
bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark
|
||||
bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls
|
||||
bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line.
|
||||
if [[ "${terminfo[kpp]}" != "" ]]; then
|
||||
bindkey "${terminfo[kpp]}" up-line-or-history # [PageUp] - Up a line of history
|
||||
fi
|
||||
if [[ "${terminfo[knp]}" != "" ]]; then
|
||||
bindkey "${terminfo[knp]}" down-line-or-history # [PageDown] - Down a line of history
|
||||
fi
|
||||
|
||||
if [[ "${terminfo[kcuu1]}" != "" ]]; then
|
||||
bindkey "${terminfo[kcuu1]}" up-line-or-search # start typing + [Up-Arrow] - fuzzy find history forward
|
||||
fi
|
||||
if [[ "${terminfo[kcud1]}" != "" ]]; then
|
||||
bindkey "${terminfo[kcud1]}" down-line-or-search # start typing + [Down-Arrow] - fuzzy find history backward
|
||||
fi
|
||||
|
||||
if [[ "${terminfo[khome]}" != "" ]]; then
|
||||
bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line
|
||||
fi
|
||||
if [[ "${terminfo[kend]}" != "" ]]; then
|
||||
bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line
|
||||
fi
|
||||
|
||||
bindkey ' ' magic-space # [Space] - do history expansion
|
||||
|
||||
bindkey '^[[1;5C' forward-word # [Ctrl-RightArrow] - move forward one word
|
||||
bindkey '^[[1;5D' backward-word # [Ctrl-LeftArrow] - move backward one word
|
||||
|
||||
if [[ "${terminfo[kcbt]}" != "" ]]; then
|
||||
bindkey "${terminfo[kcbt]}" reverse-menu-complete # [Shift-Tab] - move through the completion menu backwards
|
||||
fi
|
||||
|
||||
bindkey '^?' backward-delete-char # [Backspace] - delete backward
|
||||
if [[ "${terminfo[kdch1]}" != "" ]]; then
|
||||
bindkey "${terminfo[kdch1]}" delete-char # [Delete] - delete forward
|
||||
else
|
||||
bindkey "^[[3~" delete-char
|
||||
bindkey "^[3;5~" delete-char
|
||||
bindkey "\e[3~" delete-char
|
||||
fi
|
||||
|
||||
# Edit the current command line in $EDITOR
|
||||
autoload -U edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey '\C-x\C-e' edit-command-line
|
||||
|
||||
# file rename magick
|
||||
bindkey "^[m" copy-prev-shell-word
|
||||
|
||||
# consider emacs keybindings:
|
||||
|
||||
#bindkey -e ## emacs key bindings
|
||||
#
|
||||
#bindkey '^[[A' up-line-or-search
|
||||
#bindkey '^[[B' down-line-or-search
|
||||
#bindkey '^[^[[C' emacs-forward-word
|
||||
#bindkey '^[^[[D' emacs-backward-word
|
||||
#
|
||||
#bindkey -s '^X^Z' '%-^M'
|
||||
#bindkey '^[e' expand-cmd-path
|
||||
#bindkey '^[^I' reverse-menu-complete
|
||||
#bindkey '^X^N' accept-and-infer-next-history
|
||||
#bindkey '^W' kill-region
|
||||
#bindkey '^I' complete-word
|
||||
## Fix weird sequence that rxvt produces
|
||||
#bindkey -s '^[[Z' '\t'
|
||||
#
|
12
zsh/misc.zsh
Normal file
12
zsh/misc.zsh
Normal file
@ -0,0 +1,12 @@
|
||||
## smart urls
|
||||
autoload -U url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
|
||||
## pager
|
||||
export PAGER="less"
|
||||
export LESS="-R"
|
||||
|
||||
# only define LC_CTYPE if undefined
|
||||
if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
|
||||
export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
|
||||
fi
|
37
zsh/spectrum.zsh
Normal file
37
zsh/spectrum.zsh
Normal file
@ -0,0 +1,37 @@
|
||||
#! /bin/zsh
|
||||
# A script to make using 256 colors in zsh less painful.
|
||||
# P.C. Shyamshankar <sykora@lucentbeing.com>
|
||||
# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
|
||||
|
||||
typeset -Ag FX FG BG
|
||||
|
||||
FX=(
|
||||
reset "%{[00m%}"
|
||||
bold "%{[01m%}" no-bold "%{[22m%}"
|
||||
italic "%{[03m%}" no-italic "%{[23m%}"
|
||||
underline "%{[04m%}" no-underline "%{[24m%}"
|
||||
blink "%{[05m%}" no-blink "%{[25m%}"
|
||||
reverse "%{[07m%}" no-reverse "%{[27m%}"
|
||||
)
|
||||
|
||||
for color in {000..255}; do
|
||||
FG[$color]="%{[38;5;${color}m%}"
|
||||
BG[$color]="%{[48;5;${color}m%}"
|
||||
done
|
||||
|
||||
|
||||
ZSH_SPECTRUM_TEXT=${ZSH_SPECTRUM_TEXT:-Arma virumque cano Troiae qui primus ab oris}
|
||||
|
||||
# Show all 256 colors with color number
|
||||
function spectrum_ls() {
|
||||
for code in {000..255}; do
|
||||
print -P -- "$code: %F{$code}$ZSH_SPECTRUM_TEXT%f"
|
||||
done
|
||||
}
|
||||
|
||||
# Show all 256 colors where the background is set to specific color
|
||||
function spectrum_bls() {
|
||||
for code in {000..255}; do
|
||||
print -P -- "$BG[$code]$code: $ZSH_SPECTRUM_TEXT %{$reset_color%}"
|
||||
done
|
||||
}
|
44
zsh/theme-and-appearance.zsh
Normal file
44
zsh/theme-and-appearance.zsh
Normal file
@ -0,0 +1,44 @@
|
||||
# ls colors
|
||||
autoload -U colors && colors
|
||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
|
||||
# Enable ls colors
|
||||
if [ "$DISABLE_LS_COLORS" != "true" ]
|
||||
then
|
||||
# Find the option for using colors in ls, depending on the version: Linux or BSD
|
||||
if [[ "$(uname -s)" == "NetBSD" ]]; then
|
||||
# On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
|
||||
# otherwise, leave ls as is, because NetBSD's ls doesn't support -G
|
||||
gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty'
|
||||
elif [[ "$(uname -s)" == "OpenBSD" ]]; then
|
||||
# On OpenBSD, test if "colorls" is installed (this one supports colors);
|
||||
# otherwise, leave ls as is, because OpenBSD's ls doesn't support -G
|
||||
colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G'
|
||||
else
|
||||
ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
|
||||
fi
|
||||
fi
|
||||
|
||||
#setopt no_beep
|
||||
setopt auto_cd
|
||||
setopt multios
|
||||
setopt cdablevars
|
||||
|
||||
if [[ x$WINDOW != x ]]
|
||||
then
|
||||
SCREEN_NO="%B$WINDOW%b "
|
||||
else
|
||||
SCREEN_NO=""
|
||||
fi
|
||||
|
||||
# Apply theming defaults
|
||||
PS1="%n@%m:%~%# "
|
||||
|
||||
# git theming default: Variables for theming the git info prompt
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean
|
||||
|
||||
# Setup the prompt with pretty colors
|
||||
setopt prompt_subst
|
Loading…
Reference in New Issue
Block a user