From 4709959c821f323295de7cce78b0f1a8f525de6f Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado <55825613+luevano@users.noreply.github.com> Date: Thu, 27 Feb 2020 13:36:06 -0700 Subject: Tweak blocklets --- .local/bin/blocks/player | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to '.local/bin/blocks/player') diff --git a/.local/bin/blocks/player b/.local/bin/blocks/player index f78bd78..cc17a4e 100755 --- a/.local/bin/blocks/player +++ b/.local/bin/blocks/player @@ -1,26 +1,4 @@ #!/usr/bin/env perl -# Copyright (C) 2014 Tony Crisci -# Copyright (C) 2015 Thiago Perrotta - -# 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, either version 3 of the License, or -# (at your option) any later version. - -# 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 . - -# Requires playerctl binary to be in your path (except cmus) -# See: https://github.com/acrisci/playerctl - -# Set instance=NAME in the i3blocks configuration to specify a music player -# (playerctl will attempt to connect to org.mpris.MediaPlayer2.[NAME] on your -# DBus session). use Time::HiRes qw(usleep); use Env qw(BLOCK_INSTANCE); @@ -28,6 +6,7 @@ use Env qw(BLOCK_INSTANCE); use constant DELAY => 50; # Delay in ms to let network-based players (spotify) reflect new data. use constant SPOTIFY_STR => 'spotify'; +my $label = $ENV{LABEL} // ""; my @metadata = (); my $player_arg = ""; @@ -83,6 +62,7 @@ sub buttons { } } +print("$label "); sub cmus { my @cmus = split /^/, qx(cmus-remote -Q); if ($? == 0) { -- cgit v1.2.3-54-g00ecf