Commit Graph

93 Commits

Author SHA1 Message Date
Aleksei Bavshin ea17a66dfc
fix: compilation errors with cpp_std=c++20
There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
2023-01-20 22:50:02 -08:00
Prokhor40 ce8c13788a fix formatting issues 2022-12-02 19:32:03 +03:00
Prokhor40 b74f3c7aaa hide mdp/pulseaudio/sndio if text 'resolves' to be empty. 2022-12-02 18:15:51 +03:00
Simon Plakolb 5e9bbe5c76 modules: Revert button to label 2022-11-24 13:08:16 +01:00
Maximilian Schmidt 8c24e26f0e
Recognize outputs with 'bluez' in monitor name as bluetooth class 2022-11-16 19:01:12 +01:00
Alex c7d475ee86
Merge pull request #1728 from lilydjwg/fixpa 2022-10-18 08:45:45 +02:00
Alex 8551c4bbe3 fix: lint 2022-10-17 09:19:00 +02:00
Alex bfa3adcfd6
Merge pull request #1120 from pinselimo/use_gtk_button_v2 2022-10-17 09:09:12 +02:00
Alex c2dd296d31
Merge pull request #1704 from gunslingerfry/master 2022-10-17 09:07:26 +02:00
lilydjwg 35254ee834 pulseaudio: disconnect on destruction 2022-10-16 15:24:17 +08:00
Simon Plakolb 2b735f44bc modules: Set tooltip on button
Mouse-over tooltips set on the label only appear once the mouse hovers
over exactly the label. Other apps (e.g. firefox) show the tooltip once
the pointer hovers the button. Not solely its label. With this commit we
get the same behaviour.
2022-10-12 10:25:30 +02:00
Simon Plakolb 8fa5d9b838 modules: Set style-context on button
Fixes issue where the class parameters in style.css would have no
effect.

The CSS now references the GtkButton instead of the GtkLabel. Removing
all style-classes from the custom module GtkButton however removes
any properties set via style.css. Thus, the default classes 'flat' and
'text-button' are added on every update of these modules.
2022-10-12 10:25:30 +02:00
Simon Plakolb b8322c4b4b button: Add AButton class
The AButton class is designed as full a substitute to ALabel. The
GtkButton attribute 'button_' is initialized with a label. This
label can the be referenced by the subsequent inheritors of AButton
instead of the GtkLabel attribute 'label_' of ALabel.
For convenience a GtkLabel* 'label_' attribute is added to AButton.

If the button cannot be clicked it is disabled, effectively acting
like its label predecessor.

GtkButton seems to catch one-click mouse events regardless of the
flags set on it. Therefore, 'signal_pressed' is connected to a
function creating a fake GdkEventButton* and calling 'handleToggle'
(for details on this possible bug in GTK see:
https://stackoverflow.com/questions/45334911 )

In accordance with other GtkButtons (i.e. the sway/workspace ones)
set_relief(Gtk::RELIEF_NONE) is called on the 'button_' instance.
2022-10-12 10:25:29 +02:00
Matthew Fry c500c7d9a1 Fixed pulseaudio max-volume configuration. Fixed issue where volume stepping would cause the max volume to go above the max and never reach 0. 2022-09-30 15:25:12 -06:00
Isaac Woods faf8954712 Add config option to ignore Pulseaudio Sinks
Fixes #1347
2022-09-09 00:51:25 +01:00
TheRealLorenz 4e930ba50a Add 'max-volume' option to pulseaudio. Fixes #1607 2022-08-20 22:21:57 +02:00
Bao Trinh e57899c0c5
pulseaudio: avoid retaining outdated form factor
when the module fails to get the pulseaudio device form factor, the
module persists the existing value, resulting in the incorrect
format-icon being used to format the label on device changes.

reset the form factor value so that the icon lookup properly falls back
to "default" when missing
2022-06-14 13:57:03 -05:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Dorian Rudolph 1a93a6cfa5 fix #1431: audio output does not update on unplug 2022-02-09 14:20:09 +01:00
aashu ad20c0af2d
Merge branch 'master' into master 2021-12-14 10:22:25 +05:30
Patrick Nicolas 9dac851f6d Allow sink in addition to source for pulse icon 2021-11-30 16:31:41 +01:00
Ashutosh Malviya 08b4a83331 Add reverse scrolling config option for pulseaudio
When natural scrolling is enabled, the behaviour of scrolling on pulseaudio
module is reversed, this commit reverses the direction of scroll variable
if "reverse-scrolling" is set to 1 in config file.
2021-10-15 19:07:25 +05:30
Lars Christensen 6f2bfd43bf Fix pulseaudio icon name compilation error 2021-07-20 15:25:05 +02:00
Alex f43f8773c4
Merge pull request #1169 from roosemberth/pa-control-active-sink
pulseaudio: Control currently running sink
2021-07-20 14:01:23 +02:00
Roosembert Palacios 86a43b9042
pulseaudio: Control currently running sink
In a system with multiple sinks, the default sink may not always be
the once currently being used. It is more useful to control the
currently active sink rather than an unused one.

This patch does not make any difference if the system only uses the
default sink.

Signed-off-by: Roosembert Palacios <roosemberth@posteo.ch>
2021-07-20 10:16:53 +02:00
Patrick Nicolas 9c2b5efe7b Support per-device icon in pulseaudio 2021-07-15 09:20:43 +02:00
David96 2213380dc0 [modules/pulseaudio] fix bluetooth class for PipeWire
apparently, pipewire-pulse slightly changed the naming of the sink.
2021-04-25 11:19:35 +02:00
Kamus Hadenes a7941a00c5
fix missing parentheses 2021-01-12 19:10:34 -03:00
Kamus Hadenes f4ffb21c8c
improve sink/source separation
Add additional fields, namely `source_volume` and `source_desc`
Add `tooltip-format`, reverting to default behavior if not specified
Add additional CSS classes, namely `sink-muted` and `source-muted`
2021-01-12 18:51:44 -03:00
Andrea Scarpino 005af7f7b7 Revert "Fix waybar-pulseaudio with pipewire-pulse"
This reverts commit 0d03c1d4da.
2020-12-25 17:37:21 +01:00
Andrea Scarpino 0d03c1d4da Fix waybar-pulseaudio with pipewire-pulse 2020-12-04 23:51:10 +01:00
Alex 4a7dd400fe
Merge branch 'master' into on-update 2020-04-12 18:32:19 +02:00
Alex b40cdcb5bd refactor: call parent update 2020-04-12 18:30:21 +02:00
JohnHolmesII 5c5031fd69
pulse: do not die when a server hasn't been started. wait first. 2020-04-05 11:42:27 -07:00
Alex 9acf5587fa refactor(pulseaudio): fallback to default muted format 2020-03-25 22:53:09 +01:00
Guillaume Maudoux 190b2dd922 pulseaudio: track only the default sink and source
When you have multiple sinks (resp. sources), the module used to display
the state of the most recently changed one. This changes remembers the
default sink name, and only records changes to that one.
2020-02-24 11:30:35 +01:00
Guillaume Maudoux 9a5f5114c4 pulse: track default source/sink changes 2020-02-19 12:28:36 +01:00
Alex 543589a97b
Update pulseaudio.cpp 2020-02-16 21:48:22 +00:00
Andreas Stührk 527fa982d2 pulseaudio: adapt icon names to form factors 2020-01-31 22:47:26 +01:00
PlusMinus0 8fb3211594 Use PA_PROP_DEVICE_FORM_FACTOR for device icon. 2020-01-13 11:34:33 +01:00
Jordi Pakey-Rodriguez 0f0765e517 feat(modules): call user on-update if configured 2019-12-05 14:42:36 -08:00
Niv Sardi 6d5b502bbb pulseaudio: export desc as a format
Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>
2019-11-25 05:16:58 -03:00
Hetian Huo 3d1fd4f5ea
change audio scroll bound
Change default behavior from 0% - 99% to 0% - 100%.
2019-09-28 18:05:31 -05:00
tufteddeer d8b1b0d0af
add support for muted bluetooth audio, fix #420 2019-08-18 16:15:21 +02:00
crwxrws 617b370104 fix(pulseaudio): connect scroll event handler
Reconnect the event handler that was removed in commit 527144a.

Fixes Alexays#400
2019-07-06 15:51:00 +02:00
Alex 05f796158b fix: typo 2019-06-16 15:13:40 +02:00
Alex 527144a440 refactor(pulseaudio): proper scroll override 2019-06-16 15:08:08 +02:00
Alex 340ec7be91 refactor: AModule 2019-06-15 14:57:52 +02:00
Alex 0b01b35c76 refactor(pulseaudio): only watch changes 2019-05-31 16:21:01 +02:00
Alex d24d85bebf refactor: move label name and id to label contructor 2019-05-22 12:06:24 +02:00