Adds delay to mediactrl
This commit is contained in:
parent
6d141a1a3b
commit
9d145716ff
1 changed files with 33 additions and 32 deletions
|
|
@ -30,6 +30,7 @@ stop_playback() {
|
|||
|
||||
# Display notification with song information
|
||||
show_music_notification() {
|
||||
sleep 0.5s
|
||||
status=$(playerctl status)
|
||||
if [[ "$status" == "Playing" ]]; then
|
||||
song_title=$(playerctl metadata title)
|
||||
|
|
@ -42,19 +43,19 @@ show_music_notification() {
|
|||
|
||||
# Get media control action from command line argument
|
||||
case "$1" in
|
||||
"--nxt")
|
||||
"--nxt")
|
||||
play_next
|
||||
;;
|
||||
"--prv")
|
||||
"--prv")
|
||||
play_previous
|
||||
;;
|
||||
"--pause")
|
||||
"--pause")
|
||||
toggle_play_pause
|
||||
;;
|
||||
"--stop")
|
||||
"--stop")
|
||||
stop_playback
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
echo "Usage: $0 [--nxt|--prv|--pause|--stop]"
|
||||
exit 1
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue