209 Commits

Author SHA1 Message Date
3435e33845 Fix: style: show active workspace on hyprland
The `hyprland/workspaces` module has the CSS class
`active` rather than `focused` for the current workspace.

Update the default CSS selector for the current workspace
to match both `button.focused` and `button.active`.
2025-09-13 08:40:30 +09:00
d8218a301d Merge pull request #4095 from Fengerros/patch-1
Update mediaplayer.py - Fix artist name display in mediaplayer.py
2025-06-22 08:26:37 +01:00
d53135f834 Fix Description= in systemd service file
Description= should be a noun phrase, and not a full sentence, according
to man 5 systemd.unit.

In particular, using a dot at the end result in messages like this in
journalctl when running as a user service (not the superfluous dot at
the end):

May 31 16:03:38 framework systemd[1180]: Started Highly customizable Wayland bar for Sway and Wlroots based compositors..
May 31 16:20:39 framework systemd[1180]: Stopping Highly customizable Wayland bar for Sway and Wlroots based compositors....
May 31 16:20:39 framework systemd[1180]: Stopped Highly customizable Wayland bar for Sway and Wlroots based compositors..
2025-05-31 23:07:26 +02:00
9bf8c8277a Update mediaplayer.py - Fix artist name display in mediaplayer.py
Fixed an issue where artist names like Earth, Wind & Fire were not displayed correctly. The change ensures that artist names containing commas or special characters are now shown properly.
2025-05-03 15:52:05 +02:00
b98e717433 Merge pull request #3941 from ChaosInfinited/features/systray-custom-icons
Features/systray custom icons
2025-03-28 09:46:22 +01:00
906170400e cffi: always return config values as JSON
Previously, string JSON values were special cased to be provided as
bare strings, which means that CFFI modules have to either know what
type each value is expected to be, or use a heuristic such as trying to
decode and then treating the value as a string on failure.

Instead, we can always return JSON, and let the downstream consumer
handle deserialising the value into whatever type is expected.

The new behaviour is gated on a new ABI version 2: modules built against
version 1 will continue to get the old behaviour.
2025-03-05 17:11:26 -08:00
ddf5b3e07b add tray icons docs 2025-02-16 14:30:08 +01:00
de170fa579 Update documentation 2024-09-17 02:56:38 +02:00
ca3877d0b8 Merge pull request #3325 from williamwith4ms/escape_&_in_mediaplayer.py
fix: display titles with '&' correctly
2024-07-02 22:34:10 +02:00
02eaa8b46e escape & in mediaplayer 2024-06-03 19:46:55 +01:00
f3ed5ca5af 🌱 update default config with a menu example 2024-05-28 18:18:51 +02:00
231d6972d7 fix: custom module mediaplayer doesn't respect argument (#3198)
fix custom module mediaplayer which doesn't consider  --exclude argument on player appear
2024-05-03 08:47:41 +02:00
6c1125c1fe feat(#2989): (optional) hover for all modules 2024-04-19 19:16:39 +02:00
380607583e Merge pull request #2971 from picnoir/pic/power-profiles-daemon
Introduce a power-profiles-daemon module
2024-03-04 14:25:16 +01:00
5578c122ab modules/power-profiles-daemon: kebab case name in config
power_profiles_daemon => power-profiles-daemon
2024-03-02 18:44:25 +01:00
5ba7c9eb60 modules/power-profiles-daemon: add some right padding
The icon is not really centered in the box. This is likely coming from
a bogus glyph width calculation. It's not a big deal, but that's not
really pleasant aesthetically-wise.

Adding a bit of right padding makes it much more pleasant to watch. It
does not really disrupt a wider display form, like one that
explicitely writes the active profile.
2024-03-02 18:20:46 +01:00
61fed6a214 modules/power_profiles_daemon: add custom format from config
We move to a single icon label format to save space on the bar. We
still display the profile name and the driver in the tooltip.
2024-03-01 11:18:24 +01:00
c03fa38974 fix(mpd): use default interval in the example config
2 seconds is 2.5 times more often than the default for the module.
2024-03-01 00:53:12 -08:00
c38d05b04f Introduce power-profiles-daemon module
We introduce a module in charge to display and toggle on click the
power profiles via power-profiles-daemon.

https://gitlab.freedesktop.org/upower/power-profiles-daemon

This daemon is pretty widespread. It's the component used by Gnome and
KDE to manage the power profiles. The power management daemon is a
pretty important software component for laptops and other
battery-powered devices.

We're using the daemon DBus interface to:

- Fetch the available power profiles.
- Track the active power profile.
- Change the active power profile.

The original author recently gave up maintenance on the project. The
Upower group took over the maintenance burden… …and created a new
DBus name for the project. The old name is still advertised for now.
We use the old name for compatibility sake: most distributions did not
release 0.20, which introduces this new DBus name. We'll likely revisit
this in the future and point to the new bus name. See the inline
comment for more details.

Given how widespread this daemon is, I activated the module in the
default configuration.
2024-02-26 14:44:14 +01:00
43aabf046c chore: rename config to config.jsonc
Only changes the name of the default config we install and does not
affect the lookup logic in any way.

Man pages were already fixed in #2744
2024-02-25 12:00:53 -08:00
2108959644 chore(config): add modeline for Emacs json-mode
json-mode supports jsonc format since 1.8.0, but does not register
.jsonc as a file extension.
2024-02-25 11:21:58 -08:00
05fbbc1c43 style: align 'sway/mode' text with other modules
Use `box-shadow` instead of borders for consistent vertical alignment.
See 77c7e10 for a similar conversion of other modules.
2024-02-24 18:26:02 -08:00
2540c07f1d chore: wrap module lists in the config
"modules-right" has gotten too long, and it's easier to compare configs
that way.
2024-02-24 18:24:39 -08:00
3d31e9a22a mediaplayer: add exclude player option 2024-02-23 18:41:45 +01:00
90c2415b64 Battery estimate is no longer accessible in the "Full" state on default config 2024-02-08 15:10:21 +00:00
7e76369ec8 Using steps() in animation 2024-01-25 14:00:21 +05:30
f5370fcff5 Merge pull request #2573 from CromFr/cabi_plugins
C ABI plugin system
2023-12-18 14:10:02 +01:00
6050fa3a43 Added documentation 2023-11-04 15:16:13 +01:00
ace319b515 Updated default CSS to include the privacy module 2023-10-26 23:44:04 +02:00
f7224d8459 Initial implementation 2023-10-26 23:22:02 +02:00
02c64f3f1e Moved all waybar info into a single struct 2023-10-24 20:16:50 +02:00
d86059016e Send update dispatcher though FFI 2023-10-24 20:16:50 +02:00
088ca6b963 Added cffi/* module for third-party advanced modules 2023-10-24 20:16:50 +02:00
6dc33fe88f Mediaplayer improvements 2023-07-23 13:55:25 +02:00
a67e692d4a sway: warp-on-scroll toggle 2023-06-07 15:49:11 +02:00
c2f98d07ef feat: wireplumber support
Adds basic support for showing volume via wireplumber. Allows specifying
the node-id or falling back to the default Audio/Sink node id if node-id
is not set. If tooltip on hover is enabled, will show `{node_name}` by
default otherwise `tooltip-format`.

Format replacements:

`{volume}` - Volume in percentage
`{node_name}` - The node's nickname (`node.nick` property)
2022-11-16 23:23:07 -08:00
05dbfe261a style: Revert set default minimal width of buttons to zero #1737 2022-10-20 10:34:20 +02:00
c18c6b080a Set default minimal width of buttons to zero
Even if all margins, padding and borders of buttons are removed the
label inside the buttons may still be padded if they are too short.
Setting the minimal width of buttons to zero fixes this issue.
2022-10-19 14:48:56 +02:00
93807b0b3e resources: Remove border effect on hover
Moves the ``border = none;`` attribute from workspace buttons to the
global scope. The hover effects on all buttons are now consistent in the
default stylesheet.
2022-10-18 11:25:20 +02:00
7746328daa Merge pull request #1667 from asas1asas200/zeng-feat-sway_scratchpad 2022-10-18 09:00:31 +02:00
0012bcbd74 resources: Set button hover effects globally
Since now modules as well as workspaces are buttons, the fix for
the 'strange hover effects' has to be applied on a global level.
In return there is a nice hover effect also on the modules.
2022-10-12 10:25:30 +02:00
d2ff116c92 feat(sway/scratchpad): add some configs
Add some configs for displaying.
Remove draft codes.
2022-08-31 16:27:25 +08:00
25536f70a4 use moon phases for backlight format-icons 2022-03-12 16:05:06 +02:00
adc67b6f75 style.css: add fontawesome to beginning of font list
If there is some other font installed that 1) matches the four existing
font families and 2) provides its own glyph in the private use area used
by Awesome, then that font's glyph will be used instead of the intended
icon.

For example, the following character (U+F001, "music"): 
...looks like a pair of musical notes in fontawesome, but DejaVu Sans
also provides a glyph, which looks like a couple of squares. DejaVu Sans
matches first when "sans-serif" is requested, so its (unrelated) glyph
is used.
2022-03-03 18:18:21 +01:00
5c574975b7 resources: don't break tray icon checkboxes via CSS
These three lines break checkboxes and other forms of UI in status
indicator dropdowns. For instance, they break checkboxes on
NetworkManager's "nm-applet --indicator" via libappindicator-gtk3.

First, disabling borders completely hides those UI elements,
as they seem to render entirely via borders.
Second, min-height makes checkboxes just flat lines.

When removed entirely, the border settings seem to have had an effect on
the workspaces widget, which now renders with round underline borders.
To undo that, re-add those two lines inside its section.

The min-height setting doesn't seem to affect anything that I can see.
Remove it entirely, for now.

Fixes #1148.
2022-01-09 10:32:16 +00:00
d5112678c3 mediaplayer.py: Exit properly on SIGPIPE 2021-11-27 23:07:26 +01:00
01bfbc4656 Use spacing in config 2021-10-20 11:30:53 +02:00
f18eb71ad7 Fix spelling errors
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-10-02 18:13:17 +02:00
95ecff0551 added example tooltip usage 2021-09-09 20:12:20 +02:00
710f933fa6 Don't start if graphical-session is not running
Currently waybar _can_ try to start even if there's no graphical session (and
no sway) running. Adding `Requisite=` prevents this. From `systemd.unit(5)`:

    Requisite=
       Similar to Requires=. However, if the units listed here are not
       started already, they will not be started and the starting of
       this unit will fail immediately.  Requisite= does not imply an
       ordering dependency, even if both units are started in the same
       transaction. Hence this setting should usually be combined with
       After=, to ensure this unit is not started before the other
       unit.

       When Requisite=b.service is used on a.service, this dependency
       will show as RequisiteOf=a.service in property listing of
       b.service.  RequisiteOf= dependency cannot be specified directly.
2021-07-31 16:56:55 +02:00