terminal stuff
authorIan Kelling <iank@fsf.org>
Mon, 8 Jan 2018 17:28:46 +0000 (12:28 -0500)
committerIan Kelling <iank@fsf.org>
Mon, 8 Jan 2018 17:32:02 +0000 (12:32 -0500)
.inputrc
brc
subdir_files/.local/share/konsole/README.ian [new file with mode: 0644]
subdir_files/.local/share/konsole/default.keytab [new file with mode: 0644]
subdir_files/.local/share/konsole/profileian.profile

index 726bc78c75e09d7737f8951f0b4a14f49f89543d..76d3577a0daf28413c87ebc4c1d43f8142e41413 100644 (file)
--- a/.inputrc
+++ b/.inputrc
@@ -42,6 +42,9 @@ set mark-symlinked-directories on
 
 # 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
@@ -61,24 +64,28 @@ set mark-symlinked-directories on
 
 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
 
 
@@ -91,11 +98,6 @@ Control-Space: set-mark
 
 ####### 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
@@ -103,9 +105,6 @@ Control-Space: set-mark
 # 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
 
diff --git a/brc b/brc
index e589dfb8a3740f35a400903fb1d8addc8614f92d..bd8429e1d526b6252367f3d38b65005bca5d3337 100644 (file)
--- a/brc
+++ b/brc
@@ -112,13 +112,13 @@ if [[ $- == *i* ]]; then
         # 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
@@ -1856,22 +1856,15 @@ if [[ $- == *i* ]]; then
         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
@@ -1901,18 +1894,36 @@ if [[ $- == *i* ]]; then
         # 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() {
diff --git a/subdir_files/.local/share/konsole/README.ian b/subdir_files/.local/share/konsole/README.ian
new file mode 100644 (file)
index 0000000..dcde179
--- /dev/null
@@ -0,0 +1,3 @@
+only thing I added was
+key Backspace+Ctrl : "\x17"
+I did it through the ui. it makes ctrl-backspace delete the prev word
\ No newline at end of file
diff --git a/subdir_files/.local/share/konsole/default.keytab b/subdir_files/.local/share/konsole/default.keytab
new file mode 100644 (file)
index 0000000..0d12e6b
--- /dev/null
@@ -0,0 +1,96 @@
+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;*~"
index f48ce54d36781958286b418ae530daf86f267456..d000a1e72e45eb9289c0559c435e91bc41030894 100644 (file)
@@ -4,7 +4,7 @@ Font=Ubuntu Mono,14,-1,5,50,0,0,0,0,0
 
 [General]
 LocalTabTitleFormat=%w
-Name=Profile #1
+Name=profileian
 Parent=FALLBACK/
 RemoteTabTitleFormat=%w