2

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.10

ncmpcpp 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

1 Answers1

2

Thanks to @K7AAY I have found an answer:

#!/bin/bash

SONG=`ncmpcpp --current-song -q`
echo "NAME: ${SONG}"
echo -n $SONG | xclip -selection c

Running 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