joshuto icon indicating copy to clipboard operation
joshuto copied to clipboard

View mode to display file size and timestamp

Open tkna91 opened this issue 2 years ago • 12 comments

Thanks for your cool project. Sorry if I am saying something strange.

Is there any way to display file size and timestamp in the view? Like ranger's :linemode sizemtime. Like nnn's d Detail mode toggle.

tkna91 avatar Aug 22 '22 05:08 tkna91

Hi! No, other “linemodes” are not available in Joshuto. Displaying the size only is currently hard-coded. But I agree that other linemodes and especially "custom linemodes" would be a very useful enhancement. I would be happy to take this up but I won't have time the next ~2 months...

DLFW avatar Aug 22 '22 20:08 DLFW

@DLFW Thank you🤤 I look forward to it.

tkna91 avatar Aug 23 '22 14:08 tkna91

Apologies, I am currently busy with life stuff and won't be able to work on Joshuto at the moment xd

kamiyaa avatar Aug 23 '22 16:08 kamiyaa

Interesting feature. I never knew the existence of this feature while I was using ranger so I never considered implementing it.

However, I'm open to adding this to joshuto :+1:

kamiyaa avatar Sep 11 '22 01:09 kamiyaa

Ahoi, I have implemented a simple linemode feature which allows three basic linemodes: size, mtime, and sizemtime. → #206

The default key-bindings I have chosen are different from the ranger defaults. Ranger has these builtin linemodes and keybindings:

# Change the line mode
map Mf linemode filename
map Mi linemode fileinfo
map Mm linemode mtime
map Mh linemode humanreadablemtime
map Mp linemode permissions
map Ms linemode sizemtime
map MH linemode sizehumanreadablemtime
map Mt linemode metatitle

As M is already used in Joshuto for some scrolling, I thought I just go for m. These are the current default-bindings:

	{ keys = [ "m", "s" ],    command = "linemode size" },
	{ keys = [ "m", "m" ],   command = "linemode mtime" },
	{ keys = [ "m", "M" ],   command = "linemode sizemtime" },

The downside is that mk is already used for :mkdir, which means that m is not exclusively for changing the linemode.

We could use <ctrl>+m as “leader” for the linemodes instead.

What do you think?

DLFW avatar Oct 08 '22 19:10 DLFW

@DLFW Thank you! @kamiyaa How does it feel?

tkna91 avatar Oct 16 '22 04:10 tkna91

@tkna91: #206 has been merged, if you want to try it out. :wink:

DLFW avatar Oct 20 '22 15:10 DLFW

@DLFW Thanks. It would be nice to have a description of the linemode type in the pre-execution display. 20221021-073102_screenshot 20221021-073336_screenshot

tkna91 avatar Oct 20 '22 22:10 tkna91

Hi, yes, agree. This is not a linemode-specific feature but the way Joshuto visualizes the key-command completion in genereal. However, I see that it has a special value for the linemodes. I'll keep it in the back of my head. You may also open another Issue to track this.

DLFW avatar Oct 24 '22 08:10 DLFW

Hi, yes, agree. This is not a linemode-specific feature but the way Joshuto visualizes the key-command completion in genereal. However, I see that it has a special value for the linemodes. I'll keep it in the back of my head. You may also open another Issue to track this.

I can add this :+1: I think it should be pretty straightforward

kamiyaa avatar Oct 24 '22 23:10 kamiyaa

4c77c046953a17e2c1792ea1626df3a3f69083e4

image

kamiyaa avatar Oct 24 '22 23:10 kamiyaa

@kamiyaa @DLFW Confirmed. Thanks!

tkna91 avatar Oct 25 '22 04:10 tkna91