diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/commands/:music-web | 5 | ||||
| -rwxr-xr-x | scripts/music/player.sh | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/scripts/commands/:music-web b/scripts/commands/:music-web new file mode 100755 index 0000000..a14afc8 --- /dev/null +++ b/scripts/commands/:music-web @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +xdg-open 'http://localhost:6680' + +# spotify diff --git a/scripts/music/player.sh b/scripts/music/player.sh index e7989e1..270d02f 100755 --- a/scripts/music/player.sh +++ b/scripts/music/player.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +MAX_CHARS=36 + player() { playerctl --player=mopidy "$@"; } # Get player state @@ -16,7 +18,7 @@ get_play_state() { # Get title - artist (song label) #get_label() { player metadata --format '{{title}} - {{artist}}' || echo '...'; } get_label() { - echo -n "$(mpc current | cut -c1-20)"; + echo -n "$(mpc current | cut -c1-"$MAX_CHARS")"; echo "..."; } |
