aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/mpd_show.sh
diff options
context:
space:
mode:
authorMateja Marić <mail@matejamaric.com>2021-02-07 12:49:43 +0100
committerGitHub <noreply@github.com>2021-02-07 12:49:43 +0100
commit3ed060173b0a3110aac0a5f53a4cb534531b3c28 (patch)
treeded04f4fe15f8490b8c0e48b9684b7d2e990bfe5 /.local/bin/mpd_show.sh
parent5d0c80a46c76dd1712f274ff6ddce05526253983 (diff)
parent3621cc09ea17c771d9c99d684d1e9bafc69fb222 (diff)
downloaddotfiles-3ed060173b0a3110aac0a5f53a4cb534531b3c28.tar.gz
dotfiles-3ed060173b0a3110aac0a5f53a4cb534531b3c28.zip
Merge pull request #4 from MatejaMaric/fix-scripts
Fix issue #2
Diffstat (limited to '.local/bin/mpd_show.sh')
-rwxr-xr-x.local/bin/mpd_show.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/.local/bin/mpd_show.sh b/.local/bin/mpd_show.sh
new file mode 100755
index 0000000..1d0629a
--- /dev/null
+++ b/.local/bin/mpd_show.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+raw="$(mpc)"
+song=$(echo "$raw" | sed -n '1p')
+time=$(echo "$raw" | sed -n '2p')
+notify-send "$song" "$time"