diff --git a/usr/lib/byobu/Makefile.am b/usr/lib/byobu/Makefile.am index cf7d035d..9e684ef5 100644 --- a/usr/lib/byobu/Makefile.am +++ b/usr/lib/byobu/Makefile.am @@ -1,3 +1,3 @@ libdirdir = $(prefix)/lib/@PACKAGE@ -libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro entropy fan_speed hostname ip_address load_average logo mail memory menu network processes raid reboot_required release services session swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality +libdir_SCRIPTS = apport arch battery cpu_count cpu_freq cpu_temp color custom date disk disk_io distro entropy fan_speed hostname ip_address load_average logo mail memory menu mpc network processes raid reboot_required release services session swap time time_binary time_utc trash updates_available uptime users whoami wifi_quality diff --git a/usr/lib/byobu/mpc b/usr/lib/byobu/mpc new file mode 100755 index 00000000..fcf34b84 --- /dev/null +++ b/usr/lib/byobu/mpc @@ -0,0 +1,35 @@ +#!/bin/sh -e +# +# mpc: print current mpd song via mpc +# +# Copyright (C) 2008 Canonical Ltd. +# Copyright (C) 2011-2014 Dustin Kirkland +# +# Authors: Elan Ruusamäe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +__mpc_detail() { + uname -a +} + +__mpc_playing() { + mpc status -f '' | grep -qF '[playing]' +} + +__mpc() { + __mpc_playing || return 0 + printf "%s " $(mpc current -f '[[%artist% - ]%title%]|[%file%]') +} + +# vi: syntax=sh ts=4 noexpandtab