config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 71e3222cdf4cf7ef072d7e1b0baf9fe4ec0f567c
parent 1e4e4b355cdc3a567fee56b3e0df9671d39a4bb0
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Thu, 25 Mar 2021 20:01:11 -0700

Add mpc format toggle shell function

The mf function toggles between the '%file%' format and a costom
pretty format.

Diffstat:
Mlocal/shell/.config/shell/mpc | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/local/shell/.config/shell/mpc b/local/shell/.config/shell/mpc @@ -1,6 +1,13 @@ # mpc shell functions m() mpc "$@" +mf() { + if test "$MPC_FORMAT" = '%file%'; then + export MPC_FORMAT='%position%\t"[%title%|%file%]" [by %artist%]' + else + export MPC_FORMAT='%file%' + fi +} # player mP() m prev "$@"