aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2018-10-10 17:19:29 +0700
committerPeter Son Struschka <me@peter-struschka.com>2018-10-10 17:19:29 +0700
commit1297a2e0ec774a13c9900b63c2b4afbb6582a5d3 (patch)
tree1f633f33a5569f1924183ff801897d6e6fea4d37 /zsh
parentc0cb935f9aaa33638344415aaede751ca3d29bb1 (diff)
downloaddotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.gz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.bz2
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.lz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.xz
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.tar.zst
dotfiles-1297a2e0ec774a13c9900b63c2b4afbb6582a5d3.zip
multiple changes mostly to zsh and polybar
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zfunc/_kitty14
-rwxr-xr-xzsh/.zprofile4
-rw-r--r--zsh/.zshrc39
3 files changed, 50 insertions, 7 deletions
diff --git a/zsh/.zfunc/_kitty b/zsh/.zfunc/_kitty
new file mode 100644
index 0000000..15918b5
--- /dev/null
+++ b/zsh/.zfunc/_kitty
@@ -0,0 +1,14 @@
+autoload -Uz compinit
+compinit
+
+_kitty() {
+ local src
+ # Send all words up to the word the cursor is currently on
+ src=$(printf "%s
+" "${(@)words[1,$CURRENT]}" | kitty +complete zsh)
+ if [[ $? == 0 ]]; then
+ eval ${src}
+ fi
+}
+compdef _kitty kitty
+
diff --git a/zsh/.zprofile b/zsh/.zprofile
index 8589282..400fa76 100755
--- a/zsh/.zprofile
+++ b/zsh/.zprofile
@@ -19,5 +19,9 @@ export PATH="$HOME/.bin:$PATH"
export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
+export PATH="$HOME/.node_modules/bin:$PATH"
+export npm_config_prefix=~/.node_modules
+
+
alias open=xdg-open
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 7c3e4c5..404a8b7 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -3,10 +3,17 @@ source /usr/share/zsh/share/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
+antigen bundle git-extras
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
antigen bundle docker
+antigen bundle archlinux
+antigen bundle sublime
+antigen bundle zsh-navigation-tools
+antigen bundle systemd
+antigen bundle taskwarrior
+antigen bundle virtualenvwrapper
fpath+=~/.zfunc
antigen bundle zsh-users/zsh-syntax-highlighting
@@ -22,10 +29,10 @@ POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=""
#POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="↳ "
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_MODE='awesome-fontconfig'
-POWERLEVEL9K_SHORTEN_DIR_LENGTH=4
+POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
-POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon context dir dir_writable vcs)
-POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
+POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon context virtualenv dir dir_writable vcs)
+POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time root_indicator background_jobs history time)
# antigen theme https://gist.github.com/pstruschka/c05686e6cf10e12471a3104e42e6366b.git agnoster_custom
antigen theme bhilburn/powerlevel9k powerlevel9k
@@ -33,16 +40,34 @@ antigen theme bhilburn/powerlevel9k powerlevel9k
antigen apply
-if ! type "exa" > /dev/null; then
- echo exa Missing, using ls
-else
+if type "kitty" > /dev/null; then
+ autoload -Uz compinit
+ compinit
+ # Completion for kitty
+ kitty + complete setup zsh | source /dev/stdin
+
+ alias kdiff="kitty +kitten diff"
+ alias kicat="kitty +kitten icat"
+ alias kunicode="kitty +kitten unicode_input"
+ alias kpanel="kitty +kitten panel"
+ alias khints="kitty +kitten hints"
+ alias kclip="kitty +kitten clipboard"
+fi
+
+
+if type "exa" > /dev/null; then
alias ls=exa
fi
-eval $(thefuck --alias)
+
+if type "thefuck" > /dev/null; then
+ eval $(thefuck --alias)
+fi
# python virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
source /usr/bin/virtualenvwrapper_lazy.sh
+alias ec="emacsclient -c"
+
eval "$(fasd --init auto)"