Giter Site home page Giter Site logo

Sort by date about pqiv HOT 12 CLOSED

phillipberndt avatar phillipberndt commented on May 28, 2024
Sort by date

from pqiv.

Comments (12)

phillipberndt avatar phillipberndt commented on May 28, 2024

https://github.com/phillipberndt/pqiv/tree/sort-by-time is a simple solution for this.

from pqiv.

imShara avatar imShara commented on May 28, 2024

Thanks, this feature need to be in master

from pqiv.

phillipberndt avatar phillipberndt commented on May 28, 2024

It'll be. But I might do some changes before: While prepending the sort key to the displayed file name (which is used for sorting) is a very simple solution, I'm not really content with also displaying it in the info box. Also, it might be useful to rename the option to something like --sort-order=mtime for forward compatibility.

from pqiv.

phillipberndt avatar phillipberndt commented on May 28, 2024

I ended up naming the option --sort-key=mtime, but I implemented this now. I'll test this myself for some days and then pull the change to master!

from pqiv.

imShara avatar imShara commented on May 28, 2024

Brilliant!

from pqiv.

phillipberndt avatar phillipberndt commented on May 28, 2024

Merged to master.

from pqiv.

imShara avatar imShara commented on May 28, 2024

Doesn't work with --browse, e.g

pqiv --browse --sort-key=mtime ./image.png

from pqiv.

phillipberndt avatar phillipberndt commented on May 28, 2024

Works fine here. If you're referring to image.png being displayed first, then that's intentional. The files are sorted by mtime, but pqiv starts at the position of the image that was given as a parameter. If the order is wrong entirely, then could you provide an example, please? (The output of ls -lt --time-style="+[%s] (%Y-%m-%d %H:%M:%S)" + the actual order in pqiv should suffice.)

from pqiv.

imShara avatar imShara commented on May 28, 2024
ls -lt --time-style="+[%s] (%Y-%m-%d %H:%M:%S)"

-rw-r--r-- 1 shara shara 3041 [1441832654] (2015-09-10 00:04:14) fourth.png
-rw-r--r-- 1 shara shara 5430 [1441832570] (2015-09-10 00:02:50) third.png
-rw-r--r-- 1 shara shara 4793 [1441832530] (2015-09-10 00:02:10) second.png
-rw-r--r-- 1 shara shara 1802 [1441832216] (2015-09-09 23:56:56) first.png

pqiv --browse --sort-key=mtime ./first.png

Showed as:
[1/4] first
[2/4] third
[3/4] second
[4/4] fourth

pqiv --browse --sort-key=mtime ./second.png

Showed as:
[1/4] second
[2/4] first
[3/4] third
[4/4] fourth

from pqiv.

phillipberndt avatar phillipberndt commented on May 28, 2024

Here, I see them in order first, second, third, fourth and second, third, fourth, first, respectively.

Which GTK/glib versions, OS, and filesystem do you use?

from pqiv.

phillipberndt avatar phillipberndt commented on May 28, 2024

Ah. I guess I know what the problem might be: --sort-key only sets the key that is used for sorting, but sorting still has to be explicitly enabled. Try adding --sort to your command line.

(I have sort=1 in my configuration file, and I suppose you don't, right?)

from pqiv.

imShara avatar imShara commented on May 28, 2024

Yep, with --sort key works perfect, thank you!

from pqiv.

Related Issues (20)

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.