Skip to content

[Feature Req]: Add an option to sort wallpapers when directories specified #338

@ghost-in-the-zsh

Description

@ghost-in-the-zsh

Hello,

Currently, you're able to specify a path for wallpapers in the config file (e.g. path = ~/Pictures/wallpapers/). I've noticed that every time I restart hyprpaper, it always cycles through the images in the same order. Would it be possible to add an option that would let the user specify the order in which images get cycled through? For example, if I have:

wallpaper {
    monitor = eDP-1
    path = ~/Pictures/wallpapers/
    fit_mode = contain
    timeout = 90
}

perhaps an option called sort_order = <ascending|descending|newest|oldest|random> could be added, where:

  • ascending: sort by name, in ascending order
  • descending: ditto, in descending order
  • newest: sort by date/time, starting with the most recently added pictures
  • oldest: ditto, starting with the oldest ones
  • random: just pick images at random

For example:

wallpaper {
    monitor = eDP-1
    path = ~/Pictures/wallpapers/
    fit_mode = contain
    timeout = 90
    sort_order = random
}

Of course, the naming above is just for example purposes and better ones may be used, but I hope that conveys the basic idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions