# key bindings:
+# note c-i/m/h are unusable, duplicating tab, enter, ctrl-del or something
+# C-x would be hard to rebind because emacs.
+
"\C-q": exchange-point-and-mark
"\C-w": kill-region
"\C-e": yank-last-arg
Control-Space: set-mark
-
+# default is C-M-e which kinda sucks
"\C-t": shell-expand-line
-#C-RETURN: undo
-
# ctrl-delete
"\e[3;5~": kill-word
-
+# default is C-x C-e
"\C-g": edit-and-execute-command
+# default is C-y
"\C-v": yank
+# default is C-M-y
"\C-\M-v": yank-pop
+# by default, not bound
"\C-p": dabbrev-expand # similar menu-complete, except for commands in history
+
+# default is C-q. this matches emacs.
"\C-\M-q": quoted-insert
+# default is C-x C-u
"\C-d": undo
####### commented out stuff ###########
-# in bash, bind -p helped me figure out how to make some binds work
-# i don't see this documented anywhere. not sure where I got it from but it doesn't work now
-#"\C-p": paste-from-clipboard
-
-
# vi mode settings and observatoins
# double pound indicates it is only commented because I am not using vi mode
##set editing-mode vi
# completion from history. how cool
##Control-SPACE: dynamic-complete-history
-# if this is a command in history, execute it and bring up the next command in history.
-##"\C-o": operate-and-get-next
-
# this is just kinda cool to show off:
##"\M-{": complete-into-braces
# sakura == xterm-256color
# konsole == xterm
if [[ $TERM == "xterm" ]]; then
- # make ctrl-backspace work
- stty werase '^?'
# control + arrow keys. for other terminals, see http://unix.stackexchange.com/questions/10806/how-to-change-previous-next-word-shortcut-in-bash
bind '"\e[1;5C": shell-forward-word' 2>/dev/null
bind '"\e[1;5D": shell-backward-word' 2>/dev/null
else
- #stty werase '^h'
+ # make ctrl-backspace work. for konsole, i fixed it through
+# /home/iank/.local/share/konsole/default.keytab
+ stty werase '^h'
bind '"\eOc": shell-forward-word'
bind '"\eOd": shell-backward-word'
fi
PS1="\h $PS1"
fi
- prompt_command() {
+
+
+
+ prompt-command() {
local return=$? # this MUST COME FIRST
local psc pst ps_char ps_color stale_subvol
unset IFS
history -a # save history
- # for titlebar
- if [[ $TERM == *(screen*|xterm*|rxvt*) ]]; then
- # from the screen man page
- if [[ $TERM == screen* ]]; then
- local title_escape="\033]..2;"
- else
- local title_escape="\033]0;"
- fi
- echo -ne "$title_escape${PWD/#$HOME/~} $USER@$HOSTNAME\007"
- fi
case $return in
# emacs completion doesn't like the git prompt atm, so disabling it.
#PS1="${PS1%"${PS1#*[wW]}"}$(__git_ps1 ' (%s)') \[$ps_color\]$ps_char\[$(get_term_color nocolor)\] "
}
- PROMPT_COMMAND=prompt_command
+ PROMPT_COMMAND=prompt-command
+
+ settitle () {
+ if [[ $TERM == screen* ]]; then
+ local title_escape="\033]..2;"
+ else
+ local title_escape="\033]0;"
+ fi
+ if [[ $* != prompt-command ]]; then
+ echo -ne "$title_escape$USER@$HOSTNAME ${PWD/#$HOME/~} $*\007"
+ fi
+ }
+
+ # for titlebar
+ # condition from the screen man page i think
+ if [[ $TERM == *(screen*|xterm*|rxvt*) ]]; then
+ trap 'settitle "$BASH_COMMAND"' DEBUG
+ else
+ trap DEBUG
+ fi
+
fi
reset-konsole() {
# we also have a file in /a/c/...konsole...
- setini ShowMenuBarByDefault false KonsoleWindow $HOME/.config/konsolerc
- while read k v; do
- setini $k $v TabBar $HOME/.config/konsolerc
- done <<'EOF'
-TabBarVisibility ShowTabBarWhenNeeded
-TabBarPosition Top
-EOF
+ local f=$HOME/.config/konsolerc
+ setini DefaultProfile profileian.profile "Desktop Entry" $f
+ setini Favorites profileian.profile "Favorite Profiles" $f
+ setini ShowMenuBarByDefault false KonsoleWindow $f
+ setini TabBarPosition Top TabBar $f
}
reset-sakura() {
--- /dev/null
+keyboard "Default (XFree 4)"
+key Space+Ctrl : "\x00"
+key Backtab+Ansi : "\E[Z"
+key Backtab-Ansi : "\t"
+key Backspace+Ctrl : "\x17"
+key Backspace : "\x7f"
+key Backspace+Ctrl : "\x17"
+key Esc : "\E"
+key Tab-Shift : "\t"
+key Tab+Shift+Ansi : "\E[Z"
+key Tab+Shift-Ansi : "\t"
+key Ins+KeyPad : "\E[2~"
+key Ins-AnyModifier : "\E[2~"
+key Ins+AnyModifier : "\E[2;*~"
+key Del+KeyPad : "\E[3~"
+key Del-AnyModifier : "\E[3~"
+key Del+AnyModifier : "\E[3;*~"
+key Return-Shift-NewLine : "\r"
+key Return-Shift+NewLine : "\r\n"
+key Return+Shift : "\EOM"
+key Enter+NewLine : "\r\n"
+key Enter-NewLine : "\r"
+key Left-Shift-Ansi : "\ED"
+key Left-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOD"
+key Left-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[D"
+key Left-Shift+Ansi+AnyModifier : "\E[1;*D"
+key Left+Shift+AppScreen : "\E[1;*D"
+key Left-Shift+KeyPad+Ansi+AppCursorKeys : "\EOD"
+key Left-Shift+KeyPad+Ansi-AppCursorKeys : "\E[D"
+key Up-Shift-Ansi : "\EA"
+key Up-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOA"
+key Up-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[A"
+key Up-Shift+Ansi+AnyModifier : "\E[1;*A"
+key Up+Shift+AppScreen : "\E[1;*A"
+key Up-Shift+KeyPad+Ansi+AppCursorKeys : "\EOA"
+key Up-Shift+KeyPad+Ansi-AppCursorKeys : "\E[A"
+key Up+Shift-AppScreen : ScrollLineUp
+key Home+KeyPad+AppCursorKeys : "\EOH"
+key Home+KeyPad-AppCursorKeys : "\E[H"
+key Home-AppCursorKeys-AnyModifier : "\E[H"
+key Home+AppCursorKeys-AnyModifier : "\EOH"
+key Home+AnyModifier : "\E[1;*H"
+key Home+Shift-AppScreen : ScrollUpToTop
+key End+KeyPad+AppCursorKeys : "\EOF"
+key End+KeyPad-AppCursorKeys : "\E[F"
+key End-AppCursorKeys-AnyModifier : "\E[F"
+key End+AppCursorKeys-AnyModifier : "\EOF"
+key End+AnyModifier : "\E[1;*F"
+key End+Shift-AppScreen : ScrollDownToBottom
+key PgUp-Shift+KeyPad : "\E[5~"
+key PgUp-Shift-AnyModifier : "\E[5~"
+key PgUp-Shift+AnyModifier : "\E[5;*~"
+key PgUp+Shift-AppScreen : ScrollPageUp
+key PgDown-Shift+KeyPad : "\E[6~"
+key PgDown-Shift-AnyModifier : "\E[6~"
+key PgDown-Shift+AnyModifier : "\E[6;*~"
+key PgDown+Shift-AppScreen : ScrollPageDown
+key Right-Shift-Ansi : "\EC"
+key Right-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOC"
+key Right-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[C"
+key Right-Shift+Ansi+AnyModifier : "\E[1;*C"
+key Right+Shift+AppScreen : "\E[1;*C"
+key Right-Shift+KeyPad+Ansi+AppCursorKeys : "\EOC"
+key Right-Shift+KeyPad+Ansi-AppCursorKeys : "\E[C"
+key Down-Shift-Ansi : "\EB"
+key Down-Shift+Ansi+AppCursorKeys-AnyModifier : "\EOB"
+key Down-Shift+Ansi-AppCursorKeys-AnyModifier : "\E[B"
+key Down-Shift+Ansi+AnyModifier : "\E[1;*B"
+key Down+Shift+AppScreen : "\E[1;*B"
+key Down-Shift+KeyPad+Ansi+AppCursorKeys : "\EOB"
+key Down-Shift+KeyPad+Ansi-AppCursorKeys : "\E[B"
+key Down+Shift-AppScreen : ScrollLineDown
+key F11-AnyModifier : "\E[23~"
+key F11+AnyModifier : "\E[23;*~"
+key F12-AnyModifier : "\E[24~"
+key F12+AnyModifier : "\E[24;*~"
+key F9-AnyModifier : "\E[20~"
+key F9+AnyModifier : "\E[20;*~"
+key F10-AnyModifier : "\E[21~"
+key F10+AnyModifier : "\E[21;*~"
+key F3-AnyModifier : "\EOR"
+key F3+AnyModifier : "\EO*R"
+key F4-AnyModifier : "\EOS"
+key F4+AnyModifier : "\EO*S"
+key F1-AnyModifier : "\EOP"
+key F1+AnyModifier : "\EO*P"
+key F2-AnyModifier : "\EOQ"
+key F2+AnyModifier : "\EO*Q"
+key F7-AnyModifier : "\E[18~"
+key F7+AnyModifier : "\E[18;*~"
+key F8-AnyModifier : "\E[19~"
+key F8+AnyModifier : "\E[19;*~"
+key F5-AnyModifier : "\E[15~"
+key F5+AnyModifier : "\E[15;*~"
+key F6-AnyModifier : "\E[17~"
+key F6+AnyModifier : "\E[17;*~"