Skip to content

Commit

Permalink
Execute the volume widget commands in a shell (#1359)
Browse files Browse the repository at this point in the history
  • Loading branch information
krive001 authored and ramnes committed Jun 27, 2019
1 parent 4cf1a8b commit 024ffc9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libqtile/widget/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,31 +100,31 @@ def create_amixer_command(self, *args):
def button_press(self, x, y, button):
if button == BUTTON_DOWN:
if self.volume_down_command is not None:
subprocess.call(self.volume_down_command)
subprocess.call(self.volume_down_command, shell=True)
else:
subprocess.call(self.create_amixer_command('-q',
'sset',
self.channel,
'%d%%-' % self.step))
elif button == BUTTON_UP:
if self.volume_up_command is not None:
subprocess.call(self.volume_up_command)
subprocess.call(self.volume_up_command, shell=True)
else:
subprocess.call(self.create_amixer_command('-q',
'sset',
self.channel,
'%d%%+' % self.step))
elif button == BUTTON_MUTE:
if self.mute_command is not None:
subprocess.call(self.mute_command)
subprocess.call(self.mute_command, shell=True)
else:
subprocess.call(self.create_amixer_command('-q',
'sset',
self.channel,
'toggle'))
elif button == BUTTON_RIGHT:
if self.volume_app is not None:
subprocess.Popen(self.volume_app)
subprocess.Popen(self.volume_app, shell=True)

self.draw()

Expand Down

0 comments on commit 024ffc9

Please sign in to comment.