Хотите сделать посильный вклад в развитие Ubuntu и русскоязычного сообщества? Помогите нам с документацией!
0 Пользователей и 1 Гость просматривают эту тему.
#!/bin/bash#deadOSD by RazrFalconstop=truewhile [ "$stop" = "true" ] ; do temp=`deadbeef --nowplaying "%t"` if [ "$temp" != "$temp2" ]; then string=`deadbeef --nowplaying "%a#%b#%t" | sed 's/#/\n/g'` artist=`echo "$string" | sed -ne "1"p` album=`echo "$string" | sed -ne "2"p` song=`echo "$string" | sed -ne "3"p` icon_path="/home/razrfalcon/.config/deadbeef/artcache/"$artist"/"$album".jpg" echo "$icon_path" notify-send -i "$icon_path" -t 3000 "$artist" "$song" fi sleep 2 temp2="$temp"done
if [ "`deadbeef --nowplaying "%t"`" == "nothing" ]; do exit 0;fi
#!/bin/bashfunction DDBFNoty() {/usr/bin/python <<EOF# coding: utf-8import osimport refrom pynotify import Notification, initCASH = ('%s/.config/deadbeef/artcache' % os.path.expanduser('~'))try: full = os.popen('deadbeef --nowplaying "%a#%b#%t" 2>/dev/null').read() info = re.split("#", full) icon = ('%s/%s/%s.jpg' % (CASH, info[0], info[1])) text = ('%s\non «%s»' % (info[2], info[1])) Notification(info[0], text, icon).show()except IndexError: passEOF}stop=truewhile [ "$stop" = "true" ] ; do temp=$(deadbeef --nowplaying "%t" 2>/dev/null) if pgrep deadbeef >/dev/null; then if [ "$temp" != "$temp2" ]; then DDBFNoty fi else exit fi sleep 2 temp2="$temp"done
sudo apt-get install python-pyinotify
chmod +x osd.sh
Страница сгенерирована за 0.036 секунд. Запросов: 21.