From 85869af083741e8230cf66d1acc4a3b2da21dbd5 Mon Sep 17 00:00:00 2001 From: NeodarZ Date: Thu, 3 Nov 2016 23:32:29 +0100 Subject: Add the new i3 configuration --- i3/blocks/playerctl | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 i3/blocks/playerctl (limited to 'i3/blocks/playerctl') diff --git a/i3/blocks/playerctl b/i3/blocks/playerctl deleted file mode 100755 index 6d613ed..0000000 --- a/i3/blocks/playerctl +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# Based on https://aur.archlinux.org/packages/playerctl/ - -INSTANCE="${BLOCK_INSTANCE}" - -if [[ "${INSTANCE}" != "" ]]; then - ARGUMENTS="--player ${INSTANCE}" -fi - -ICON_PLAY="➤" -ICON_PAUSE="Ⅱ" -ICON_STOP="≠" -CUR_ICON="" - -if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then - $(playerctl ${ARGUMENTS} previous) -elif [[ "${BLOCK_BUTTON}" -eq 2 ]]; then - $(playerctl ${ARGUMENTS} play-pause) -elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then - $(playerctl ${ARGUMENTS} next) -fi - -PLAYER_STATUS=$(playerctl ${ARGUMENTS} status) -INFO_TITLE=$(playerctl ${ARGUMENTS} metadata title) -INFO_ALBUM=$(playerctl ${ARGUMENTS} metadata album) -INFO_ARTIST=$(playerctl ${ARGUMENTS} metadata artist) - -if [[ "${PLAYER_STATUS}" = "Paused" ]]; then - CUR_ICON="${ICON_PAUSE}" -elif [[ "${PLAYER_STATUS}" = "Playing" ]]; then - CUR_ICON="${ICON_PLAY}" -else - CUR_ICON="${ICON_STOP}" -fi - -if [[ "${INFO_TITLE}" != "" ]] && [[ "${INFO_ARTIST}" != "" ]]; then - echo "${INFO_ARTIST} - ${INFO_TITLE} ${CUR_ICON}" - echo "${INFO_ARTIST} - ${INFO_TITLE} ${CUR_ICON}" -fi \ No newline at end of file -- cgit v1.2.1