def play_sound(sound): """ Description - only works with pulseaudio. :type sound: String (Path) :param sound: Sound path to be played audio file from :rtype: I hope you will hear your Sound ;) """ if config.sound_get_checkbox(): subprocess.run(["paplay", resource_path(sound)])
def set_correct_buttons(self): theme = config.get_theme() if theme == "dark": self.ui.light_push.setEnabled(True) self.ui.dark_push.setEnabled(False) if theme == "light": self.ui.light_push.setEnabled(False) self.ui.dark_push.setEnabled(True) if theme == "": self.ui.light_push.setEnabled(True) self.ui.dark_push.setEnabled(True) self.ui.sound_checkBox.setChecked(config.sound_get_checkbox())