GithubHelp home page GithubHelp logo

mistakenelf / fm Goto Github PK

View Code? Open in Web Editor NEW
541.0 5.0 29.0 9.03 MB

A terminal based file manager

License: MIT License

Go 90.82% Makefile 0.10% Shell 9.08%
golang go filemanager bubbletea cli terminal file-manager fm tui

fm's Introduction

Keep those files organized

Latest Release GoDoc Build Status

default screenshot

About The Project

A terminal based file manager

Built With

Installation

Curl

curl -sfL https://raw.githubusercontent.com/mistakenelf/fm/main/install.sh | sh

Go

go install github.com/mistakenelf/fm@latest

AUR

Install through the Arch User Repository with your favorite AUR helper. There are currently two possible packages:

  • fm-git: Builds the package from the main branch
paru -S fm-git
  • fm-bin: Uses the github release package
paru -S fm-bin

Features

  • File icons (requires nerd font)
  • Layout adjusts to terminal resize
  • Syntax highlighting for source code with customizable themes using styles from chroma (dracula, monokai etc.)
  • Render pretty markdown
  • Mouse support
  • Themes (default, gruvbox, nord)
  • Render PNG, JPG and JPEG as strings
  • Colors adapt to terminal background, for syntax highlighting to work properly on light/dark terminals, set the appropriate theme flags
  • Open selected file in editor set in EDITOR environment variable
  • Copy selected directory items path to the clipboard
  • Read PDF files

Themes

Default

default

Gruvbox

gruvbox

Nord

nord

Usage

  • fm will start fm in the current directory
  • fm update will update fm to the latest version
  • fm --start-dir=/some/start/dir will start fm in the specified directory
  • fm --selection-path=/tmp/tmpfile will write the selected items path to the selection path when pressing E and exit fm
  • fm --start-dir=/some/dir start fm at a specific directory
  • fm --enable-logging=true start fm with logging enabled
  • fm --pretty-markdown=true render markdown using glamour to make it look nice
  • fm --theme=default set the theme of fm
  • fm --show-icons=false set whether to show icons or not
  • fm --syntax-theme=dracula sets the syntax theme to render code with

Local Development

Follow the instructions below to get setup for local development

  1. Clone the repo
git clone https://github.com/mistakenelf/fm
  1. Run
make
  1. Build a binary
make build

fm's People

Contributors

citizen428 avatar hankertrix avatar hartraft avatar is0n avatar meowgorithm avatar mistakenelf avatar sam9032 avatar zcharym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fm's Issues

Refactor component rendering

  • Currently using View() functions of other components outside of View() functions which can cause rendering issues

File preview in light terminal not readable with default theme

If I use the default terminal on linux Gnome with a light theme, the text on the right side isn't readable:

image

Seems like the colors in the preview are made for dark mode, but the filebrowser on the left site got black on grey text if I switch the terminal to dark mode:

image

Symbolic links to directories are not treated as directories

I have a symbolic link in my home directory, which is not recognized by fm.

image

file output on the link in question:
Templates: symbolic link to /home/gwyndolyn/Repositories/Dot-Files/Templates/

I have replicated the problem by creating a symbolic link to a folder elsewhere (in my Documents folder, for example) and fm is again unable to resolve it to a directory.

System details:

  • OS: EndeavourOS Linux x86_64
  • Host: iMac8,1 1.0
  • Kernel: 5.14.7-arch1-1
  • Shell: fish 3.3.1

Use keys for commands

Remove the need to type file commands in the command bar and handle it through key handlers

Config file ignored on Windows

~/.config
❯ cat fm.yml
settings:
  borderless: true
  enable_logging: false
  enable_mousewheel: true
  pretty_markdown: true
  show_icons: false

Config is not loaded. Borders are still enabled, icons are enabled, etc.

Previewing zip, rar, mp3, webm breaks UI

Trying to preview either of the listed formats breaks the UI. It would be nice if fm could at least display some meta info if it's not able to give an actual preview, like the IDv3 info for mp3s or simply just file sizes and the full name of the file (as it can be too long for the list) for others.

[Feature Request] Add Ability to Write File Path Instead of Open File

Lf for example has this feature that instead of opening files, it writes the path of the selected file onto a specified file.

For example, when using this Lf, if lf -selection-path /tmp/tempfile is used, then instead of doing something like...

$ $EDITOR /path/to/file

when opening a file, it writes the file's path to the file specified after -selection-path...

$ echo "/path/to/file" > /tmp/tempfile
$ cat /tmp/tempfile
/path/to/file

This is an excerpt from the lf --help...

-selection-path string
path to the file to write selected files on open (to use as open file dialog)

I request this feature as I really like your file manager and would like to use it with my neovim plugin called fm-nvim.

fm hangs when navigating to folder with vast amount of files

When I open my downloads folder (which contains half the internet of files of all sorts of types) fm simply hangs and won't let me do anything. Even Ctrl+C hangs.

The folder cointains approx 857 files, many of which are images, pdfs and zips.

ctrl+d `y` should not require CR

When ctrl+d a file, the input prompt that asks for confirmation should not require an additional CR, but instead accept the confirmation (or rejection) with a simple key press of y or n.

Open files

How can i open a selected file in vim ?

Support M1 Mac

Hi,

This project looks awesome. I do however get the error message:

knipferrc/fm crit platform darwin/arm64 is not supported. Make sure this script is up-to-date and file request at https://github.com/knipferrc/fm/issues/new

I have no idea how easy/hard this is but it would be really nice.

Add theming

Remove the custom colors for individual components and implement theming

Simple mode

Add a simple mode to remove the secondary pane

Previewing gif

Previewing a gif breaks the UI. Would it be possible to use something like chafa for previewing it? Chafa can play it and it should be possible to pipe its output into fm, I believe.

Copy file and directory

Copy a file or directory by pressing the letter c. Should give it a name with the word copy as well as a time stamp

Support arm64 on Linux/FreeBSD/OpenBSD

Hi I was trying to install this on an arm64 Linux device but the following install.sh script failed.

$ curl -sfL https://raw.githubusercontent.com/knipferrc/fm/main/install.sh | sh
knipferrc/fm crit platform linux/arm64 is not supported. Make sure this script is up-to-date and file request at https://github.com/knipferrc/fm/issues/new

I see that Issue #96 Support M1 has been resolved and that Darwin and other arm64 targets are released. So I did a naive PR to add these targets to the install.sh script.

scoop package

i beg u please provide a scoop pacakge for tha one . its soo good

please 🙏
give a scoop verions to install

Support for arm64

Question

Is there any plans on getting support for arm64 processors ?

Or if it already exists, can someone provide a link ?

Thanks

Long directory item names

If a directory item name is really long, it needs to wrap or get truncated instead of breaking the pane layout

List beahviour odd

Talking about my folder of 800+ files, when I move down that list at some point the selected row is "below" the screen bottom, effectively making it invisible. Scrolling up two or three times brings it back into the visible area.

Another odd behavior was when I scrolled backwards (from the first position of the list on the top pressing key up). I could only scroll to roughly half of the visible list before the selection would reset to the last element again. It would basically loop from there on.

Maybe all these oddities have something to do with the UI breaking in between from trying to preview different file types.

Setup cobra

Setup cobra so that a version flag can be used

Opening a binary file breaks TUI

Pressing l on a binary file to preview it in the preview pane will break the TUI. However, it does return at some point and fm continues to work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.