Open wjdp opened 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.
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
.
I much prefer the command once fman is open. But I also am not a prolific user of the command line.
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)
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.
Fab, thanks for taking the time
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?
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.
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.
This could also be a setting in maybe panes.json?
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
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.
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.