My dotfiles
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

20 linhas
530 B

  1. #!/bin/sh
  2. artist="$(playerctl metadata artist)"
  3. title="$(playerctl metadata title)"
  4. if [ $# -ge 1 ]; then
  5. if [ "$1" -eq 1 ]; then
  6. playerctl play-pause
  7. else
  8. [ "$1" -eq 2 ] && playerctl next
  9. [ "$1" -eq 3 ] && playerctl previous
  10. artist="$(playerctl metadata artist)"
  11. title="$(playerctl metadata title)"
  12. notify-send -i "media-playback-playing" "Playing now..." "$artist - $title"
  13. fi
  14. else
  15. notify-send -i "media-playback-playing" "Playing now..." "$artist - $title"
  16. fi