- Notifications
You must be signed in to change notification settings - Fork2
Curses based file manager written in C for UNIX like Systems
License
nots1dd/LiteFM
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Curses based file manager that caters to power users
Meant to be insanely FAST and LIGHTWEIGHT
Licensed underGNU GPL v3
- Ranger like traversal of directories (vim keybinds supported)
- String search along with next occurance functionalities
- Easy and Fast addition, deletion of files and directories
- Clean and responsive TUI thanks to ncurses with cool colors and unicodes
- Incredibly fast extraction and compression functions thanks to
libarchive
- Very transient and logical workflow
- InsanelyFAST andMODULAR Syntax Highlighting systemSYNHASH
Note
1. Ensure that your terminal has any NERD FONT enabled.
Without a nerd font, LiteFM will show some unreadable chars!
2. Dynamic resizing:
There is dynamic windowing setup in LiteFM. However,
Upon resizing, you will have to press any key for it to show!
3. Launch LiteFM withsuperuser
LiteFM allows for fast file/dir actions,as such it is optimal to use LiteFM with any userthat hassudo
permissions to make every LiteFMincredibly productive.
-> Currently LiteFM has only been tested on the following Linux Distros:
- Arch Linux kernels >= 6.9 (zen and base) x86_64 arch (1920x1080)
- Ubuntu versions >= 20 x86_64 arch
- Linux Mint >= 20 x86_64 arch
-> There are no plans on expanding this beyond Linux distributions
Warning
The yank functiony (getting file location)
only work withWAYLAND
andX11
display servers!!
If you are on other display servers likeMir
,SurfaceFlinger
and yanking does NOT work:
You can create an issue or even submit a PR as perCONTRIBUTION.md
LiteFM usesgetenv
to get the env vars$EDITOR
,$VISUAL
andWAYLAND_SERVER
to detect the default editor, default image viewer and display server.
Hence, ensure that you have your preferred display server and editor setup in your UNIX system so that LiteFM can be even more productive to you!
To set an env var (EXAMPLE):
echo'export EDITOR=/sbin/nvim'>>~/.bashrc
You can set your desired$EDITOR and shell rc.
Setting your$EDITOR as any editor that creates a new window that resizes the main litefm window, will lead to litefm to look a bit weird (it will resize)
It is HIGHLY recommended that you pick aterminal editor likenano
,vi
,vim
,nvim
, so on
Also for$VISUAL it is recommended that you go for something minimal likeswappy
,satty
, so on
You can setup$VISUAL as whatever you please (even if it creates a new window and resizes litefm)
As LiteFM can only be built manually, here is a table of all deps used:
Package Manager | Debian | Fedora (RPM) | Arch Linux |
---|---|---|---|
64-bit | |||
libncursesw5-dev | ncurses-devel | ncurses | |
cmake | cmake | cmake | |
make | make | make | |
libarchive-dev | libarchive-devel | libarchive | |
libyaml-dev | libyaml-devel | yaml-cpp | |
rsync | rsync | rsync | |
pkg-config | pkg-config | pkg-config | |
libsdl2-dev | SDL2-devel | sdl2 | |
libsdl2-mixer-dev | SDL2_mixer-devel | sdl2_mixer | |
32-bit | |||
libncurses5-dev | ncurses-libs | lib32-ncurses5 | |
libarchive-dev:i386 | libarchive-devel.i686 | lib32-libarchive | |
libyaml-dev:i386 | libyaml-devel.i686 | lib32-yaml-cpp | |
rsync:i386 | rsync.i686 | lib32-rsync | |
pkg-config:i386 | pkg-config.i686 | lib32-pkg-config | |
libsdl2-dev:i386 | SDL2-devel.i686 | lib32-sdl2 | |
libsdl2-mixer-dev:i386 | SDL2_mixer-devel.i686 | lib32-sdl2_mixer |
The above are the listed32-bit and64-bit libraries that are used in this project.
-> Only 64-bit libs have been tested to fruition so far
Refer to this table to understand theBuilding procedure better
REFER TODependencies TO BETTER UNDERSTAND THE BUILDING PROCESS AND FLOW.
LiteFM cannot be installed in any UNIX-like distribution but can be easily built!
Note
Building LiteFM with build.sh (HIGHLY RECOMMENDED)
The script contains every method of installation, logging and setup of litefm
Just run:
chmod +x build.sh./build.sh
Just wait for it to setup and answer a few questions, thats it!
Ensure you have CMake installed first
->cmake -S . -B build/
to create abuild/
directory with all libraries linked as perCMakeLists.txt
->cmake --build build/
to get the./build/litefm
executable
-> Set it as an alias in your respective shell rc and enjoy!
cmake -S. -B build cmake --build build/./build/litefm
Important
Ensure that you set up litefm.log in your~/.cache/litefm/log/
directory (create if not there)
LiteFM has a very modular logging system and keeps a track of every file/dir control that goes on in a litefm instance
Just run the commandmkdir -p $HOME/.cache/litefm/log/
and you can run litefm without a hassle!
-> Runmake
in the current directory
-> This should give a./litefm
executable, just run it to enjoy LiteFM!
-> To cleanup, runmake clean
make ./litefm
-> Ensure that you havemeson
andninja
(orninja-build
) installed in your distribution.
meson setup build/meson compile -C build/./build/litefm
NOTE: Runningsudo ninja install
will MOVE the litefm executable to/usr/local/bin
directory.
If you DO NOT want this, ignore the last step and simple run./litefm
In any case, to uninstall (stay in the build dir):
sudo ninja uninstall
-> Run the executablelitefm
and enjoy!
In order check how LiteFM works under the hood and further understand any issues, redundancies or vulnerabilities,
Check outdebug to build LiteFM withAddressSanitizer (ASan)
You can add the man page for LiteFM in your system by the following commands:
[NOTE: You will have to keep updating this man page manually every time a new functionality is introduced.]
sudo cp components/litefm.1 /usr/share/man/man1cd /usr/share/man/man1/&& sudo gzip litefm.1
Thats it! The man page is ready to be used viaman litefm
As this is a file manager that is able to perform some VERY cool and dangerous tasks like deleting any directory recursively, I definitely have tried to set up security measures to avoid any form of code vulnerability or CWE.
Other steps I plan on taking to ensure that you are always in control of the file manager are:
- A
litefm.log
and it's functionality has been implemented (src/logging.c
) that will log EVERY file/dir control in every litefm instance - Possibly set up a trash system so that accidental deletion of any file/dir can be restored [priority/low]
- Trying to add password protected files [priority/med]
Check outSECURITY for the security policy that this repository follows.
Security Tools that can be used in LiteFM:
-> AddressSanitizer (ASan): Gives an in-depth view of how memory leaks take place, overflows and much more
This file manager is far from done there are a lot of cool and essential features that are planned:
Adding a basic file preview for readable files (and stat info for directories)
Integrating current file tasks to multiple files selection (copy, paste, move)
GO-TO a particular file or directory through string input (might be tough)
Color coding for file groups (green - general files, pink - images, red - unextracted archives, orange - audio files) [implementation through struct mostly]
Bugfixes and massive code refactor
Improve the build script
Integration of adding a text editor
Better handling of
dynamically linked files
andsymbolic links
Handling resizing of litefm window (maybe through
SIGWINCH
)UPCOMING: Modular Syntax highlighting through
yaml.h
andHashtables
UPCOMING: Adding a privacy guard (using GPG maybe)
About
Curses based file manager written in C for UNIX like Systems