-
Notifications
You must be signed in to change notification settings - Fork 0
/
%bind.bash
39 lines (26 loc) · 1.2 KB
/
%bind.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /hint/bash
${shell_is_interactive-return}
# Shift+Tab: alias-expand-line
bind '"\e[Z": alias-expand-line'
#### 2>&- || return # 'no bind cmd', we do not have bind in this bash ?
# bind '"\b": '
# Shift + F11 = decrease brightness, Shift+F12 increase brightness # also moves cursor to 6 lines up (\n + brightnessctl expected to be 5 lines)
bind '"\e[23;2~": "brightnessctl s 1%- && printf \\\\e\\\[6A \n"'
# bind '"\e[23;2~": "$(brightnessctl s 1%- && printf \\\\e\\\[6A \n)"'
bind '"\e[24;2~": "brightnessctl s 1%+ && printf \\\\e\\\[6A \n"'
# bind '"\e[24;2~": "$(brightnessctl s 1%+ && printf \\\\e\\\[6A \n)"'
# Ctrl + T = search forward (Ctrl+R is backwords)
# default for Ctrl+T is "transpose-chars" from bash
# bind '"\C-t": forward-search-history'
# Shift + Enter = new line without execution
bind '"\eOM": "\026\n"'
# Ctrl + BackSpace / "OldBackspace" = remove left word
# bind '"\b": unix-word-rubout'
# bind '"\b": backward-kill-word'
bind '"\b": shell-backward-kill-word'
# disable Meta+S it is overwrited by OS but sometimes does't work
bind '"\030@ss": "_"'
## # media player controls fallback: (never tested)
## bind '"\EO1P": ##pause/resume'
## bind '"\EO3Q": ##rext'
## bind '"\EO3R": ##prev'