GithubHelp home page GithubHelp logo

mhnightcat / superfile Goto Github PK

View Code? Open in Web Editor NEW
378.0 1.0 11.0 26.36 MB

Pretty fancy and modern terminal file manager

Home Page: https://github.com/MHNightCat/superfile

License: MIT License

Go 98.22% Shell 0.54% Nix 1.24%
bubbletea cli file-manager filesystem golang linux-app terminal-app tui filemanager terminal-based

superfile's Introduction

superfile LOGO

Demo

Perform common operations

Content

Features

  • Fancy GUI
  • Fully customizable
  • Vim keybindings
  • Easy to use
  • Trash can
  • Metadata detail
  • Clipboard viewer
  • Copy and paste file
  • Auto rename file or folder when duplicate
  • Rename files in a modern way
  • Open file with default app
  • Open terminal with current path

Install

I am still working on different installation methods like homebrew and snap

Requirements

Homebrew

If you want to use homebrew please install go first!

brew tap mhnightcat/superfile https://github.com/MHNightCat/homebrew-superfile.git && brew install superfile

Linux

You can go to the latest release and download the binary file. Once it is downloaded please excrate the file after that enter the following in your terminal:

cd ~/Download
chmod +x ./spf
sudo mv ./spf /bin/

Installation:

# Homebrew:
brew install exiftool

# Fedora:
sudo dnf install perl-Image-ExifTool

# Ubuntu:
sudo apt install exiftool

# Archlinux:
sudo pacman -S perl-image-exiftool

NixOS

Click to expand

Add superfile to your flake inputs:

inputs = {
  superfile = {
    url = "github:MHNightCat/superfile";
  };
  # ...
};

Then you can add it to your packages:

let
  system = "x86_64-linux";
in {
  environment.systemPackages = with pkgs; [
    # ...
    inputs.superfile.packages.${system}.default  ];
}

Font

WARNING: This is a reminder that you must use a Nerd font

Once the font is installed if superfile isn't working make sure to update your terminal preferences to use the font.

Build

You can build the source code yourself by using these steps:

Requirements

Build Steps

Clone this repo using the following command:

git clone https://github.com/MHNightCat/superfile.git

Enter the downloaded directory:

cd superfile

Run the build.sh file:

./build.sh

Add the binary file to your $PATH, e.g. in /usr/local/bin:

mv ./bin/spf /usr/local/bin

Supported Systems

  • Linux
  • MacOS
  • Windows

Plugins

Metadata request: exiftool

Themes

Use an existing theme

You can go to theme list to find one you like!

We only have a few themes at the moment, but we will be making more over time! You can also submit a pull request for your own theme!

copy theme_name in:

Theme name: theme_name

Edit config.json using your preferred editor:

$EDITOR ~/.config/superfile/config.json

and change:

theme = "gruvbox"

to:

theme = "theme-name"

Create your own theme

If you want to customize your own theme, you can go to ~/.config/superfile/theme/YOUR_THEME_NAME.json and copy the existing theme's json to your own theme file

Don't forget to change the theme variable in config.json to your theme name.

If you are satisfied with your theme, you might as well put it into the default theme list!

Hotkeys

Click me to see the hotkey list

You can change all hotkeys in ~/.config/superfile/config.json

"Normal mode" is the default browsing mode

Global hotkeys cannot conflict with other hotkeys (The only exception is the special hotkey).

The hotkey ranges are found in config.json

Contributing

If you want to contribute please follow the contribution guide

Todo list

See the todo list in here

Star History

THANKS FOR All OF YOUR STARS!

Star History Chart

superfile's People

Contributors

anshumanneon avatar c3r5b8 avatar dem0ngo avatar lescx avatar mhnightcat avatar nonepork avatar tanbinislam43 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

superfile's Issues

Open IDE from current directory

Hello
I hope you're doing well .

I've been using superfile and it looks really cool.but the only issue I've is that, I can't open VS Code or any other IDE from
current directory. This feature can be really helpful for me at least πŸ˜…
because 99% of the time when i'm opening any directory I'm gonna open VS Code or Vim from that directory.
We can implement hot-keys for it or maybe code . or nvim . something like.

Thanks πŸ™‚

feature: file preview

It'd be great, if superfile could preview files, like ranger does. At least text files

runtime error: invalid memory address or nil pointer dereference

As soon as I select .$rfc.drawio.bkp file, superfile crashes with the following output:

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
	runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
	github.com/charmbracelet/bubbletea/tea.go:478 +0x91
panic({0x8178e0?, 0xc596e0?})
	runtime/panic.go:770 +0x132
github.com/barasher/go-exiftool.(*Exiftool).ExtractMetadata(0x0, {0xc0004b58b0, 0x1, 0xc59e30?})
	github.com/barasher/go-exiftool/exiftool.go:145 +0x5d
github.com/MHNightCat/superfile/components.ReturnMetaData({{{0xc0000b2a08, 0x1, 0x1}, 0x138, 0x0}, {{{0xc0001fe340, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...})
	github.com/MHNightCat/superfile/components/function.go:372 +0x348
github.com/MHNightCat/superfile/components.model.Update({{{0xc0000b2a08, 0x1, 0x1}, 0x138, 0x0}, {{{0xc0001fe340, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...}, ...)
	github.com/MHNightCat/superfile/components/model.go:210 +0x1af1
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc00026e000, {0x94cc20?, 0xc0000a1008?}, 0xc0000444e0)
	github.com/charmbracelet/bubbletea/tea.go:411 +0x5e2
github.com/charmbracelet/bubbletea.(*Program).Run(0xc00026e000)
	github.com/charmbracelet/bubbletea/tea.go:543 +0x86b
main.main.func1(0xc000092a80?)
	github.com/MHNightCat/superfile/main.go:60 +0x145
github.com/urfave/cli/v2.(*Command).Run(0xc0001fc160, 0xc000092a80, {0xc000024170, 0x1, 0x1})
	github.com/urfave/cli/v2/command.go:279 +0x97d
github.com/urfave/cli/v2.(*App).RunContext(0xc0001c6200, {0x94d2b0, 0xccfa80}, {0xc000024170, 0x1, 0x1})
	github.com/urfave/cli/v2/app.go:337 +0x58b
github.com/urfave/cli/v2.(*App).Run(...)
	github.com/urfave/cli/v2/app.go:311
main.main()
	github.com/MHNightCat/superfile/main.go:69 +0x9f
2024-04-09.12-02-28.mp4

Make Nerdfont optional

While this adds a great visual enhancement, not everybody has or wants Nerdfonts.

Making it optional (even enabled by default) could be great.
If needed, adding a / to the end of the folder name to see it as a folder if colors aren't sufficient.

Invalid memory address or nil pointer dereference

Build latest version available (7th april) and the app panics seconds after startup. Running on Arch Hyprland with Alacritty terminal.

First time:

❯ ./spf
First initialize the superfile configuration.
Need to download the theme.
Please make sure you have internet access.
And this may take some time(<10s).
Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/usr/lib/go/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
	/usr/lib/go/src/runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
	/home/daniel/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:478 +0x91
panic({0x811920?, 0xc53360?})
	/usr/lib/go/src/runtime/panic.go:770 +0x132
github.com/barasher/go-exiftool.(*Exiftool).ExtractMetadata(0x0, {0xc0004c2608, 0x1, 0xc537e0?})
	/home/daniel/go/pkg/mod/github.com/barasher/[email protected]/exiftool.go:145 +0x5d
github.com/MHNightCat/superfile/components.returnMetaData({{{0xc00012e308, 0x1, 0x1}, 0x64, 0x0}, {{{0xc00011e8f0, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...})
	/home/daniel/tmp/superfile/src/components/function.go:377 +0x2af
github.com/MHNightCat/superfile/components.model.Update({{{0xc00012e308, 0x1, 0x1}, 0x64, 0x0}, {{{0xc00011e8f0, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...}, ...)
	/home/daniel/tmp/superfile/src/components/model.go:179 +0x16d1
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc0002da680, {0x944a20?, 0xc00009b808?}, 0xc0002dc240)
	/home/daniel/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:411 +0x5e2
github.com/charmbracelet/bubbletea.(*Program).Run(0xc0002da680)
	/home/daniel/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:543 +0x86b
main.main.func1(0xc000144a40?)
	/home/daniel/tmp/superfile/src/main.go:55 +0x9e
github.com/urfave/cli/v2.(*Command).Run(0xc00018c160, 0xc000144a40, {0xc000116120, 0x1, 0x1})
	/home/daniel/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0x97d
github.com/urfave/cli/v2.(*App).RunContext(0xc0001ea200, {0x9450b0, 0xcc9220}, {0xc000116120, 0x1, 0x1})
	/home/daniel/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:337 +0x58b
github.com/urfave/cli/v2.(*App).Run(...)
	/home/daniel/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:311
main.main()
	/home/daniel/tmp/superfile/src/main.go:65 +0xa5
^[[B^[[B^[[B^[[B^[[BA new version v1.0.0 is available.
Please update.
┏

        github.com/MHNightCat/superfile/releases/latest

                                                               β”›

After first run:

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/usr/lib/go/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
	/usr/lib/go/src/runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
	/home/daniel/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:478 +0x91
panic({0x811920?, 0xc53360?})
	/usr/lib/go/src/runtime/panic.go:770 +0x132
github.com/barasher/go-exiftool.(*Exiftool).ExtractMetadata(0x0, {0xc000136608, 0x1, 0xc537e0?})
	/home/daniel/go/pkg/mod/github.com/barasher/[email protected]/exiftool.go:145 +0x5d
github.com/MHNightCat/superfile/components.returnMetaData({{{0xc0000aea08, 0x1, 0x1}, 0x64, 0x0}, {{{0xc00039c270, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...})
	/home/daniel/tmp/superfile/src/components/function.go:377 +0x2af
github.com/MHNightCat/superfile/components.model.Update({{{0xc0000aea08, 0x1, 0x1}, 0x64, 0x0}, {{{0xc00039c270, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...}, ...)
	/home/daniel/tmp/superfile/src/components/model.go:179 +0x16d1
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc00025dba0, {0x944a20?, 0xc00009b008?}, 0xc000098300)
	/home/daniel/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:411 +0x5e2
github.com/charmbracelet/bubbletea.(*Program).Run(0xc00025dba0)
	/home/daniel/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:543 +0x86b
main.main.func1(0xc00003eac0?)
	/home/daniel/tmp/superfile/src/main.go:55 +0x9e
github.com/urfave/cli/v2.(*Command).Run(0xc0001fe160, 0xc00003eac0, {0xc000024170, 0x1, 0x1})
	/home/daniel/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0x97d
github.com/urfave/cli/v2.(*App).RunContext(0xc0001ca200, {0x9450b0, 0xcc9220}, {0xc000024170, 0x1, 0x1})
	/home/daniel/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:337 +0x58b
github.com/urfave/cli/v2.(*App).Run(...)
	/home/daniel/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:311
main.main()
	/home/daniel/tmp/superfile/src/main.go:65 +0xa5

Interface lag when selecting zip files

Hey! I've noticed that when pointer is at archives (zip files in my case) it freezes the spf while calculating archived metadata.
If you have a large archive with lots and lots of small files there it will freeze the app for quite a long time.

In my case 450 mb archive with about 1mil files would take around 9-12 seconds to process.
Archives with many files but about 10-15mb take 1-2 seconds.

moreover, inputs are not blocked but queued when you try to move pointer up/down while it calculates.

Crash when selecting a broken symlink

Hi, first of all: nice work! It looks really fancy.
I did however immediately encounter a tiny bug because I had a broken symlink in my home directory.

Reproduce:

  1. ln -s /broken/link test
  2. Open superfile and move the cursor to the test file.

Output:

Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
   /usr/lib/golang/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
   /usr/lib/golang/src/runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
   /home/nightcat/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:478 +0x91
panic({0x7f9300?, 0xc24300?})
   /usr/lib/golang/src/runtime/panic.go:920 +0x270
github.com/MHNightCat/superfile/components.returnMetaData({{{0xc00012f100, 0x1, 0x1}, 0xa8, 0x0}, {{{0xc000198f70, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...})
   /home/nightcat/Documents/code/superfile/src/components/function.go:367 +0x1ef
github.com/MHNightCat/superfile/components.model.Update({{{0xc00012f100, 0x1, 0x1}, 0xa8, 0x0}, {{{0xc000198f70, 0x5, 0x5}}, 0x0}, {0x0, ...}, ...}, ...)
   /home/nightcat/Documents/code/superfile/src/components/model.go:167 +0x109b
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc00020fd40, {0x925d18?, 0xc0001c4800?}, 0xc00019eba0?)
   /home/nightcat/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:411 +0x75a
github.com/charmbracelet/bubbletea.(*Program).Run(0xc00020fd40)
   /home/nightcat/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:543 +0x86e
main.main.func1(0xc00020c160?)
   /home/nightcat/Documents/code/superfile/src/main.go:55 +0x9e
github.com/urfave/cli/v2.(*Command).Run(0xc00020c160, 0xc000146a40, {0xc000118050, 0x1, 0x1})
   /home/nightcat/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:279 +0x9dd
github.com/urfave/cli/v2.(*App).RunContext(0xc0001e0200, {0x926410?, 0xc65920}, {0xc000118050, 0x1, 0x1})
   /home/nightcat/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:337 +0x5db
github.com/urfave/cli/v2.(*App).Run(...)
   /home/nightcat/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:311
main.main()
   /home/nightcat/Documents/code/superfile/src/main.go:65 +0xa5

Dot file toggle

I think dot files should be hidden by default but toggleable with ctrl+.

Current themes not readable when using light theme.

See also: #28

The theme of spf doesn't change the background color of the terminal to the one used by the theme. By default it uses gruvbox (because of personal preference for Gruvbox?). I don't use gruvbox on my system and by default supefile looks like this (and to new users not using a gruvbox or dark theme):

image

dracula doesn't look so dracula :')

Screenshot 2024-04-09 16 11 36

We should implement the background color in the theme config files and also provide light themes where applicable.

Helix implements this nicely where you can look at each theme live:

image


Also, gruvbox dark looks nice but we might want to use the users default terminal colors by default with the option to specify fancy themes in the config.

Remove open terminal function

superfile is a TUI based file manager. I don't see the use case for opening a terminal inside of the file manager. GUI based file managers like Konsole sometimes implement a terminal because they are not a terminal based application.

If one needs a terminal in the same terminal as superfile, we can use tmux for that. That's what Tmux is used for.

Also, no need to spawn a new Terminal, just creating a subshell would be enough. No need to check for a googol amount of possible terminal applications.

image

AUR

I am of the opinion that it ought to be feasible to procure the project from AUR in a manner that facilitates automatic updates.

Nix package not working

Describe the bug
Build of this package fails when trying to install on NixOS by the method given in the README

To Reproduce
Steps to reproduce the behavior:

  1. Add Nix derivation into the config / use nix run
  2. Build error

Expected behavior
Should build successfully

Screenshots
image

System information (please complete the following information):

  • NixOS

Extra Info
Builds successfully when using build.sh script from development shell (nix develop)

Open directory with default application

It would be cool if I would be able to open a directory (e.g. this superfile/ repository) in my $EDITOR. What do you think about this?

If this is something that is going to be implemented, we need to think about how to handle terminal based editors, i.e. should we move back to spf after closing the editor?

Crashes when truncating metadata

Describe the bug
I try to move my cursor to a file but spf crashes when I do so. The crash logs tell that this happens when we try to truncate the text, i.e. spf tries to get metadata and because it cannot fit in metadata panel, it tries to truncate it. Then it crashes. The exact line mentioned is in file components/style.go and line 234.
I will try to work on this to find why this is happening.

To Reproduce
Steps to reproduce the behavior:

  1. open superfile config folder in spf
  2. Move cursor to the log file
  3. See error

Expected behavior
Nothing should've happened. (At least the crash shouldn't have happened)

Screenshots
Screenshot 2024-04-11 at 3 55 36 PM

System information (please complete the following information):

  • OS: MacOS
  • Version: 10.15.7

Use Xdg Trash specification to stay compatible with other file managers

Seems you use a trashfolder into your config folder. This is not compatible with XDG Trash specification and can lead to incompatibilities with other file managers. Also when trashing files on other disks it will make a full copy when moving the file, this can take a lot of time and will abnormally grow the config folder and home (or root) partition.

The specifications : https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html (with multi device folders)

Some trash management softwares (none in archlinux extra, only aur) : https://wiki.archlinux.org/title/Trash_management

Get external media error

While using superfile the log file is being spammed with "Get external media error":

Get external media error
open /run/media/main: no such file or directory

The reason it happens is because I don't use /run/media/<user>, instead I mount my drives to /mnt.

It would be nice if superfile supported /mnt as a valid external media as well. An example of such path is /mnt/example-drive/.

Better predefined user directories in sidebar and localization

Localization is another issue we should improve on for consistency and accessibility but this isn't the main focus of this issue.

Currently, a few common directories (Documents, Downloads, Pictures and Videos) are added below Home. These are hardcoded under src/components/function.go in the getFolder() function.

image

Problem

There are two prominent issues with this implementation:

1. Localication

Some people might not use English localizations for their system. E.g. in Germany Documents would be Dokumente and Pictures be Bilder.

2. Non-existent directories

This ties into the first problem. I don't have a Pictures directory. But I might have an Images folder.

image

Also note, that in the top status bar it reads videos where on the sidebar it reads Videos.

Solution

Without XDG user directories

If the user does not have predefined user directories, we could display only well known directories. I don't know how we could handle the localization in this case. Maybe with a structure listing the names of the Pictures folder in i18n languages.

BSDs and macOS don't use XDG-* directories by default, even tho they support it.

With XDG user directories

If you use any "normal" Linux distro or install one of the big desktop environments like Gnome or KDE, you most probably have the XDG-* utilities installed on your system. By default they create user directories based on the systems language.

You can also create more XDG_*_DIRs by adding them to XDG_CONFIG_HOME/user-dirs.dirs. XDG_CONFIG_HOME/user-dirs.locale can be used to override the localization (e.g. en_US).

~/.config/user-dirs.dirs:

XDG_DESKTOP_DIR="$HOME/desktop"
XDG_DOWNLOAD_DIR="$HOME/downloads"
XDG_TEMPLATES_DIR="$HOME/templates"
XDG_PUBLICSHARE_DIR="$HOME/public"
XDG_DOCUMENTS_DIR="$HOME/documents"
XDG_MUSIC_DIR="$HOME/music"
XDG_PICTURES_DIR="$HOME/pictures"
XDG_VIDEOS_DIR="$HOME/videos"
# Added by me
XDG_PASSWORDS_DIR="$HOME/passwords"
XDG_PROJECTS_DIR="$HOME/projects"

With xdg-user-dirs-update you can generate these directories.

We could check for the xdg-utils and list the folders based on that.

Out of scope features and plugins

This issue is based around features file managers do or do not have, should or should not have.

It is important to keep the amount of hard dependencies to a minimum. Such a hard dependency is exiftool for example. Without it, the problem crashes. Even tho exiftool isn't actually required for superfile to work. It should be an optional, soft dependency. With it you gain extra features (nice metadata preview for example).

I think currently the concept of what should be inside superfile isn't as clear as it should be. Extensibility with optional features is the better way IMO for the user to use superfile instead of forcing them to install a couple of external dependencies. The beauty of Go are the simple, single binaries it produces.

The same goes for features like archiving and extraction (there are so many options!), encryption (there are even more options!) and a lot of other features.

When there are a large number of files in the folder, lag will occur.

Describe the bug
When there are a large number of files in a folder, there will be serious lag when scrolling the wheel or moving the cursor quickly.

To Reproduce
Have a lot of files

Expected behavior
no lag

Screenshots
If applicable, add screenshots to help explain your problem.
image

System information (please complete the following information):

  • OS: fedora (I think all systems will have this error)

Not able to go back to parent folder

Describe the bug
I try pressing h and backspace but I am unable to go back to parent folder.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a folder
  2. Enter a subdirectory
  3. Try pressing h or backspace
  4. Unable to return

Expected behavior
I should be able to return to the parent folder

System information (please complete the following information):

  • OS: MacOS
  • Version 10.12.7

Error: Theme file doesn't exist

Describe the bug
I tried to build app manually but got error 2024/04/13 16:35:31 Theme file doesn't exist: open /home/casual/.config/superfile/theme/gruvbox.toml: no such file or directory.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/MHNightCat/superfile
  2. sh build.sh
  3. sh ./bin/spf
  4. See error 2024/04/13 16:35:31 Theme file doesn't exist: open /home/casual/.config/superfile/theme/gruvbox.toml: no such file or directory

Expected behavior
run app

Screenshots

superfile ➀ ./build.sh
go: downloading github.com/rkoesters/xdg v0.0.1
go: downloading github.com/urfave/cli/v2 v2.27.1
go: downloading github.com/charmbracelet/bubbletea v0.25.0
go: downloading github.com/muesli/termenv v0.15.2
go: downloading github.com/barasher/go-exiftool v1.10.0
go: downloading github.com/charmbracelet/bubbles v0.18.0
go: downloading github.com/atotto/clipboard v0.1.4
go: downloading github.com/charmbracelet/lipgloss v0.9.1
go: downloading github.com/lithammer/shortuuid v2.0.3+incompatible
go: downloading github.com/pelletier/go-toml/v2 v2.2.1
go: downloading github.com/shirou/gopsutil v3.21.11+incompatible
go: downloading github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81
go: downloading github.com/mattn/go-isatty v0.0.18
go: downloading github.com/mattn/go-localereader v0.0.1
go: downloading github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b
go: downloading github.com/muesli/cancelreader v0.2.2
go: downloading golang.org/x/term v0.6.0
go: downloading github.com/mattn/go-runewidth v0.0.15
go: downloading golang.org/x/sys v0.15.0
go: downloading github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading github.com/satori/go.uuid v1.2.0
go: downloading github.com/rivo/uniseg v0.4.6
go: downloading github.com/charmbracelet/harmonica v0.2.0
go: downloading github.com/russross/blackfriday/v2 v2.1.0
superfile ➀ cd bin           
bin ➀ ls                   
Permissions Size User   Date Modified Git Name
.rwxr-xr-x@  13M casual 13 Π°ΠΏΡ€ 16:35   -I ο€– spf
bin ➀ ./spf                
2024/04/13 16:35:31 Theme file doesn't exist: open /home/casual/.config/superfile/theme/gruvbox.toml: no such file or directory

System information (please complete the following information):

  • OS: NixOS
➀ nix-shell -p nix-info --run "nix-info -m" 
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.2-zen2, NixOS, 24.05 (Uakari), 24.05.20240329.807c549`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos, nixpkgs"`
 - channels(casual): `""`
 - nixpkgs: `/home/casual/.nix-defexpr/channels/nixpkgs`

Trash can error: No such file or directory

When trying to delete a file with ctrl+d, I get the following error in the log files:

2024/04/09 09:11:22 Delete single item function move file to trash can error
2024/04/09 09:11:22 open /home/luca/.local/share/Trash/info/superfile.log.trashinfo: no such file or directory

image

I think it would be nice if the XDG-folder would be created if it doesn't exist already.

Use Xdg base directory specifications for your files

There is a list of the possible folders :

  • configFolder : $XDG_CONFIG_HOME/superfile
  • themeFolder : $XDG_CONFIG_HOME/superfile/theme
  • trashFolder : see #4
  • dataFolder : $XDG_STATE_HOME/superfile
  • lastCheckVersion : "$dataFolder/lastCheckVersion"
  • pinnedFile : "dataFolder/pinned.json"
  • configFile : "$configFolder/config.json"
  • themeZipName : "$themeFolder/theme.zip"
  • logFile : "$dataFolder/superfile.log"

This is the specification : https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Some more informations : https://wiki.archlinux.org/title/XDG_Base_Directory

File encryption using age instead of AES

Based on the roadmap, it is planned to support AES encryption. While I think it is a great idea to implement file encryption in a file manager, using AES is a bad idea. It is good enough for the web, but not a good tool to encrypt files on a hard drive. There are other tools that should be used for that.

Please have a look at age, a nice, small and lightning fast encryption tool written in Go. There is also a nice API for it. Crypto is hard but programming with age is not.

As mentioned in #36, I think encryption should be an optional feature. If you have age, you can encrypt files, otherwise you get a notification on which binary you need to install.

External media error when moving cursor

Each time I move the cursor, I get the following error in superfile.log:

2024/04/09 09:00:34 Get external media error
2024/04/09 09:00:34 open /run/media/luca: no such file or directory

There is no /run/media folder on my system.

OS: Debian 12 (bookworm)
spf: v1.0.1

Better theme config

I currently work on implementing the ayu themes. I noticed a few shortcomings I would like to bring up:

Better naming convention

When the terminal size is too small for spf (maybe that's also something that could be worked on in the future), the current terminal dimensions that are too small are highlighted in the terminalTooSmallError hex color value. There is also fail for error messages.

  "terminalTooSmallError": "#E65050",
  "fail": "#E65050",

I think it might be a good idea to combine color fields into more logical groups like error, warning, gutter, gutterActive and so on. It's a tradeoff between configurability and simplicity.

Separate icons and text colors

Many text editors and IDEs separate the file and folder icon colors.

Good examples would be

There are also editors and file managers that don't do that:

This would also allow icons based on file type, better tree view and overall better UI and user orientation.

No folder recognized except Home

Screen.Recording.2024-04-10.at.10.51.04.AM.mov

When I select one of the pinned folder except Home, it highlights everything and shows no file or folder.
Maybe this is because of the new pinned folders. I need to check. Help appreciated

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.