aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.config/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.config/zsh')
-rw-r--r--dotfiles/.config/zsh/.zshrc55
-rw-r--r--dotfiles/.config/zsh/inputrc (renamed from dotfiles/.config/zsh/.inputrc)0
-rw-r--r--dotfiles/.config/zsh/shortcuts48
3 files changed, 57 insertions, 46 deletions
diff --git a/dotfiles/.config/zsh/.zshrc b/dotfiles/.config/zsh/.zshrc
index a597162..4a21004 100644
--- a/dotfiles/.config/zsh/.zshrc
+++ b/dotfiles/.config/zsh/.zshrc
@@ -1,8 +1,5 @@
# Colors and prompt
autoload -U colors && colors
-if [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]]; then
- . /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
-fi
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
@@ -55,50 +52,16 @@ function zle-keymap-select {
}
echo -ne '\e[5 q' # Use beam shape cursor on startup.
-preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
+printf "\033]2;%s\a" "$PWD" # Set terminal window title to current dir
+# Repeat for every new prompt
+preexec() {
+ echo -ne '\e[5 q'
+ printf "\033]2;%s\a" "$PWD"
+}
zle -N zle-keymap-select
-# Some aliases
-alias v="nvim"
-alias abook="abook -C $HOME/.config/abook/abookrc --datafile $HOME/Documents/contacts/addressbook"
-alias eslint="./node_modules/.bin/eslint"
-alias ls="ls -hN --color=auto --group-directories-first"
-weath() { curl wttr.in/$1 ;} # Check the weather (give city or leave blank).
-wintitle() { printf "\033]2;%s\a" "$1";}
-
-# Generic shortcuts
-alias music="ncmpcpp"
-alias clock="ncmpcpp -s clock"
-alias news="newsboat"
-alias files="ranger"
-alias audio="ncpamixer"
-alias calendar="calcurse"
-alias contacts="abook"
-alias calc="R --no-save"
+[ -f "$HOME/.config/zsh/shortcuts" ] && . "$HOME/.config/zsh/shortcuts"
-# Mounting drive shortcuts
-alias mnt="udisksctl mount -b"
-alias umnt="udisksctl unmount -b"
-alias dlock="udisksctl lock -b"
-alias dulock="udisksctl unlock -b"
-
-# Internet
-alias yt="youtube-dl --add-metadata -ic" # Download video link
-alias yta="youtube-dl --add-metadata -xic" # Download only audio
-alias YT="youtube-viewer"
-alias starwars="telnet towel.blinkenlights.nl"
-
-# Audio and Music
-alias mute="lmc mute"
-alias vu="lmc up"
-alias vd="lmc down"
-alias play="mpc toggle"
-alias next="mpc next"
-alias prev="mpc prev"
-alias pause="mpc pause"
-alias beg="mpc seek 0%"
-alias lilbak="mpc seek -10"
-alias lilfor="mpc seek +10"
-alias bigbak="mpc seek -120"
-alias bigfor="mpc seek +120"
+[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] &&
+ . /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
diff --git a/dotfiles/.config/zsh/.inputrc b/dotfiles/.config/zsh/inputrc
index f852d3b..f852d3b 100644
--- a/dotfiles/.config/zsh/.inputrc
+++ b/dotfiles/.config/zsh/inputrc
diff --git a/dotfiles/.config/zsh/shortcuts b/dotfiles/.config/zsh/shortcuts
new file mode 100644
index 0000000..a47bbba
--- /dev/null
+++ b/dotfiles/.config/zsh/shortcuts
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# Some aliases
+alias v="nvim"
+alias abook="abook -C $HOME/.config/abook/abookrc --datafile $HOME/Documents/contacts/addressbook"
+alias eslint="./node_modules/.bin/eslint"
+alias ls="ls -hN --color=auto --group-directories-first"
+alias tmux="tmux -f $HOME/.config/tmux/tmux.conf"
+weath() { curl wttr.in/$1 ;} # Check the weather (give city or leave blank).
+corona() { curl https://corona-stats.online/$1 ;} # It's corona time
+wintitle() { printf "\033]2;%s\a" "$1";}
+
+# Generic shortcuts
+alias music="ncmpcpp"
+alias clock="ncmpcpp -s clock"
+alias news="newsboat"
+alias files="ranger"
+alias audio="ncpamixer"
+alias calendar="calcurse"
+alias contacts="abook"
+alias calc="R --no-save"
+
+# Mounting drive shortcuts
+alias mnt="udisksctl mount -b"
+alias umnt="udisksctl unmount -b"
+alias dlock="udisksctl lock -b"
+alias dulock="udisksctl unlock -b"
+
+# Internet
+alias yt="youtube-dl --add-metadata -ic" # Download video link
+alias yta="youtube-dl --add-metadata -xic" # Download only audio
+alias YT="youtube-viewer"
+alias starwars="telnet towel.blinkenlights.nl"
+
+# Audio and Music
+alias mute="lmc mute"
+alias vu="lmc up"
+alias vd="lmc down"
+alias play="mpc toggle"
+alias next="mpc next"
+alias prev="mpc prev"
+alias pause="mpc pause"
+alias beg="mpc seek 0%"
+alias lilbak="mpc seek -10"
+alias lilfor="mpc seek +10"
+alias bigbak="mpc seek -120"
+alias bigfor="mpc seek +120"
+