Giter Site home page Giter Site logo

fman's Introduction

FMAN

GitHub release (latest SemVer) GitHub Build Status PRs Welcome

Awesome TUI File Manager

Preview

🚀 Features

  • Mouse Support
  • Clean UI
  • File Preview
  • Syntax Highlighting
  • Themes
  • Copy Path to Clipboard

    More on the way!!

NOTE: If you want to edit your files in the terminal you must set the EDITOR environment variable to your favorite editor. Example: vim, nvim, emacs...

⚡ Installation

Pre-built Binaries

You can install pre-built binaries on the releases page

GO

$ go install github.com/nore-dev/fman@latest

NPM

$ npm i @nore-dev/fman

Brew

brew install fman/tap/fman

⌨️ Keybindings

Key Description
q, Ctrl+C Exit from application
a, h, left Move to parent directory
d, l, right Move to selected directory
s, j, down Move cursor down
w, k, up Move cursor up
enter Open file with default program
c Copy selected entry path to the clipboard
shift+g Move to the end of the list
g Move to the beginning of the list
m Toggle showing hidden Files
~, . Move to the home directory
shift+down Scroll preview down
shift+up Scroll preview up
? Toggle help

💻 CLI options

Key Type Values Default value
--theme string dracula,brogrammer dracula
--icons string nerdfont,emoji,none nerdfont

❤️ Built With

Without these projects this project would not have existed at all.

💄 Themes

dracula dracula catppuccin catppuccin
nord nord gruvbox gruvbox
brogrammer brogrammer everblush everblush

👥 CONTRIBUTING

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 LICENSE

Distributed under the MIT License. See LICENSE for more information.

❓ Acknowledgments

Inspired by knipferrc/fm

fman's People

Contributors

aaronarduino avatar arkaeriit avatar bluefalconhd avatar cutestnekoaqua avatar dzzzchhh avatar hiroebe avatar nore-dev avatar plutov avatar tomekz avatar tuongminh465 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

fman's Issues

List item icons

Visual feedback from list items can be improved by using emojis to represent files/directories/symlinks.

  • 📃 for files
  • 📁 for folders
  • 🔗 for symlinks

Themes

Add more themes and add option to select themes

fman --theme dracula

--icons CLI option

Ability to specify where to source the file/directory icons from:

  • nerd font on user's machine
  • emoji
  • do not display icons

Feature requests

Thanks a lot for your work on this project, really love it.

Two feature requests:

  • An option to open files in vim/nvim
  • A search function using the / key

vim movements - 'j' and 'k' - is the mapping correct?

Hi! Forgive me for being picky, but I was at first disoriented by how j and k keys are mapped by default.

case "w", "up", "j": // Select entry above

case "s", "down", "k": // Select entry below

The reason for my confusion is the fact that I'm used to j being responsible for moving the cursor down instead of up, as portrayed here, for example.

Was just wondering if this is intended 🤔

Thanks in advance!

File Operations

  • Create file/folder
  • Delete file/folder
  • Rename file/folder
  • Copy & Paste

could not decode rune

  1. Downloaded binary file.
  2. Moved it to /usr/bin/ via: sudo mv fman /usr/bin/fman
  3. After launching the application and going to the folder, the application closes and the following error occurs in the terminal: could not decode rune
  4. screenshot

Don't panic on all GetEntries errors

When you go to a folder the app can't access or the file path gets malformed in some way the app just crashes. Looking at the code it seems that this behaviour stems from the Update function on the ListModel. I suggest doing some form of error validation to check if the error is recoverable or indeed a panic must happen.

Due to the fact that this implies some design decisions as to how to handle this from a UI perspective I don't think that doing a pull request with my own solution will be beneficial. If there is anything I can help with let me know.

Error on folders above home path

It works fine under /home directory but for example, if you go to /usr directory it gives an error.

Caught panic:

stat lib: no such file or directory

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /usr/lib/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
        /usr/lib/go/src/runtime/debug/stack.go:16 +0x19
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func3()
        /home/noredev/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:370 +0x95
panic({0x7cb520, 0xc00009a090})
        /usr/lib/go/src/runtime/panic.go:890 +0x262
github.com/nore-dev/fman/model.ListModel.Update({{0xc000153b00, 0xd, 0x10}, {0xc0000162b8, 0x16}, 0x0, 0x0, 0x0, 0xc000072c80, 0x0, ...}, ...)
        /home/noredev/dev/fman/model/list.go:178 +0x11fc
main.(*App).Update(0xc000324000, {0x7cc5a0?, 0xc000321a20})
        /home/noredev/dev/fman/main.go:66 +0x4aa
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel(0xc00011e160)
        /home/noredev/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:539 +0x12bf
github.com/charmbracelet/bubbletea.(*Program).Start(...)
        /home/noredev/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:548
main.main()
        /home/noredev/dev/fman/main.go:124 +0x77f

File preview scroll

Add ability to browse through the contents of file preview (using vim key combinations as an initial proposal):

  • Ctrl+Y to scroll up
  • Ctrl+E to scroll down

New theme

could you also consider adding [Everblush[https://github.com/Everblush) theme.

Panic on run

First of all, awesome work!
As a developer, I love it when the work is praised, and this is the case.

After installation with go install and running, I've got this:

> fman

Caught panic:

runtime error: index out of range [0] with length 0

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/opt/homebrew/Cellar/go/1.19.1/libexec/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
	/opt/homebrew/Cellar/go/1.19.1/libexec/src/runtime/debug/stack.go:16 +0x1c
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func3()
	/Users/yuriizinets/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:370 +0x8c
panic({0x1011bcec0, 0x140003a02b8})
	/opt/homebrew/Cellar/go/1.19.1/libexec/src/runtime/panic.go:890 +0x258
github.com/nore-dev/fman/model.ListModel.View({{0x140000c0000, 0x3a, 0x47}, {0x1400012a1c8, 0x12}, 0x52, 0x27, 0x0, 0x140000de000, 0x1d, ...})
	/Users/yuriizinets/go/pkg/mod/github.com/nore-dev/[email protected]/model/list.go:397 +0x1da4
main.(*App).View(0x140000e0000)
	/Users/yuriizinets/go/pkg/mod/github.com/nore-dev/[email protected]/main.go:84 +0xd8
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel(0x140000e4000)
	/Users/yuriizinets/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:541 +0xfb4
github.com/charmbracelet/bubbletea.(*Program).Start(...)
	/Users/yuriizinets/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:548
main.main()
	/Users/yuriizinets/go/pkg/mod/github.com/nore-dev/[email protected]/main.go:128 +0x624

Some additional information:

  • Machine: Macbook Air M1
  • System: MacOS Monterey (12.6)
  • Shell: bash

"-" Character problem

Strangely, a blank line is inserted when the list element name has more than two "-" signs in its name. I temporarily changed the "-" character to "_"

content[0].WriteString(strings.ReplaceAll(name, "-", "_")) // FIXME: Temporary Solution

Resolve Symlinks

Right now, the symlinks are ignored. It would be nice to handle symlinks.

fman/entry/entry.go

Lines 71 to 74 in 8f64a62

// If the entry is a symlink, ignore it
if info.Mode()&os.ModeSymlink != 0 {
continue
}

Maximize file preview area

  • Make the most use out of vertical space available for the file preview
  • Limit entry info display to a number of rows only necessary for displaying the info, leaving the rest of the space to the height of the preview

Help Model

Show help text to user

Toggle the view with ? key

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.