Enviado em 30/07/2016 - 11:54h
estou arrumando os scripts do meu i3wm, especificamente o de música (que pra mim essencial) e tem algo que me incomoda um pouco, que se alterado poderia otimizar o espaço da barra, quando não estou ouvindo música pelo player na barra onde se passava o nome da música / autor fica assim:#!/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}"
echo ""
fi
Desktop Linux ganha fôlego enquanto distros refinam experiência e segurança
Wayland em alta, IA em debate e novos ventos para distros e devices
Qt 6.10 e Python 3.14 puxam o ritmo do software livre nesta quarta
Atualizações de Apps, Desktop e Kernel agitam o ecossistema Linux nesta terça-feira
Como mudar o nome de dispositivos Bluetooth via linha de comando
Adicionando o repositório backports no Debian 13 Trixie
Meu Amigo não consegue entrar em meu mundo, via tailscale, hamachi e z... (1)
Erro ao fazer remaster usando Penguin eggs (1)
Warcraft II Remastered no Linux? (0)
queria saber como instalar o android power tools igual ao winux no lin... (7)