Browse Source

[TASK] change lollypop column control shortcut script

master
Dor dicke Gind 1 year ago
parent
commit
0ad07054fb
  1. 7
      .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
  2. 13
      Scripts/lollypop-volumne-ctrl.sh
  3. 2
      Scripts/lollypopVolumne50.sh
  4. 2
      Scripts/lollypopVolumne75.sh

7
.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

@ -29,6 +29,7 @@
<property name="&lt;Super&gt;r" type="empty">
<property name="startup-notify" type="empty"/>
</property>
<property name="&lt;Alt&gt;&lt;Super&gt;s" type="empty"/>
<property name="&lt;Control&gt;&lt;Alt&gt;Delete" type="empty"/>
<property name="&lt;Control&gt;Escape" type="empty"/>
</property>
@ -55,8 +56,6 @@
</property>
<property name="&lt;Primary&gt;&lt;Shift&gt;Escape" type="string" value="xfce4-taskmanager"/>
<property name="Print" type="string" value="gnome-screenshot --interactive"/>
<property name="&lt;Shift&gt;AudioLowerVolume" type="string" value="lollypopVolumne50.sh"/>
<property name="&lt;Shift&gt;AudioRaiseVolume" type="string" value="lollypopVolumne75.sh"/>
<property name="AudioRaiseVolume" type="string" value="notifyVolumn.sh -r"/>
<property name="AudioMute" type="string" value="notifyVolumn.sh -t"/>
<property name="AudioLowerVolume" type="string" value="notifyVolumn.sh -l"/>
@ -65,6 +64,8 @@
<property name="AudioPlay" type="string" value="lollypop-mprisctl.sh play-pause"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;r" type="string" value="reload-compiz.sh"/>
<property name="Calculator" type="string" value="gnome-calculator"/>
<property name="&lt;Shift&gt;AudioLowerVolume" type="string" value="lollypop-volumne-ctrl.sh &quot;-&quot;"/>
<property name="&lt;Shift&gt;AudioRaiseVolume" type="string" value="lollypop-volumne-ctrl.sh &quot;+&quot;"/>
</property>
</property>
<property name="xfwm4" type="empty">
@ -123,8 +124,8 @@
<property name="&lt;Primary&gt;F12" type="empty"/>
<property name="&lt;Super&gt;KP_Left" type="empty"/>
<property name="&lt;Super&gt;KP_Right" type="empty"/>
<property name="&lt;Super&gt;KP_Up" type="empty"/>
<property name="&lt;Super&gt;KP_Down" type="empty"/>
<property name="&lt;Super&gt;KP_Up" type="empty"/>
<property name="&lt;Super&gt;KP_Page_Up" type="empty"/>
<property name="&lt;Super&gt;KP_Home" type="empty"/>
<property name="&lt;Super&gt;KP_End" type="empty"/>

13
Scripts/lollypop-volumne-ctrl.sh

@ -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

2
Scripts/lollypopVolumne50.sh

@ -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

2
Scripts/lollypopVolumne75.sh

@ -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.8
Loading…
Cancel
Save