IgnorantGuru / spacefm

SpaceFM File Manager
http://ignorantguru.github.com/spacefm/
GNU General Public License v3.0
489 stars 73 forks source link

add toggle state to spacefm -s set sort_by #290

Closed zeltak closed 11 years ago

zeltak commented 11 years ago

Hya

thx alot for the sort commands it works fantasticly well. i wonder if you wouldnt mind adding a toggle state to them, so that issueing IE

spacefm -s set sort_by_toggle name

would one time switch to ascend and the next press to descend

thx alot

Z

IgnorantGuru commented 11 years ago

No plans to add a convenience function for this. Your script can toggle the state, eg:

value=$(spacefm -s get sort_ascend)
(( new_value = 1 - value ))
spacefm -s set sort_ascend $new_value