All Projects → de-vri-es → Weechat Autosort

de-vri-es / Weechat Autosort

Licence: gpl-3.0
Automatically keep your buffers sorted.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Weechat Autosort

Vue Slicksort
A set of vue mixins to turn any list into an animated, touch-friendly, sortable list ✌️
Stars: ✭ 1,010 (+1363.77%)
Mutual labels:  sort
Go Apns2
Go package for HTTP/2 Apple Push Notification Service.
Stars: ✭ 53 (-23.19%)
Mutual labels:  channels
Girc
💣 girc is a flexible IRC library for Go 👌
Stars: ✭ 59 (-14.49%)
Mutual labels:  irc
Mortgageblockchainfabric
Mortgage Processing App using Hyperledger Fabric Blockchain. Uses channels for privacy and access, and restricts read/write previleges through endorsement policies
Stars: ✭ 45 (-34.78%)
Mutual labels:  channels
Marvin
The paranoid bot (framework)
Stars: ✭ 51 (-26.09%)
Mutual labels:  irc
Format Graphql
Formats GraphQL schema definition language (SDL) document.
Stars: ✭ 55 (-20.29%)
Mutual labels:  sort
Twig Lambda
Lambda expressions for Twig and filters that make use of them
Stars: ✭ 40 (-42.03%)
Mutual labels:  sort
Inspircd Contrib
Third-party InspIRCd module repository.
Stars: ✭ 61 (-11.59%)
Mutual labels:  irc
Biboumi
IRC gateway for XMPP
Stars: ✭ 51 (-26.09%)
Mutual labels:  irc
Array Sort
Fast and powerful array sorting. Sort an array of objects by one or more properties. Any number of nested properties or custom comparison functions may be used.
Stars: ✭ 58 (-15.94%)
Mutual labels:  sort
Alectro
A terminal IRC client in Rust.
Stars: ✭ 47 (-31.88%)
Mutual labels:  irc
Sketch Name Organizer
🖌 Rename and sort artboards based on their x and y position; Rename layers based on their Style and Symbol.
Stars: ✭ 50 (-27.54%)
Mutual labels:  sort
Laravel Fcm
🌐 A Laravel package to send Push Notifications to one or many devices of the user.
Stars: ✭ 56 (-18.84%)
Mutual labels:  channels
Hammerspoon
Staggeringly powerful macOS desktop automation with Lua
Stars: ✭ 8,540 (+12276.81%)
Mutual labels:  irc
Continuum Desktop
Matrix client in kotlin
Stars: ✭ 60 (-13.04%)
Mutual labels:  irc
Tsorter
JavaScript Table Sorter using Quick Sort
Stars: ✭ 40 (-42.03%)
Mutual labels:  sort
Homura
an IRC bouncer written in JavaScript for Node.js
Stars: ✭ 54 (-21.74%)
Mutual labels:  irc
Tinker app
Android热更新Tinker + 多渠道打包 + 加固的流程详解demo
Stars: ✭ 67 (-2.9%)
Mutual labels:  channels
Inspircd Docker
InspIRCd Docker Image
Stars: ✭ 60 (-13.04%)
Mutual labels:  irc
React Grid Table
A modular table, based on a CSS grid layout, optimized for customization.
Stars: ✭ 57 (-17.39%)
Mutual labels:  sort

Autosort

Introduction

Autosort is a weechat script to automatically or manually keep your buffers sorted. The sort order can be customized by defining your own sort rules, but the default should be sane enough for most people. It can also group IRC channel/private buffers under their server buffer if you like.

Autosort uses a stable sorting algorithm, meaning that you can manually move buffers to change their relative order, if they sort equal with your rule set.

Sort rules

Autosort evaluates a list of eval expressions (see /help eval) and sorts the buffers based on evaluated result. Earlier rules will be considered first. Only if earlier rules produced identical results is the result of the next rule considered for sorting purposes.

You can debug your sort rules with the /autosort debug command, which will print the evaluation results of each rule for each buffer.

NOTE: The sort rules for version 3 are not compatible with version 2 or vice versa. You will have to manually port your old rules to version 3 if you have any.

Helper variables

You may define helper variables for the main sort rules to keep your rules readable. They can be used in the main sort rules as variables. For example, a helper variable named foo can be accessed in a main rule with the string ${foo}.

Automatic or manual sorting

By default, autosort will automatically sort your buffer list whenever a buffer is opened, merged, unmerged or renamed. This should keep your buffers sorted in almost all situations. However, you may wish to change the list of signals that cause your buffer list to be sorted. Simply edit the autosort.sorting.signals option to add or remove any signal you like. If you remove all signals you can still sort your buffers manually with the /autosort sort command. To prevent all automatic sorting, autosort.sorting.sort_on_config_change should also be set to off.

Recommended settings

For the best visual effect, consider setting the following options:

/set irc.look.server_buffer independent

This setting allows server buffers to be sorted independently, which is needed to create a hierarchical tree view of the server and channel buffers.

If you are using the buflist plugin you can (ab)use Unicode to draw a tree structure with the following setting (modify to suit your need):

/set buflist.format.indent "${color:237}${if:${buffer.next_buffer.local_variables.type}=~^(channel|private)$?├─:└─}"

Commands

Miscellaneous

/autosort sort

Manually trigger the buffer sorting.

/autosort debug

Show the evaluation results of the sort rules for each buffer.

Sorting rules

/autosort rules list

Print the list of sort rules.

/autosort rules add <expression>

Add a new rule at the end of the list.

/autosort rules insert <index> <expression>

Insert a new rule at the given index in the list.

/autosort rules update <index> <expression>

Update a rule in the list with a new expression.

/autosort rules delete <index>

Delete a rule from the list.

/autosort rules move <index_from> <index_to>

Move a rule from one position in the list to another.

/autosort rules swap <index_a> <index_b>

Swap two rules in the list

Helper variables

/autosort helpers list

Print the list of helpers variables.

/autosort helpers set <name> <expression>

Add or update a helper variable.

/autosort helpers delete <name>

Delete a helper variable.

/autosort helpers rename <old_name> <new_name>

Rename a helper variable.

/autosort helpers swap <name_a> <name_b>

Swap the expressions of two helper variables in the list.

Info hooks

Autosort comes with a number of info hooks to add some extra functionality to regular weechat eval strings. Info hooks can be used in eval strings in the form of ${info:some_hook,arguments}.

Commas and backslashes in arguments to autosort info hooks (except for ${info:autosort_escape}) must be escaped with a backslash.

${info:autosort_replace,pattern,replacement,source}

Replace all occurrences of pattern with replacement in the string source. Can be used to ignore certain strings when sorting by replacing them with an empty string.

For example: ${info:autosort_replace,cat,dog,the dog is meowing} expands to "the cat is meowing".

${info:autosort_order,value,option0,option1,option2,...}

Generate a zero-padded number that corresponds to the index of value in the list of options. If one of the options is the special value *, then any value not explicitly mentioned will be sorted at that position. Otherwise, any value that does not match an option is assigned the highest number available. Can be used to easily sort buffers based on a manual sequence.

For example: ${info:autosort_order,${server},freenode,oftc,efnet} will sort freenode before oftc, followed by efnet and then any remaining servers. Alternatively, ${info:autosort_order,${server},freenode,oftc,*,efnet} will sort any unlisted servers after freenode and oftc, but before efnet.

${info:autosort_escape,text}

Escape commas and backslashes in text by prepending them with a backslash. This is mainly useful to pass arbitrary eval strings as arguments to other autosort info hooks. Otherwise, an eval string that expands to something with a comma would be interpreted as multiple arguments.

For example, it can be used to safely pass buffer names to ${info:autosort_replace} like so: ${info:autosort_replace,##,#,${info:autosort_escape,${buffer.name}}}.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].