Browse Source

[TASK] make tmp file user specific

master
DorGind 7 months ago
parent
commit
00d0f43ab2
  1. 2
      Scripts/lollypop-volumne-ctrl.sh
  2. 2
      Scripts/notifyVolumn.sh

2
Scripts/lollypop-volumne-ctrl.sh

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
expireTimeNotifyOSD=3000 expireTimeNotifyOSD=3000
currentId=2 currentId=2
tmpFile=/tmp/currentLollypopVolumnNotifyId tmpFile=/tmp/currentLollypopVolumnNotifyId$(whoami)
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) 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 operator=$1

2
Scripts/notifyVolumn.sh

@ -8,7 +8,7 @@
expireTimeNotifyOSD=3000 expireTimeNotifyOSD=3000
currentId=1 currentId=1
tmpFile=/tmp/currentVolumnNotifyId tmpFile=/tmp/currentVolumnNotifyId$(whoami)
# gets the current notify id from our tmp file # gets the current notify id from our tmp file
if [ -s $tmpFile ] if [ -s $tmpFile ]
then then

Loading…
Cancel
Save