filecon 0.2.0 → 0.2.1
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 +4 -4
- data/README.md +46 -13
- data/config.yaml +2 -1
- data/lib/filecon/version.rb +1 -1
- data/lib/filecon.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d62cae7fca7f8ef2348b79ac2df27edfafbc5da7ada9523a2fad5b38de27e5a9
|
|
4
|
+
data.tar.gz: 20fe942d398a0dd68e27a5cdc5b40d16d296e33399327494aaa608d847401e47
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d2ac9423eecd422db9ac518ba264ef56b3f9d17823950f648e56eff3de0dd08326daba18bfd8eeeba51d76e072a060f4be5c6542a50c709623adac370f080f0
|
|
7
|
+
data.tar.gz: 198c5fa607c36cbc86808d42e3b0a806d83832ba5432827c871526d8ebaebaaa8cc3864f7a486e586b00ce2e983086e81184d08fe993f93ca2fa58fd7b0c9fd6
|
data/README.md
CHANGED
|
@@ -2,15 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
# Filecon
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Description
|
|
6
|
+
|
|
7
|
+
Filecon is a terminal-based file manager built on the [Typr](https://codeberg.org/typr/typr) terminal UI toolkit. It packs everything a file manager should do into a keyboard-driven terminal program: every file, command, and directory is reachable in a few keystrokes, and the most common operations take the fewest key presses.
|
|
8
|
+
|
|
9
|
+
Filecon is designed to be **intuitive**, **complete**, **powerful**, and the **fastest possible** file manager. The whole interface is built around that principle:
|
|
10
|
+
|
|
11
|
+
- **Hint navigation** — every visible row carries a number hint (1–9, 0); pressing it acts on that row immediately, no cursor movement needed.
|
|
12
|
+
- **Live search in popups** — command and history popups open in `/` search mode; type to distill the list, then pick one of the few remaining results with a number.
|
|
13
|
+
- **Frequency-ordered history** — directory and command history are ranked by use count, so the most likely choice is always near the top.
|
|
14
|
+
|
|
15
|
+
Filecon's long-term goal is to become an **interactive shell**: a separate companion program will handle command building, and combined with Filecon the two will form a full interactive shell that competes with interactive CLI shells.
|
|
16
|
+
|
|
17
|
+
Filecon runs on Typr, whose self-contained terminal layer ships its own precompiled terminfo key table and MIME-type database in the gem — no ncurses or external tooling required — so Filecon works on any raw, ANSI-capable terminal (including Termux).
|
|
6
18
|
|
|
7
19
|
## Features
|
|
8
20
|
|
|
9
|
-
- Directory browsing with MIME-type detection
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
21
|
+
- **Directory browsing with MIME-type detection** — files are typed from a packaged MIME database and colored accordingly, with optional `file --mime-type` magic detection for unknowns
|
|
22
|
+
- **Fastest possible navigation** — hint numbers (1–9, 0) open rows directly; TAB pages hints beyond the first ten
|
|
23
|
+
- **Default `[/]:search` in popups** — command and history popups open in search mode: start typing to distill the list down to the matches, then press a number hint to pick from the few remaining results. The listing itself searches the same way
|
|
24
|
+
- **Mouse support** — click a row to open it with its default action; the mouse wheel scrolls the listing (pointer-only mode is planned)
|
|
25
|
+
- **Command execution modes** — commands run in one of four ways, chosen by prefix: `|` status line, `=` text viewer, `+` new terminal window, `!` Ruby eval; per-MIME-type command sets with `%name`, `%dir`, `%file`, `%str` substitution
|
|
26
|
+
- **Customizable column views** — view columns run shell commands with `%name` substitution (content preview, char/word/line counts, type info, disk usage, man-page descriptions)
|
|
27
|
+
- **Directory and command history with a frequency counter** — entries stored as `[count, entry]` pairs, most-used first then most-recent; `frequency_limit` controls how many frequent entries lead the list
|
|
28
|
+
- **Shell history import** — on first run, `~/.bash_history` and `~/.zsh_history` are validated, alias-resolved, and merged into the command history; directory paths referenced by those commands are collected into the directory history
|
|
29
|
+
- **Power browsing** — recursive directory listing, `execute` ($PATH browser), marking, filtering, sorting, and switchable column views
|
|
30
|
+
- **Fully documented configuration** — a self-documenting `config.yaml` covers colors, commands, views, history, and terminal settings
|
|
14
31
|
|
|
15
32
|
## Installation
|
|
16
33
|
|
|
@@ -42,6 +59,7 @@ filecon [directory]
|
|
|
42
59
|
- `f` — Filter view
|
|
43
60
|
- `r` — Reset view
|
|
44
61
|
- `R` — Recursive file listing
|
|
62
|
+
- `/` — Search the listing by name
|
|
45
63
|
|
|
46
64
|
**Marking**
|
|
47
65
|
- `m` — Mark file
|
|
@@ -58,25 +76,40 @@ filecon [directory]
|
|
|
58
76
|
- Enter — Select / confirm
|
|
59
77
|
- Esc — Quit
|
|
60
78
|
|
|
79
|
+
### Mouse
|
|
80
|
+
|
|
81
|
+
Click a row to open it with its default action; the mouse wheel scrolls the listing. Mouse reporting is enabled automatically when Filecon starts.
|
|
82
|
+
|
|
83
|
+
### Popups and search
|
|
84
|
+
|
|
85
|
+
Command and history popups open in `/` search mode. Type a few characters to **distill** the list down to the matching entries; when only a handful remain, press the number hint of the one you want. Large lists can be narrowed in a keystroke or two. The main listing searches the same way when you press `/`.
|
|
86
|
+
|
|
61
87
|
### Configuration
|
|
62
88
|
|
|
63
|
-
Config is stored at `~/.config/filecon/config.yaml` (YAML
|
|
89
|
+
Config is stored at `~/.config/filecon/config.yaml` (YAML). On first run the bundled, fully documented `config.yaml` is copied there. It includes:
|
|
64
90
|
|
|
65
|
-
- Color settings (named colors, 8-bit palette, RGB triplets)
|
|
66
|
-
- Command definitions per MIME type
|
|
67
|
-
- View configurations
|
|
91
|
+
- Color settings (named colors, 8-bit palette, RGB triplets) — including the `colors.commands` pair used by the command picker and status line
|
|
92
|
+
- Command definitions per MIME type, with execution-mode prefixes
|
|
93
|
+
- View configurations (columns that run shell commands)
|
|
68
94
|
- History limits and terminal settings
|
|
69
95
|
|
|
70
|
-
|
|
96
|
+
State and history files live under `~/.local/share/filecon/`.
|
|
71
97
|
|
|
72
|
-
|
|
98
|
+
**Command execution modes:**
|
|
99
|
+
|
|
100
|
+
- `|` — pipe output to the status line
|
|
73
101
|
- `+` — run in a new terminal window
|
|
74
102
|
- `=` — display output in the text viewer
|
|
75
103
|
- `!` — evaluate as Ruby code
|
|
76
104
|
|
|
77
105
|
**Substitution variables:** `%name` (file path), `%dir` (directory picker), `%file` (file picker), `%str` (text input)
|
|
78
106
|
|
|
79
|
-
See `filecon(1)`
|
|
107
|
+
See `filecon(1)` for the full manual.
|
|
108
|
+
|
|
109
|
+
## Roadmap
|
|
110
|
+
|
|
111
|
+
- **Pointer-only mode** — full mouse-driven operation of the entire interface, building on the click/wheel mouse support already present
|
|
112
|
+
- **Interactive shell** — a separate command-building program that combines with Filecon into an interactive shell competing with interactive CLI shells
|
|
80
113
|
|
|
81
114
|
## Development
|
|
82
115
|
|
data/config.yaml
CHANGED
data/lib/filecon/version.rb
CHANGED
data/lib/filecon.rb
CHANGED
|
@@ -329,6 +329,14 @@ class Filecon::App < Typr::Browser
|
|
|
329
329
|
next unless key
|
|
330
330
|
case key
|
|
331
331
|
when KEY_ESCAPE; exit
|
|
332
|
+
when Typr::Mouse
|
|
333
|
+
if key.wheel? and key.press?
|
|
334
|
+
send( key.wheel_up? ? @keymap[:up] : @keymap[:down] )
|
|
335
|
+
elsif key.press? and key.left?
|
|
336
|
+
id = hit( key.y, key.x )
|
|
337
|
+
open_file( id, true ) if id.is_a? Integer
|
|
338
|
+
end
|
|
339
|
+
@user.reset
|
|
332
340
|
else
|
|
333
341
|
id = send( key )
|
|
334
342
|
open_file( id, true) if id.is_a? Integer
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: filecon
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kilian Reitmayr
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '1.
|
|
18
|
+
version: '1.3'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '1.
|
|
25
|
+
version: '1.3'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: unicode-display_width
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|