volume_status: skip pamixer if no pulseaudio
@@ -302,12 +302,11 @@ class Py3status:
def post_config_hook(self):
if not self.command:
- self.command = self.py3.check_commands(
- ['pamixer', 'pactl', 'amixer'])
- # pactl may be automatically installed, check for pulseaudio too
- if self.command == 'pactl':
+ commands = ['pamixer', 'pactl', 'amixer']
+ # pamixer, pactl requires pulseaudio to work
if not self.py3.check_commands('pulseaudio'):
- self.command = self.py3.check_commands('amixer')
+ commands = ['amixer']
+ self.command = self.py3.check_commands(commands)
elif self.command not in ['amixer', 'pamixer', 'pactl']:
raise Exception(STRING_ERROR % self.command)
elif not self.py3.check_commands(self.command):
