guest@dotshare [~/groups/mpd/ncmpcpp] $ ls ncmpcpp-with-albumart/ | cat

ncmpcpp with albumart (scrot) (+3 likes)

fikriomar16 Aug 28, 2017 (mpd/ncmpcpp)

config(raw, dl)

SCROT

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
% egrep -v '^#' .ncmpcpp/config
mpd_music_dir = "/home/user/Music/"

#mpd_host = "127.0.0.1"
#mpd_port = "6601"
mouse_list_scroll_whole_page = "yes"
lines_scrolled = "1"

visualizer_in_stereo = "no"
visualizer_fifo_path = "/tmp/mpd.fifo"
visualizer_output_name = "my_fifo"
visualizer_sync_interval = "10"
visualizer_type = "spectrum"
visualizer_look = "▋▋"

message_delay_time = "3"
playlist_shorten_total_times = "yes"
playlist_display_mode = "classic"
browser_display_mode = "columns"
search_engine_display_mode = "columns"
playlist_editor_display_mode = "columns"
autocenter_mode = "yes"
centered_cursor = "yes"
user_interface = "classic"
follow_now_playing_lyrics = "yes"
locked_screen_width_part = "60"
display_bitrate = "no"
external_editor = "nano"

main_window_highlight_color = "white"

progressbar_elapsed_color = "white"
progressbar_color = "black"

progressbar_look = "▃▃▃"
#progressbar_look = "─⊙ "

mouse_support = "yes"
header_visibility = "no"
statusbar_visibility = "no"

statusbar_color = "white"
visualizer_color = "white"
titles_visibility = "no"
enable_window_title = "yes"

now_playing_prefix = "$b"
now_playing_suffix = "$8$/b"

#now_playing_prefix = "$u$2"
#now_playing_suffix = "$2$/u$2"

song_columns_list_format = "(6)[]{} (23)[red]{a} (26)[yellow]{t|f} (40)[green]{b} (4)[blue]{l}"

color1 = "white"
color2 = "black"

song_list_format = " $7%l  $2%t $R$5%a "

#uncomment both statement's below if you want to display the albumart

#execute_on_song_change="~/.ncmpcpp/art.sh"
#song_list_format = "                       $2%t $R$5%a "

song_status_format = "$b$7♫ $2%a $4⟫$3⟫ $8%t $4⟫$3⟫ $5%b "
song_window_title_format = " {%a} - {%t}"

CLICK TO VIEW

x

art.sh(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

#put this file to ~/.ncmpcpp/

MUSIC_DIR=/home/user/Music/ #path to your music dir

COVER=/tmp/cover.jpg

function reset_background
{
    printf "\e]20;;100x100+1000+1000\a"
}

{
    album="$(mpc --format %album% current)"
    file="$(mpc --format %file% current)"
    album_dir="${file%/*}"
    [[ -z "$album_dir" ]] && exit 1
    album_dir="$MUSIC_DIR/$album_dir"

    covers="$(find "$album_dir" -type d -exec find {} -maxdepth 1 -type f -iregex ".*/.*\(${album}\|cover\|folder\|artwork\|front\).*[.]\(jpe?g\|png\|gif\|bmp\)" \; )"
    src="$(echo -n "$covers" | head -n1)"
    rm -f "$COVER" 
    if [[ -n "$src" ]] ; then
        #resize the image's width to 300px 
        convert "$src" -resize 300x "$COVER"
        if [[ -f "$COVER" ]] ; then
           #scale down the cover to 30% of the original
           printf "\e]20;${COVER};70x70+0+00:op=keep-aspect\a"
        else
            reset_background
        fi
    else
        reset_background
    fi
} &
 

x

Notes

first, u must have urxvt compiled with ‘–enable-pixbuf’

*sorry for my bad english

Comments

beli3ver said about 10 months ago

could give me your colors for urxvt?
thanks

beli3ver said about 10 months ago

and the font settings

villasv said about 9 months ago

Ins’t this script going to print the cover on all windows, including the visualizer? Also, it’s forcing the background to be transparent in my URxvt.

edited about 9 months ago