diff -Nru pulsemixer-1.5.0/debian/changelog pulsemixer-1.5.1/debian/changelog --- pulsemixer-1.5.0/debian/changelog 2019-07-12 18:58:35.000000000 +0000 +++ pulsemixer-1.5.1/debian/changelog 2020-06-28 12:39:47.000000000 +0000 @@ -1,3 +1,11 @@ +pulsemixer (1.5.1-1) unstable; urgency=medium + + * New upstream release + * Bump debhelper compat version to 13 + * Bump Standards-Version to 4.5.0 (no changes needed) + + -- Alessandro Ghedini Sun, 28 Jun 2020 13:39:47 +0100 + pulsemixer (1.5.0-1) unstable; urgency=medium * New upstream release (Closes: #931799) diff -Nru pulsemixer-1.5.0/debian/compat pulsemixer-1.5.1/debian/compat --- pulsemixer-1.5.0/debian/compat 2019-07-12 18:58:35.000000000 +0000 +++ pulsemixer-1.5.1/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -12 diff -Nru pulsemixer-1.5.0/debian/control pulsemixer-1.5.1/debian/control --- pulsemixer-1.5.0/debian/control 2019-07-12 18:58:35.000000000 +0000 +++ pulsemixer-1.5.1/debian/control 2020-06-28 12:39:47.000000000 +0000 @@ -2,8 +2,8 @@ Section: sound Priority: optional Maintainer: Alessandro Ghedini -Build-Depends: debhelper (>= 12), dh-python, python3-all, python3-setuptools -Standards-Version: 4.4.0 +Build-Depends: debhelper-compat (= 13), dh-python, python3-all, python3-setuptools +Standards-Version: 4.5.0 Vcs-Git: https://salsa.debian.org/debian/pulsemixer.git Vcs-Browser: https://salsa.debian.org/debian/pulsemixer Homepage: https://github.com/GeorgeFilipkin/pulsemixer diff -Nru pulsemixer-1.5.0/pulsemixer pulsemixer-1.5.1/pulsemixer --- pulsemixer-1.5.0/pulsemixer 2019-06-01 19:14:23.000000000 +0000 +++ pulsemixer-1.5.1/pulsemixer 2020-04-11 15:50:10.000000000 +0000 @@ -20,7 +20,7 @@ --no-mouse disable mouse support --create-config generate configuration file''' -VERSION = '1.5.0' +VERSION = '1.5.1' import curses import functools @@ -960,7 +960,7 @@ self.stream_index = stream_index self.volume = pa.volume.values if hasattr(pa, 'media_name'): - media_fullname = pa.media_name.decode() + media_fullname = pa.media_name.decode().replace('\n', ' ') media_name = ': {}'.format(media_fullname.replace('|', ' ')) if media_fullname != self.fullname and media_name != self.media_name: self.media_name, self.media_name_wide = media_name, False @@ -1039,7 +1039,10 @@ self.focus_line_num = 0 self.lines, self.cols = curses.LINES - 2, curses.COLS - 1 self.info, self.menu = str, str - self.menu_titles = ['F1 Output', 'F2 Input', 'F3 Cards'] + self.mode_keys = self.get_mode_keys() + self.menu_titles = ['{} Output'.format(self.mode_keys[0]), + '{} Input'.format(self.mode_keys[1]), + '{} Cards'.format(self.mode_keys[2])] self.data = [] self.mode = {0: 1, 1: 0, 2: 0} self.modes_data = [[[], 0, 0] for i in range(6)] @@ -1534,7 +1537,10 @@ cols = self.cols - 31 - off - len(tree) vol = list(CFG.style.bar_off * (cols - (cols % 3 != 0))) n = int(len(vol) * bar.volume[bartype] / bar.maxsize) - vol[:n] = CFG.style.bar_on * n + if bar.muted: + vol[:n] = CFG.style.bar_on_muted * n + else: + vol[:n] = CFG.style.bar_on * n vol = ''.join(vol) if bartype is Bar.LEFT: if bar.pa.name in (self.server_info.default_sink_name, self.server_info.default_source_name): @@ -1574,22 +1580,27 @@ self.display_line(self.lines + 1, self.info) self.screen.refresh() + def get_mode_keys(self): + return [re.compile(r'[()]|KEY_').sub('', curses.keyname(k[0]).decode('utf-8')) for k in [ + CFG.keys.mode1, CFG.keys.mode2, CFG.keys.mode3]] + def display_helpwin(self): - '''j k ↑ ↓ Navigation - h l ← → Change volume - H L Shift← Shift→ Change volume by 10 - 1 2 3 .. 8 9 0 Set volume to 10%-100% - m Mute/Unmute - Space Lock/Unlock channels - Enter Context menu - F1 F2 F3 Change modes - Tab Shift Tab Next/Previous mode - Mouse click Select device or mode - Mouse wheel Volume change - Esc q Quit''' + doc = (('j k ↑ ↓', 'Navigation'), + ('h l ← →', 'Change volume'), + ('H L Shift← Shift→', 'Change volume by 10'), + ('1 2 3 .. 8 9 0', 'Set volume to 10%-100%'), + ('m', 'Mute/Unmute'), + ('Space', 'Lock/Unlock channels'), + ('Enter', 'Context menu'), + ('{} {} {}'.format(*self.mode_keys), 'Change modes'), + ('Tab Shift Tab', 'Next/Previous mode'), + ('Mouse click', 'Select device or mode'), + ('Mouse wheel', 'Volume change'), + ('Esc q', 'Quit')) + win_width, desc_maxlen = self.helpwin.getmaxyx()[1] - 4, max(len(x[1]) for x in doc) self.helpwin.erase() - for i, s in enumerate(self.display_helpwin.__doc__.split('\n')): - self.helpwin.addstr(i + 1, 2, s.strip(), curses.A_NORMAL) + for i, s in enumerate(doc): + self.helpwin.addstr(i + 1, 2, s[0] + ' ' * (win_width - desc_maxlen - len(s[0])) + s[1]) self.helpwin.border() self.helpwin.refresh() @@ -1752,7 +1763,7 @@ mouse = True class Style: - _bar_style = os.getenv('PULSEMIXER_BAR_STYLE', '┌╶┐╴└┘▮- ──').ljust(11, '?') + _bar_style = os.getenv('PULSEMIXER_BAR_STYLE', '┌╶┐╴└┘▮▯- ──').ljust(12, '?') bar_top_left = _bar_style[0] bar_left_mono = _bar_style[1] bar_top_right = _bar_style[2] @@ -1760,10 +1771,11 @@ bar_bottom_left = _bar_style[4] bar_bottom_right = _bar_style[5] bar_on = _bar_style[6] - bar_off = _bar_style[7] - arrow = _bar_style[8] - arrow_focused = _bar_style[9] - arrow_locked = _bar_style[10] + bar_on_muted = _bar_style[7] + bar_off = _bar_style[8] + arrow = _bar_style[9] + arrow_focused = _bar_style[10] + arrow_locked = _bar_style[11] default_stream = '*' info_locked = 'L' info_unlocked = 'U' @@ -1824,6 +1836,7 @@ ; bar-bottom-left = └ ; bar-bottom-right = ┘ ; bar-on = ▮ + ; bar-on-muted = ▯ ; bar-off = - ; arrow = ' ' ; arrow-focused = ─ diff -Nru pulsemixer-1.5.0/README.md pulsemixer-1.5.1/README.md --- pulsemixer-1.5.0/README.md 2019-06-01 19:14:23.000000000 +0000 +++ pulsemixer-1.5.1/README.md 2020-04-11 15:50:10.000000000 +0000 @@ -113,7 +113,7 @@ ``` ## Configuration -Optional. +Optional. The config file will not be created automatically. Do `pulsemixer --create-config` or copy-paste it from here. ```ini @@ -124,7 +124,7 @@ [general] step = 1 step-big = 10 -; server = +; server = [keys] ;; To bind "special keys" such as arrows see "Key constant" table in @@ -162,6 +162,7 @@ ; bar-bottom-left = └ ; bar-bottom-right = ┘ ; bar-on = ▮ +; bar-on-muted = ▯ ; bar-off = - ; arrow = ' ' ; arrow-focused = ─ @@ -180,10 +181,10 @@ ; 'AudioIPC Server' = 'Firefox' ``` -The old environment variable `PULSEMIXER_BAR_STYLE` is still supported. +The old environment variable `PULSEMIXER_BAR_STYLE` is still supported. To change the volume bar's appearance in (e.g.) zsh without creating the config file: ```bash -export PULSEMIXER_BAR_STYLE="╭╶╮╴╰╯◆· ──" +export PULSEMIXER_BAR_STYLE="╭╶╮╴╰╯◆◇· ──" ``` ## See also diff -Nru pulsemixer-1.5.0/setup.py pulsemixer-1.5.1/setup.py --- pulsemixer-1.5.0/setup.py 2019-06-01 19:14:23.000000000 +0000 +++ pulsemixer-1.5.1/setup.py 2020-04-11 15:50:10.000000000 +0000 @@ -4,7 +4,7 @@ long_description = fh.read() setup(name='pulsemixer', - version='1.5.0', + version='1.5.1', description='pulsemixer - CLI and curses mixer for PulseAudio', long_description=long_description, long_description_content_type="text/markdown", diff -Nru pulsemixer-1.5.0/snap/snapcraft.yaml pulsemixer-1.5.1/snap/snapcraft.yaml --- pulsemixer-1.5.0/snap/snapcraft.yaml 2019-06-01 19:14:23.000000000 +0000 +++ pulsemixer-1.5.1/snap/snapcraft.yaml 2020-04-11 15:50:10.000000000 +0000 @@ -1,5 +1,5 @@ name: pulsemixer -version: 1.5.0 +version: 1.5.1 summary: cli and curses mixer for pulseaudio description: | cli and curses mixer for pulseaudio.