Skip to content

Commit b4e0406

Browse files
authored
Merge branch 'elfmz:master' into master
2 parents ef5bf06 + cd70be2 commit b4e0406

31 files changed

+928
-526
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ jobs:
176176
libssl-dev libsmbclient-dev libnfs-dev libneon27-dev libssh-dev
177177
libarchive-dev
178178
python3-dev python3-cffi
179+
python3-markdown appstream
179180
180181
- name: Create Build Environment
181182
# Create a separate build directory as working directory for all subsequent commands
@@ -195,6 +196,9 @@ jobs:
195196
# Execute the build. You can specify a specific target with "--target <NAME>"
196197
run: |
197198
cmake --build _build --config $BUILD_TYPE -j$(nproc --all)
199+
200+
- name: Validate AppStream metainfo file
201+
run: appstreamcli validate --strict _build/far2l/DE/io.github.elfmz.far2l.metainfo.xml
198202

199203
macos14-arm64-clang15:
200204
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}

HACKING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ far2l uses this to resolve symlink destination when user selects plugin's item t
8989
* `DM_SETTEXTPTRSILENT`
9090
* `ECTL_ADDTRUECOLOR` - applies coloring to editor like ECTL_ADDCOLOR does but allows to specify 24 RGB color using EditorTrueColor structure.
9191
* `ECTL_GETTRUECOLOR` - retrieves coloring of editor like ECTL_GETCOLOR does but gets 24 RGB color using EditorTrueColor structure.
92-
* `DN_KEY` - Param2 retrives bitmasked state of the keys KEY_SHIFT, KEY_ALT and KEY_CTRL when Param1 equals to 0
92+
* `DN_KEY` - Param2 retrives bitmasked state of the keys KEY_SHIFT, KEY_ALT and KEY_CTRL when Param1 equals to -1.
9393

9494
Note that all true-color capable messages extend but don't replace 'base' 16 palette colors. This is done intentionally as far2l may run in terminal that doesn't support true color palette, and in such case 24bit colors will be ignored and base palette attributes will be used instead.
9595

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Works also on OSX/MacOS and BSD (but latter not tested on regular manner)
66
BETA VERSION.
77
**Use on your own risk!**
88

9-
Plug-ins that are currently working: NetRocks (SFTP/SCP/FTP/FTPS/SMB/NFS/WebDAV), colorer, multiarc, tmppanel, align, autowrap, drawline, editcase, SimpleIndent, Calculator, Python (optional scripting support)
9+
Plug-ins that are currently working: NetRocks (SFTP/SCP/FTP/FTPS/SMB/NFS/WebDAV), colorer, multiarc, tmppanel, Advanced compare, filecase, inside, align, autowrap, drawline, editcase, editorcomp, incsrch, SimpleIndent, Calculator, Python (optional scripting support)
1010

1111
FreeBSD/MacOS (Cirrus CI): [![Cirrus](https://api.cirrus-ci.com/github/elfmz/far2l.svg)](https://cirrus-ci.com/github/elfmz/far2l)
1212

@@ -22,13 +22,30 @@ FreeBSD/MacOS (Cirrus CI): [![Cirrus](https://api.cirrus-ci.com/github/elfmz/far
2222
* 7z ANSI-C Decoder
2323
* utf-cpp by ww898
2424

25+
### Jump To:
26+
* [Getting Started](#gstarted)
27+
* [Installing, Running](#inst_run)
28+
* [Building, Contributing, Hacking](#building)
29+
* [Compatible Terminals and SSH clients](#terminals)
30+
* [Useful 3rd-party extras](#useful3party)
31+
* [Community packages & binaries](#community_bins)
32+
* See also (in external documents):
33+
* [Change log](changelog.md)
34+
* [Releases](https://github.com/elfmz/far2l/releases)
35+
* [Notes on porting and FAR Plugin API changes](HACKING.md)
36+
* [Coding style](CODESTYLE.md)
37+
* [Testing](testing/README.md)
38+
39+
<a name="gstarted"></a>
40+
## Getting Started
41+
2542
<sub><a name="keyshells"></a>_Note_: Far2l uses keyboard shortcurts in the tradition of the Far Manager for Windows,
26-
but some of them (**Alt**-**F1**, **Alt**-**F2**, **Alt**-**F7**, **Ctrl**-arrows, etc.)
43+
but some of them (**Alt**+**F1**, **Alt**+**F2**, **Alt**+**F7**, **Ctrl**+arrows, etc.)
2744
usually exclusively used in desktop environment GNOME, KDE, Xfce, macOS etc. and in terminal emulators.
2845
To work with these keys in far2l you need to _release keyboard shortcuts globally_
2946
in the environment settings (see [#2326](https://github.com/elfmz/far2l/issues/2326))
3047
or use far2l lifehacks:
31-
_Sticky controls via **Ctrl**-**Space** or **Alt**-**Space**_ or _Exclusively handle hotkeys option in the Input settings_
48+
_Sticky controls via **Ctrl**+**Space** or **Alt**+**Space**_ or _Exclusively handle hotkeys option in the Input settings_
3249
(see details in buil-in far2l help).</sub>
3350

3451
### UI Backends
@@ -76,6 +93,7 @@ and in **terminal settings** option OSC 52 must be allowed (by default, OSC 52 i
7693
OSC 52 in many terminals is implemented only for the copy mode, and paste from the terminal goes by bracketed paste mode).</sub>
7794

7895

96+
<a name="inst_run"></a>
7997
## Installing, Running
8098
<a name="debian"></a>
8199
#### Debian/Ubuntu binaries from the official repositories
@@ -136,6 +154,7 @@ docker run -it far2l
136154
See also [Community packages & binaries](#community_bins)
137155

138156

157+
<a name="building"></a>
139158
## Building, Contributing, Hacking
140159
#### Required dependencies
141160

@@ -149,6 +168,7 @@ See also [Community packages & binaries](#community_bins)
149168
* `libsmbclient-dev` (_optional_ - needed for **NetRocks/SMB**)
150169
* `libnfs-dev` (_optional_ - needed for **NetRocks/NFS**)
151170
* `libneon27-dev` (or later, _optional_ - needed for **NetRocks/WebDAV**)
171+
* [AWS SDK S3](https://github.com/aws/aws-sdk-cpp) (_optional_ - needed for **NetRocks/AWS**)
152172
* `libarchive-dev` (_optional_ - needed for better archives support in **multiarc**)
153173
* `libunrar-dev` (_optional_ - needed for RAR archives support in **multiarc**, see `-DUNRAR` command line option)
154174
* `libicu-dev` (_optional_ - needed if used non-default ICU_MODE, see `-DICU_MODE` command line option)
@@ -207,7 +227,7 @@ To force-disable TTY|X and TTY|Xi backends: add argument `-DTTYX=no`; to disable
207227
208228
To eliminate libuchardet requirement to reduce far2l dependencies by cost of losing automatic charset detection functionality: add `-DUSEUCD=no`
209229
210-
By default far2l uses pre-generated "hardcoded" UNICODE characters properties. But this can be changed by specifying -DICU_MODE when configuring cmake:
230+
By default far2l uses pre-generated "hardcoded" UNICODE characters properties. But this can be changed by specifying `-DICU_MODE` when configuring cmake:
211231
`-DICU_MODE=prebuilt` - is a described above default implementaion. Most dependency-less option.
212232
`-DICU_MODE=build` - re-generate characters properties during build by using libicu available on build system, but it still not required to be present on target.
213233
`-DICU_MODE=runtime` - obtain properties at runtime (that can be bit slower) using libicu that required to be present on target system.
@@ -338,7 +358,7 @@ You can import the project into your favourite IDE like QtCreator, CodeLite, or
338358
* **Visual Studio Code** (required _CMake Tools extension_): open far2l root directory (by default building in subdirectory `_build`; you can change in `.vscode/settings.json`)
339359
340360
<a name="terminals"></a>
341-
## Terminals and SSH clients
361+
## Compatible Terminals and SSH clients
342362
Supporting extended far2l keyboard shortcuts and clipboard access
343363
344364
* **kovidgoyal's kitty** (Linux/BSD, macOS): https://github.com/kovidgoyal/kitty & https://sw.kovidgoyal.net/kitty (TTY|k backend: keys by kovidgoyal's kitty keyboard protocol; turn on OSC 52 in far2l and kitty for clipboard support)
@@ -354,12 +374,14 @@ Supporting extended far2l keyboard shortcuts and clipboard access
354374
* **putty4far2l** (Windows ssh-client): https://github.com/ivanshatsky/putty4far2l/releases & https://github.com/unxed/putty4far2l (TTY|F backend: keys and clipboard by FAR2L TTY extensions support)
355375
* **cyd01's KiTTY** (Windows ssh-client): https://github.com/cyd01/KiTTY & https://www.9bis.net/kitty (TTY|F backend: keys and clipboard by FAR2L TTY extensions support)
356376
* **putty-nd** (Windows ssh-client): https://sourceforge.net/projects/putty-nd & https://github.com/noodle1983/putty-nd (TTY|F backend: keys and clipboard by FAR2L TTY extensions support)
357-
* **PuTTY 0.82+**: since 0.82 in vanilla PuTTY you can set keyboard settings `Xterm 216+` and `xterm-style bitmap` (see: https://github.com/elfmz/far2l/issues/2630 )
377+
* **PuTTY 0.82+**: since 0.82 in vanilla PuTTY you can set keyboard settings `Xterm 216+` and `xterm-style bitmap` (see: https://github.com/elfmz/far2l/issues/2630 ),
378+
but vanilla PuTTY can not transfer clipboard.
358379
359380
_Note_: to full transfer extended keyboard shortcuts and the clipboard to/from the **remote far2l**
360381
one of the best way to initiate the connection **inside local far2l-GUI**
361382
(see details in build-in help section **UI backends**).
362383
384+
<a name="useful3party"></a>
363385
## Useful 3rd-party extras
364386
365387
* A collection of macros for far2l: https://github.com/corporateshark/far2l-macros

changelog.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# far2l changelog
2+
3+
Only significant user-side changes are listed here (for all changes see history of [Commits](https://github.com/elfmz/far2l/commits/master/) and [Pull requests](https://github.com/elfmz/far2l/pulls?q=is%3Apr+is%3Aclosed)).
4+
5+
## Master (current development)
6+
* _New:_ Different desktop files for launch WX (GUI) `--notty` and TTY `--tty`
7+
* _New:_ Horizontal panels layout (toggle horizontal-vertical by **Ctrl+,**)
8+
* _New:_ Groups of file masks
9+
* _New:_ "Files highlighting and sort groups" dialog short/full view by **Ctrl+M**
10+
* _New:_ Customize Size column in panels (all by dialog or **Ctrl+Alt+D**, symlinks by **Ctrl+Alt+L**)
11+
* More customize dirs/files markers in panels (by dialog or **Ctrl+Alt+M** and **Ctrl+Alt+N**)
12+
* _New:_ Link item in File menu (in addition to the usual **Alt+F6**)
13+
* _New:_ Chattr / chflags with all flags for single file (in File menu or by **Ctrl+Alt+A**)
14+
* _New:_ Python-subplugin: copy/paste files via clipboard - wx ONLY version - with support for gnome clipboard types, works with gnome files/nautilus
15+
* _New:_ At 1st run detect Russian locale
16+
* _New:_ At 1st run show OSC52 info (if need)
17+
* _New:_ Far colors moved to farcolors.ini
18+
* Help actualization and improvements
19+
* Info panel: New EditorConfig block
20+
* _colorer plugin_: Update colorer schemes to v1.2.0.57
21+
* _Inside plugin_: Add PE format, add png, ogg, m4a and Mach-O support
22+
* _multiarc plugin_: Removed PCRE library dependencies
23+
* _NetRocks plugin_: Explicit SSH algorithms options
24+
* _NetRocks plugin_: Add AWS S3 protocol support (_optional compilation if AWSSDK installed_)
25+
* _python plugin_: New subplugin **hex editor**
26+
* _python plugin_: Removed debugpy dependencies
27+
* _Temporary panel plugin_: Significant fixes, tweaks and improvements
28+
* optional ability to use icu available on build system or target
29+
* Several bugfixes
30+
31+
## 2.6.4 beta (2024-11-18)
32+
* _New:_ icons and a desktop file for far2ledit
33+
* _New:_ Default Files highlighting with dirs/files markers a la `mc` and `ls -F`
34+
* _New:_ Panels customization align filenames by marks (by dialog and **Ctrl+Alt+M**)
35+
* Info panel: add hide/show blocks + additions in file systems info and tuning git status
36+
* _New:_ **Ctrl-Alt-\\** quick jump to the mount point of the current folder's file system
37+
* Enable esc expiration if we've got no TTY|X or got TTY|X without Xi (`--ee` no need more)
38+
* _New:_ Add special commands `edit:<` and `view:<` for grab redirect output
39+
* _New:_ Extend `--nodetect` option to cover win32/iTerm2/kovidgoyal's kitty modes
40+
* _New:_ Add bash-completion
41+
* _colorer plugin_: Update colorer lib to v1.4.1
42+
* _colorer plugin_: Change logger library
43+
* _multiarc plugin_: Update bundled 7z sources to 2408
44+
* _multiarc plugin_: Update bundled unrar sources to 7.0.9
45+
* _python plugin_: New subplugins
46+
* _python plugin_: Build changes and requirements
47+
* Several bugfixes
48+
49+
## 2.6.3 beta (2024-07-26)
50+
* Several bugfixes
51+
52+
## 2.6.2 beta (2024-07-16)
53+
* _New:_ Case (in)sensitive option for file masks in Find file
54+
* _New:_ Case (in)sensitive option for Compare folders and (De)Select in Panels
55+
* _New:_ Attributes dialog (by **Ctrl+A**) - dynamically show marks (\*) near changed fields
56+
* _New:_ Option to disable automatic highlights in history lists
57+
* _New:_ Commands History - delete duplicates if Name and Path equal (customization via System settings)
58+
* _New:_ Datetime format customization via Interface settings
59+
* _New:_ RGB in far2l Palette
60+
* Several bugfixes
61+
62+
## 2.6.1 beta (2024-04-14)
63+
## 2.6.0 beta (2024-02-19)
64+
## 2.5.3 beta (2023-11-05)
65+
## 2.5.3 beta (2023-11-05)
66+
## 2.5.2 beta (2023-08-15)
67+
## 2.5.1 beta (2023-05-28)
68+
## 2.5.0 beta (2023-01-15)
69+
## 2.4.1 beta (2022-09-25)
70+
## 2.4.0 beta (2022-01-12)

colorer/src/Colorer-library/src/colorer/strings/legacy/UnicodeString.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <colorer/strings/legacy/CommonString.h>
55
#include <memory>
6+
#include <cstdint>
67

78
class CString;
89

far2l/CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,34 @@ else()
300300
DESTINATION "share/applications"
301301
COMPONENT desktop
302302
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE)
303+
304+
find_package(Python3 COMPONENTS Interpreter)
305+
306+
if(Python3_Interpreter_FOUND)
307+
execute_process(COMMAND "${Python3_EXECUTABLE}" -c "import markdown"
308+
RESULT_VARIABLE PYTHON_MARKDOWN_STATUS
309+
OUTPUT_QUIET
310+
ERROR_QUIET)
311+
312+
if(PYTHON_MARKDOWN_STATUS EQUAL 0)
313+
add_custom_command(TARGET far2l POST_BUILD
314+
COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/DE/generate_metainfo.py"
315+
"${CMAKE_SOURCE_DIR}/changelog.md"
316+
"${CMAKE_CURRENT_SOURCE_DIR}/DE/io.github.elfmz.far2l.metainfo.xml.in"
317+
"${CMAKE_CURRENT_BINARY_DIR}/DE/io.github.elfmz.far2l.metainfo.xml"
318+
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/DE/generate_metainfo.py"
319+
"${CMAKE_SOURCE_DIR}/changelog.md"
320+
"${CMAKE_CURRENT_SOURCE_DIR}/DE/io.github.elfmz.far2l.metainfo.xml.in"
321+
COMMENT "Generating DE/io.github.elfmz.far2l.metainfo.xml"
322+
VERBATIM)
323+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/DE/io.github.elfmz.far2l.metainfo.xml"
324+
DESTINATION "share/metainfo"
325+
COMPONENT desktop)
326+
else()
327+
message(WARNING "Python-Markdown not found. Skipping AppStream metainfo generation.")
328+
endif()
329+
else()
330+
message(WARNING "Python3 interpreter not found. Skipping AppStream metainfo generation.")
331+
endif()
332+
303333
endif()

far2l/DE/generate_metainfo.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env python3
2+
3+
import markdown
4+
import re
5+
import sys
6+
import xml.etree.ElementTree as ET
7+
8+
[changelog_file, xml_template_file, xml_output_file] = sys.argv[1:]
9+
10+
with open(changelog_file) as fp:
11+
md_text = fp.read()
12+
13+
html_content = markdown.markdown(md_text)
14+
html_root = ET.fromstring(f"<root>{html_content}</root>")
15+
release_re = re.compile(r"(?P<version>[\d.]+) (?P<type>[a-z]+) \((?P<date>\d{4}-\d{2}-\d{2})\)")
16+
17+
tree = ET.parse(xml_template_file)
18+
releases = tree.getroot().find("releases")
19+
release_elem = None
20+
21+
for elem in html_root:
22+
if elem.tag == "h2":
23+
if elem.text[0].isdecimal():
24+
match = release_re.match(elem.text)
25+
release = match.groupdict()
26+
if release["type"] == "beta":
27+
release["type"] = "development"
28+
release_elem = ET.SubElement(releases, "release", release)
29+
elif elem.tag == "ul" and release_elem is not None:
30+
for child_elem in elem.iter():
31+
# https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description
32+
if child_elem.tag == "strong":
33+
child_elem.tag = "em"
34+
desc_elem = ET.SubElement(release_elem, "description")
35+
desc_elem.append(elem)
36+
37+
ET.indent(tree)
38+
tree.write(xml_output_file, encoding="utf-8", xml_declaration=True)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>io.github.elfmz.far2l</id>
4+
5+
<name>far2l</name>
6+
<summary>Linux port of FAR v2</summary>
7+
<categories>
8+
<category>Utility</category>
9+
<category>FileManager</category>
10+
<category>System</category>
11+
<category>FileTools</category>
12+
</categories>
13+
<url type="homepage">https://github.com/elfmz/far2l</url>
14+
<developer id="io.github.elfmz">
15+
<name>elfmz</name>
16+
</developer>
17+
<content_rating type="oars-1.1"/>
18+
19+
<metadata_license>CC0-1.0</metadata_license>
20+
<project_license>GPL-2.0 and BSD-3-Clause</project_license>
21+
22+
<description>
23+
<p>
24+
This is a clone of FAR manager for Windows, similar, but more powerful than Norton Commander/Midnight Commander.
25+
</p>
26+
<p>
27+
Plug-ins that are currently working:
28+
</p>
29+
<ul>
30+
<li>align</li>
31+
<li>autowrap</li>
32+
<li>calc</li>
33+
<li>colorer</li>
34+
<li>compare</li>
35+
<li>drawline</li>
36+
<li>editcase</li>
37+
<li>editorcomp</li>
38+
<li>filecase</li>
39+
<li>incsrch</li>
40+
<li>inside</li>
41+
<li>multiarc</li>
42+
<li>NetRocks (SFTP/SCP/FTP/FTPS/SMB/NFS/WebDAV)</li>
43+
<li>python</li>
44+
<li>SimpleIndent</li>
45+
<li>tmppanel</li>
46+
</ul>
47+
</description>
48+
49+
<launchable type="desktop-id">far2l.desktop</launchable>
50+
51+
<releases/>
52+
</component>

0 commit comments

Comments
 (0)