diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 65bdd13c0..7f59c6c2e 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -278,7 +278,8 @@ Set all settings back to their default. [[config-cycle]] === config-cycle -Syntax: +:config-cycle [*--pattern* 'pattern'] [*--temp*] [*--print*] 'option' ['values' ['values' ...]]+ +Syntax: +:config-cycle [*--pattern* 'pattern'] [*--temp*] [*--print*] + 'option' ['values' ['values' ...]]+ Cycle an option between multiple values. @@ -530,7 +531,8 @@ Show help about a command or setting. [[hint]] === hint -Syntax: +:hint [*--mode* 'mode'] [*--add-history*] [*--rapid*] [*--first*] ['group'] ['target'] ['args' ['args' ...]]+ +Syntax: +:hint [*--mode* 'mode'] [*--add-history*] [*--rapid*] [*--first*] + ['group'] ['target'] ['args' ['args' ...]]+ Start hinting. @@ -781,7 +783,8 @@ Do nothing. [[open]] === open -Syntax: +:open [*--related*] [*--bg*] [*--tab*] [*--window*] [*--secure*] [*--private*] ['url']+ +Syntax: +:open [*--related*] [*--bg*] [*--tab*] [*--window*] [*--secure*] [*--private*] + ['url']+ Open a URL in the current/[count]th tab. @@ -1110,7 +1113,9 @@ Load a session. [[session-save]] === session-save -Syntax: +:session-save [*--current*] [*--quiet*] [*--force*] [*--only-active-window*] [*--with-private*] ['name']+ +Syntax: +:session-save [*--current*] [*--quiet*] [*--force*] [*--only-active-window*] + [*--with-private*] + ['name']+ Save a session. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index e4d75777b..6299581f2 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -2238,7 +2238,7 @@ class CommandDispatcher: """Mute/Unmute the current/[count]th tab. Args: - count: The tab index to pin or unpin, or None + count: The tab index to mute or unmute, or None """ tab = self._cntwidget(count) if tab is None: diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index cfeeee07e..afdfb9453 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -1377,7 +1377,7 @@ tabs.title.format: * `{private}`: Indicates when private mode is enabled. * `{current_url}`: URL of the current web page. * `{protocol}`: Protocol (http/https/...) of the current web page. - * `{audio}`: Cookie for audio/mute status + * `{audio}`: Indicator for audio/mute status tabs.title.format_pinned: default: '{index}' diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 9cb160959..e5955998f 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -239,9 +239,9 @@ class TabbedBrowser(QWidget): tab.renderer_process_terminated.connect( functools.partial(self._on_renderer_process_terminated, tab)) tab.audio_muted_changed.connect( - functools.partial(self.on_audio_changed, tab)) + functools.partial(self._on_audio_changed, tab)) tab.recently_audible_changed.connect( - functools.partial(self.on_audio_changed, tab)) + functools.partial(self._on_audio_changed, tab)) tab.new_tab_requested.connect(self.tabopen) if not self.private: web_history = objreg.get('web-history') @@ -737,8 +737,7 @@ class TabbedBrowser(QWidget): self._update_window_title('scroll_pos') self.widget.update_tab_title(idx, 'scroll_pos') - @pyqtSlot() - def on_audio_changed(self, tab, _muted): + def _on_audio_changed(self, tab, _muted): """Update audio field in tab when mute or recentlyAudible changed.""" try: idx = self._tab_index(tab) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 7135d587c..8540ef24a 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -174,10 +174,14 @@ class TabWidget(QTabWidget): fields['backend'] = objects.backend.name fields['private'] = ' [Private Mode] ' if tab.private else '' try: - fields['audio'] = '[M] ' if tab.is_muted() else ( - '[A] ' if tab.is_recently_audible() else '') - except (NotImplementedError, browsertab.WebTabError): - # one of the functions was not implemented or had an error, abort + if tab.is_muted(): + fields['audio'] = '[M] ' + elif tab.is_recently_audible(): + fields['audio'] = '[A] ' + else: + fields['audio'] = '' + except browsertab.WebTabError: + # Muting is only implemented with QtWebEngine fields['audio'] = '' if tab.load_status() == usertypes.LoadStatus.loading: