fatty 0.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.envrc +2 -0
- data/.simplecov +23 -0
- data/.yardopts +4 -0
- data/CHANGELOG.md +34 -0
- data/CHANGELOG.org +38 -0
- data/LICENSE.txt +21 -0
- data/README.md +31 -0
- data/README.org +166 -0
- data/Rakefile +15 -0
- data/TODO.org +163 -0
- data/examples/markdown/native-markdown.md +370 -0
- data/examples/markdown/ox-gfm-markdown.md +373 -0
- data/examples/markdown/ox-gfm-markdown.org +376 -0
- data/exe/fatty +275 -0
- data/fatty.gemspec +42 -0
- data/lib/fatty/accept_env.rb +32 -0
- data/lib/fatty/action.rb +103 -0
- data/lib/fatty/action_environment.rb +42 -0
- data/lib/fatty/actionable.rb +73 -0
- data/lib/fatty/alert.rb +93 -0
- data/lib/fatty/ansi/renderer.rb +168 -0
- data/lib/fatty/ansi.rb +352 -0
- data/lib/fatty/colors/color.rb +379 -0
- data/lib/fatty/colors/pairs.rb +73 -0
- data/lib/fatty/colors/palette.rb +73 -0
- data/lib/fatty/colors/rgb.txt +788 -0
- data/lib/fatty/colors.rb +5 -0
- data/lib/fatty/config.rb +86 -0
- data/lib/fatty/config_files/config.yml +50 -0
- data/lib/fatty/config_files/help.md +120 -0
- data/lib/fatty/config_files/help.org +124 -0
- data/lib/fatty/config_files/keybindings.yml +49 -0
- data/lib/fatty/config_files/keydefs.yml +23 -0
- data/lib/fatty/config_files/themes/mono.yml +76 -0
- data/lib/fatty/config_files/themes/nordic.yml +77 -0
- data/lib/fatty/config_files/themes/solarized_dark.yml +77 -0
- data/lib/fatty/config_files/themes/terminal.yml +90 -0
- data/lib/fatty/config_files/themes/wordperfect.yml +77 -0
- data/lib/fatty/config_files/themes/wordperfect_light.yml +77 -0
- data/lib/fatty/core_ext/string.rb +21 -0
- data/lib/fatty/core_ext.rb +3 -0
- data/lib/fatty/counter.rb +81 -0
- data/lib/fatty/curses/context.rb +279 -0
- data/lib/fatty/curses/curses_coder.rb +684 -0
- data/lib/fatty/curses/event_source.rb +230 -0
- data/lib/fatty/curses/key_decoder.rb +183 -0
- data/lib/fatty/curses/patch.rb +116 -0
- data/lib/fatty/curses/window_styling.rb +32 -0
- data/lib/fatty/curses.rb +16 -0
- data/lib/fatty/env.rb +100 -0
- data/lib/fatty/help.rb +41 -0
- data/lib/fatty/history/entry.rb +71 -0
- data/lib/fatty/history.rb +289 -0
- data/lib/fatty/input_buffer.rb +998 -0
- data/lib/fatty/input_field.rb +507 -0
- data/lib/fatty/key_event.rb +342 -0
- data/lib/fatty/key_map.rb +392 -0
- data/lib/fatty/keymaps/emacs.rb +189 -0
- data/lib/fatty/log_formats/json.rb +47 -0
- data/lib/fatty/log_formats/text.rb +67 -0
- data/lib/fatty/logger.rb +142 -0
- data/lib/fatty/markdown/ansi_renderer.rb +373 -0
- data/lib/fatty/markdown/render.rb +22 -0
- data/lib/fatty/markdown.rb +4 -0
- data/lib/fatty/menu_env.rb +22 -0
- data/lib/fatty/mouse_event.rb +32 -0
- data/lib/fatty/output_buffer.rb +78 -0
- data/lib/fatty/pager.rb +801 -0
- data/lib/fatty/prompt.rb +40 -0
- data/lib/fatty/renderer/curses.rb +697 -0
- data/lib/fatty/renderer/truecolor.rb +607 -0
- data/lib/fatty/renderer.rb +419 -0
- data/lib/fatty/screen.rb +96 -0
- data/lib/fatty/search.rb +43 -0
- data/lib/fatty/session/alert_session.rb +52 -0
- data/lib/fatty/session/input_session.rb +99 -0
- data/lib/fatty/session/isearch_session.rb +172 -0
- data/lib/fatty/session/keytest_session.rb +236 -0
- data/lib/fatty/session/modal_session.rb +61 -0
- data/lib/fatty/session/output_session.rb +105 -0
- data/lib/fatty/session/popup_session.rb +540 -0
- data/lib/fatty/session/prompt_session.rb +157 -0
- data/lib/fatty/session/search_session.rb +136 -0
- data/lib/fatty/session/shell_session.rb +566 -0
- data/lib/fatty/session.rb +173 -0
- data/lib/fatty/sessions.rb +14 -0
- data/lib/fatty/terminal/popup_owner.rb +26 -0
- data/lib/fatty/terminal/progress.rb +374 -0
- data/lib/fatty/terminal.rb +1067 -0
- data/lib/fatty/themes/loader.rb +136 -0
- data/lib/fatty/themes/manager.rb +71 -0
- data/lib/fatty/themes/registry.rb +64 -0
- data/lib/fatty/themes/resolver.rb +224 -0
- data/lib/fatty/themes/themes.rb +131 -0
- data/lib/fatty/themes.rb +6 -0
- data/lib/fatty/version.rb +5 -0
- data/lib/fatty/view/alert_view.rb +14 -0
- data/lib/fatty/view/cursor_view.rb +18 -0
- data/lib/fatty/view/input_view.rb +9 -0
- data/lib/fatty/view/output_view.rb +9 -0
- data/lib/fatty/view/status_view.rb +14 -0
- data/lib/fatty/view.rb +33 -0
- data/lib/fatty/viewport.rb +90 -0
- data/lib/fatty/views.rb +9 -0
- data/lib/fatty.rb +55 -0
- data/sig/fatty.rbs +4 -0
- metadata +250 -0
data/lib/fatty/colors.rb
ADDED
data/lib/fatty/config.rb
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fatty
|
|
4
|
+
module Config
|
|
5
|
+
class << self
|
|
6
|
+
attr_reader :progname
|
|
7
|
+
attr_accessor :reader
|
|
8
|
+
attr_accessor :dir
|
|
9
|
+
end
|
|
10
|
+
@progname = 'fatty'
|
|
11
|
+
@config = {}
|
|
12
|
+
@reader = nil
|
|
13
|
+
@dir = nil
|
|
14
|
+
|
|
15
|
+
# Read in the general configuration for fatty in config.yml for certain
|
|
16
|
+
# user-adjustable features of fatty. One of these is the logging,
|
|
17
|
+
# including the location of the log file.
|
|
18
|
+
def self.config
|
|
19
|
+
@reader ||= FatConfig::Reader.new(progname, user_dir: dir)
|
|
20
|
+
@config = reader.read('config')
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.progname=(name)
|
|
24
|
+
@progname = name || 'fatty'
|
|
25
|
+
@reader = nil
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.user_config_path
|
|
29
|
+
@reader ||= FatConfig::Reader.new(progname, user_dir: dir)
|
|
30
|
+
reader.config_paths[:user].first || default_user_path('config')
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.user_keydefs_path
|
|
34
|
+
@reader ||= FatConfig::Reader.new(progname)
|
|
35
|
+
reader.config_paths('keydefs')[:user].first || default_user_path('keydefs')
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.user_keybindings_path
|
|
39
|
+
self.reader ||= FatConfig::Reader.new(progname)
|
|
40
|
+
reader.config_paths('keybindings')[:user].first || default_user_path('keybindings')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Read in the keydefs.yml config file that maps numeric keycodes returned
|
|
44
|
+
# by curses but not assigned a key name.
|
|
45
|
+
def self.keydefs
|
|
46
|
+
FatConfig::Reader.new(progname).read('keydefs')
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Read in the keybindings.yml config file that maps key names (together
|
|
50
|
+
# with any modifiers, shift, ctrl, meta) to action names to be triggered
|
|
51
|
+
# by the key chord.
|
|
52
|
+
def self.keybindings
|
|
53
|
+
kb_cfg = FatConfig::Reader.new(progname).read("keybindings")
|
|
54
|
+
return [] unless kb_cfg.is_a?(Hash)
|
|
55
|
+
|
|
56
|
+
bindings = kb_cfg[:keybindings]
|
|
57
|
+
Array(bindings)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def self.default_user_path(name = 'config')
|
|
61
|
+
"~/.config/#{progname}/#{name}.yml"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def self.sys_themes_dir
|
|
65
|
+
File.expand_path("config_files/themes", __dir__)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def self.user_config_dir
|
|
69
|
+
dir || File.join(ENV.fetch("XDG_CONFIG_HOME", File.expand_path("~/.config")), progname)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def self.user_themes_dir
|
|
73
|
+
File.join(user_config_dir, "themes")
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def self.install_default_themes!
|
|
77
|
+
FileUtils.mkdir_p(user_themes_dir)
|
|
78
|
+
|
|
79
|
+
Dir.glob(File.join(sys_themes_dir, "*.yml")).each do |src|
|
|
80
|
+
dst = File.join(user_themes_dir, File.basename(src))
|
|
81
|
+
FileUtils.cp(src, dst) unless File.exist?(dst)
|
|
82
|
+
end
|
|
83
|
+
nil
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# What fatty considers a "word" in the input buffer
|
|
2
|
+
|
|
3
|
+
# # treat dash as part of a word (good for CLI flags / kebab-case)
|
|
4
|
+
# input_buffer:
|
|
5
|
+
# word_chars: "[[:alnum:]_-]"
|
|
6
|
+
|
|
7
|
+
# # treat '.' as part of a word (good for fqdn / ruby constants / filenames)
|
|
8
|
+
# input_buffer:
|
|
9
|
+
# word_chars: "[[:alnum:]_.:-]"
|
|
10
|
+
|
|
11
|
+
input_buffer:
|
|
12
|
+
# A Ruby regexp fragment used *inside* /.../ (not including the slashes).
|
|
13
|
+
# Default if omitted: "[[:alnum:]_]"
|
|
14
|
+
word_chars: "[[:alnum:]_]"
|
|
15
|
+
|
|
16
|
+
# This controls how long (in milliseconds) curses waits after receiving ESC
|
|
17
|
+
# for a second key to interpret it as a meta-key sequence. ncurses defaults
|
|
18
|
+
# to 1000, i.e., a full second, which can make response to a bare ESC key feel
|
|
19
|
+
# really laggy. You can set it to something more reasonable here or by
|
|
20
|
+
# setting the environment variable ESCDELAY in you shell setup.
|
|
21
|
+
esc_delay: 25
|
|
22
|
+
|
|
23
|
+
# file: sets the location of the log file, by default at
|
|
24
|
+
# $XDG_STATE_HOME/fatty/fatty.log
|
|
25
|
+
#
|
|
26
|
+
# level: whether to log at the debug level or info.
|
|
27
|
+
#
|
|
28
|
+
# tags: when at the debug level, what categories of events to log. The special
|
|
29
|
+
# tag 'all' logs all levels, and is the default when the level is debug.
|
|
30
|
+
log:
|
|
31
|
+
file: "~/log/fatty.log"
|
|
32
|
+
level: debug # debug or info
|
|
33
|
+
tags:
|
|
34
|
+
- keycode # raw curses input / bytes / ESC buffering
|
|
35
|
+
- keyevent # constructed KeyEvent normalization (ctrl/meta mapping)
|
|
36
|
+
- keybinding # – KeyMap#resolve hits/misses, contexts used
|
|
37
|
+
- action # Actions.call, target selection, unknown action
|
|
38
|
+
- command # Terminal.apply_command / :send dispatches
|
|
39
|
+
- session # session update calls, mode/context stack changes
|
|
40
|
+
- render # viewports, layout sizes, redraw triggers
|
|
41
|
+
- perf # timings, frame time, slow paths
|
|
42
|
+
# - all # All of the above
|
|
43
|
+
history:
|
|
44
|
+
file: "~/.fatty_history"
|
|
45
|
+
max: 10_000
|
|
46
|
+
|
|
47
|
+
# By default the theme is 'terminal'
|
|
48
|
+
theme: wordperfect
|
|
49
|
+
|
|
50
|
+
truecolor: auto
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Fatty Help
|
|
2
|
+
|
|
3
|
+
## The `fatty` demo command
|
|
4
|
+
|
|
5
|
+
When you run `fatty`, it operates as a simple demo of the `fatty` gem by
|
|
6
|
+
presenting an editable command-line using emacs key bindings. It has several
|
|
7
|
+
builtin commands to demonstrate `fatty` features, and any command it does not
|
|
8
|
+
recognized is handed off to the shell.
|
|
9
|
+
|
|
10
|
+
## Builtin commands
|
|
11
|
+
|
|
12
|
+
Here are the commands builtin to `fatty`
|
|
13
|
+
|
|
14
|
+
| Command | Description |
|
|
15
|
+
|:-----------------------------|:------------------------------------------------------------------------|
|
|
16
|
+
| help | Display this file on the output pane |
|
|
17
|
+
| cd | Change the current directory used by the shell |
|
|
18
|
+
| choose | Present a series of choices in a popup window |
|
|
19
|
+
| choosevals | Also present choices in a popup window but return an associated value |
|
|
20
|
+
| choose\_multi | Present choices with a "checkbox" for selecting multiple values |
|
|
21
|
+
| choosevals\_multi | Also present a checkbox but return associated values |
|
|
22
|
+
| menu | Present a menu of labeled routines to run |
|
|
23
|
+
| info | Display an "info" message on the status line |
|
|
24
|
+
| good | Display a "good" message colored to indicate success |
|
|
25
|
+
| warn | Display a "warn" message colored to indicate caution |
|
|
26
|
+
| oops | Display an "oops" message colored to indicate failure |
|
|
27
|
+
| prompt | Popup a text box for entering a value in response to a prompt |
|
|
28
|
+
| progress count <N> | Display an animated progress indicator counting up to 40 or the given N |
|
|
29
|
+
| progress percent <N> | Same but also show the percent complete |
|
|
30
|
+
| progress simple\_percent <N> | Same but show only the percent complete |
|
|
31
|
+
| progress trail | Show progress by displaying an "indicator" character for each step |
|
|
32
|
+
| progress bar | Show progress by a filling bar using ASCII characters |
|
|
33
|
+
| progress unicode\_bar | Same, but using unicode characters |
|
|
34
|
+
| progress braille\_bar | Same, but using braille characters |
|
|
35
|
+
| progress spinner | Animate a "spinner" showing a busy state |
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Keybindings
|
|
39
|
+
|
|
40
|
+
The following tables explain the keybindings available in `fatty` in different
|
|
41
|
+
contexts. Named keys are indicated by `:name` and key categories, such as
|
|
42
|
+
`<digits>` are indicated with brackets.
|
|
43
|
+
|
|
44
|
+
### Input Context
|
|
45
|
+
|
|
46
|
+
When editing the input line or text input for widgets like the `prompt`,
|
|
47
|
+
`fatty` provides emacs-like editing keybindings by default. Many of these
|
|
48
|
+
commands can take a count prefix argument to repeat the command count times.
|
|
49
|
+
For example, `M-8 M-0 #` will insert 80 '#' characters at the cursor.
|
|
50
|
+
|
|
51
|
+
| Key | Description |
|
|
52
|
+
|:-----------|:------------------------------------------------------|
|
|
53
|
+
| C-a | move to the beginning of the line |
|
|
54
|
+
| :home | move to the beginning of the line |
|
|
55
|
+
| C-e | move to the end of the line |
|
|
56
|
+
| :end | move to the end of the line |
|
|
57
|
+
| C-f | move cursor right one character |
|
|
58
|
+
| :right | move cursor right one character |
|
|
59
|
+
| C-b | move cursor left one character |
|
|
60
|
+
| :left | move cursor left one character |
|
|
61
|
+
| M-f | move cursor right one word |
|
|
62
|
+
| M-:right | move cursor right one word |
|
|
63
|
+
| C-:right | move cursor right one word |
|
|
64
|
+
| M-b | move cursor left one word |
|
|
65
|
+
| M-:left | move cursor left one word |
|
|
66
|
+
| C-:left | move cursor left one word |
|
|
67
|
+
| C-t | transpose characters |
|
|
68
|
+
| M-t | transpose words |
|
|
69
|
+
| | |
|
|
70
|
+
| C-d | delete character at cursor |
|
|
71
|
+
| :delete | delete character at cursor |
|
|
72
|
+
| :backspace | delete character before cursor |
|
|
73
|
+
| M-d | kill word at cursor |
|
|
74
|
+
| C-w | kill word before cursor |
|
|
75
|
+
| C-k | kill to end of line |
|
|
76
|
+
| | |
|
|
77
|
+
| C-/ | undo |
|
|
78
|
+
| C-_ | undo |
|
|
79
|
+
| C-M-/ | redo |
|
|
80
|
+
| M-/ | redo |
|
|
81
|
+
| | |
|
|
82
|
+
| C-:space | set the mark at the current cursor position |
|
|
83
|
+
| C-@ | set the mark at the current cursor position |
|
|
84
|
+
| C-g | clear the mark |
|
|
85
|
+
| C-w | kill the region |
|
|
86
|
+
| M-w | copy the region |
|
|
87
|
+
| | |
|
|
88
|
+
| C-y | yank last kill at cursor |
|
|
89
|
+
| M-y | replace last yank with next in kill ring |
|
|
90
|
+
| | |
|
|
91
|
+
| C-u | universal count argument (time 4 each press) |
|
|
92
|
+
| M-<digit> | accumulate count argument |
|
|
93
|
+
| | |
|
|
94
|
+
| C-p | replace the line with the prior history item |
|
|
95
|
+
| :up | replace the line with the prior history item |
|
|
96
|
+
| C-n | replace the line with the next history item |
|
|
97
|
+
| :down | replace the line with the prior history item |
|
|
98
|
+
| C-r | search the history in a popup |
|
|
99
|
+
| | |
|
|
100
|
+
| :enter | feed the line to the on_accept proc and page output |
|
|
101
|
+
| M-:enter | feed the line to the on_accept proc and scroll output |
|
|
102
|
+
| C-c | quit `fatty` |
|
|
103
|
+
| C-d | quit `fatty` only if the input line is empty |
|
|
104
|
+
| C-l | clear the output pane |
|
|
105
|
+
| | |
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
## Paging Context
|
|
109
|
+
|
|
110
|
+
By default, `fatty` sends output to the large output pane, and if the output
|
|
111
|
+
is more than one screen long presents a paging environment for viewing and
|
|
112
|
+
searching the environment.
|
|
113
|
+
|
|
114
|
+
| Key | Description |
|
|
115
|
+
|:------|:--------------------------|
|
|
116
|
+
| :up | move output one line up |
|
|
117
|
+
| k | move output one line up |
|
|
118
|
+
| :down | move output one line down |
|
|
119
|
+
| j | move output one line down |
|
|
120
|
+
| | |
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
* Fatty Help
|
|
2
|
+
** The =fatty= demo command
|
|
3
|
+
|
|
4
|
+
When you =fatty=, it operates as a simple demo of the =fatty= gem by
|
|
5
|
+
presenting an editable command-line using emacs key bindings. It has several
|
|
6
|
+
builtin commands to demonstrate =fatty= features, and any command it does not
|
|
7
|
+
recognized is handed off to the shell.
|
|
8
|
+
|
|
9
|
+
** Builtin commands
|
|
10
|
+
|
|
11
|
+
Here are the commands builtin to =fatty=
|
|
12
|
+
|
|
13
|
+
| Command | Description |
|
|
14
|
+
|-----------------------------+-------------------------------------------------------------------------|
|
|
15
|
+
| help | Display this file on the output pane |
|
|
16
|
+
| cd | Change the current directory used by the shell |
|
|
17
|
+
| choose | Present a series of choices in a popup window |
|
|
18
|
+
| choosevals | Also present choices in a popup window but return an associated value |
|
|
19
|
+
| choose_multi | Present choices with a "checkbox" for selecting multiple values |
|
|
20
|
+
| choosevals_multi | Also present a checkbox but return associated values |
|
|
21
|
+
| menu | Present a menu of labeled routines to run |
|
|
22
|
+
| info | Display an "info" message on the status line |
|
|
23
|
+
| good | Display a "good" message colored to indicate success |
|
|
24
|
+
| warn | Display a "warn" message colored to indicate caution |
|
|
25
|
+
| oops | Display an "oops" message colored to indicate failure |
|
|
26
|
+
| prompt | Popup a text box for entering a value in response to a prompt |
|
|
27
|
+
| progress count <N> | Display an animated progress indicator counting up to 40 or the given N |
|
|
28
|
+
| progress percent <N> | Same but also show the percent complete |
|
|
29
|
+
| progress simple_percent <N> | Same but show only the percent complete |
|
|
30
|
+
| progress trail | Show progress by displaying an "indicator" character for each step |
|
|
31
|
+
| progress bar | Show progress by a filling bar using ASCII characters |
|
|
32
|
+
| progress unicode_bar | Same, but using unicode characters |
|
|
33
|
+
| progress braille_bar | Same, but using braille characters |
|
|
34
|
+
| progress spinner | Animate a "spinner" showing a busy state |
|
|
35
|
+
| markdown <file.md> | Render the markdown file to the output pane; defaults to a demo file |
|
|
36
|
+
| keytest | Enter key diagnostic mode report keycodes, key names, and bindings |
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
** Keybindings
|
|
40
|
+
|
|
41
|
+
The following tables explain the keybindings available in `fatty` in different
|
|
42
|
+
contexts. Named keys are indicated by `:name` and key categories, such as
|
|
43
|
+
`<digits>` are indicated with brackets.
|
|
44
|
+
|
|
45
|
+
*** Input Context
|
|
46
|
+
|
|
47
|
+
When editing the input line or text input for widgets like the `prompt`,
|
|
48
|
+
`fatty` provides emacs-like editing keybindings by default. Many of these
|
|
49
|
+
commands can take a count prefix argument to repeat the command count times.
|
|
50
|
+
For example, `M-8 M-0 #` will insert 80 '#' characters at the cursor.
|
|
51
|
+
|
|
52
|
+
| Key | Description |
|
|
53
|
+
|------------+-------------------------------------------------------|
|
|
54
|
+
| C-a | move to the beginning of the line |
|
|
55
|
+
| :home | move to the beginning of the line |
|
|
56
|
+
| C-e | move to the end of the line |
|
|
57
|
+
| :end | move to the end of the line |
|
|
58
|
+
| C-f | move cursor right one character |
|
|
59
|
+
| :right | move cursor right one character |
|
|
60
|
+
| C-b | move cursor left one character |
|
|
61
|
+
| :left | move cursor left one character |
|
|
62
|
+
| M-f | move cursor right one word |
|
|
63
|
+
| M-:right | move cursor right one word |
|
|
64
|
+
| C-:right | move cursor right one word |
|
|
65
|
+
| M-b | move cursor left one word |
|
|
66
|
+
| M-:left | move cursor left one word |
|
|
67
|
+
| C-:left | move cursor left one word |
|
|
68
|
+
| C-t | transpose characters |
|
|
69
|
+
| M-t | transpose words |
|
|
70
|
+
| | |
|
|
71
|
+
| C-d | delete character at cursor |
|
|
72
|
+
| :delete | delete character at cursor |
|
|
73
|
+
| :backspace | delete character before cursor |
|
|
74
|
+
| M-d | kill word at cursor |
|
|
75
|
+
| C-w | kill word before cursor |
|
|
76
|
+
| C-k | kill to end of line |
|
|
77
|
+
| | |
|
|
78
|
+
| C-/ | undo |
|
|
79
|
+
| C-_ | undo |
|
|
80
|
+
| C-M-/ | redo |
|
|
81
|
+
| M-/ | redo |
|
|
82
|
+
| | |
|
|
83
|
+
| C-:space | set the mark at the current cursor position |
|
|
84
|
+
| C-@ | set the mark at the current cursor position |
|
|
85
|
+
| C-g | clear the mark |
|
|
86
|
+
| C-w | kill the region |
|
|
87
|
+
| M-w | copy the region |
|
|
88
|
+
| | |
|
|
89
|
+
| C-y | yank last kill at cursor |
|
|
90
|
+
| M-y | replace last yank with next in kill ring |
|
|
91
|
+
| | |
|
|
92
|
+
| C-u | universal count argument (time 4 each press) |
|
|
93
|
+
| M-<digit> | accumulate count argument |
|
|
94
|
+
| | |
|
|
95
|
+
| C-p | replace the line with the prior history item |
|
|
96
|
+
| :up | replace the line with the prior history item |
|
|
97
|
+
| C-n | replace the line with the next history item |
|
|
98
|
+
| :down | replace the line with the prior history item |
|
|
99
|
+
| C-r | search the history in a popup |
|
|
100
|
+
| | |
|
|
101
|
+
| :enter | feed the line to the on_accept proc and page output |
|
|
102
|
+
| M-:enter | feed the line to the on_accept proc and scroll output |
|
|
103
|
+
| C-c | quit `fatty` |
|
|
104
|
+
| C-d | quit `fatty` only if the input line is empty |
|
|
105
|
+
| C-l | clear the output pane |
|
|
106
|
+
| | |
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
*** Paging Context
|
|
110
|
+
|
|
111
|
+
By default, `fatty` sends output to the large output pane, and if the output
|
|
112
|
+
is more than one screen long presents a paging environment for viewing and
|
|
113
|
+
searching the environment.
|
|
114
|
+
|
|
115
|
+
| Key | Description |
|
|
116
|
+
|-------+---------------------------|
|
|
117
|
+
| :up | move output one line up |
|
|
118
|
+
| k | move output one line up |
|
|
119
|
+
| :down | move output one line down |
|
|
120
|
+
| j | move output one line down |
|
|
121
|
+
| | |
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
** fatty on the Web
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# This file is for user-defined keybindings. Each binding can look like this:
|
|
2
|
+
#
|
|
3
|
+
# - key: <KEYNAME>
|
|
4
|
+
# context: input/paging/popup (input)
|
|
5
|
+
# ctrl: true/false (false)
|
|
6
|
+
# meta: true/false (false)
|
|
7
|
+
# shift: true/false (false)
|
|
8
|
+
# action: <Fatty action> (noop)
|
|
9
|
+
|
|
10
|
+
- key: left
|
|
11
|
+
meta: true
|
|
12
|
+
action: move_word_left
|
|
13
|
+
|
|
14
|
+
- key: right
|
|
15
|
+
meta: true
|
|
16
|
+
action: move_word_right
|
|
17
|
+
|
|
18
|
+
- key: space
|
|
19
|
+
context: paging
|
|
20
|
+
action: page_down
|
|
21
|
+
|
|
22
|
+
- key: backspace
|
|
23
|
+
context: paging
|
|
24
|
+
action: page_up
|
|
25
|
+
|
|
26
|
+
# Or, for mouse events:
|
|
27
|
+
# - button: <BUTTONNAME>
|
|
28
|
+
# context: input/paging/popup (input)
|
|
29
|
+
# ctrl: true/false (false)
|
|
30
|
+
# meta: true/false (false)
|
|
31
|
+
# shift: true/false (false)
|
|
32
|
+
# action: <Fatty action> (noop)
|
|
33
|
+
|
|
34
|
+
# Where <BUTTONNAME> is one of:
|
|
35
|
+
# left_pressed,
|
|
36
|
+
# left_released,
|
|
37
|
+
# left_clicked,
|
|
38
|
+
# left_double_clicked,
|
|
39
|
+
# left_triple_clicked,
|
|
40
|
+
# middle_pressed,
|
|
41
|
+
# middle_released,
|
|
42
|
+
# middle_clicked,
|
|
43
|
+
# middle_double_clicked,
|
|
44
|
+
# middle_triple_clicked,
|
|
45
|
+
# right_pressed,
|
|
46
|
+
# right_released,
|
|
47
|
+
# right_clicked,
|
|
48
|
+
# right_double_clicked,
|
|
49
|
+
# right_triple_clicked
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: mono
|
|
2
|
+
inherit: null
|
|
3
|
+
|
|
4
|
+
output:
|
|
5
|
+
fg: black
|
|
6
|
+
bg: white
|
|
7
|
+
|
|
8
|
+
input:
|
|
9
|
+
fg: white
|
|
10
|
+
bg: black
|
|
11
|
+
|
|
12
|
+
input_suggestion:
|
|
13
|
+
fg: gray
|
|
14
|
+
bg: white
|
|
15
|
+
|
|
16
|
+
cursor:
|
|
17
|
+
fg: black
|
|
18
|
+
bg: white
|
|
19
|
+
|
|
20
|
+
region:
|
|
21
|
+
fg: black
|
|
22
|
+
bg: white
|
|
23
|
+
|
|
24
|
+
match_current:
|
|
25
|
+
fg: black
|
|
26
|
+
bg: yellow
|
|
27
|
+
|
|
28
|
+
match_other:
|
|
29
|
+
fg: black
|
|
30
|
+
bg: lightgray
|
|
31
|
+
|
|
32
|
+
search:
|
|
33
|
+
fg: black
|
|
34
|
+
bg: cyan
|
|
35
|
+
|
|
36
|
+
pager_status:
|
|
37
|
+
fg: black
|
|
38
|
+
bg: white
|
|
39
|
+
|
|
40
|
+
good:
|
|
41
|
+
fg: "green"
|
|
42
|
+
bg: "white"
|
|
43
|
+
|
|
44
|
+
info:
|
|
45
|
+
fg: black
|
|
46
|
+
bg: white
|
|
47
|
+
|
|
48
|
+
warn:
|
|
49
|
+
fg: default
|
|
50
|
+
bg: default
|
|
51
|
+
|
|
52
|
+
error:
|
|
53
|
+
fg: default
|
|
54
|
+
bg: default
|
|
55
|
+
|
|
56
|
+
popup:
|
|
57
|
+
fg: black
|
|
58
|
+
bg: white
|
|
59
|
+
|
|
60
|
+
popup_selection:
|
|
61
|
+
fg: white
|
|
62
|
+
bg: black
|
|
63
|
+
|
|
64
|
+
popup_input:
|
|
65
|
+
fg: white
|
|
66
|
+
bg: black
|
|
67
|
+
|
|
68
|
+
popup_counts:
|
|
69
|
+
fg: white
|
|
70
|
+
bg: gray
|
|
71
|
+
|
|
72
|
+
popup_frame:
|
|
73
|
+
fg: black
|
|
74
|
+
bg: white
|
|
75
|
+
corners: square
|
|
76
|
+
border: ascii
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: nordic
|
|
2
|
+
inherit: null
|
|
3
|
+
|
|
4
|
+
output:
|
|
5
|
+
fg: "#d8dee9"
|
|
6
|
+
bg: "#2e3440"
|
|
7
|
+
|
|
8
|
+
input:
|
|
9
|
+
fg: "#eceff4"
|
|
10
|
+
bg: "#3b4252"
|
|
11
|
+
attrs: [bold]
|
|
12
|
+
|
|
13
|
+
input_suggestion:
|
|
14
|
+
fg: "#81a1c1"
|
|
15
|
+
bg: "#3b4252"
|
|
16
|
+
|
|
17
|
+
cursor:
|
|
18
|
+
fg: "#2e3440"
|
|
19
|
+
bg: "#88c0d0"
|
|
20
|
+
|
|
21
|
+
region:
|
|
22
|
+
fg: "#2e3440"
|
|
23
|
+
bg: "#88c0d0"
|
|
24
|
+
|
|
25
|
+
good:
|
|
26
|
+
fg: "green"
|
|
27
|
+
bg: "#2e3440"
|
|
28
|
+
|
|
29
|
+
info:
|
|
30
|
+
fg: "#d8dee9"
|
|
31
|
+
bg: "#2e3440"
|
|
32
|
+
|
|
33
|
+
warn:
|
|
34
|
+
fg: "#2e3440"
|
|
35
|
+
bg: "#ebcb8b"
|
|
36
|
+
|
|
37
|
+
error:
|
|
38
|
+
fg: "#eceff4"
|
|
39
|
+
bg: "#bf616a"
|
|
40
|
+
|
|
41
|
+
pager_status:
|
|
42
|
+
fg: "black"
|
|
43
|
+
bg: "lightgreen"
|
|
44
|
+
|
|
45
|
+
search_input:
|
|
46
|
+
fg: "black"
|
|
47
|
+
bg: "cyan"
|
|
48
|
+
|
|
49
|
+
match_current:
|
|
50
|
+
fg: "black"
|
|
51
|
+
bg: "yellow"
|
|
52
|
+
|
|
53
|
+
match_other:
|
|
54
|
+
fg: "black"
|
|
55
|
+
bg: "lightgray"
|
|
56
|
+
|
|
57
|
+
popup:
|
|
58
|
+
fg: "#d8dee9"
|
|
59
|
+
bg: "#3b4252"
|
|
60
|
+
|
|
61
|
+
popup_input:
|
|
62
|
+
fg: "#eceff4"
|
|
63
|
+
bg: "#434c5e"
|
|
64
|
+
|
|
65
|
+
popup_counts:
|
|
66
|
+
fg: "#2e3440"
|
|
67
|
+
bg: "white"
|
|
68
|
+
|
|
69
|
+
popup_selection:
|
|
70
|
+
fg: "#2e3440"
|
|
71
|
+
bg: "#88c0d0"
|
|
72
|
+
|
|
73
|
+
popup_frame:
|
|
74
|
+
fg: "#81a1c1"
|
|
75
|
+
bg: "#3b4252"
|
|
76
|
+
border: single
|
|
77
|
+
corners: rounded
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: solarized_dark
|
|
2
|
+
inherit: null
|
|
3
|
+
|
|
4
|
+
output:
|
|
5
|
+
fg: "#839496"
|
|
6
|
+
bg: "#002b36"
|
|
7
|
+
|
|
8
|
+
input:
|
|
9
|
+
fg: "#93a1a1"
|
|
10
|
+
bg: "#073642"
|
|
11
|
+
attrs: [bold]
|
|
12
|
+
|
|
13
|
+
input_suggestion:
|
|
14
|
+
fg: "#657b83"
|
|
15
|
+
bg: "#073642"
|
|
16
|
+
|
|
17
|
+
cursor:
|
|
18
|
+
fg: "#002b36"
|
|
19
|
+
bg: "#b58900"
|
|
20
|
+
|
|
21
|
+
region:
|
|
22
|
+
fg: "#002b36"
|
|
23
|
+
bg: "#b58900"
|
|
24
|
+
|
|
25
|
+
good:
|
|
26
|
+
fg: "green"
|
|
27
|
+
bg: "#002b36"
|
|
28
|
+
|
|
29
|
+
info:
|
|
30
|
+
fg: "#839496"
|
|
31
|
+
bg: "#002b36"
|
|
32
|
+
|
|
33
|
+
warn:
|
|
34
|
+
fg: "#002b36"
|
|
35
|
+
bg: "#cb4b16"
|
|
36
|
+
|
|
37
|
+
error:
|
|
38
|
+
fg: "#fdf6e3"
|
|
39
|
+
bg: "red"
|
|
40
|
+
|
|
41
|
+
pager_status:
|
|
42
|
+
fg: "black"
|
|
43
|
+
bg: "lightgreen"
|
|
44
|
+
|
|
45
|
+
search_input:
|
|
46
|
+
fg: "black"
|
|
47
|
+
bg: "cyan"
|
|
48
|
+
|
|
49
|
+
match_current:
|
|
50
|
+
fg: "black"
|
|
51
|
+
bg: "yellow"
|
|
52
|
+
|
|
53
|
+
match_other:
|
|
54
|
+
fg: "black"
|
|
55
|
+
bg: "lightgray"
|
|
56
|
+
|
|
57
|
+
popup:
|
|
58
|
+
fg: "#839496"
|
|
59
|
+
bg: "#073642"
|
|
60
|
+
|
|
61
|
+
popup_input:
|
|
62
|
+
fg: "#93a1a1"
|
|
63
|
+
bg: "#002b36"
|
|
64
|
+
|
|
65
|
+
popup_counts:
|
|
66
|
+
fg: "#002b36"
|
|
67
|
+
bg: "white"
|
|
68
|
+
|
|
69
|
+
popup_selection:
|
|
70
|
+
fg: "#002b36"
|
|
71
|
+
bg: "#b58900"
|
|
72
|
+
|
|
73
|
+
popup_frame:
|
|
74
|
+
fg: "#268bd2"
|
|
75
|
+
bg: "#073642"
|
|
76
|
+
border: single
|
|
77
|
+
corners: rounded
|