A shitty file manager
You will need:
- A linux machine
- gcc
- make
- txt
txt
is needed as it is hard-coded into the file manager to use it when editing files.
As lst is worked on, it will be able to use your personal choice of editor as a fallback.
A linux machine is needed as lst uses two header files that are not available on Windows:
- sys/ioctl.h
- termios.h
To build:
- Clone this repo
- Enter the directory
- Run
make
to create the binary - Run
make install
to copy the binary to path - Enjoy
$ lst -h
lst [options] <path>
a shitty file manager
OPTIONS
-h :: show help
-v :: show version
-t :: show tildes
-n :: show numbers
-i :: show file info
-p :: show path at exit
OPERATIONS
q :: exit lst
r :: rename a file
d :: delete a file
c :: create a new file
^c :: create a new folder
$ lst -tni ~/.config
Exiting
lst
:
Q
Esc
Config file:
The config file uses the .ini
/ ini
file format and utilises ini
which
reads and parses the file. The format of file will be specified here
.
- Lists files and directories
- Opens files
- It does depend on my shitty text editor:
txt
- It does depend on my shitty text editor:
- Inline file size (
-i
) - Line numbers (
-n
) - Tildes on empty lines (
-t
) - Status & Message Bar
- File size
- Current line
- Current Dir
- Total Dirs
- Clock
- Reads a config file (WIP)
More is to come in the future. It's Work In Progress
Size calculations
lst
shows the size of the file that is highlighted in the UI. Directories will always
return as 0 bytes in the status bar and shows >
to indicate it is a directory when you
enable the info flag (-i
).
Extensions
lst
has what I am calling extensions. They add features that you might want in a file manager
and are enabled through flags and config files. These can be toggled when running lst
.
They are all disabled by default, giving a minimal-ish file manager.
Opening directories & files
When pressing Enter
or ->
key, lst
will check if the highlighted item is a file.
If it is, txt
will take over so you can edit the file. Otherwise, it will open the directory.
txt
is hardcoded as text editor of choice but that will soon be able to customised in the config file.
File & directory operations
In lst
, you can rename, delete and create files. Directories can also be renamed and created, however they
can't be deleted as that the directories have to empty to be deleted. This will be implemented soon.
To edit files, this requires you to have txt, which lst
is hardcoded to use. Moving files,
grouped file operations and deleting directories are currently in the works.
Config file [Work In Progress]
lst
will soon be able to read a config file that will be able to enable extensions
on start up with out specifying flags for extra convenience. You will also able to customize the
colors lst
uses for the status bar, highlighted item, etc.
Changing directory on exit [Work In Progress]
I need to find an efficient way to do this so this will be coming in the near future.
The -p
flag will print final directory on exit. So you'll probs need a wrapper function.
* 1.1.1 Flags & input timeout fixed
* 1.1.0 New features introduced
* 1.0.0 Initial Release