Dor dicke Gind
1 year ago
4 changed files with 17 additions and 7 deletions
@ -0,0 +1,13 @@
|
||||
#!/bin/bash |
||||
expireTimeNotifyOSD=3000 |
||||
currentId=2 |
||||
tmpFile=/tmp/currentLollypopVolumnNotifyId |
||||
|
||||
currentVolume=$(dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.Lollypop /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Volume' | grep -Eo '[+-]?[0-9]+([.][0-9]+)?' | tail -n 1) |
||||
operator=$1 |
||||
newVolume=$(echo $currentVolume $operator 0.05 | bc) |
||||
newVolumeAsInt=$(echo $newVolume | cut -c 2-3) |
||||
dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.Lollypop /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Set string:'org.mpris.MediaPlayer2.Player' string:'Volume' variant:double:$newVolume |
||||
|
||||
notify-send "Volume $newVolumeAsInt" "test" -p -t $expireTimeNotifyOSD -r $currentId -i org.gnome.Lollypop -h int:value:$newVolumeAsInt > $tmpFile |
||||
l |
@ -1,2 +0,0 @@
|
||||
#!/bin/bash |
||||
dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.Lollypop /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Set string:'org.mpris.MediaPlayer2.Player' string:'Volume' variant:double:0.55 |
Loading…
Reference in new issue