fman-users / fman

Issue tracker for fman, a cross-platform file manager
https://fman.io
240 stars 3 forks source link

Option to start fman in 'single pane mode' #156

Open wjdp opened 7 years ago

wjdp commented 7 years ago

Occasionally I want to browse directories without the intention of moving files around. I use a tiling window manager and having both panes of the file manager takes up space.

It would be great to be able to start fman like: fman --single-pane to omit the second pane from the UI.

mherrmann commented 7 years ago

Thank you for the suggestion Will. For simplicity's sake, I'm a little wary of adding a command line. Would a command that lets you quickly change the number of panes (#57) once fman is open also let you do what you want? It could then be as quick as a keyboard shortcut of your choice away.

wjdp commented 7 years ago

That would work, ideally though I'd prefer a command line switch. I've got fman bound to a keyboard shortcut, I'd like to have 'fman single pane' bound to shift+that shortcut.

As per #57 perhaps it could be fman --panes=1.

macosxguru commented 7 years ago

I much prefer the command once fman is open. But I also am not a prolific user of the command line.

wjdp commented 7 years ago

Oh for sure there should be a key combination to change state once the app is open, but having the command line option allows better integration with other tools and workflows (such as a keyboard shortcut to launch directly into)

mherrmann commented 7 years ago

You have a point Will. You said #57 would let you do what you want, and the present issue would be a further improvement. So I'll implement #57 first and then look at this one again. Maybe there will be other command line parameters by then that need to be integrated somehow. For instance, maybe there could be a command line arg that lets you execute arbitrary Python code in the context of fman (and its API). Such a flag would then also let you do what you want (because you could pass the API call to set the number of panes). I'll definitely take your "votes" for #57 and the present issue into account.

wjdp commented 7 years ago

Fab, thanks for taking the time

mherrmann commented 6 years ago

I know this issue has been open for a long time, I'm sorry I haven't gotten to it yet. There were just so many other things (and perhaps still are) that seemed more important.

But because @Danmou raised it in #57, I want to ask a follow-up question: What are commands such as eg. Copy supposed to do when there is only one pane?

oskretc commented 6 years ago

Commands that interact with 2 panes are definitely not relevant with a single pane setup, but that is also true for more than 2 panes, (Copy... to which pane?) I'm with @Danmou on this one, on the fact that more than 2 panes will only clutter fman.

mherrmann commented 6 years ago

Hm, I do think that Copy could make sense for eg. 3 panes - it could just copy to the next pane on the right, or the pane on the left if it's the rightmost one.

sullyj3 commented 6 years ago

This could also be a setting in maybe panes.json?

sullyj3 commented 6 years ago

It would make sense to me to just grey out the commands in the pallete in single pane mode, and the hotkey could show a toast notification

mherrmann commented 6 years ago

You can already get a single pane by editing the file Local/Session.json in your data directory. Change the "panes" entry to contain just one element. For instance, change

"panes": [{"location": "file:///home/michael/.config/fman/Local", "col_widths": [1734, 95]}, {"location": "file:///home/michael/Temp", "col_widths": [1734, 95]}]

to

"panes": [{"location": "file:///home/michael/.config/fman/Local", "col_widths": [1734, 95]}]

You need to do this while fman is closed, because the file gets overwritten with each restart. To get two panes back, delete the Session.json file while fman is closed.

Needless to say, this is a very awkward workaround. But for people who really want a single pane, and never want more than that, it should work.