aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.config/herbstluftwm/colourgrab.sh2
-rwxr-xr-x.config/herbstluftwm/restartpanels.sh2
-rwxr-xr-x.config/herbstluftwm/switcher.sh2
-rwxr-xr-x.config/sxiv/exec/key-handler2
-rw-r--r--.zshrc51
5 files changed, 51 insertions, 8 deletions
diff --git a/.config/herbstluftwm/colourgrab.sh b/.config/herbstluftwm/colourgrab.sh
index 1144001..5a38f8f 100755
--- a/.config/herbstluftwm/colourgrab.sh
+++ b/.config/herbstluftwm/colourgrab.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/zsh
file=$(xoris)
echo "$file" | tr -d '\n' | xclip -selection clipboard
echo "$file" | tr -d '\n' | xclip -selection primary
diff --git a/.config/herbstluftwm/restartpanels.sh b/.config/herbstluftwm/restartpanels.sh
index 9d9110c..1d14f1d 100755
--- a/.config/herbstluftwm/restartpanels.sh
+++ b/.config/herbstluftwm/restartpanels.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/zsh
installdir=/
diff --git a/.config/herbstluftwm/switcher.sh b/.config/herbstluftwm/switcher.sh
index 88ff366..4d570c2 100755
--- a/.config/herbstluftwm/switcher.sh
+++ b/.config/herbstluftwm/switcher.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/zsh
IFS=$'\r\n' clients=($(wmctrl -l | cut -c -10))
number=$(wmctrl -l | cut -c 20- | nl -w 2 -s ") " | dmenu -i -h 18 -nb $1 -nf $2 -sb $3 -sf $4 -p "Select:" -l 40 | grep -oE '[0-9]' | head -1)
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index 30b05a8..cf286c9 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/zsh
# The key combo argument has the following form: "[C-][M-][S-]KEY",
# where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X
diff --git a/.zshrc b/.zshrc
index 6ecfdc6..63bc11d 100644
--- a/.zshrc
+++ b/.zshrc
@@ -11,8 +11,6 @@ HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt HIST_IGNORE_DUPS
-[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" history-beginning-search-backward
-[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" history-beginning-search-forward
# urxvt does visual mode just fine, and i don't compose
# any large strings in a shell, so treating it as always
@@ -20,9 +18,54 @@ setopt HIST_IGNORE_DUPS
bindkey -e
setopt notify
unsetopt beep
-#%(?..%{$fg[red]%}[e]%{$fg[white]%})
-PROMPT="%{%B$fg[white]%}[%{%(!.$fg[red].$fg[magenta])%}%n@%M %{$fg[blue]%}%~%{$fg[white]%}]: %{%b$reset_color%}"
+PROMPT="%{%B$fg[white]%}[%{%(!.$fg[red].$fg[magenta])%}%n@%M %{$fg[blue]%}%c%{$fg[white]%}]: %{%b$reset_color%}"
+
+################# KEYBINDINGS #################
+typeset -g -A key
+
+key[F1]='^[[11~'
+key[F2]='^[[12~'
+key[F3]='^[[13~'
+key[F4]='^[[14~'
+key[F5]='^[[15~'
+key[F6]='^[[17~'
+key[F7]='^[[18~'
+key[F8]='^[[19~'
+key[F9]='^[[20~'
+key[F10]='^[[21~'
+key[F11]='^[[23~'
+key[F12]='^[[24~'
+key[Backspace]='^?'
+key[Insert]='^[[2~'
+key[Home]='^[[7~'
+key[PageUp]='^[[5~'
+key[Delete]='^[[3~'
+key[End]='^[[8~'
+key[PageDown]='^[[6~'
+key[Up]='^[[A'
+key[Left]='^[[D'
+key[Down]='^[[B'
+key[Right]='^[[C'
+
+bindkey ${key[Backspace]} backward-delete-char
+bindkey ${key[Insert]} overwrite-mode
+bindkey ${key[Home]} beginning-of-line
+bindkey ${key[Delete]} delete-char
+bindkey ${key[End]} end-of-line
+bindkey ${key[Up]} up-line-or-search
+bindkey ${key[Left]} backward-char
+bindkey ${key[Down]} down-line-or-search
+bindkey ${key[Right]} forward-char
+bindkey ${key[PageUp]} history-beginning-search-backward
+bindkey ${key[PageDown]} history-beginning-search-forward
+bindkey '^W' backward-kill-word
+bindkey '^U' backward-kill-line
+bindkey '^P' up-history
+bindkey '^N' down-history
+
+
+################### ALIASES ##################
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias diff='colordiff'