Advertisement
constantin-net

.moc/OnSongChange.sh

Jul 25th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #!/bin/bash
  2. #echo 'closeLastNoti() naughty.notify({font = beautiful.font, timeout = 7, icon = "/usr/share/icons/moblin/48x48/actions/media-playback-start.png", title = awful.util.pread("mocp -Q %state") .. awful.util.pread("mocp -Q %song/\%tt"), text = awful.util.pread("mocp -Q %artist") .. "\n"})' | awesome-client
  3. echo 'naughty.notify({font = beautiful.font, timeout = 7, icon = "/usr/share/icons/moblin/48x48/actions/media-playback-start.png", title = awful.util.pread("mocp -Q %state") .. (awful.util.pread("mocp -Q %song") == "\n" and awful.util.pread("mocp -Q %file") or awful.util.pread("mocp -Q %song")), text = awful.util.pread("mocp -Q %artist") .. "\n"})' | awesome-client
  4. exit 0
  5.  
  6. #title = awful.util.pread("mocp -Q %state") .. function() local song = awful.util.pread("mocp -Q %song/\%tt") if song == "" then return awful.util.pread("mocp -Q %file") else return song end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement