Advertisement
Guest User

Untitled

a guest
Mar 16th, 2016
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. i3status | while :
  4. do
  5. read line
  6.  
  7. SPOTIFY_WIN_ID=$(xwininfo -root -all | grep "\"spotify\" \"Spotify\"" | cut -d '"' -f 1 | sed -n 1p | sed -e 's/^[[:space:]]*//')
  8.  
  9. NOWPLAYING=$(xprop -id $SPOTIFY_WIN_ID | grep WM_NAME | cut -d '"' -f 2 | sed -n 1p)
  10.  
  11. echo -n "${NOWPLAYING} | ${line}" || exit 1
  12.  
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement