Like neofetch, but for files
Tested on Arch linux
Works on clean build ([linux] base)
Download repo and use:
chmod +x filedetch.sh"
Copy to path by:
sudo cp filefetch.sh /usr/local/bin/filefetch
For files:
filefetch [file]
For directories:
filefetch [directory]
- get_name - has two varians, one for files, one for directory, trims path to get only name.
- get_pixels - uses "file" function to get info about picture and grep to cut only resolution info.
- get_size - uses "stat" function to get size (in bytes) and numfmt to change bytes to kb/mb/gb etc, also has two variants - for directories it uses du instead of stat.
- get_file_path - uses pwd and parameter to give full path to file.
- get_extenction - cuts from path only extenction type (like png or txt).
- get_creation_date - uses "stat" function to get raw data and "date" to add data to the pattern.
- get_last_modification_date - like get_creation_date, uses the same functions.
- gap - adds some "-" to make gap
- get_all_files - uses "find [path] -f" and wc to get number of files in the directory.
- get_ascii - selects with ascii (photo/file/directory) should be displayed.
I want stay only with basic functions that are preinstalled with base [linux].
That means filefetch (at this moment) can't show for example video metadata like duration etc etc.
No.
Filefetch License (Non-Commercial)
Copyright (c) 2024-2026 Kajmix
Permission is hereby granted to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy, modify, merge, publish, and distribute the Software for free, subject to the following conditions:ns:
-
The Software may not be sold, licensed commercially, or included in any product or service for which money is charged, whether directly or indirectly. Only free, non-commercial use is permitted.d.
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software..
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.WARE.