9 lines
207 B
Bash
Executable file
9 lines
207 B
Bash
Executable file
#!/bin/sh
|
|
|
|
tmpfile=$(mktemp /tmp/st-cmd-output.XXXXXX)
|
|
|
|
trap 'rm "$tmpfile"' 0 1 15
|
|
sed -n "w $tmpfile"
|
|
sed -i 's/\x0//g; /^\s*$/d' "$tmpfile"
|
|
|
|
dmenu -p 'Copy line:' <"$tmpfile" | xclip -selection clipboard
|