Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert option weechat.look.hotlist_sort to a list of hdata fields #2097

Closed
flashcode opened this issue Mar 15, 2024 · 0 comments
Closed

Convert option weechat.look.hotlist_sort to a list of hdata fields #2097

flashcode opened this issue Mar 15, 2024 · 0 comments
Assignees
Labels
feature New feature request
Milestone

Comments

@flashcode
Copy link
Member

flashcode commented Mar 15, 2024

Feature description

Based on this comment: #1235 (comment)

The new format is a comma-separated list of hdata fields, using hdata "hotlist" (var) and "buffer" (buffer.var).

The old value (enum) is automatically converted to a string, and the format of weechat.conf is bumped:

  • group_time_asc-priority,time,time_usec
  • group_time_desc-priority,-time,-time_usec
  • group_number_asc-priority,buffer.number
  • group_number_desc-priority,-buffer.number
  • number_ascbuffer.number
  • number_desc-buffer.number

Each field can start with this char (they can be combined):

  • -: reverse order
  • ~: case insensitive string comparison

For example to sort on a buffer local variable called my_priority: buffer.local_variables.my_priority.

Note: be careful, for buffer local variables, comparison is made between strings, so for example "10" < "5".

@flashcode flashcode added the feature New feature request label Mar 15, 2024
@flashcode flashcode added this to the 4.3.0 milestone Mar 15, 2024
@flashcode flashcode self-assigned this Mar 15, 2024
flashcode added a commit that referenced this issue Mar 18, 2024
Restore original signals caught: "buffer_moved" and "buffer_closed", and the
signal "buffer_localvar_*" is added so that any local variable
added/changed/removed triggers a re-sort of hotlist.
flashcode added a commit that referenced this issue Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

1 participant