Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by
edited by

I would like to show all current filters string on status bar that warns me about applied file filters, is that possible?

1 Answer

0 votes
by
selected by
 
Best answer
  • %x macro of 'rulerformat' can be used in the value of 'statusline' to display number of filtered-out files
  • 'dotfiles' can also be used inside %{...} of 'statusline'

And that's about it, file-name fileters of :filter and zf aren't exposed in any way.

by

And that's about it, file-name fileters of :filter and zf aren't
exposed in any way.

got it, %x will sufficient for my needs

would status bar accept conditions? I would like to show (%x filtered) portion of status bar only if there are non 0 filtered elements

do I need to use %{ system( ...) } to accomplish that or is there a less complex way?

by

%[ and %] can be used for hiding macros that expand to nothing or 0:

%[(%x filtered)%]
by

I'm in awe, that's beautiful

one last question: I have a customized color pattern, is there a way to invert the fg/bg color of %[(%x filtered)%] part of the status bar, in order to highlight it? from what I understand from Default.vifm config it should not be possible, but I would gladly find myself wrong

either way, thank you for the help

by

That's also possible. There are 20 custom color groups User1..User20. After doing highlight User1 ..., you can do

%[%1*(%x filtered)%]%*

Here %1* selects User1 and %* resets back to StatusLine group.

by

just sent a little donation to express my gratitude, have a great day!

by

Thanks, you too, appreciate it :)

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...