Skip to content

How to bind sort mtime to a key? #302

Answered by leo-arch
Kossak-esky asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Kossak-esky!

For the time being, bindable actions are fixed, and there's no sort mtime action. However, it can be done by binding to a plugin. Follow these steps:

  1. Create a new plugin named sort_mtime.sh under ~/.config/clifm/plugins with this content:
#!/bin/sh
echo "sort mtime" > "$CLIFM_BUS"
exit 0

Do not forget to make it executable: te sort_mtime.sh.

  1. Bind the new plugin to an action name: run actions edit and add this line: plugin2=sort_mtime.sh

  2. Edit your keybindings and bind a key to the new plugin:

plugin2:\M-x

NOTE: There are four available slots for plugins (plugin[1-4]), and plugin1 is already used by the xclip.sh plugin, which can be removed if you don't use it.

  1. Re…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Kossak-esky
Comment options

You must be logged in to vote
2 replies
@leo-arch
Comment options

@leo-arch
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants