#!/usr/bin/elvish var tmpfile = (mktemp) var selection = clipboard if (<= 1 (count $args) ) { set selection = $args[0] } xclip -o -selection $selection > $tmpfile mousepad $tmpfile xclip -i -selection $selection < $tmpfile rm $tmpfile