I can't find a way to copy a title of currently played song in ncmpcpp to clipboard.
Is there any shortcut to do this ?
Ubuntu Version: 19.10:
$ lsb_release -r
Release: 19.10ncmpcpp 0.8.2:
$ ncmpcpp -v
ncmpcpp 0.8.2
optional screens compiled-in: - tag editor - tiny tag editor - outputs - visualizer - clock
encoding detection: enabled
built with support for: fftw ncurses taglib 2 1 Answer
Thanks to @K7AAY I have found an answer:
#!/bin/bash
SONG=`ncmpcpp --current-song -q`
echo "NAME: ${SONG}"
echo -n $SONG | xclip -selection cRunning above script will print song name and copy it to the clipboard.
$ ./get-current-song.sh
NAME: (-:--) Daniel Gomez - Two Ways [New York] 055 (18 December 2019) Hour 1 0