filecon 0.4.0 → 0.4.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/CHANGELOG.md +3 -1
- data/README.md +1 -1
- data/config.yaml +4 -4
- data/lib/filecon/version.rb +1 -1
- data/lib/filecon.rb +12 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f07add892511a6e097e0179f4cef51dc07b63472130a1e346c92384472dfb3d
|
|
4
|
+
data.tar.gz: 6fa89d833523b2adc8b86fa0f2bee7f5ce0b9077d86d0cf66d181931f60f8081
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43c10e4395a6e444ddd831ce98034864706b6be2e380b0d62ed58be4a6ff6d57b49397b12771fe6dad9d785c04df4638c7d0b77c4a104a7971da9fabdb8c8879
|
|
7
|
+
data.tar.gz: abfcb1c4db8a0ab38f3108469c048c7ca2566d18dd30dfb4212d8edbf03e171da52a0750dc36cc4df2c77233a475897c81f6bce954157f254864bd7c63f05491
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [v0.4.1] — 2026-09-11
|
|
4
4
|
|
|
5
5
|
## [v0.4.0] — 2026-09-05
|
|
6
6
|
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
- `cd` owns the path column flag — array `cd` sets `@show_path` (single dirs clear it), so `reset_view` preserves the path listing after `execute`/`recurse` instead of dropping it; `recurse` just builds the recursive directory array and delegates the loading to `cd`
|
|
21
21
|
- Array `cd` fills the path column after the full load — previously only the first directory's rows got values (the rest stayed blank on `reset_view`), and custom Hash views dropped the column entirely; the trailing `change_view` now runs once on complete data, and computed views keep PATH too
|
|
22
22
|
- Clickable header path — left-clicking the username goes home and each directory segment navigates there, while right-click opens the command list for that path without leaving the current directory
|
|
23
|
+
- Alt+click opens the command list — Alt+left-click on a row or header path behaves like right-click, for touchscreens where right-click is hard to send (Termux)
|
|
24
|
+
- Failed `cd` keeps history and the path flag — directory history, selection clearing, and `@show_path` only commit after a successful navigation, and array loads skip unreadable entries up front
|
|
23
25
|
- A binding picked in help now runs — `fly` re-dispatches a String return from `send` (as it already did for mouse clicks), so pressing `h` and clicking e.g. `[R]ecurse` executes that action instead of just closing the help page
|
|
24
26
|
- The help text panel sits flush with the terminal edge — the text panel's `right: -2` border now draws on the last column, matching the browser edge; the previous inset was caused by an off-by-one in the `draw_border` guard
|
|
25
27
|
|
data/README.md
CHANGED
|
@@ -76,7 +76,7 @@ filecon [directory]
|
|
|
76
76
|
|
|
77
77
|
### Mouse
|
|
78
78
|
|
|
79
|
-
Click a row to open it with its default action, right-click to open its command list; click a binding label on the bottom bar or a filter/sort/views column on the head to run that action; the mouse wheel scrolls the listing. Clicking outside a popup dismisses it. `h` shows a two-pane help with the keybinding grid (from the line's `list`) beside the help text — clicking a binding row returns its trigger key, and clicking outside both panes closes it. Mouse reporting is enabled automatically when Filecon starts.
|
|
79
|
+
Click a row to open it with its default action, right-click (or Alt+click) to open its command list; click a binding label on the bottom bar or a filter/sort/views column on the head to run that action; the mouse wheel scrolls the listing. Clicking outside a popup dismisses it. `h` shows a two-pane help with the keybinding grid (from the line's `list`) beside the help text — clicking a binding row returns its trigger key, and clicking outside both panes closes it. Mouse reporting is enabled automatically when Filecon starts.
|
|
80
80
|
|
|
81
81
|
### Popups and search
|
|
82
82
|
|
data/config.yaml
CHANGED
|
@@ -128,9 +128,9 @@ colors:
|
|
|
128
128
|
commands:
|
|
129
129
|
default:
|
|
130
130
|
# copy: "|rsync --progress %name %dir"
|
|
131
|
-
info: "=file %name"
|
|
132
|
-
view: "+moor %name"
|
|
133
131
|
edit: "+micro %name"
|
|
132
|
+
view: "+moor %name"
|
|
133
|
+
info: "=file %name"
|
|
134
134
|
copy: "|cp -R %name %dir"
|
|
135
135
|
move: "|mv %name %dir"
|
|
136
136
|
rename: "|mv %name %str"
|
|
@@ -154,8 +154,8 @@ commands:
|
|
|
154
154
|
disk_use: "|du -hs %name | cut -wf1"
|
|
155
155
|
play: "+mpv %name"
|
|
156
156
|
|
|
157
|
-
text:
|
|
158
|
-
count: "|wc -l %name | cut -wf1"
|
|
157
|
+
# text:
|
|
158
|
+
# count: "|wc -l %name | cut -wf1"
|
|
159
159
|
|
|
160
160
|
troff:
|
|
161
161
|
manual: "+man %name"
|
data/lib/filecon/version.rb
CHANGED
data/lib/filecon.rb
CHANGED
|
@@ -13,7 +13,8 @@ class Filecon::App < Typr::Browser
|
|
|
13
13
|
@selected[:rows] = [] unless append
|
|
14
14
|
if dir.is_a? Array
|
|
15
15
|
@show_path = true
|
|
16
|
-
dirs = dir.filter_map { |d| d = File.expand_path(d.to_s);
|
|
16
|
+
dirs = dir.filter_map { |d| d = File.expand_path(d.to_s);
|
|
17
|
+
Dir.exist?(d) && File.readable?(d) && File.executable?(d) ? d : nil }
|
|
17
18
|
dirs.each_with_index { |d, i|
|
|
18
19
|
@directory = d if i.positive?
|
|
19
20
|
Dir.chdir(d) if i.positive?
|
|
@@ -23,10 +24,14 @@ class Filecon::App < Typr::Browser
|
|
|
23
24
|
change_view @view if dirs.any?
|
|
24
25
|
nil
|
|
25
26
|
else
|
|
26
|
-
@show_path = false unless append
|
|
27
27
|
dir = @dir_history[dir+1][1] if dir.is_a? Integer
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
saved = @show_path
|
|
29
|
+
@show_path = false unless append
|
|
30
|
+
if ( super dir, append ) == false
|
|
31
|
+
@show_path = saved
|
|
32
|
+
else
|
|
33
|
+
record :dir, File.expand_path(dir) unless append || [?/, ENV["HOME"]].include?(dir)
|
|
34
|
+
end
|
|
30
35
|
nil
|
|
31
36
|
end
|
|
32
37
|
end
|
|
@@ -413,11 +418,12 @@ class Filecon::App < Typr::Browser
|
|
|
413
418
|
case key
|
|
414
419
|
when KEY_ESCAPE; exit
|
|
415
420
|
when Typr::Mouse
|
|
421
|
+
alt = key.alt?
|
|
416
422
|
if key.press? and ( key.left? or key.right? ) and target = @head.path_at( key.x, key.y )
|
|
417
|
-
key.right? ? open_path( target ) : cd( target )
|
|
423
|
+
( key.right? or alt ) ? open_path( target ) : cd( target )
|
|
418
424
|
else
|
|
419
425
|
value = send( key )
|
|
420
|
-
open_file( value, !key.right? ) if value.is_a?( Integer )
|
|
426
|
+
open_file( value, !( key.right? or alt ) ) if value.is_a?( Integer )
|
|
421
427
|
end
|
|
422
428
|
@user.reset
|
|
423
429
|
else
|