diff --git a/bin/miniplayer b/bin/miniplayer index f1ebd19..4d19f67 100755 --- a/bin/miniplayer +++ b/bin/miniplayer @@ -18,7 +18,8 @@ if "player" not in config.sections(): config["player"] = {"music_directory": "~/Music", "font_width": 11, "font_height": 24, - "image_method": "pixcat" + "image_method": "pixcat", + "volume_step": 5 } if "mpd" not in config.sections(): @@ -75,6 +76,9 @@ MPDPORT = mpd_config.getint("port", 6600) # What to use to draw images IMAGEMETHOD = player_config.get("image_method", "pixcat") +# Volume step +VOLUMESTEP = player_config.getint("volume_step", 5) + def albumArtSize(album_space, window_width): """ @@ -347,10 +351,10 @@ class Player: self.client.pause() elif action == "volume_up": - self.client.volume("5") + self.client.volume(str(VOLUMESTEP)) elif action == "volume_down": - self.client.volume("-5") + self.client.volume(str(-VOLUMESTEP)) elif action == "quit": raise KeyboardInterrupt diff --git a/config.example b/config.example index b6a527a..14c8359 100644 --- a/config.example +++ b/config.example @@ -3,6 +3,7 @@ music_directory = ~/Music font_width = 11 font_height = 24 image_method = pixcat +volume_step = 5 [mpd] host = localhost