Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating window #306

Open
JE-Amouel opened this issue Sep 5, 2024 · 15 comments
Open

Floating window #306

JE-Amouel opened this issue Sep 5, 2024 · 15 comments

Comments

@JE-Amouel
Copy link

Hi,
I do love navigation's phylosophy of clifm,however I wonder if we would have feature such as floating window.

Thanks, I love your job.

@leo-arch
Copy link
Owner

leo-arch commented Sep 5, 2024

Hi @JE-Amouel, and thanks.

What do you mean exactly by floating window? Clifm is not involved at all with windows: it runs on a terminal which sometimes runs on a window. Be it as it may, window stuff is done by the window manager.

Maybe you're talking about panes, like the TUI ones, say Midnight Commander. Maybe related to #303.

@JE-Amouel
Copy link
Author

I wanted to talk about floating pane.
Here is a quick preview

tutorial-1-using-floating-panes

@JE-Amouel
Copy link
Author

I also have some educational questions,
Which library do you use?
There is a thing that I don't understand very well, I use wezterm which has image support, and whatever the command I use to view an image within clifm, it works very well, my question is,... HOW? Is cilfm adds its own implementation to handle images?

@leo-arch
Copy link
Owner

I wanted to talk about floating pane.
Here is a quick preview

Thanks for the clarification @JE-Amouel. Yes, this is a TUI pane. But clifm's main interface isn't TUI, but CLI. Fo better or worse, this is a design decision. I'll keep this in mind however.

@leo-arch
Copy link
Owner

leo-arch commented Sep 15, 2024

whatever the command I use to view an image within clifm, it works very well, my question is,... HOW?

Clifm has no internal protocol to handle images (file previews, more generally), but relies on external applications. However, it can decide which is the more appropriate application (based on file type or file name) pretty well via configuration files (much like Ranger does with its scope.sh script).

When it comes to opening files, it consults mimelist.clifm (which you can edit/view via the mm edit command) to decide which is the more appropriate opening application. For more info take a look at the resource opener page.

Now, when it comes to file previews (e.g., when you run the view command, or when you run clifm --preview FILE), the procedure is similar: it first consults preview.clifm (which you can edit/view via the view edit command) to decide which is the more appropriate previewing application. For more information take a look at the file previews page.

If you're talking about file previews with FZF (TAB completion). This is how it works:

  1. Fzf is invoked with the appropriate parameters to generate the completion list.
  2. Clifm tells fzf to generate file previews via clifm itself (i.e. via clifm --preview FILE).

You can play around with clifm --preview to get an idea of how file previews are generated for clifm's TAB completion.

@JE-Amouel
Copy link
Author

thanks 🙏

@leo-arch
Copy link
Owner

You're welcome @JE-Amouel!

@JE-Amouel
Copy link
Author

one more thing, how did you manage to make fzf display it ui where you what, for tab completion?

@leo-arch
Copy link
Owner

how did you manage to make fzf display it ui where you what, for tab completion?

Just passing to fzf the appropriate parameters. Take a look at our code to get an idea of what we're doing. We basically use the --margin option to place the fzf window wherever we want.

@JE-Amouel
Copy link
Author

Did you heard about Lash#Cat9?.
Do you think, clifm might mimic some of the feature from Lash@cat9

@leo-arch
Copy link
Owner

Hi @JE-Amouel. No, didn't know about this. I'll definitely take a look at it. Thanks for the reference.

@JE-Amouel
Copy link
Author

Hi @leo-arch, did you get time enough to check on that?

@leo-arch
Copy link
Owner

Only superficially, but it's interesting. Maybe I can grab some idea from this project. I'll keep it in mind.

@JE-Amouel
Copy link
Author

JE-Amouel commented Sep 23, 2024

Did you heard about Lash#Cat9?.
Do you think, clifm might mimic some of the feature from Lash@cat9

I like your project and i love using as it is, forget about that.
i am happy with all enhancement you provide trough clifm, i would like to see other program mimic yours.
💯 👍

thank you for this wonderfull work, which make the live in terminale more productive and friendly 🙏

@leo-arch
Copy link
Owner

Thank you for your kind words @JE-Amouel! Feedback is always appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants