poljar / weechat-matrix

Weechat Matrix protocol script written in python
Other
961 stars 121 forks source link

Tweaks to contrib/matrix_decrypt.py #236

Closed wavexx closed 3 years ago

wavexx commented 4 years ago

I recently tried to use matrix_decrypt.py, but found its usage a bit odd. I generally wanted to save attachments to a known path, not to "run" them with something.

As such I added a second (optional) positional argument to specify a destination file. If a path has been specified, we just save without running the default plumber.

Running with a single argument runs the plumber as before, and specifying a custom plumber allows to both save and run the plumber.

In the second commit I change the default plumber from "rifle" to "xdg-open". Despite loving ranger, IMHO xdg-open is something which is a bit more useful for the general public.