Compare commits

..

484 Commits

Author SHA1 Message Date
Alexis Rouillard
2f94435014 Merge pull request #4789 from xander1421/fix/json-type-check-crash
fix(json): use local CharReaderBuilder for thread safety
2026-01-25 21:59:41 +01:00
xander1421
1639dec7d8 fix(json): use local CharReaderBuilder for thread safety 2026-01-24 23:40:07 +02:00
Alexis Rouillard
b4854f96a3 Merge pull request #4766 from zjeffer/fix/zjeffer/persistent-special-workspaces
hyprland/workspaces: don't show persistent special workspaces if show-special is disabled
2026-01-14 18:27:30 +01:00
zjeffer
8f5fc990a5 hyprland/workspaces: don't show persistent special workspaces if show-special is disabled 2026-01-10 13:29:40 +01:00
Alexis Rouillard
a02180a815 Merge pull request #4739 from LorenzBischof/man-reverse-mouse-scrolling
docs: add missing reverse-mouse-scrolling to pulseaudio module man page
2026-01-09 20:02:15 +01:00
Alexis Rouillard
af7eebba5e Merge pull request #4745 from cartok/docs/arch-update-readme
docs(arch): install build deps as deps to keep system clean
2026-01-09 20:01:17 +01:00
Alexis Rouillard
479ea9f3e8 Merge pull request #4746 from cartok/chore/maintainance
chore: update .gitingore
2026-01-09 20:01:02 +01:00
Alexis Rouillard
f990486a40 Merge pull request #4748 from Alexays/update_flake_lock_action
flake.lock: Update
2026-01-09 20:00:50 +01:00
github-actions[bot]
d0f5fab52b flake.lock: Update
Flake lock file updates:

• Updated input 'flake-compat':
    'github:edolstra/flake-compat/f387cd2afec9419c8ee37694406ca490c3f34ee5?narHash=sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4%3D' (2025-10-27)
  → 'github:edolstra/flake-compat/5edf11c44bc78a0d334f6334cdaf7d60d732daab?narHash=sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns%3D' (2025-12-29)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2fad6eac6077f03fe109c4d4eb171cf96791faa4?narHash=sha256-sKoIWfnijJ0%2B9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI%3D' (2025-11-27)
  → 'github:NixOS/nixpkgs/c0b0e0fddf73fd517c3471e546c0df87a42d53f4?narHash=sha256-coBu0ONtFzlwwVBzmjacUQwj3G%2BlybcZ1oeNSQkgC0M%3D' (2025-12-28)
2026-01-01 00:14:44 +00:00
Dennis Weiershaeuser
a05e6c6f74 chore: update .gitingore 2025-12-31 18:18:04 +01:00
Dennis Weiershaeuser
99867005a0 docs(arch): install build deps as deps to keep system clean 2025-12-31 13:43:21 +01:00
LorenzBischof
959f41ca9c docs: add missing reverse-mouse-scrolling to pulseaudio module man page 2025-12-30 12:30:30 +01:00
Alexis Rouillard
06484547d1 Merge pull request #4677 from mliszcz/remove-window-format
fix(sway/workspaces): window-rewrite: do not check for window-format
2025-12-28 23:12:44 +01:00
Alexis Rouillard
46a6f60138 Merge pull request #4728 from xav-ie/fix-cava-config
fix-cava-config
2025-12-28 23:11:05 +01:00
Alexis Rouillard
83a6998fcb Merge pull request #4708 from khaneliman/cava
nix: bump cava again
2025-12-28 21:50:21 +01:00
Alexis Rouillard
386036a67a Merge pull request #4710 from LukashonakV/cavaMan
cava man
2025-12-28 21:50:04 +01:00
Xavier Ruiz
e3186abdce fix(cava): handle all output methods in frontend
Default to raw Cava module for non-GLSL output methods.
Fixes "Unknown module" error when no cava_config is specified.
2025-12-27 14:52:28 -05:00
Viktar Lukashonak
c8c3287be3 cava man 2025-12-20 15:35:20 +03:00
Austin Horstman
601b5f0241 nix: bump cava again
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-12-18 23:47:01 -06:00
Alexis Rouillard
97eb60677e Merge pull request #4616 from schmop/battery-plugging-instant-updates
2. Try: Make battery module update on plugging/unplugging again (refs #2519)
2025-12-18 19:11:18 +01:00
Alexis Rouillard
3d0b942956 Merge pull request #4689 from ospafford/feat-dwl_tag_state
feat(dwl/tags): add empty tag option
2025-12-18 19:09:39 +01:00
Alexis Rouillard
c3d29b1185 Merge branch 'master' into battery-plugging-instant-updates 2025-12-18 19:04:31 +01:00
Alexis Rouillard
c6844781ea Merge pull request #4671 from touero/dev
Fix example error about update moudle by signal in man page
2025-12-18 19:03:11 +01:00
Alexis Rouillard
c1218fa889 Merge pull request #4646 from gszy/swap-abused
modules: memory: fix fully utilized swap percentage calculation
2025-12-18 19:02:47 +01:00
Alexis Rouillard
11c4e55376 Merge pull request #4591 from rrrnld/fix/multiple-batteries
Improve multiple battery support
2025-12-18 19:02:31 +01:00
Alexis Rouillard
6b05d73a64 Merge pull request #4589 from cebem1nt/master
fix: crash on group scrolling #4510
2025-12-18 19:01:15 +01:00
Alexis Rouillard
374ccbb878 Merge pull request #4705 from rwwiv/fix/duplicate-layers-on-monitor-hotplug
fix: prevent duplicate layer surfaces on monitor hotplug
2025-12-18 19:00:48 +01:00
Alexis Rouillard
d012de3cde Merge pull request #4682 from LukashonakV/cavaGLSL
Cava GLSL
2025-12-18 18:59:27 +01:00
Alexis Rouillard
7ecad3229d Merge pull request #4650 from BartiX259/master
fix(docs): pulseaudio man page example
2025-12-18 18:59:01 +01:00
Alexis Rouillard
278e8822ff Merge pull request #4686 from marvelpokemaster/fix-wireplumber-init-order
fix(wireplumber): reorder initializer list to match header and fix -Wreorder
2025-12-18 18:58:10 +01:00
Alexis Rouillard
a23cef457f Merge pull request #4615 from Alexays/update_flake_lock_action
flake.lock: Update
2025-12-18 18:57:57 +01:00
Will Wernert
a9ef11a2b3 fix: prevent duplicate layer surfaces on monitor hotplug
The monitor signal handlers (signal_monitor_added, signal_monitor_removed)
were never disconnected during SIGUSR2 reload. Each reload accumulated
additional handlers, causing multiple layer surfaces to be created when
monitors were hotplugged.

This fix:
- Stores signal connections as class members
- Disconnects them before reconnecting in bindInterfaces()
- Clears stale outputs_ on reload
2025-12-17 22:17:35 -05:00
Owen Spafford
07cb2c02d2 feat(dwl/tags): add empty tag option
Added option in the `dwl/tags` to theme empty tags (i.e. tags without any clients) in `style.css` using
`#tags button.empty`.

Signed-off-by: ospafford <ospafford@gmail.com>
2025-12-09 07:28:18 -08:00
Viktar Lukashonak
e03119fe94 Factory. cava_frontend 2025-12-09 18:13:45 +03:00
marvelpokemaster
5ee3bd5325 fix(wireplumber): reorder initializer list to match header and fix -Wreorder warnings 2025-12-08 01:44:19 +05:30
Viktar Lukashonak
3773021546 cavaGLSL 2025-12-07 23:08:55 +03:00
Viktar Lukashonak
52f4db1154 Moving GTK dispatcher into frontend 2025-12-05 10:04:52 +03:00
mliszcz
e362550e27 fix(sway/workspaces): window-rewrite: do not check for window-format
Remove check for unused window-format option.

Fixes #3797.
2025-12-02 17:19:44 +01:00
github-actions[bot]
cb0ee665a3 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-compat':
    'github:edolstra/flake-compat/9100a0f413b0c601e0533d1d94ffd501ce2e7885?narHash=sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX%2BfjA8Xf8PUmqCY%3D' (2025-05-12)
  → 'github:edolstra/flake-compat/f387cd2afec9419c8ee37694406ca490c3f34ee5?narHash=sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4%3D' (2025-10-27)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5e2a59a5b1a82f89f2c7e598302a9cacebb72a67?narHash=sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs%3D' (2025-10-19)
  → 'github:NixOS/nixpkgs/2fad6eac6077f03fe109c4d4eb171cf96791faa4?narHash=sha256-sKoIWfnijJ0%2B9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI%3D' (2025-11-27)
2025-12-01 00:15:02 +00:00
touero
e189649c33 docs(custom): fix example error about update moudle by signal 2025-11-29 17:29:52 +08:00
Viktar Lukashonak
13519ca5bf cava. nonsafe thread.= & cava bump 2025-11-26 13:26:32 +03:00
BartiX259
097c00c7bd fix(docs): pulseaudio man page example
The example configuration in the man page used 'headphones' and 'handsfree' as keys for format-icons. The correct keys are 'headphone' and 'hands-free'.
2025-11-22 20:09:34 +01:00
Grzegorz Szymaszek
73808dfacc modules: memory: fix fully utilized swap percentage calculation
Do calculate used swap percentage even if swapfree is 0, otherwise
reported used_swap_percentage would be 0, even though it should be 100.

Signed-off-by: Grzegorz Szymaszek <gszymaszek@short.pl>
2025-11-18 11:50:04 +01:00
schmop
ce1da5a178 Make udev_deleter not linux-only and fix freebsd build 2025-11-01 10:57:18 +01:00
schmop
4e25871655 Reapply "Make battery module update on plugging/unplugging again (refs #2519)"
This reverts commit bb2c67ebad.
2025-10-31 13:43:36 +01:00
arne
ca62481dc9 fix: default weighted average to true 2025-10-26 06:44:53 +01:00
arne
b701d7f70b docs: add information about weighted-average config option 2025-10-26 06:34:04 +01:00
cebem1nt
68cbb507d9 fixing crash on group scrolling 2025-10-24 21:57:58 -03:00
Alexis Rouillard
161367d961 Merge pull request #4579 from khaneliman/freebsd
fix(clock): fix freebsd compatibility
2025-10-23 09:36:19 +02:00
Alexis Rouillard
a62455e1b9 Merge pull request #4578 from khaneliman/fmt
fix(subprojects): fmt hash mismatch
2025-10-23 09:35:49 +02:00
Alexis Rouillard
588c344c8a Merge pull request #4577 from khaneliman/cava
fix(nix): bump cava and fix nix build
2025-10-23 09:35:39 +02:00
Austin Horstman
bf0ccfd90c fix(clock): fix freebsd compatibility
Recently introduced for ISO 8601 calendar compatibility. But, lib
differences causing the explicit type to break freebsd.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-10-21 23:07:04 -05:00
Austin Horstman
8b0a82ad34 fix(subprojects): fmt hash mismatch
Failing ci for multiple runners

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-10-21 22:56:33 -05:00
Austin Horstman
37ac2daac8 flake.lock: update
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-10-21 22:08:57 -05:00
Austin Horstman
97682a1332 nix: bump cava
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-10-21 22:08:57 -05:00
Austin Horstman
4beb7ddac7 nix: remove useless parens
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-10-19 17:35:07 -05:00
Alexis Rouillard
84ec25bbeb Merge pull request #4551 from LukashonakV/cavaBump
cava bump & fixing memory leaks
2025-10-19 13:38:58 +02:00
Alexis Rouillard
b475399a22 Merge pull request #4541 from aanderse/master
backlight: gracefully handle a null epoll device
2025-10-19 13:38:39 +02:00
Alexis Rouillard
15a503ae21 Merge pull request #4546 from kosa12/fix/fmt-version
fix: FMT version update from 11.0.2 to 12.0.0
2025-10-19 13:38:15 +02:00
Alexis Rouillard
46d3e80bce Merge pull request #4559 from carljustineoyales/chore/update-pulseaudio-slider-module
fix(pulseaudio-slider): Use `background` in CSS example
2025-10-19 13:38:03 +02:00
Alexis Rouillard
9221508e51 Merge pull request #4560 from NicolasBuchin/fix-css-memory-leak
fix: resolve memory leak by removing old CSS provider before reloading CSS styles
2025-10-19 13:37:48 +02:00
NicolasBuchin
9d37dedb57 fix: resolve memory leak by removing old CSS provider before reloading styles 2025-10-16 10:04:12 +02:00
carljustineoyales
6021261383 fix(pulseaudio-slider): Use background in CSS example
The `background-color` property does not work as expected for the slider. Using the `background` shorthand property correctly applies the color.
2025-10-15 20:47:35 +08:00
Viktar Lukashonak
966da11f3b cava bump & fixing memory leaks 2025-10-12 14:53:49 +03:00
Kosa Matyas
7add8b2726 fix: FMT version update from 11.0.2 to 12.0.0 2025-10-10 19:40:43 +03:00
Aaron Andersen
bef35e48fe backlight: gracefully handle a null epoll device 2025-10-09 20:52:51 -04:00
Alex
559079e9a6 fix: lint 2025-10-05 10:56:24 +02:00
Alexis Rouillard
0c41cf47c2 Merge pull request #4359 from zjeffer/fix/zjeffer/thread-sanitizer-warning
Fix Hyprland IPC thread sanitizer warning, other IPC & general fixes
2025-10-05 10:56:02 +02:00
Alexis Rouillard
a16d53b30d Merge branch 'master' into fix/zjeffer/thread-sanitizer-warning 2025-10-05 10:51:47 +02:00
Alex
151cf54532 fix: lint 2025-10-05 09:58:34 +02:00
Alexis Rouillard
b3f1d02b16 Merge pull request #4516 from DreamMaoMao/fix-ext-ws
fix: right and middle button not work in ext/workspace module
2025-10-05 09:57:50 +02:00
Alexis Rouillard
bea012d06d Merge pull request #4518 from DreamMaoMao/fix-network
fix: Correct the error in converting network speed units
2025-10-05 09:57:29 +02:00
Alexis Rouillard
197ee78080 Merge pull request #4525 from lairez/makepkg
Fixes #4521 and #4522
2025-10-05 09:57:06 +02:00
Pierre Lairez
d8e2392410 Fixes #4521 and #4522
The problem is commit 2b552f7 which introduces a minimum interval time
of 1ms. But then, in modules/custom.cpp, the constructor tests if the
interval is nonzero to distinguish continuous workers from delay workers.
2025-10-03 11:24:18 +02:00
DreamMaoMao
801319f024 fix: Correct the error in converting network speed units 2025-10-02 08:55:40 +08:00
DreamMaoMao
6f308d8ea1 fix: right and middle button not work in ext/workspace module 2025-10-01 22:30:23 +08:00
Alexis Rouillard
18a9835b7c Merge pull request #4246 from edeustua/master
feat: Add ISO 8601 calendar to clock module
2025-10-01 14:29:37 +02:00
Alexis Rouillard
632af16b19 Merge pull request #4448 from winkelnp/gamemode-icon
Fix: styling: set gamemode icon size and spacing to 0 if use-icon is false
2025-10-01 14:28:30 +02:00
Alexis Rouillard
9acf032c0c Merge pull request #4458 from kolayne/patch-1
Fix: style: show active workspace on hyprland
2025-10-01 14:28:02 +02:00
Alexis Rouillard
9dd75d4f6b Merge pull request #4507 from workflow/niri-language-add-css-classes
feat(niri/language): add CSS classes
2025-10-01 14:27:35 +02:00
Alexis Rouillard
4f16ec16f9 Merge pull request #4395 from pol-rivero/workspace-taskbar-improvements
[hyprland/workspaces] Taskbar improvements
2025-10-01 14:27:13 +02:00
Alexis Rouillard
b4c80cfb56 Merge pull request #4387 from seschwar/include-xdg-data-home
fix: display icons for userwide installed applications
2025-10-01 14:26:39 +02:00
Alexis Rouillard
e00db5886e Merge pull request #4372 from rellimn/fix-menu-hover
Fix module and tray item staying in hover state after opening menu
2025-10-01 14:25:23 +02:00
Alexis Rouillard
a613cd54b0 Merge pull request #4371 from khaneliman/nixfmt
fix(flake): fix formatter configuration
2025-10-01 14:24:23 +02:00
Alexis Rouillard
5c01ad75f1 Merge pull request #4358 from labruzese/master
Moved workspace id failing to parse from an error to part of the trace
2025-10-01 14:23:59 +02:00
Alexis Rouillard
3cc5943c08 Merge pull request #4373 from Arkoniak/4354-wildcard-config-regression
bugfix: expanding wildcards in config includes (#4354)
2025-10-01 14:23:31 +02:00
Alexis Rouillard
c7a77f2c08 Merge pull request #4390 from aidansunbury/master
Support millisecond precision for script intervals
2025-10-01 14:22:17 +02:00
Alexis Rouillard
a15565ac48 Merge pull request #4408 from lfos/fix-hyprland-ipc-destructor
Prevent child zombie process from tearing down Hyprland IPC
2025-10-01 14:21:17 +02:00
Alexis Rouillard
23220eb541 Merge pull request #4410 from lfos/fix-clock-asan-use-after-scope
clock: fix use after scope
2025-10-01 14:20:34 +02:00
Alexis Rouillard
32d4cf4c7b Merge pull request #4414 from PedroManse/master
docs: fix waybar menu example and formatting
2025-10-01 14:20:07 +02:00
Alexis Rouillard
f29e843d6e Merge pull request #4428 from Alexays/update_flake_lock_action
flake.lock: Update
2025-10-01 14:19:50 +02:00
Alexis Rouillard
97f1e54b70 Merge pull request #4447 from guttermonk/clock-fix
Clock Module: Independent clock tooltip formatting and fix for blank line at the end of the timezone list
2025-10-01 14:18:28 +02:00
Alexis Rouillard
6824a76595 Merge pull request #4380 from khaneliman/test-tweak
feat(makefile): support more detailed test output
2025-10-01 14:18:01 +02:00
Alexis Rouillard
0f1d31147a Merge pull request #4457 from dmyTRUEk/fix-4455
fix(temperature): critical style not being removed
2025-10-01 14:17:14 +02:00
Alexis Rouillard
d3b094503e Merge pull request #4493 from LukashonakV/cava_backend
Cava backend. Comminication using signals
2025-10-01 14:16:51 +02:00
Alexis Rouillard
fbec045492 Merge pull request #4437 from jp7677/ext-workspaces-remove-dirty-tracking
ext/workspaces: fix appearing of hidden workspaces
2025-10-01 14:16:03 +02:00
Alexis Rouillard
c31d15045a Merge pull request #4452 from dmyTRUEk/master
docs(temperature): add missed `warning` style
2025-10-01 14:15:10 +02:00
Alexis Rouillard
8bb19a9505 Merge pull request #4474 from LordMZTE/river-vacant-startup
fix(river): hide vacant tags on initial startup
2025-10-01 14:14:54 +02:00
Alexis Rouillard
08b36955de Merge pull request #4488 from RQuarx/patch-1
fix: changed *waybar-styles(5)" to *waybar-styles(5)* in the last line
2025-10-01 14:13:54 +02:00
Alexis Rouillard
6978193c6a Merge pull request #4485 from coleleavitt/master
fix: handle null GDK window reference in surface initialization
2025-10-01 14:13:33 +02:00
Alexis Rouillard
7092244402 Merge pull request #4495 from stefonarch/patch-2
Fix example in waybar-niri-language.5.scd
2025-10-01 14:12:53 +02:00
Alexis Rouillard
8013556d2b Merge pull request #4476 from notpeelz/fix-sni-item-menu-destroy
fix: close sni menu on item destruction
2025-10-01 14:12:35 +02:00
Pol Rivero
5f1db15c2e Workspaces containing only ignored windows should be considered empty
This fixes #4479
2025-10-01 08:06:11 +02:00
github-actions[bot]
db2dfb6f3c flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/dc9637876d0dcc8c9e5e22986b857632effeb727?narHash=sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM%3D' (2025-07-28)
  → 'github:NixOS/nixpkgs/e9f00bd893984bc8ce46c895c3bf7cac95331127?narHash=sha256-0m27AKv6ka%2Bq270dw48KflE0LwQYrO7Fm4/2//KCVWg%3D' (2025-09-28)
2025-10-01 00:13:30 +00:00
workflow
862ba2f568 feat(niri/language): add CSS classes 2025-09-29 17:43:23 +03:00
Viktar Lukashonak
76d3b47ffd Cava back/front end transformation 2025-09-26 23:34:11 +03:00
Viktar Lukashonak
cbab9c9713 spdlog bump 2025-09-25 21:46:13 +03:00
Standreas
cbd8930e22 Fix example in waybar-niri-language.5.scd 2025-09-23 16:32:45 +02:00
Jens Peters
b08d0c21f3 ext/workspaces: add deactivate action 2025-09-20 14:11:46 +02:00
RQuarx
9e3a9f7d35 fix: changed *waybar-styles(5)" to *waybar-styles(5)* in the last line 2025-09-20 15:05:16 +07:00
Cole Leavitt
45cfaf4a0b fix: validate 'swap-icon-label' configuration type and log warnings 2025-09-17 21:20:43 -07:00
Cole Leavitt
4a5358e8c5 fix: handle null GDK window reference in surface initialization 2025-09-17 21:17:26 -07:00
peelz
0c3e82219f fix: close sni menu on item destruction 2025-09-16 14:03:45 -04:00
LordMZTE
fd601801b4 fix(river): hide vacant tags on initial startup
Before this, vacant tags would show with `hide-vacant` set on initial
startup, because we receive initial tag events from River before we show
the bar. In that case, we won't call `set_visible(false)` on the
respective buttons because they're not shown yet. This registers the
output status listener after we show the bar so we won't miss any
events.
2025-09-16 16:04:25 +02:00
winkelnp
e87ece4462 set gamemode icon size and spacing to 0 if use-icon is false 2025-09-15 22:03:23 +02:00
Nikolai Nechaev
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
dmyTRUEk
09a07cd429 fix(temperature): critical style not being removed (#4455) 2025-09-12 20:00:43 +03:00
dmyTRUEk
e8a2e6c66f docs(temperature): add missed warning style 2025-09-10 13:21:04 +03:00
guttermonk
d45ce841e3 Keep the local timezone from being in the tooltip. 2025-09-06 08:40:09 -05:00
guttermonk
97fa6aa4dd Added option to show timezones in tooltip only and removed the extra
blank line at the bottom of the timezone list.
2025-09-05 21:01:23 -05:00
Jens Peters
af9c31ccd3 ext/workspaces: fix appearing of hidden workspaces
Do this by removing the needs-update tracking. The gain
was questionable to begin with and turns out it  doesn't
work correctly with multiple outputs.
2025-09-03 06:53:21 +02:00
Manse
19468d4365 docs: fix waybar menu example and formatting
fix example's hibernate id typo
fix xml and json formatting
2025-08-25 10:50:51 -03:00
zjeffer
9720d80524 add asan.supp 2025-08-23 18:25:45 +02:00
Lukas Fleischer
8e488b4d5e clock: fix use after scope
Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
2025-08-23 00:25:50 -04:00
Lukas Fleischer
5a29473080 Prevent child zombie process from tearing down Hyprland IPC
In rare circumstances, we may fork(), e.g., as part of a custom module,
and the child process may fail to exec() and exit. In those cases, the
IPC destructor will be called in the child process.

Prior to this commit, this call would then result in the shared socket
being closed. Prevent this by only closing the socket from the original
process.

Fixes #3975 and #4152.

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
2025-08-22 18:58:53 -04:00
zjeffer
3c3164eb8e Fix warning if swap-icon-label is not defined in config 2025-08-19 23:56:10 +02:00
zjeffer
556c5f5a30 Add tsan.supp file to easily ignore common tsan issues from external libraries 2025-08-19 23:56:08 +02:00
Pol Rivero
45d01ce6e5 Implement "active-window-position" 2025-08-18 21:23:36 +02:00
Pol Rivero
691b7d427b Implement "reverse-direction" 2025-08-18 20:49:14 +02:00
Aidan Sunbury
5a87a9d60a Merge pull request #1 from aidansunbury/AS-millisecond-intervals 2025-08-16 16:02:43 -07:00
aidansunbury
2b81782fa9 more changes 2025-08-16 16:01:41 -07:00
aidansunbury
2b552f7fb6 compat 2025-08-16 15:34:43 -07:00
aidansunbury
6dc5a73a02 initial changes 2025-08-16 15:29:59 -07:00
Sebastian Schwarz
e8755b1a7f fix: display icons for userwide installed applications
Previously Waybar only displayed icons for applications which were
installed systemwide.  Icons were resolved via `.desktop` files in
directories specified by the environment variable `XDG_DATA_DIRS`.
However the [XDG specification](https://specifications.freedesktop.org/basedir-spec/0.8/#variables)
notes that this variable should only consulted **in addition** to
`XDG_DATA_HOME`:

> `$XDG_DATA_DIRS` defines the preference-ordered set of base
> directories to search for data files in addition to the
> `$XDG_DATA_HOME` base directory.

This because `XDG_DATA_DIRS` contains only systemwide directories,
whereas `XDG_DATA_HOME` contains the userwide directory.  Also
including the latter when looking up `.desktop` files allows Waybar to
display icons for applications which where installed userwide.
2025-08-16 14:14:59 +02:00
Austin Horstman
25ac6b7a80 refactor(makefile): allow build on test command
meson will skip building, if not needed, but we want to make sure we're
actually testing what we expect.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-08-13 14:09:01 -05:00
Austin Horstman
8fe76317fb feat(makefile): support more detailed test output
Add a command to show a prettier test output so you can see what's going
on easier.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-08-13 14:09:01 -05:00
Arkoniak
691e66a7fd tests: additional tests for bugfix (#4354) 2025-08-13 10:30:25 +03:00
Arkoniak
5ac28f3947 bugfix: expanding wildcards in config includes (#4354) 2025-08-12 22:31:59 +03:00
rellimn
089b9a20fc Fix module and tray item staying in hover state after opening menu
Fixes #3980
2025-08-12 20:51:35 +02:00
Austin Horstman
d09a4072e5 chore(flake): nixfmt-rfc-style -> nixfmt
Marked stable and uses new name after replacing classic.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-08-12 13:28:07 -05:00
Austin Horstman
a0c21318f9 chore(format): run treefmt
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-08-12 13:26:02 -05:00
Austin Horstman
be48f6bff2 fix(flake): fix formatter configuration
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-08-12 13:25:50 -05:00
zjeffer
5079884b78 Hyprland IPC improvements, fix tsan warning, WindowCount shouldn't create a separate IPC 2025-08-12 19:39:36 +02:00
Pol Rivero
83f16a2092 Document newer config options of workspace-taskbar
Adds some configs that were only documented in the GitHub wiki to the manpage.
2025-08-12 16:43:31 +02:00
Skylar Abruzese
64b64d0316 Moved workspace id failing to parse from an error to part of the trace.
With named persistent workspaces it is expected behavior that they have
no id since their workspace may not have been created by hyprland yet.
2025-08-09 18:33:35 -04:00
Alex
41de8964f1 chore: 0.14.0 2025-08-08 09:15:22 +02:00
Alex
7e0cbf4a1f fix: lint 2025-08-08 08:59:10 +02:00
Alexis Rouillard
b3fbe1b5ed Merge pull request #4319 from M0streng0/master
wireplumber & backlight: fix states and support for microphone
2025-08-08 08:56:07 +02:00
Alexis Rouillard
477f30705c Merge pull request #4208 from markx86/feat/battery-events
battery: Add support for battery level related events
2025-08-08 08:54:32 +02:00
Alexis Rouillard
07d3a4da10 Merge pull request #4333 from Arkoniak/relative_paths_in_includes
Relative paths in included configs
2025-08-08 08:53:55 +02:00
Alexis Rouillard
61b3c6d7d1 Merge pull request #3929 from xb-bx/master
sway/workspaces: Implement reverse-scroll
2025-08-08 08:45:42 +02:00
Alexis Rouillard
c63e332fb2 Merge pull request #4278 from rwsalie/master
add openbsd support
2025-08-08 08:43:52 +02:00
Alex
79c30e77a7 fix: lint 2025-08-08 08:42:17 +02:00
Alexis Rouillard
b0983e9c37 Merge pull request #3833 from Bahnschrift/master 2025-08-08 08:26:21 +02:00
Alexis Rouillard
3dce0956ec Merge pull request #3930 from Invertisment/master 2025-08-08 08:24:58 +02:00
Alexis Rouillard
9a545e75e4 Merge pull request #4080 from proycon/river-layout-class 2025-08-08 08:23:12 +02:00
Alexis Rouillard
7cfa708b1a Merge pull request #4326 from notpeelz/feat-network-match-altnames 2025-08-08 08:21:33 +02:00
Alexis Rouillard
f1b7d829c2 Merge pull request #4016 from jp7677/ext-workspaces
ext/workspaces: port from wlr/workspaces to ext-workspace-v1 for a.o. labwc support
2025-08-08 08:18:01 +02:00
Alexis Rouillard
6679801a9c Merge pull request #3849 from haansn08/mpd-format-uri
mpd: add uri and filename format arguments
2025-08-07 23:04:02 +02:00
Alexis Rouillard
13a4e5d43d Merge pull request #4337 from Alexays/update_flake_lock_action
flake.lock: Update
2025-08-07 23:02:17 +02:00
Alexis Rouillard
b9a26f51b6 Merge pull request #3868 from pol-rivero/master
[hyprland/workspaces] Implement workspace taskbars
2025-08-07 23:00:22 +02:00
github-actions[bot]
ff69525e29 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/30e2e2857ba47844aa71991daa6ed1fc678bcbb7?narHash=sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM%3D' (2025-06-27)
  → 'github:NixOS/nixpkgs/dc9637876d0dcc8c9e5e22986b857632effeb727?narHash=sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM%3D' (2025-07-28)
2025-08-01 00:14:36 +00:00
Arkoniak
1e0037a873 fixed extra copy 2025-07-31 21:29:20 +03:00
Pol Rivero
5bbace1d43 Merge remote-tracking branch 'upstream/master' 2025-07-29 23:30:44 +02:00
peelz
4c72033309 refactor: why is that line there 2025-07-29 07:52:46 -04:00
peelz
b5093f3e58 feat: match network interfaces by their altnames 2025-07-29 07:52:46 -04:00
Arkoniak
f824ae9334 Relative paths in included configs 2025-07-29 10:45:31 +03:00
Henrique Oliveira
90f2490407 Fix: Backlight same issue with states 2025-07-23 20:26:17 +02:00
Henrique Oliveira
a6ac75983f Add: WirePlumber - format-source support 2025-07-23 16:59:07 +02:00
Henrique Oliveira
7cb1a0e3d6 Add: Wireplumber - support for microphone 2025-07-23 13:19:53 +02:00
Henrique Oliveira
91e57376ef Fix: WirePlumber module - states not working 2025-07-23 12:18:22 +02:00
Alexis Rouillard
0776e694df Merge pull request #4316 from erikeah/master 2025-07-23 08:31:48 +02:00
Erik Alonso
bb190409de fix: unable to disable upower's tooltip 2025-07-22 13:09:33 +01:00
Alexis Rouillard
39d6d80f64 Merge pull request #4315 from notpeelz/style-clang-format 2025-07-21 07:26:58 +02:00
peelz
b4d95b405c style: clang-format 2025-07-20 22:40:29 -04:00
Alexis Rouillard
71b01fe58f Merge pull request #4161 from blackxored/feat/electron-tray-hack
feat: add a way to override electron app tray icons
2025-07-20 18:55:01 +02:00
Alexis Rouillard
2baa93174b Merge pull request #4260 from notpeelz/feat-display-rfkill-setting
feat: add rfkill network setting
2025-07-20 18:54:24 +02:00
Alexis Rouillard
321ed85a67 Merge pull request #4298 from csskevin/docu-arch
adding dependency command for arch
2025-07-20 18:51:57 +02:00
Alexis Rouillard
e526afb963 Merge pull request #4310 from arnaud-ma/remove-persistent-workspace-rules
Fix #4307
2025-07-20 18:51:01 +02:00
arnaud-ma
8dcdd97879 small fixes 2025-07-19 05:01:29 +02:00
arnaud-ma
2dc2b5ccfd fix #4307 2025-07-19 04:50:59 +02:00
arnaud-ma
a4f200cdb5 revert 2025-07-19 04:47:31 +02:00
arnaud-ma
64ed2cd970 fix indentation 2025-07-19 03:23:32 +02:00
arnaud-ma
e45883088d hyprland: Remove redundant workspace rules loading 2025-07-19 03:18:48 +02:00
csskevin
061c561762 adding dependency command for arch 2025-07-15 00:19:55 +02:00
bilaliscarioth
506fd5c597 Merge branch 'Alexays:master' into master 2025-07-14 02:00:51 +02:00
bilaliscarioth
682fc34c1d fix linters for css_reload_helper.cpp 2025-07-13 14:03:09 +02:00
bilaliscarioth
f91889ce1c format SafeSignal.hpp as the linters want 2025-07-13 14:01:59 +02:00
Alexis Rouillard
94777921d9 Merge pull request #4272 from labruzese/master
fix: hyprland named persistent workspaces
2025-07-13 09:07:26 +02:00
Alexis Rouillard
ee9dc6ae05 Merge pull request #4292 from nraffp/4291
respect gtk color scheme variant for gtk css variable
2025-07-13 09:06:25 +02:00
Alexis Rouillard
1cb30e0f85 Merge pull request #4275 from acarl005/master
fix: prevent persistent workspaces from being duplicated if they exist…
2025-07-13 09:05:36 +02:00
Alexis Rouillard
50711bfb87 Merge pull request #4284 from hritix/feature/markup_support_for_tooltip_of_battery_and_pulseaudio
enabled pango markup support for tooltip of battery and pulseaudio modules
2025-07-13 09:04:47 +02:00
Nick Raffaele
19360462ba respect gtk color schema variant for gtk css variable 2025-07-12 09:45:14 -07:00
peelz
73d9c5f560 fix(network): reset is_p2p_ in clearIface 2025-07-10 08:01:20 -04:00
peelz
b85f0c17c3 fix(network): ignore carrier state when the interface is down
I'm not sure why, but my network card (mt7921e) sometimes will report
having a carrier when the interface is down. This usually happens
when rfkill was active before rebooting.
2025-07-10 08:01:20 -04:00
peelz
b02694caef fix(network): initialize all fields
Some fields were previously uninitialized (e.g. carrier), which
could lead to UB.
2025-07-10 08:01:20 -04:00
peelz
2dfbaabf31 fix(network): use atomic_bool to store the rfkill state 2025-07-10 08:01:20 -04:00
peelz
f991af2893 style(network): fix trailing white space 2025-07-10 08:01:20 -04:00
peelz
0e07c7ac5c feat(network): add rfkill setting
This setting makes it possible to have a configuration with two
network modules where one of them displays the ethernet state
(disconnected, linked, ethernet), and the other, the wifi state
(disabled, disconnected, linked, wifi).

Otherwise the ethernet state would show up as "disabled" (instead of
"disconnected") when rfkill is active.
2025-07-10 08:01:20 -04:00
peelz
46a152abc8 fix(network): display as disabled if rfkill and no carrier
We want the "disabled" state even when an interface is selected
explicitly.
2025-07-10 08:01:20 -04:00
hritix
310a473e65 enabled markup support for tooltip of battery and pulseaudio modules 2025-07-09 22:50:03 +05:30
Emiliano Deustua
be819be8bd fix: Revert formatting to clang 2025-07-07 22:10:09 -05:00
bilaliscarioth
d808c00324 avoid useless vars on cpu_frequency, mimic sigrtmin/sigrtmax 2025-07-08 02:21:48 +02:00
bilaliscarioth
0cb605b529 start openbsd ports 2025-07-08 02:13:33 +02:00
Maarten van Gompel
04796988e9 feat(river): set layout name as class
This allows for custom styling for specific river layouts (such as monocle).
2025-07-07 15:13:33 +02:00
xb-bx
4d74bb3004 sway/workspaces: implement reverse-scroll 2025-07-07 14:17:18 +03:00
Andy Carlson
fd67002662 fix: prevent persistent workspaces from being duplicated if they exist under a different name 2025-07-06 23:11:00 -04:00
Pol Rivero
c98cb7095d Merge remote-tracking branch 'upstream/master' 2025-07-06 10:18:59 +02:00
Alexis Rouillard
cae5f9a56f Merge pull request #4274 from tpaau-17DB/master 2025-07-04 21:21:30 +01:00
tpaau-17DB
10c116e54a Change default tooltip for the battery module. 2025-07-04 19:02:10 +02:00
Skylar Abruzese
6d3b93bbf7 fix: added active workspace matching by name as fallback
fixes bug where persistent workspaces would not be marked as active
because their id is based on creation time by hyprland and thus we can't
consistently match the id's without constantly changing them (this would
also cause issues with workspace sorting).
2025-07-03 18:48:04 -04:00
Skylar Abruzese
9ef6dc7380 fix: hyprland named persistent workspaces
allowed persistent workspaces to be defined with names instead of just
id's
2025-07-03 17:44:37 -04:00
Alexis Rouillard
f409f53131 Merge pull request #4256 from Alexays/update_flake_lock_action
flake.lock: Update
2025-07-02 09:51:31 +01:00
Alexis Rouillard
88766de1ee Merge pull request #4258 from notpeelz/fix-network-eth-rfkill-precedence
fix: 'ethernet' network state should have precedence over 'disabled'
2025-07-01 16:31:54 +01:00
peelz
b6c13ba58b fix: 'ethernet' network state should have precedence over 'disabled' 2025-07-01 10:37:31 -04:00
github-actions[bot]
e7a4bafede flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/96ec055edbe5ee227f28cdbc3f1ddf1df5965102?narHash=sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg%3D' (2025-05-28)
  → 'github:NixOS/nixpkgs/30e2e2857ba47844aa71991daa6ed1fc678bcbb7?narHash=sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM%3D' (2025-06-27)
2025-07-01 00:14:02 +00:00
Emiliano Deustua
08a39dd9eb refactor: Change config key name 2025-06-30 10:44:46 -05:00
Jens Peters
6c48db6cee ext/workspaces: log workspace id/name
This should help to distinguish between internal and
external ID in the logs.
2025-06-29 21:51:31 +02:00
Jens Peters
984d0de1fc ext/workspaces: introduce ignore-hidden option
Hide hidden workspaces by default, but add an option for overriding.

While at it, move button visibility handling to Workspaces and only
handle add/removal of buttons at WorkspaceManager. This makes it
easier to keep track if sorting is needed.
2025-06-29 21:51:31 +02:00
Jens Peters
29bf5d5da1 ext/workspaces: moved/renamed from wlr/workspaces
The ext-workspace-v1 protocol is not wlr/wlroots
specific.
2025-06-29 21:51:31 +02:00
Jens Peters
255c0ebe28 wlr/workspaces: port to ext-workspace-v1
Rework implementation to match new protocol behavior.
2025-06-29 21:51:31 +02:00
Emiliano Deustua
649a98a679 feat: Add ISO 8601 calendar to clock module 2025-06-28 19:42:55 -05:00
Alexis Rouillard
8516d457ad Merge pull request #4242 from mexanoz/fix-hyprland-language
fix hyprland/language layout parsing
2025-06-27 18:20:27 +01:00
mexanoz
7505e2c3f3 fix hyprland/language layout parsing 2025-06-27 20:54:38 +05:00
Martynas Maciulevičius
c8dc3e7024 Remove unused import 2025-06-27 09:31:51 +03:00
Martynas Maciulevičius
b7ff47fb05 User kill signal config keys: Use underscore instead of dash 2025-06-27 09:31:51 +03:00
Martynas Maciulevičius
7463be9b6a Fix initial null configuration; Fix doc compilation errors 2025-06-27 09:31:51 +03:00
Martynas Maciulevičius
125b59e23b Add more details on how 'reload' works in signals 2025-06-27 09:31:51 +03:00
Martynas Maciulevičius
3c7a9bf432 Documentation for sigusr1 and sigusr2 config 2025-06-27 09:31:51 +03:00
Martynas Maciulevičius
aaea814217 Idempotent bar show/hide via configurable user kill signals 2025-06-27 09:31:51 +03:00
Alexis Rouillard
c336bc5466 Merge pull request #4234 from Invertisment/fix-default-icon 2025-06-26 20:35:45 +01:00
Martynas Maciulevičius
460b19ba1b Fix default icon in tray module 2025-06-26 20:34:56 +03:00
Alex
0fcda9afa5 chore: 0.13.0 2025-06-23 09:10:48 +02:00
markx86
53d8d3cd2a fix: Code formatting for clang-format/lint CI 2025-06-22 18:55:07 +02:00
markx86
eae22f3273 battery: Document events in waybar-battery manpage 2025-06-22 17:45:16 +02:00
markx86
08da7b5282 feat: Add support for battery related events 2025-06-22 17:45:12 +02:00
Alexis Rouillard
4730fc4d77 Merge pull request #4219 from yuannan/nix_gpsd
Added IPC fix and Nix GPS fix
2025-06-22 13:22:19 +01:00
yuannan
2b9601b9a4 added IPC fix and Nix GPS fix 2025-06-22 13:15:18 +01:00
Alexis Rouillard
6a1d89e80d Merge pull request #4217 from Alexays/revert-2886-feat/upower_bat_bluetooth
Revert "Bluetooth module: fetch battery percentage from upower if not found from bluez"
2025-06-22 11:24:41 +01:00
Alexis Rouillard
35d5203b4e Revert "Bluetooth module: fetch battery percentage from upower if not found from bluez" 2025-06-22 12:24:22 +02:00
Alexis Rouillard
13ed499999 Merge pull request #2886 from levnikmyskin/feat/upower_bat_bluetooth
Bluetooth module: fetch battery percentage from upower if not found from bluez
2025-06-22 09:06:42 +01:00
Alexis Rouillard
0c1f1f2df9 Merge pull request #3544 from nktnet1/hyprland/windowcount
add Hyprland/windowcount module
2025-06-22 09:03:21 +01:00
Alex
ee91d18ad9 fix: lint 2025-06-22 10:01:36 +02:00
Alexis Rouillard
f27df33280 Merge pull request #3628 from adryzz/gps-module
Add GPS module
2025-06-22 08:59:46 +01:00
Alexis Rouillard
ea1ee2c027 Merge pull request #4068 from Rimsoo/patch-1
Fixed one layout with multiple variant bug hyprland/language Fixes #3676
2025-06-22 08:59:05 +01:00
Alexis Rouillard
54f7991325 Merge pull request #3762 from cc-nogueira/add_rewrite_to_wlr_tooltip
add rewrite to wlr tooltip
2025-06-22 08:58:33 +01:00
Alexis Rouillard
9246297d63 Merge pull request #4113 from Duncaen/niri-workspace-urgency
niri: add support for urgency indicators to workspaces
2025-06-22 08:57:57 +01:00
Alexis Rouillard
630f85dcb1 Merge branch 'master' into niri-workspace-urgency 2025-06-22 08:57:49 +01:00
Alexis Rouillard
77b42105a6 Merge pull request #4136 from Roc25/special-centered
hyprland workspaces: Add sorting Special Centered
2025-06-22 08:57:12 +01:00
Alex
df138e12c4 fix: compat freebsd 2025-06-22 09:55:57 +02:00
Alex
373fd77f7a chore: update cross-platform-actions/action 2025-06-22 09:54:46 +02:00
Alexis Rouillard
f5e6e5e9fc Merge pull request #3863 from yamader/wayfire
add module wayfire/window, wayfire/workspaces
2025-06-22 08:53:23 +01:00
Alexis Rouillard
a88e5795a4 Merge branch 'master' into wayfire 2025-06-22 08:53:02 +01:00
Alexis Rouillard
e9d0f2254d Merge pull request #1784 from ruanformigoni/issue-1681
exec runs after on-* events
2025-06-22 08:50:48 +01:00
Alexis Rouillard
71c6c6032b Merge pull request #4133 from Roc25/persistent-only
Add persistent-only setting for hyprland/workspaces
2025-06-22 08:50:33 +01:00
Alexis Rouillard
780e96bd78 Merge pull request #4131 from belcaik/master
Add support for mouse side buttons (back/forward) to control track navigation in mpris module
2025-06-22 08:45:41 +01:00
Alexis Rouillard
a563a3fceb Merge pull request #4127 from iostapyshyn/master
niri/workspaces: Add empty icon
2025-06-22 08:45:13 +01:00
Alex
286cff2e3d fix: lint 2025-06-22 09:44:35 +02:00
Alexis Rouillard
cbdbc492bb Merge pull request #4097 from RobertMueller2/sway-window-marks
feat: sway/window: provide {marks} format replacement
2025-06-22 08:43:27 +01:00
Alexis Rouillard
d6b6158ae9 Update custom.cpp 2025-06-22 09:42:14 +02:00
Alexis Rouillard
f314150736 Merge branch 'master' into issue-1681 2025-06-22 08:41:15 +01:00
Alexis Rouillard
6206cebd75 Merge pull request #3887 from torstehu/fix-typo
Fix typos in function, variable names and in documentation
2025-06-22 08:39:23 +01:00
Alexis Rouillard
0cae53747e Merge pull request #3881 from TripleTrable/AModules/fix-expand-fill-no-center
Fixes: Add stretching of modules and modules-center toggling
2025-06-22 08:38:08 +01:00
Alexis Rouillard
249b452829 Merge pull request #4040 from coreydoughty/hypr-submap-patch
hyprland/submap: allow pango markup.
2025-06-22 08:33:53 +01:00
Alexis Rouillard
bfedb7c446 Merge pull request #4155 from Yutsuten/fix/wide-char-calendar
Fix calendar extra padding if there are wide characters
2025-06-22 08:32:50 +01:00
Alexis Rouillard
9ca04ee2fd Merge pull request #4048 from LiterallyVoid/literallyvoid/fix-4047-deadlock
Fix signal safety deadlock
2025-06-22 08:32:36 +01:00
Alexis Rouillard
eea9561525 Merge pull request #4092 from RobertMueller2/issue_3981
Issue 3981: try and fix memory leak in privacy module
2025-06-22 08:31:06 +01:00
Alexis Rouillard
bef539e4de Update privacy_item.cpp 2025-06-22 09:30:46 +02:00
Alexis Rouillard
456c3add4a Merge pull request #4102 from edwin0cheng/style-sym
Use load_symbolic for gtk icon to support styling in tray icon
2025-06-22 08:29:42 +01:00
Alexis Rouillard
a48116799a Merge pull request #4088 from Alexays/update_flake_lock_action
flake.lock: Update
2025-06-22 08:27:57 +01:00
Alexis Rouillard
74a6726f4f Merge pull request #4096 from aereaux/idle_docs
Add idle_inhibitor style docs.
2025-06-22 08:27:37 +01:00
Alexis Rouillard
3d00c4bed4 Merge pull request #4160 from davidemanini/icon-label
AIconLabel.cpp: honour "rotation" property and add "swap-icon-label" propery
2025-06-22 08:27:07 +01:00
Alexis Rouillard
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
Alexis Rouillard
44a8910022 Merge pull request #4173 from S0nter/master
privacy: ignore some streams
2025-06-22 08:24:22 +01:00
Alexis Rouillard
341e39fbcf Merge pull request #4210 from stkth/feat/display-systemd-system-state
Feat/display systemd system state
2025-06-22 08:24:04 +01:00
Alexis Rouillard
7b9db134dd Merge pull request #4207 from markx86/fix/mpris
fix: MPRIS widget not hiding when no player is active
2025-06-22 08:23:09 +01:00
Alexis Rouillard
7d5905b38c Merge pull request #4204 from stkth/feat/add-swap-state-to-memory-module
modules: memory: Add swapState format argument
2025-06-22 08:22:36 +01:00
Alexis Rouillard
5a013bdba0 Merge pull request #4209 from notpeelz/fix-formatting
Fix CI clang-format
2025-06-22 08:21:38 +01:00
Alexis Rouillard
ae777c65a6 Merge pull request #4212 from notpeelz/fix-namespace-pollution
Fix namespace pollution
2025-06-22 08:21:24 +01:00
Alexis Rouillard
103487f672 Merge pull request #4213 from notpeelz/fix-missing-cxx20-chrono-literals
fix: don't use c++20 chrono literals
2025-06-22 08:21:01 +01:00
Alexis Rouillard
3c197811e2 Merge pull request #4214 from notpeelz/bump-freebsd-14-3
ci: bump FreeBSD to 14.3
2025-06-22 08:20:48 +01:00
peelz
0bdea1e46f ci: bump FreeBSD to 14.3 2025-06-22 01:02:53 -04:00
peelz
8daaad1e13 fix: don't use c++20 chrono literals
Unfortunately we can't use these yet because the freebsd build (clang)
still uses HowardHinnant/date, which doesn't provide literal suffixes.
2025-06-22 00:56:56 -04:00
peelz
25f432b0ce refactor: avoid Gio namespace pollution 2025-06-22 00:50:25 -04:00
peelz
e4dd2ecc5a refactor: avoid namespace pollution in util/date.hpp 2025-06-22 00:50:25 -04:00
Alexis Rouillard
a40c53bd5d Merge pull request #4211 from notpeelz/fix-ci-gentoo 2025-06-22 00:43:11 +01:00
peelz
84bd0d452e ci: run the docker workflow monthly instead of daily
Rebuilding the gentoo docker image daily is most definitely going to
bust through the free CI tier limits.
2025-06-21 16:05:00 -04:00
peelz
d4f61ad271 ci: allow manual triggering of docker workflow 2025-06-21 16:05:00 -04:00
peelz
c6fceb03c8 ci: relax gentoo gtkmm dependency requirement 2025-06-21 16:05:00 -04:00
Steffen Kothe
cfb47790ad modules: systemd_failed_units: Introduce systemd state variables
Systemd provides the status of a given user and system session as a
human readable string.

Retrieve this information via RequestSystemState and guard the
retrieve of failed units depending on this request.

The functionality is extended but does not change, which means that
failed units in any granularity are displayed as before.

Update documentation in the meantime.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-21 16:53:12 +00:00
Steffen Kothe
d5e3a9f894 modules: systemd_failed_units: Enforce visibility of event box on every update
Instead if guarding visibility in if condition, enforce visibility
regardless of the state of the current update.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-21 16:51:13 +00:00
Steffen Kothe
0731117679 modules: systemd_failed_units: Introduce RequestFailedUnits member
Split-out request of failed units from systemd into a separate member
function.

This increases the readability and extendability, but preserves the
current functionality (non-functional change).

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-21 16:51:13 +00:00
Steffen Kothe
4bb06b86bc modules: systemd_failed_units: Use explicit g_variant_get_uint32
Determining of failed units can be done by usage of explicit uint32
function with direct return due to auto lambda expression.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-21 16:47:27 +00:00
Steffen Kothe
74255d0c7e modules: systemd_failed_units: Move DBUS proxy check into lambda function
Checking for the availability of a given proxy member can be done in the
lambda function as well.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-21 16:47:25 +00:00
Steffen Kothe
5c2cf4c65c modules: systemd_failed_units: Fail early if state did not change
Prefer early exit if last status matches the current status.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-21 16:47:07 +00:00
Steffen Kothe
dcbbe3bb97 modules: systemd_failed_units: Move nr_failed calculation to updateData
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-21 16:46:06 +00:00
Steffen Kothe
37a6106d3e modules: systemd_failed_units: Introduce nr_failed as member
Keeping nr_failed as member allows to split-out calculation of overall
failed units into updateData.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-21 15:17:59 +00:00
peelz
b8a985d606 style: fix formatting 2025-06-21 10:54:16 -04:00
Sonter
8f35dc17b8 Merge branch 'Alexays:master' into master 2025-06-20 18:30:56 +00:00
Alexis Rouillard
dfbf1ff2a0 Merge pull request #4154 from VannTen/fix/service_file_description
Fix Description= in systemd service file
2025-06-20 16:15:30 +01:00
Alexis Rouillard
93d85a0cea Merge pull request #4190 from notpeelz/fix-network-rfkill-update
fix: network module not displaying rfkill state
2025-06-20 16:14:38 +01:00
Alexis Rouillard
3abbdb849d Merge pull request #4191 from notpeelz/fix-length-error-output-description
fix: length_error thrown in handleOutputDescription
2025-06-20 16:14:22 +01:00
Alexis Rouillard
7da053f1bd Merge pull request #4205 from stkth/feat/use-debian-slim-for-container
Dockerfiles: Use debian-slim for container
2025-06-20 16:13:43 +01:00
Sonter
2f6f9620d2 Merge branch 'Alexays:master' into master 2025-06-20 14:32:05 +00:00
markx86
c266befe0a fix: MPRIS widget not hiding when no player is active 2025-06-20 14:02:01 +02:00
Steffen Kothe
76d0b44214 Dockerfiles: Use debian-slim for container
Slim images of Debian tend to be smaller even during development. Hence
replace the full-fledged variant with the slim one.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-19 18:59:15 +00:00
Steffen Kothe
bdcab011ee modules: memory: Add swapState format argument
Add an argument to the memory module which displays the state of the
swap configuration of the local system.

Usage of swap does not necessarily indicate if swap is on or off.

Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
2025-06-19 18:44:31 +00:00
Alexis Rouillard
f8f795ac38 Merge pull request #4202 from markx86/master
fix: `cldMonShift_` not getting initialized in `Clock()` constructor
2025-06-19 07:35:28 +01:00
markx86
af9d61fa8f fix: cldMonShift_ not getting initialized in Clock() constructor
Initialize `cldMonShift_` member in the `clock` module constructor. This
fixes a bug where the calendar tooltip would break after a reload, when
in month mode.
2025-06-19 00:35:54 +02:00
Bahnschrift
800c4b56cc Merge remote-tracking branch 'source/master' 2025-06-18 18:42:23 +10:00
peelz
bd28bb959f fix: use spdlog in zxdg_output_v1_listener callbacks 2025-06-13 22:57:31 -04:00
peelz
f4496c9648 fix: length_error thrown in handleOutputDescription 2025-06-13 22:51:03 -04:00
peelz
07468357f4 fix: network module not displaying rfkill state 2025-06-13 21:40:18 -04:00
Alexis Rouillard
2c482a2917 Merge pull request #4189 from notpeelz/fix-man-network-frequency 2025-06-13 08:32:27 +02:00
peelz
5e14698b4e fix: network frequency is reported in GHz 2025-06-12 17:01:10 -04:00
Alexis Rouillard
250f58eed6 Merge pull request #4183 from Talbrelliles/custom-module-memory-fix
Memory Fix for continuous scripts in custom module
2025-06-11 13:18:23 +02:00
Taimase
3ebf2d96e5 fix continuousWorker in the custom module by capturing the buffer by reference. 2025-06-11 01:12:08 -06:00
Sonter
4d9403601a privacy: format with clang-format 2025-06-08 12:53:46 +03:00
Sonter
f73d26722c privacy: add example configuration 2025-06-08 12:39:10 +03:00
Gregor Kleen
6cfaf4ff63 privacy: document ignore options 2025-06-08 12:23:50 +03:00
Gregor Kleen
831602a913 privacy: default to ignoring all stream.monitor pw nodes 2025-06-08 12:23:50 +03:00
Gregor Kleen
703be13b00 privacy: introduce ignore option 2025-06-08 12:23:50 +03:00
Дмитрий
fca159ad01 Update man page
Co-authored-by: Tuur Vanhoutte <4633209+zjeffer@users.noreply.github.com>
2025-06-07 12:19:13 +03:00
gred
35c6e9c21c Update man page 2025-06-07 11:23:19 +03:00
gred
b36a283f83 Update man 2025-06-07 11:06:06 +03:00
gred
715503ec3e Rename vector to hiddenWorkspaces 2025-06-07 10:50:29 +03:00
Adrian Perez
81fb0daad2 feat: add a way to override electron app tray icons 2025-06-03 16:13:41 -07:00
Davide Manini
c26978eca8 Update documentation 2025-06-03 14:54:41 +03:00
Davide Manini
34484919d6 AIconLabel: honour rotation' option; add swap-icon-label' option 2025-06-03 14:54:41 +03:00
Mateus Eto
05cfd73804 Fix calendar extra padding if there are wide characters 2025-06-01 21:43:43 +09:00
github-actions[bot]
c0e7aad60e flake.lock: Update
Flake lock file updates:

• Updated input 'flake-compat':
    'github:edolstra/flake-compat/ff81ac966bb2cae68946d5ed5fc4994f96d0ffec?narHash=sha256-NeCCThCEP3eCl2l/%2B27kNNK7QrwZB1IJCrXfrbv5oqU%3D' (2024-12-04)
  → 'github:edolstra/flake-compat/9100a0f413b0c601e0533d1d94ffd501ce2e7885?narHash=sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX%2BfjA8Xf8PUmqCY%3D' (2025-05-12)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7?narHash=sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo%3D' (2025-04-23)
  → 'github:NixOS/nixpkgs/96ec055edbe5ee227f28cdbc3f1ddf1df5965102?narHash=sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg%3D' (2025-05-28)
2025-06-01 00:14:43 +00:00
Max Gautier
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
gred
15f54cd6ef Fix hidden buttons 2025-05-21 01:38:03 +03:00
gred
24a30b7ffd Add sorting with centered special workspaces 2025-05-21 01:01:23 +03:00
gred
4f55d7da90 Add persistent-only setting for hyprland/workspaces 2025-05-20 23:00:09 +03:00
belcaik
7613069a40 Merge pull request #1 from belcaik/feature/mpris-fordward-backward-handle
Add mouse navigation support for side buttons in Mpris
2025-05-19 23:25:31 -04:00
belcaik
d41a664779 refactor: use command pattern for button actions 2025-05-19 23:12:42 -04:00
belcaik
cdf3ca910d feat: Add support for side buttons mouse navigation in handleToggle
mapped buttons config on-click-backward and on-click-forward on mpris module to previous/next handle
GTK codes are 9 and 8
2025-05-19 22:52:01 -04:00
Illia Ostapyshyn
19d2430516 niri/workspaces: Add empty icon 2025-05-19 23:01:19 +02:00
Duncan Overbruck
47e0f42523 niri: add support for urgency indicators to workspaces 2025-05-14 20:33:11 +02:00
Khiet Tam Nguyen
6319569ed0 Merge branch 'Alexays:master' into hyprland/windowcount 2025-05-09 20:46:00 +10:00
Edwin Cheng
0340760e12 Use load_symbolic for gtk icon instead of load_icon. 2025-05-07 16:57:54 +08:00
Rene D. Obermueller
f4b68f41e6 feat: sway/window: provide {marks} format replacement 2025-05-04 07:50:28 +02:00
Aidan Epstein
7b5206128c Add idle_inhibitor style docs. 2025-05-03 10:41:07 -07:00
Fengerros
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
Rene D. Obermueller
ff4ed82693 memory leak: 2nd attempt 2025-05-03 11:29:53 +02:00
Pol Rivero
4ae2b6f1ba Implement ignore-list 2025-05-02 15:48:34 +02:00
Pol Rivero
c9215ad818 Minor code cleanup 2025-05-02 14:29:44 +02:00
Rene D. Obermueller
72184b2205 Issue 3981: try and fix memory leak 2025-05-02 10:01:09 +02:00
Pol Rivero
61c5dad895 Fix some windows not being marked as active when opened
In some cases, the active event is arriving before the create event. We need to store the currently active address and initialize the windows accordingly
2025-05-01 21:03:46 +02:00
Pol Rivero
998fd7a192 Fix window title not being updated properly 2025-05-01 20:51:12 +02:00
Pol Rivero
72404a77f0 Initial implementation of active window
TODO:
- Sometimes the active event arrives before the create, in which case the window is not activated.
- The window title event also looks unreliable in some cases, will need to investigate
2025-05-01 20:22:34 +02:00
Pol Rivero
59c270ec06 Respect format-window-separator if workspace-taskbar is enabled 2025-05-01 19:26:44 +02:00
Pol Rivero
a816812f81 Run clang-format 2025-04-30 16:20:11 +02:00
Pol Rivero
451d458545 Fix compilation errors after merge 2025-04-29 20:12:59 +02:00
Pol Rivero
4222032fa1 Merge remote-tracking branch 'upstream/master' 2025-04-29 19:59:42 +02:00
Rimsoo
afeea62214 fixes #3676 including #3224 2025-04-24 23:32:47 +02:00
Alexis Rouillard
0332d2ebf8 Merge pull request #4046 from ebeem/sway-workspace-current-not-shown-fix
Sway Workspace: Fix workspace button not showing for tabbed/nested layouts
2025-04-24 11:32:56 +02:00
Alexis Rouillard
7cbdce5064 Merge pull request #4075 from Alexays/update_flake_lock_action
flake.lock: Update
2025-04-24 11:30:08 +02:00
github-actions[bot]
ba8ea3d952 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/52faf482a3889b7619003c0daec593a1912fddc1?narHash=sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om%2BD4UnDhlDW9BE%3D' (2025-03-30)
  → 'github:NixOS/nixpkgs/8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7?narHash=sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo%3D' (2025-04-23)
2025-04-24 09:29:40 +00:00
Alexis Rouillard
8b48982bf6 Merge pull request #4032 from RobertMueller2/issue_3974
wireplumber: fix potential nullpointer deref
2025-04-24 11:28:56 +02:00
Alexis Rouillard
5382a09db0 Merge pull request #4025 from khaneliman/format
flake.nix: add treefmt; treewide: clang and nix format
2025-04-24 11:28:11 +02:00
Rimsoo
20642f47df Fixed variant bug 2025-04-22 11:41:45 +02:00
Lena
d0c6e91094 gps: add rfkill support 2025-04-18 22:56:47 +02:00
Lena
956e39d3d3 make gpsd receiver not poll 2025-04-18 22:56:47 +02:00
Lena
22ec8e0770 fix factory copy&paste typo 2025-04-18 22:56:47 +02:00
Lena
d331331b76 add manpage 2025-04-18 22:56:47 +02:00
Lena
dfa40d6a00 add all arguments 2025-04-18 22:56:47 +02:00
Lena
45ebf45343 Start GPS module 2025-04-18 22:56:36 +02:00
Austin Horstman
55f52c3457 treewide: clang and nix format 2025-04-15 14:56:28 -05:00
Austin Horstman
5c48373cfe flake.nix: add treefmt formatter
Easier to format everything properly.
2025-04-15 14:56:05 -05:00
Alexis Rouillard
c8484ebb1d Merge pull request #4058 from khaneliman/cava 2025-04-15 20:28:12 +02:00
Austin Horstman
bf4f3ab064 nix: cava bump 2025-04-15 12:06:41 -05:00
Alexis Rouillard
913e0665e7 Merge pull request #4056 from LukashonakV/cavaBump 2025-04-15 17:04:04 +02:00
Viktar Lukashonak
e85025f805 libCava bump: 0.10.4 2025-04-15 16:33:07 +03:00
literallyvoid
517eb7651e Run clang-format on main.cpp 2025-04-14 12:31:23 -07:00
Alexis Rouillard
67272cc47f Merge pull request #4042 from clemenscodes/wlr-taskbar-icon-title-fallback
wlr/taskbar: find icon by title as fallback
2025-04-14 20:53:06 +02:00
Alexis Rouillard
1dfde583df Merge pull request #4045 from khaneliman/pulse
audio_backend: fix crash
2025-04-14 20:52:45 +02:00
Alexis Rouillard
3e16c3f74e Merge pull request #4052 from AOSC-Tracking/aosc/v0.12.0 2025-04-14 08:34:57 +02:00
Kaiyang Wu
252e4f78bf fix: support libcava 0.10.4
Signed-off-by: Kaiyang Wu <self@origincode.me>
2025-04-13 22:23:40 -07:00
literallyvoid
dbd3ffd732 Convert reload to a local 2025-04-12 17:54:10 -07:00
literallyvoid
97591c825a Remove signalThread and move reaping to catchSignals 2025-04-12 17:52:37 -07:00
literallyvoid
b03ecb3d74 Move signal handling to main thread 2025-04-12 17:52:37 -07:00
Almarhoon Ibraheem
7e845f506e sway workspace: fix workspace button not shown in nested layouts 2025-04-12 18:31:34 +03:00
Austin Horstman
afb1ee5422 audio_backend: fix crash
Getting crashes when called before we have proper information.
2025-04-11 14:53:47 -05:00
Corey Doughty
682492f7a9 This commit fixes #4023 2025-04-10 07:05:45 -04:00
Corey Doughty
633bf9e00f Hyprland submap allow pango markup. 2025-04-10 06:56:00 -04:00
Clemens Horn
addf44d945 test 2025-04-07 20:51:35 +02:00
Clemens Horn
e92b0a86b5 wlr/taskbar: find icon by title as fallback 2025-04-07 20:33:18 +02:00
Rene D. Obermueller
9ca52a48c8 wireplumber: fix potential nullpointer deref 2025-04-06 09:46:06 +02:00
Alexis Rouillard
056295cbc6 Merge pull request #4026 from khaneliman/workflows
.github/workflows/clang-format: bump github action (fix clang-format check)
2025-04-04 10:20:16 +02:00
Alexis Rouillard
80669f7134 Merge pull request #4024 from khaneliman/hyprland-crash 2025-04-04 08:34:13 +02:00
Austin Horstman
5ff6b0ad0f .github/workflows: tweak job names
They didn't seem to correspond to the workflow, properly. Making
triggering them locally weird.
2025-04-04 00:04:51 -05:00
Austin Horstman
84162ec604 .github/workflows/clang-format: bump github action 2025-04-04 00:04:51 -05:00
Austin Horstman
91ef6e51ed hyprland/workspaces: range find lint cleanup 2025-04-03 23:31:18 -05:00
Austin Horstman
c5bc3bc59a hyprland/workspaces: fix crash 2025-04-03 23:31:14 -05:00
Alexis Rouillard
569445f8b3 Merge pull request #4017 from RobertMueller2/issue_4015
fix manpage for backlight/slider
2025-04-01 13:38:25 +02:00
Alexis Rouillard
eb254db867 Merge pull request #4018 from Alexays/update_flake_lock_action
flake.lock: Update
2025-04-01 13:38:15 +02:00
github-actions[bot]
c0b8c4d468 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5135c59491985879812717f4c9fea69604e7f26f?narHash=sha256-Vr3Qi346M%2B8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic%3D' (2025-02-26)
  → 'github:NixOS/nixpkgs/52faf482a3889b7619003c0daec593a1912fddc1?narHash=sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om%2BD4UnDhlDW9BE%3D' (2025-03-30)
2025-04-01 00:12:37 +00:00
Rene D. Obermueller
9d2b137594 fix manpage for backlight/slider 2025-03-31 18:36:12 +02:00
Alexis Rouillard
4a8d527dd5 Merge pull request #3921 from bpandreotti/vertical-privacy
Add support for vertical orientation in privacy module
2025-03-28 09:52:48 +01:00
Alexis Rouillard
b98e717433 Merge pull request #3941 from ChaosInfinited/features/systray-custom-icons
Features/systray custom icons
2025-03-28 09:46:22 +01:00
Alexis Rouillard
fda7abb33d Merge pull request #3878 from matt-fff/mw/hyprland-events-workspaces-v2
Migrate Hyprland workspace events to v2
2025-03-28 09:45:44 +01:00
Alexis Rouillard
9681cfd2e8 Merge pull request #4009 from teatwig/master
fix incorrect type for `weeks-pos` in waybar-clock man page
2025-03-28 09:45:19 +01:00
tea
567ae16a68 fix incorrect type for weeks-pos in waybar-clock man page 2025-03-28 09:43:47 +01:00
Alexis Rouillard
2fdfd1028a Merge pull request #3959 from voiceroy/ip-address-display
Provide an option to show ipv4, ipv6 or both
2025-03-28 09:25:44 +01:00
Alexis Rouillard
8476a7dc84 Merge pull request #3970 from khaneliman/nativeinstallcheck
nix/default: disable version check
2025-03-28 09:24:43 +01:00
Alexis Rouillard
e74844b8d4 Merge pull request #3961 from Alexays/update_flake_lock_action
flake.lock: Update
2025-03-28 09:24:28 +01:00
Alexis Rouillard
a622dfd072 Merge pull request #3969 from LawnGnome/cffi-config-value-json
cffi: always return config values as JSON
2025-03-28 09:24:14 +01:00
Alexis Rouillard
775067f2da Merge pull request #3995 from spectrum70/wip/login-proxy
add login-proxy option
2025-03-28 09:23:32 +01:00
Alexis Rouillard
508d3cd3dd Merge pull request #3638 from RowanLeeder/ISSUE-3092
Resolves #3092 Add source support to wireplumber module
2025-03-28 09:23:01 +01:00
Alexis Rouillard
eb2df58f5a Merge pull request #4002 from lbartoletti/freebsd_temp
fix(FreeBSD): Use dev.cpu temperature sysctl
2025-03-24 22:19:40 +01:00
Loïc Bartoletti
4ba1947a50 fix(FreeBSD): Use dev.cpu temperature sysctl 2025-03-24 15:30:57 +01:00
Angelo Dureghello
6fd859c0c4 add login-proxy option
There are cases where systemd-logind is not used/running. Result is
that bcklight module will not run.

Add an option that, when set to false, allows backlight module to
work without systemd-logind.
2025-03-22 18:40:47 +01:00
Lars Niesen
8a15cbad5c Fixes: Add stretching of modules and modules-center toggling
Thanks to tmccombs this commit fixes some inconsitencies in #3730.
These inconsitencies were:
- Fixed the oversight of missing the implementation of expand_center for
  center_ and right_
- Removes a last minut printf debugging statment I missed.
2025-03-09 16:15:39 +01:00
Pol Rivero
e541936df9 Merge remote-tracking branch 'upstream/master' 2025-03-08 17:18:31 +01:00
Austin Horstman
f631d5eaf9 nix/default: disable version check
Downstream added version check, causes this flake to fail building.
2025-03-05 22:44:55 -06:00
Adam Harvey
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
Harishankar G
5e4dac1c0a Newline as a seperator when displaying IPv4 and 6 at the same time 2025-03-05 15:29:21 +05:30
Matthew White
f7b4451564 fix(hyprland): support additional v2 events 2025-03-04 10:23:19 -07:00
Harishankar G
4a6c417ef5 Add format replacements
For cidr6, netmask6
2025-03-04 19:09:21 +05:30
github-actions[bot]
9f71de5227 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/9d3ae807ebd2981d593cddd0080856873139aa40?narHash=sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9%2BWC4%3D' (2025-01-29)
  → 'github:NixOS/nixpkgs/5135c59491985879812717f4c9fea69604e7f26f?narHash=sha256-Vr3Qi346M%2B8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic%3D' (2025-02-26)
2025-03-01 00:11:29 +00:00
Matt White
17cee0d876 feat(hyprland): support workspacev2 2025-02-26 18:56:11 -07:00
Matt White
0c6ca8321c feat(hyprland): support destroyworkspacev2 2025-02-26 18:56:11 -07:00
Matt White
26a344b131 feat(hyprland): support createworkspacev2 2025-02-26 18:56:11 -07:00
Harishankar G
8bd0285c88 Remove redundant if condition 2025-02-26 16:06:58 +05:30
Harishankar G
212c676251 Provide an option to show ipv4 or ipv6 or both of them 2025-02-26 15:59:33 +05:30
Kaosu
ddf5b3e07b add tray icons docs 2025-02-16 14:30:08 +01:00
Kaosu
d1998de47a add setCustomIcon and try to apply such when ID is known 2025-02-16 14:22:10 +01:00
Kaosu
78d5c3ef3a init custom icons from config per tray 2025-02-16 14:21:34 +01:00
Kaosu
937b62ea9a add SNI custom icon manager 2025-02-16 14:21:08 +01:00
Bruno Andreotti
a26ed50d0f Add support for vertical bars in privacy module 2025-02-07 14:39:07 -03:00
Pol Rivero
4dbb874f7c Merge remote-tracking branch 'upstream/master' 2025-02-06 12:19:57 +01:00
Pol Rivero
1a9f5aced7 workspace taskbars: Add button param to click command 2025-01-27 11:47:16 +01:00
Pol Rivero
7b854112ed workspace taskbars: Allow custom command on window click 2025-01-27 11:46:35 +01:00
Pol Rivero
b4519c0819 workspace taskbars: Use sigc::mem_fun instead of lambda 2025-01-27 11:46:35 +01:00
Pol Rivero
e0f3695523 workspace taskbars: Minor fixes
- Add missing CSS class to manpage
- Fix rare segfault when address is not found (seems to only happen when compiled for production)
2025-01-27 11:46:35 +01:00
Pol Rivero
42affa4eda workspace taskbars: Update manpage 2025-01-27 11:46:35 +01:00
Pol Rivero
5ee0d1c7fe workspace taskbars: Fix windows not showing
Windows were not being shown or updated unless the window-rewrite config were present.
2025-01-27 11:46:35 +01:00
Pol Rivero
3948c0d154 workspace taskbars: Focus window on click 2025-01-27 11:46:35 +01:00
Pol Rivero
53ca5a4883 workspace taskbars: Display windows in a consistent order
Use a vector instead of a map for for storing the workspace windows.
This orders the windows by the time they were added to the workspace, instead of sorting by address (which is effectively a random order). The new ordering seems to match the wlr/taskbar module
2025-01-27 11:46:35 +01:00
Pol Rivero
e1649b001f workspace taskbars: Fix title not updating
Fix another older bug where the title of a window will not be updated after moving it to another monitor.
In onWindowMoved, when moving an orphan window to the display of the current bar, that window should no longer be an orphan.
2025-01-27 11:46:35 +01:00
Pol Rivero
5e1d6d1cc5 workspace taskbars: Fix title not updating
This seems to be an old bug that has been made visible with the new workspace taskbars feature.
Sometimes, when closing a window and re-opening a window of the same program, hyprland reuses the window address. Since m_orphanWindowMap was not being cleaned up on window close, the new window would not be updated properly.
2025-01-27 11:46:35 +01:00
Pol Rivero
fdb9004048 workspace taskbars: More config options
- orientation
- icon-size
- icon-theme
2025-01-27 11:46:35 +01:00
Pol Rivero
1c07ca0099 workspace taskbars: Add config parsing
Use format from config instead of hardcoding
2025-01-27 11:46:35 +01:00
Pol Rivero
69e2e249a6 Initial implementation of workspace taskbars
Add a list of window titles and icons to each workspace (like wlr/taskbar but grouped by workspace).

Only implemented on hyprland for now.
2025-01-27 11:46:35 +01:00
Pol Rivero
bc2e143ac5 Extract icon loading logic to separate class 2025-01-27 11:46:35 +01:00
Torstein Husebø
6004316f1a Fix typos in function, variable names and in documentation 2025-01-16 13:25:19 +01:00
Khiet Tam Nguyen
36a1c89e30 Merge branch 'Alexays:master' into hyprland/windowcount 2025-01-13 10:33:05 +11:00
YamaD
d7e4a7d91f add module wayfire/window, wayfire/workspaces 2025-01-03 15:22:46 +09:00
Khiet Tam Nguyen
565602114e Merge branch 'Alexays:master' into hyprland/windowcount 2025-01-03 12:18:38 +11:00
Stefan Haan
d100e78872 mpd: add uri and filename format arguments 2024-12-28 13:58:19 +01:00
Khiet Tam Nguyen
d29a17d703 Merge branch 'Alexays:master' into hyprland/windowcount 2024-12-22 17:12:54 +11:00
Bahnschrift
cf64b2c88c fix: un-hide tray when new icons are added 2024-12-19 12:29:58 +11:00
Bahnschrift
622f22d6b5 fix: hide tray when there are no non-passive icons 2024-12-19 12:09:31 +11:00
Khiet Tam Nguyen
334fc6e0e4 Merge branch 'Alexays:master' into hyprland/windowcount 2024-11-30 19:37:29 +11:00
Khiet Tam Nguyen
17d7cea4fd Merge branch 'Alexays:master' into hyprland/windowcount 2024-11-17 08:37:04 +11:00
Ricardo Nogueira
ddb3016440 add rewrite to wlr tooltip 2024-11-12 17:10:05 -03:00
Khiet Tam Nguyen
278588b1a3 Merge branch 'Alexays:master' into hyprland/windowcount 2024-10-06 00:34:20 +10:00
Rowan Leeder
2dfef1c213 Issue-3092 Add node type to wireplumber logs
- The module only fetches nodes for "node-type". This causes the 'onMixerChanged' log to spam whenever two or more
  wireplumber modules were registered on different nodes. To reduce this the unknown node warning will now only print
  if the node is not the focus of any current module.
2024-09-25 05:06:15 +10:00
Rowan Leeder
71a53eb79d Issue-3092 Add source support to wireplumber module
- Adds microphone support etc to the wireplumber module.

  The existing module hardcodes the selected node type to "Audio/Sink". This feature allows the user to override this
  via `"node-type": "Audio/Source"`.

- Unlike the pulseaudio module, this change does not try to see the module manage both input and output. The same effect
  can be achieved by running two instances of the wireplumber module.

  This approach:
  - Works around some of the complexity overhead that seem to have caused similar PRs to stall.
  - Using separate module instances also allows both the microphone and speaker levels to be controlled with a scroll
    wheel. This is something a unified module like pulseaudio struggles with.
  - Similarly, separate instances allows the source volume level to be exposed as the state. Ie- the linear-gradient
    css patterns can be applied to both input and output.
2024-09-25 05:03:24 +10:00
Khiet Tam Nguyen
636ef21f6e Merge branch 'Alexays:master' into hyprland/windowcount 2024-09-15 18:11:41 +10:00
Khiet Tam Nguyen
4cb2bf06b7 Merge branch 'Alexays:master' into hyprland/windowcount 2024-09-14 13:42:04 +10:00
Khiet Tam Nguyen
fd67c6e915 docs: rewording of separate-outputs in man page 2024-08-25 00:05:41 +10:00
Khiet Tam Nguyen
b82bcdb515 docs: updated documentation for windowcount.5.scd 2024-08-24 15:21:33 +10:00
Khiet Tam Nguyen
13bc497abd style: clang-format 2024-08-24 15:21:04 +10:00
Khiet Tam Nguyen
8254bd72b7 style: applied clang-format on windowcount.cpp 2024-08-24 13:36:00 +10:00
Khiet Tam Nguyen
9254ef6f2f docs: updated scd man pages 2024-08-24 13:29:46 +10:00
Khiet Tam Nguyen
a5e322ee66 fix: remove rewrite 2024-08-24 12:59:57 +10:00
Khiet Tam Nguyen
6aa8aa3b22 fix: remove focused_ 2024-08-24 12:57:10 +10:00
Khiet Tam Nguyen
f7e1d34251 feat: added empty and fullscreen style classes 2024-08-24 01:33:15 +10:00
Khiet Tam Nguyen
38ffb24c52 feat: format-fullscreen and format-windowed override added 2024-08-24 01:25:50 +10:00
Khiet Tam Nguyen
1b282e67a7 fix: remove unused attributes 2024-08-24 01:06:00 +10:00
Khiet Tam Nguyen
1806edcb06 fix: remove unused variable 2024-08-24 01:04:58 +10:00
Khiet Tam Nguyen
e40bc27257 fix: default separate-outputs to true 2024-08-24 00:40:41 +10:00
Khiet Tam Nguyen
58e4f89a82 fix: allow custom format 2024-08-24 00:40:22 +10:00
Khiet Tam Nguyen
d64c80e234 temp: working implementation 2024-08-24 00:14:30 +10:00
Khiet Tam Nguyen
5c859bf520 temp: changed window -> windowcount 2024-08-24 00:06:24 +10:00
Alessio Molinari
ea4b95fdd2 Fix: move init gdbusproxy after proxy_device_bat nullcheck
Co-authored-by: Alexis Rouillard <alexisr245@gmail.com>
2024-03-04 16:34:45 +01:00
Alessio Molinari
d831a45622 fix: restore signature 2024-02-04 18:01:26 +01:00
Alessio Molinari
2de8a83d84 feat: fetch battery percentage from upower if not found from bluez 2024-02-04 17:20:45 +01:00
Alexis Rouillard
ee0958973b Merge branch 'master' into issue-1681 2023-07-04 22:49:35 +02:00
Ruan E. Formigoni
15132aeec3 Fix for leftover pids 2022-11-15 01:19:51 -03:00
Ruan E. Formigoni
38af4a6f16 exec runs after on-* events 2022-11-10 02:36:54 -03:00
192 changed files with 7288 additions and 2845 deletions

View File

@@ -7,11 +7,13 @@ concurrency:
cancel-in-progress: true
jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.16.2
# TODO: bump to clang 19 release
# - uses: DoozyX/clang-format-lint-action@v0.18.2
- uses: DoozyX/clang-format-lint-action@558090054b3f39e3d6af24f0cd73b319535da809
name: clang-format
with:
source: "."

View File

@@ -7,7 +7,7 @@ concurrency:
cancel-in-progress: true
jobs:
build:
lint:
runs-on: ubuntu-latest
container:
image: alexays/waybar:debian

View File

@@ -1,14 +1,15 @@
name: Build and Push Docker Image
on:
workflow_dispatch:
schedule:
# run every night at midnight
- cron: '0 0 * * *'
# run monthly
- cron: '0 0 1 * *'
jobs:
build-and-push:
runs-on: ubuntu-latest
if: github.repository == 'Alexays/Waybar'
if: github.event_name != 'schedule' || github.repository == 'Alexays/Waybar'
strategy:
fail-fast: false # don't fail the other jobs if one of the images fails to build
matrix:

View File

@@ -7,21 +7,21 @@ concurrency:
cancel-in-progress: true
jobs:
clang:
build:
# Run actions in a FreeBSD VM on the ubuntu runner
# https://github.com/actions/runner/issues/385 - for FreeBSD runner support
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test in FreeBSD VM
uses: cross-platform-actions/action@v0.25.0
uses: cross-platform-actions/action@v0.28.0
timeout-minutes: 180
env:
CPPFLAGS: '-isystem/usr/local/include'
LDFLAGS: '-L/usr/local/lib'
with:
operating_system: freebsd
version: "14.1"
version: "14.2"
environment_variables: CPPFLAGS LDFLAGS
sync_files: runner-to-vm
run: |

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ vgcore.*
*.swp
packagecache
/subprojects/**/
/subprojects/.wraplock
/build*
/dist
/meson.egg-info

View File

@@ -1,6 +1,6 @@
# vim: ft=Dockerfile
FROM debian:sid
FROM debian:sid-slim
RUN apt update && \
apt install --no-install-recommends --no-install-suggests -y \

View File

@@ -6,6 +6,6 @@ RUN export FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox -sandbox -usersa
emerge --sync && \
eselect news read --quiet new 1>/dev/null 2>&1 && \
emerge --verbose --update --deep --with-bdeps=y --backtrack=30 --newuse @world && \
USE="wayland gtk3 gtk -doc X pulseaudio minimal" emerge dev-vcs/git dev-libs/wayland dev-libs/wayland-protocols =dev-cpp/gtkmm-3.24.6 x11-libs/libxkbcommon \
USE="wayland gtk3 gtk -doc X pulseaudio minimal" emerge dev-vcs/git dev-libs/wayland dev-libs/wayland-protocols dev-cpp/gtkmm:3.0 x11-libs/libxkbcommon \
x11-libs/gtk+:3 dev-libs/libdbusmenu dev-libs/libnl sys-power/upower media-libs/libpulse dev-libs/libevdev media-libs/libmpdclient \
media-sound/sndio gui-libs/gtk-layer-shell app-text/scdoc media-sound/playerctl dev-libs/iniparser sci-libs/fftw

View File

@@ -20,8 +20,12 @@ debug-run: build-debug
./build/waybar --log-level debug
test:
meson test -C build --no-rebuild --verbose --suite waybar
meson test -C build --verbose --suite waybar
.PHONY: test
test-detailed:
meson test -C build --verbose --print-errorlogs --test-args='--reporter console -s'
.PHONY: test-detailed
clean:
rm -rf build

View File

@@ -116,6 +116,36 @@ sudo apt install \
libxkbregistry-dev
```
On Arch, you can use this command:
```
pacman -S --asdeps \
gtkmm3 \
jsoncpp \
libsigc++ \
fmt \
wayland \
chrono-date \
spdlog \
gtk3 \
gobject-introspection \
libgirepository \
libpulse \
libnl \
libappindicator-gtk3 \
libdbusmenu-gtk3 \
libmpdclient \
sndio \
libevdev \
libxkbcommon \
upower \
meson \
cmake \
scdoc \
wayland-protocols \
glib2-devel
```
Contributions welcome!<br>
Have fun :)<br>

5
asan.supp Normal file
View File

@@ -0,0 +1,5 @@
# Suppress common address sanitizer issues in dependencies, these are often non-fixable or not an issue.
# Use it like this (when in repo root): ASAN_OPTIONS="suppressions=./asan.supp" ./build/waybar
leak:libpangoft2-1.0.so.0
leak:libgtk-3.so.0
leak:libfontconfig.so.1

View File

@@ -1,10 +1,9 @@
(import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; }
).defaultNix
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
in
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
) { src = ./.; }).defaultNix

12
flake.lock generated
View File

@@ -3,11 +3,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
@@ -18,11 +18,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1738142207,
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
"lastModified": 1766902085,
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
"rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
"type": "github"
},
"original": {

129
flake.nix
View File

@@ -9,47 +9,94 @@
};
};
outputs = { self, nixpkgs, ... }:
outputs =
{ self, nixpkgs, ... }:
let
inherit (nixpkgs) lib;
genSystems = func: lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
]
(system: func (import nixpkgs {
inherit system;
overlays = with self.overlays; [
waybar
];
}));
genSystems =
func:
lib.genAttrs
[
"x86_64-linux"
"aarch64-linux"
]
(
system:
func (
import nixpkgs {
inherit system;
overlays = with self.overlays; [
waybar
];
}
)
);
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
mkDate =
longDate:
(lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
in
{
devShells = genSystems
(pkgs:
{
default =
pkgs.mkShell
{
name = "waybar-shell";
devShells = genSystems (pkgs: {
default = pkgs.mkShell {
name = "waybar-shell";
# inherit attributes from upstream nixpkgs derivation
inherit (pkgs.waybar) buildInputs depsBuildBuild depsBuildBuildPropagated depsBuildTarget
depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget
depsTargetTargetPropagated propagatedBuildInputs propagatedNativeBuildInputs strictDeps;
# inherit attributes from upstream nixpkgs derivation
inherit (pkgs.waybar)
buildInputs
depsBuildBuild
depsBuildBuildPropagated
depsBuildTarget
depsBuildTargetPropagated
depsHostHost
depsHostHostPropagated
depsTargetTarget
depsTargetTargetPropagated
propagatedBuildInputs
propagatedNativeBuildInputs
strictDeps
;
# overrides for local development
nativeBuildInputs = pkgs.waybar.nativeBuildInputs ++ (with pkgs; [
clang-tools
gdb
]);
};
});
# overrides for local development
nativeBuildInputs =
pkgs.waybar.nativeBuildInputs
++ (with pkgs; [
nixfmt
clang-tools
gdb
]);
};
});
formatter = genSystems (
pkgs:
pkgs.treefmt.withConfig {
settings = {
formatter = {
clang-format = {
options = [ "-i" ];
command = lib.getExe' pkgs.clang-tools "clang-format";
excludes = [ ];
includes = [
"*.c"
"*.cpp"
"*.h"
"*.hpp"
];
};
nixfmt = {
command = lib.getExe pkgs.nixfmt;
includes = [ "*.nix" ];
};
};
tree-root-file = ".git/index";
};
}
);
overlays = {
default = self.overlays.waybar;
@@ -58,11 +105,15 @@
waybar = prev.waybar;
# take the first "version: '...'" from meson.build
version =
(builtins.head (builtins.split "'"
(builtins.elemAt
(builtins.split " version: '" (builtins.readFile ./meson.build))
2)))
+ "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
(builtins.head (
builtins.split "'" (
builtins.elemAt (builtins.split " version: '" (builtins.readFile ./meson.build)) 2
)
))
+ "+date="
+ (mkDate (self.lastModifiedDate or "19700101"))
+ "_"
+ (self.shortRev or "dirty");
};
};
};

View File

@@ -21,7 +21,7 @@ class ALabel : public AModule {
protected:
Gtk::Label label_;
std::string format_;
const std::chrono::seconds interval_;
const std::chrono::milliseconds interval_;
bool alt_ = false;
std::string default_format_;

View File

@@ -36,6 +36,7 @@ class AModule : public IModule {
SCROLL_DIR getScrollDir(GdkEventScroll *e);
bool tooltipEnabled() const;
std::vector<int> pid_children_;
const std::string name_;
const Json::Value &config_;
Gtk::EventBox event_box_;
@@ -54,7 +55,6 @@ class AModule : public IModule {
const bool isTooltip;
const bool isExpand;
bool hasUserEvents_;
std::vector<int> pid_;
gdouble distance_scrolled_y_;
gdouble distance_scrolled_x_;
std::map<std::string, std::string> eventActionMap_;

View File

@@ -14,6 +14,7 @@
#include "AModule.hpp"
#include "group.hpp"
#include "util/kill_signal.hpp"
#include "xdg-output-unstable-v1-client-protocol.h"
namespace waybar {
@@ -68,7 +69,11 @@ class Bar : public sigc::trackable {
void setMode(const std::string &mode);
void setVisible(bool value);
void toggle();
void show();
void hide();
void handleSignal(int);
util::KillSignalAction getOnSigusr1Action();
util::KillSignalAction getOnSigusr2Action();
struct waybar_output *output;
Json::Value config;
@@ -118,6 +123,9 @@ class Bar : public sigc::trackable {
std::unique_ptr<BarIpcClient> _ipc_client;
#endif
std::vector<std::shared_ptr<waybar::AModule>> modules_all_;
waybar::util::KillSignalAction onSigusr1 = util::SIGNALACTION_DEFAULT_SIGUSR1;
waybar::util::KillSignalAction onSigusr2 = util::SIGNALACTION_DEFAULT_SIGUSR2;
};
} // namespace waybar

View File

@@ -56,6 +56,8 @@ class Client {
std::list<struct waybar_output> outputs_;
std::unique_ptr<CssReloadHelper> m_cssReloadHelper;
std::string m_cssFile;
sigc::connection monitor_added_connection_;
sigc::connection monitor_removed_connection_;
};
} // namespace waybar

View File

@@ -35,6 +35,8 @@ class Config {
void setupConfig(Json::Value &dst, const std::string &config_file, int depth);
void resolveConfigIncludes(Json::Value &config, int depth);
void mergeConfig(Json::Value &a_config_, Json::Value &b_config_);
static std::vector<std::string> findIncludePath(
const std::string &name, const std::vector<std::string> &dirs = CONFIG_DIRS);
std::string config_file_;

View File

@@ -6,6 +6,7 @@
#if defined(__linux__)
#include <sys/inotify.h>
#endif
#include <sys/poll.h>
#include <algorithm>
#include <fstream>
@@ -15,6 +16,7 @@
#include "ALabel.hpp"
#include "bar.hpp"
#include "util/sleeper_thread.hpp"
#include "util/udev_deleter.hpp"
namespace waybar::modules {
@@ -35,15 +37,19 @@ class Battery : public ALabel {
std::tuple<uint8_t, float, std::string, float, uint16_t, float> getInfos();
const std::string formatTimeRemaining(float hoursRemaining);
void setBarClass(std::string&);
void processEvents(std::string& state, std::string& status, uint8_t capacity);
int global_watch;
std::map<fs::path, int> batteries_;
std::unique_ptr<udev, util::UdevDeleter> udev_;
std::array<pollfd, 1> poll_fds_;
std::unique_ptr<udev_monitor, util::UdevMonitorDeleter> mon_;
fs::path adapter_;
int battery_watch_fd_;
int global_watch_fd_;
std::mutex battery_list_mutex_;
std::string old_status_;
std::string last_event_;
bool warnFirstTime_{true};
bool weightedAverage_{true};
const Bar& bar_;
util::SleeperThread thread_;

View File

@@ -1,50 +0,0 @@
#pragma once
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"
namespace cava {
extern "C" {
#include <cava/common.h>
}
} // namespace cava
namespace waybar::modules {
using namespace std::literals::chrono_literals;
class Cava final : public ALabel {
public:
Cava(const std::string&, const Json::Value&);
virtual ~Cava();
auto update() -> void override;
auto doAction(const std::string& name) -> void override;
private:
util::SleeperThread thread_;
util::SleeperThread thread_fetch_input_;
struct cava::error_s error_{}; // cava errors
struct cava::config_params prm_{}; // cava parameters
struct cava::audio_raw audio_raw_{}; // cava handled raw audio data(is based on audio_data)
struct cava::audio_data audio_data_{}; // cava audio data
struct cava::cava_plan* plan_; //{new cava_plan{}};
// Cava API to read audio source
cava::ptr input_source_;
// Delay to handle audio source
std::chrono::milliseconds frame_time_milsec_{1s};
// Text to display
std::string text_{""};
int rePaint_{1};
std::chrono::seconds fetch_input_delay_{4};
std::chrono::seconds suspend_silence_delay_{0};
bool silence_{false};
bool hide_on_silence_{false};
std::string format_silent_{""};
int sleep_counter_{0};
// Cava method
void pause_resume();
// ModuleActionMap
static inline std::map<const std::string, void (waybar::modules::Cava::* const)()> actionMap_{
{"mode", &waybar::modules::Cava::pause_resume}};
};
} // namespace waybar::modules

View File

@@ -0,0 +1,43 @@
#pragma once
#include <epoxy/gl.h>
#include "AModule.hpp"
#include "cava_backend.hpp"
namespace waybar::modules::cava {
class CavaGLSL final : public AModule, public Gtk::GLArea {
public:
CavaGLSL(const std::string&, const Json::Value&);
~CavaGLSL() = default;
private:
std::shared_ptr<CavaBackend> backend_;
struct ::cava::config_params prm_;
int frame_counter{0};
bool silence_{false};
bool hide_on_silence_{false};
// Cava method
auto onUpdate(const ::cava::audio_raw& input) -> void;
auto onSilence() -> void;
// Member variable to store the shared pointer
std::shared_ptr<::cava::audio_raw> m_data_;
GLuint shaderProgram_;
// OpenGL variables
GLuint fbo_;
GLuint texture_;
GLint uniform_bars_;
GLint uniform_previous_bars_;
GLint uniform_bars_count_;
GLint uniform_time_;
// Methods
void onRealize();
bool onRender(const Glib::RefPtr<Gdk::GLContext>& context);
void initShaders();
void initSurface();
void initGLSL();
GLuint loadShader(const std::string& fileName, GLenum type);
};
} // namespace waybar::modules::cava

View File

@@ -0,0 +1,30 @@
#pragma once
#include "ALabel.hpp"
#include "cava_backend.hpp"
namespace waybar::modules::cava {
class Cava final : public ALabel, public sigc::trackable {
public:
Cava(const std::string&, const Json::Value&);
~Cava() = default;
auto doAction(const std::string& name) -> void override;
private:
std::shared_ptr<CavaBackend> backend_;
// Text to display
Glib::ustring label_text_{""};
bool silence_{false};
bool hide_on_silence_{false};
std::string format_silent_{""};
int ascii_range_{0};
// Cava method
void pause_resume();
auto onUpdate(const std::string& input) -> void;
auto onSilence() -> void;
// ModuleActionMap
static inline std::map<const std::string, void (waybar::modules::cava::Cava::* const)()>
actionMap_{{"mode", &waybar::modules::cava::Cava::pause_resume}};
};
} // namespace waybar::modules::cava

View File

@@ -0,0 +1,84 @@
#pragma once
#include <json/json.h>
#include <sigc++/sigc++.h>
#include "util/sleeper_thread.hpp"
namespace cava {
extern "C" {
// Need sdl_glsl output feature to be enabled on libcava
#ifndef SDL_GLSL
#define SDL_GLSL
#endif
#include <cava/common.h>
#ifdef SDL_GLSL
#undef SDL_GLSL
#endif
}
} // namespace cava
namespace waybar::modules::cava {
using namespace std::literals::chrono_literals;
class CavaBackend final {
public:
static std::shared_ptr<CavaBackend> inst(const Json::Value& config);
virtual ~CavaBackend();
// Methods
int getAsciiRange();
void doPauseResume();
void Update();
const struct ::cava::config_params* getPrm();
std::chrono::milliseconds getFrameTimeMilsec();
// Signal accessor
using type_signal_update = sigc::signal<void(const std::string&)>;
type_signal_update signal_update();
using type_signal_audio_raw_update = sigc::signal<void(const ::cava::audio_raw&)>;
type_signal_audio_raw_update signal_audio_raw_update();
using type_signal_silence = sigc::signal<void()>;
type_signal_silence signal_silence();
private:
CavaBackend(const Json::Value& config);
util::SleeperThread read_thread_;
util::SleeperThread out_thread_;
// Cava API to read audio source
::cava::ptr input_source_{NULL};
struct ::cava::error_s error_{}; // cava errors
struct ::cava::config_params prm_{}; // cava parameters
struct ::cava::audio_raw audio_raw_{}; // cava handled raw audio data(is based on audio_data)
struct ::cava::audio_data audio_data_{}; // cava audio data
struct ::cava::cava_plan* plan_{NULL}; //{new cava_plan{}};
std::chrono::seconds fetch_input_delay_{4};
// Delay to handle audio source
std::chrono::milliseconds frame_time_milsec_{1s};
const Json::Value& config_;
int re_paint_{0};
bool silence_{false};
bool silence_prev_{false};
std::chrono::seconds suspend_silence_delay_{0};
int sleep_counter_{0};
std::string output_{};
// Methods
void invoke();
void execute();
bool isSilence();
void doUpdate(bool force = false);
void loadConfig();
void freeBackend();
// Signal
type_signal_update m_signal_update_;
type_signal_audio_raw_update m_signal_audio_raw_;
type_signal_silence m_signal_silence_;
};
} // namespace waybar::modules::cava

View File

@@ -0,0 +1,27 @@
#pragma once
#ifdef HAVE_LIBCAVA
#include "cavaRaw.hpp"
#include "cava_backend.hpp"
#ifdef HAVE_LIBCAVAGLSL
#include "cavaGLSL.hpp"
#endif
#endif
namespace waybar::modules::cava {
AModule* getModule(const std::string& id, const Json::Value& config) {
#ifdef HAVE_LIBCAVA
const std::shared_ptr<CavaBackend> backend_{waybar::modules::cava::CavaBackend::inst(config)};
switch (backend_->getPrm()->output) {
#ifdef HAVE_LIBCAVAGLSL
case ::cava::output_method::OUTPUT_SDL_GLSL:
return new waybar::modules::cava::CavaGLSL(id, config);
#endif
default:
return new waybar::modules::cava::Cava(id, config);
}
#else
throw std::runtime_error("Unknown module");
#endif
};
} // namespace waybar::modules::cava

View File

@@ -38,39 +38,41 @@ class Clock final : public ALabel {
5 - tooltip-format
*/
std::map<int, std::string const> fmtMap_;
uint cldMonCols_{3}; // calendar count month columns
int cldWnLen_{3}; // calendar week number length
const int cldMonColLen_{20}; // calendar month column length
WS cldWPos_{WS::HIDDEN}; // calendar week side to print
months cldCurrShift_{0}; // calendar months shift
int cldShift_{1}; // calendar months shift factor
year_month_day cldYearShift_; // calendar Year mode. Cached ymd
std::string cldYearCached_; // calendar Year mode. Cached calendar
year_month cldMonShift_; // calendar Month mode. Cached ym
std::string cldMonCached_; // calendar Month mode. Cached calendar
day cldBaseDay_{0}; // calendar Cached day. Is used when today is changing(midnight)
uint cldMonCols_{3}; // calendar count month columns
int cldWnLen_{3}; // calendar week number length
const int cldMonColLen_{20}; // calendar month column length
WS cldWPos_{WS::HIDDEN}; // calendar week side to print
date::months cldCurrShift_{0}; // calendar months shift
int cldShift_{1}; // calendar months shift factor
date::year_month_day cldYearShift_; // calendar Year mode. Cached ymd
std::string cldYearCached_; // calendar Year mode. Cached calendar
date::year_month cldMonShift_; // calendar Month mode. Cached ym
std::string cldMonCached_; // calendar Month mode. Cached calendar
date::day cldBaseDay_{0}; // calendar Cached day. Is used when today is changing(midnight)
std::string cldText_{""}; // calendar text to print
bool iso8601Calendar_{false}; // whether the calendar is in ISO8601
CldMode cldMode_{CldMode::MONTH};
auto get_calendar(const year_month_day& today, const year_month_day& ymd, const time_zone* tz)
-> const std::string;
auto get_calendar(const date::year_month_day& today, const date::year_month_day& ymd,
const date::time_zone* tz) -> const std::string;
// get local time zone
auto local_zone() -> const time_zone*;
auto local_zone() -> const date::time_zone*;
// time zoned time in tooltip
const bool tzInTooltip_; // if need to print time zones text
std::vector<const time_zone*> tzList_; // time zones list
int tzCurrIdx_; // current time zone index for tzList_
std::string tzText_{""}; // time zones text to print
const bool tzInTooltip_; // if need to print time zones text
std::vector<const date::time_zone*> tzList_; // time zones list
int tzCurrIdx_; // current time zone index for tzList_
std::string tzText_{""}; // time zones text to print
std::string tzTooltipFormat_{""}; // optional timezone tooltip format
util::SleeperThread thread_;
// ordinal date in tooltip
const bool ordInTooltip_;
std::string ordText_{""};
auto get_ordinal_date(const year_month_day& today) -> std::string;
auto get_ordinal_date(const date::year_month_day& today) -> std::string;
auto getTZtext(sys_seconds now) -> std::string;
auto first_day_of_week() -> weekday;
auto getTZtext(date::sys_seconds now) -> std::string;
auto first_day_of_week() -> date::weekday;
// Module actions
void cldModeSwitch();
void cldShift_up();

View File

@@ -0,0 +1,141 @@
#pragma once
#include <fmt/format.h>
#include <gtkmm/button.h>
#include <gtkmm/image.h>
#include <gtkmm/label.h>
#include <map>
#include <memory>
#include <vector>
#include "AModule.hpp"
#include "bar.hpp"
#include "ext-workspace-v1-client-protocol.h"
namespace waybar::modules::ext {
class WorkspaceGroup;
class Workspace;
class WorkspaceManager final : public AModule {
public:
WorkspaceManager(const std::string &id, const waybar::Bar &bar, const Json::Value &config);
~WorkspaceManager() override;
void register_manager(wl_registry *registry, uint32_t name, uint32_t version);
void remove_workspace_group(uint32_t id);
void remove_workspace(uint32_t id);
void set_needs_sorting() { needs_sorting_ = true; }
// wl events
void handle_workspace_group(ext_workspace_group_handle_v1 *handle);
void handle_workspace(ext_workspace_handle_v1 *handle);
void handle_done();
void handle_finished();
// wl requests
void commit() const;
private:
void update() override;
bool has_button(const Gtk::Button *button);
void sort_workspaces();
void clear_buttons();
void update_buttons();
static uint32_t group_global_id;
static uint32_t workspace_global_id;
uint32_t workspace_name = 0;
bool sort_by_id_ = false;
bool sort_by_name_ = true;
bool sort_by_coordinates_ = false;
bool all_outputs_ = false;
const waybar::Bar &bar_;
Gtk::Box box_;
ext_workspace_manager_v1 *ext_manager_ = nullptr;
std::vector<std::unique_ptr<WorkspaceGroup>> groups_;
std::vector<std::unique_ptr<Workspace>> workspaces_;
bool needs_sorting_ = false;
};
class WorkspaceGroup {
public:
WorkspaceGroup(WorkspaceManager &manager, ext_workspace_group_handle_v1 *handle, uint32_t id);
~WorkspaceGroup();
u_int32_t id() const { return id_; }
bool has_output(const wl_output *output);
bool has_workspace(const ext_workspace_handle_v1 *workspace);
// wl events
void handle_capabilities(uint32_t capabilities);
void handle_output_enter(wl_output *output);
void handle_output_leave(wl_output *output);
void handle_workspace_enter(ext_workspace_handle_v1 *handle);
void handle_workspace_leave(ext_workspace_handle_v1 *handle);
void handle_removed();
private:
WorkspaceManager &workspaces_manager_;
ext_workspace_group_handle_v1 *ext_handle_;
uint32_t id_;
std::vector<wl_output *> outputs_;
std::vector<ext_workspace_handle_v1 *> workspaces_;
};
class Workspace {
public:
Workspace(const Json::Value &config, WorkspaceManager &manager, ext_workspace_handle_v1 *handle,
uint32_t id, const std::string &name);
~Workspace();
ext_workspace_handle_v1 *handle() const { return ext_handle_; }
u_int32_t id() const { return id_; }
std::string &workspace_id() { return workspace_id_; }
std::string &name() { return name_; }
std::vector<u_int32_t> &coordinates() { return coordinates_; }
Gtk::Button &button() { return button_; }
void update();
// wl events
void handle_id(const std::string &id);
void handle_name(const std::string &name);
void handle_coordinates(const std::vector<uint32_t> &coordinates);
void handle_state(uint32_t state);
void handle_capabilities(uint32_t capabilities);
void handle_removed();
// gdk events
bool handle_clicked(const GdkEventButton *button) const;
private:
bool has_state(uint32_t state) const { return (state_ & state) == state; }
std::string icon();
WorkspaceManager &workspace_manager_;
ext_workspace_handle_v1 *ext_handle_ = nullptr;
uint32_t id_;
uint32_t state_ = 0;
std::string workspace_id_;
std::string name_;
std::vector<uint32_t> coordinates_;
bool active_only_ = false;
bool ignore_hidden_ = true;
std::string format_;
bool with_icon_ = false;
static std::map<std::string, std::string> icon_map_;
std::string on_click_action_;
std::string on_click_middle_action_;
std::string on_click_right_action_;
Gtk::Button button_;
Gtk::Box content_;
Gtk::Label label_;
};
} // namespace waybar::modules::ext

View File

@@ -0,0 +1,10 @@
#include "ext-workspace-v1-client-protocol.h"
namespace waybar::modules::ext {
void add_registry_listener(void *data);
void add_workspace_listener(ext_workspace_handle_v1 *workspace_handle, void *data);
void add_workspace_group_listener(ext_workspace_group_handle_v1 *workspace_group_handle,
void *data);
ext_workspace_manager_v1 *workspace_manager_bind(wl_registry *registry, uint32_t name,
uint32_t version, void *data);
} // namespace waybar::modules::ext

40
include/modules/gps.hpp Normal file
View File

@@ -0,0 +1,40 @@
#pragma once
#include <fmt/format.h>
#include <sys/statvfs.h>
#ifdef WANT_RFKILL
#include "util/rfkill.hpp"
#endif
#include <gps.h>
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"
namespace waybar::modules {
class Gps : public ALabel {
public:
Gps(const std::string&, const Json::Value&);
virtual ~Gps();
auto update() -> void override;
private:
#ifdef WANT_RFKILL
util::Rfkill rfkill_;
#endif
const std::string getFixModeName() const;
const std::string getFixModeString() const;
const std::string getFixStatusString() const;
util::SleeperThread thread_, gps_thread_;
gps_data_t gps_data_;
std::string state_;
bool hideDisconnected = true;
bool hideNoFix = false;
};
} // namespace waybar::modules

View File

@@ -17,9 +17,13 @@ class EventHandler {
virtual ~EventHandler() = default;
};
/// If you want to use the Hyprland IPC, simply use IPC::inst() to get the singleton instance.
/// Do not create multiple instances.
class IPC {
protected:
IPC(); // use IPC::inst() instead.
public:
IPC();
~IPC();
static IPC& inst();
@@ -42,8 +46,7 @@ class IPC {
util::JsonParser parser_;
std::list<std::pair<std::string, EventHandler*>> callbacks_;
int socketfd_; // the hyprland socket file descriptor
bool running_ = true;
pid_t socketOwnerPid_;
bool running_ = true; // the ipcThread will stop running when this is false
};
inline bool modulesReady = false;
}; // namespace waybar::modules::hyprland

View File

@@ -0,0 +1,41 @@
#pragma once
#include <fmt/format.h>
#include <string>
#include "AAppIconLabel.hpp"
#include "bar.hpp"
#include "modules/hyprland/backend.hpp"
namespace waybar::modules::hyprland {
class WindowCount : public waybar::AAppIconLabel, public EventHandler {
public:
WindowCount(const std::string&, const waybar::Bar&, const Json::Value&);
~WindowCount() override;
auto update() -> void override;
private:
struct Workspace {
int id;
int windows;
bool hasfullscreen;
static auto parse(const Json::Value& value) -> Workspace;
};
auto getActiveWorkspace(const std::string&) -> Workspace;
auto getActiveWorkspace() -> Workspace;
void onEvent(const std::string& ev) override;
void queryActiveWorkspace();
void setClass(const std::string&, bool enable);
bool separateOutputs_;
std::mutex mutex_;
const Bar& bar_;
Workspace workspace_;
IPC& m_ipc;
};
} // namespace waybar::modules::hyprland

View File

@@ -26,34 +26,48 @@ namespace waybar::modules::hyprland {
class Workspaces;
struct WindowRepr {
std::string address;
std::string window_class;
std::string window_title;
std::string repr_rewrite;
bool isActive = false;
public:
bool empty() const { return address.empty(); }
void setActive(bool value) { isActive = value; }
};
class WindowCreationPayload {
public:
WindowCreationPayload(std::string workspace_name, WindowAddress window_address,
std::string window_repr);
WindowRepr window_repr);
WindowCreationPayload(std::string workspace_name, WindowAddress window_address,
std::string window_class, std::string window_title);
std::string window_class, std::string window_title, bool is_active);
WindowCreationPayload(Json::Value const& client_data);
int incrementTimeSpentUncreated();
bool isEmpty(Workspaces& workspace_manager);
bool reprIsReady() const { return std::holds_alternative<Repr>(m_window); }
std::string repr(Workspaces& workspace_manager);
WindowRepr repr(Workspaces& workspace_manager);
void setActive(bool value) { m_isActive = value; }
std::string getWorkspaceName() const { return m_workspaceName; }
WindowAddress getAddress() const { return m_windowAddress; }
void moveToWorksace(std::string& new_workspace_name);
void moveToWorkspace(std::string& new_workspace_name);
private:
void clearAddr();
void clearWorkspaceName();
using Repr = std::string;
using Repr = WindowRepr;
using ClassAndTitle = std::pair<std::string, std::string>;
std::variant<Repr, ClassAndTitle> m_window;
WindowAddress m_windowAddress;
std::string m_workspaceName;
bool m_isActive = false;
int m_timeSpentUncreated = 0;
};

View File

@@ -42,7 +42,6 @@ class Workspace {
bool isPersistentConfig() const { return m_isPersistentConfig; };
bool isPersistentRule() const { return m_isPersistentRule; };
bool isVisible() const { return m_isVisible; };
bool isEmpty() const { return m_windows == 0; };
bool isUrgent() const { return m_isUrgent; };
bool handleClicked(GdkEventButton* bt) const;
@@ -54,15 +53,18 @@ class Workspace {
void setWindows(uint value) { m_windows = value; };
void setName(std::string const& value) { m_name = value; };
void setOutput(std::string const& value) { m_output = value; };
bool containsWindow(WindowAddress const& addr) const { return m_windowMap.contains(addr); }
void insertWindow(WindowCreationPayload create_window_paylod);
std::string removeWindow(WindowAddress const& addr);
bool containsWindow(WindowAddress const& addr) const {
return std::ranges::any_of(m_windowMap,
[&addr](const auto& window) { return window.address == addr; });
};
void insertWindow(WindowCreationPayload create_window_payload);
void initializeWindowMap(const Json::Value& clients_data);
void setActiveWindow(WindowAddress const& addr);
bool onWindowOpened(WindowCreationPayload const& create_window_paylod);
std::optional<std::string> closeWindow(WindowAddress const& addr);
bool onWindowOpened(WindowCreationPayload const& create_window_payload);
std::optional<WindowRepr> closeWindow(WindowAddress const& addr);
void update(const std::string& format, const std::string& icon);
void update(const std::string& workspace_icon);
private:
Workspaces& m_workspaceManager;
@@ -78,11 +80,17 @@ class Workspace {
bool m_isUrgent = false;
bool m_isVisible = false;
std::map<WindowAddress, std::string> m_windowMap;
std::vector<WindowRepr> m_windowMap;
Gtk::Button m_button;
Gtk::Box m_content;
Gtk::Label m_label;
Gtk::Label m_labelBefore;
Gtk::Label m_labelAfter;
bool isEmpty() const;
void updateTaskbar(const std::string& workspace_icon);
bool handleClick(const GdkEventButton* event_button, WindowAddress const& addr) const;
bool shouldSkipWindow(const WindowRepr& window_repr) const;
IPC& m_ipc;
};

View File

@@ -1,12 +1,14 @@
#pragma once
#include <gtkmm/button.h>
#include <gtkmm/enums.h>
#include <gtkmm/label.h>
#include <json/value.h>
#include <cstdint>
#include <map>
#include <memory>
#include <optional>
#include <regex>
#include <string>
#include <vector>
@@ -17,6 +19,7 @@
#include "modules/hyprland/windowcreationpayload.hpp"
#include "modules/hyprland/workspace.hpp"
#include "util/enum.hpp"
#include "util/icon_loader.hpp"
#include "util/regex_collection.hpp"
using WindowAddress = std::string;
@@ -36,26 +39,43 @@ class Workspaces : public AModule, public EventHandler {
auto showSpecial() const -> bool { return m_showSpecial; }
auto activeOnly() const -> bool { return m_activeOnly; }
auto specialVisibleOnly() const -> bool { return m_specialVisibleOnly; }
auto persistentOnly() const -> bool { return m_persistentOnly; }
auto moveToMonitor() const -> bool { return m_moveToMonitor; }
auto enableTaskbar() const -> bool { return m_enableTaskbar; }
auto taskbarWithIcon() const -> bool { return m_taskbarWithIcon; }
auto getBarOutput() const -> std::string { return m_bar.output->name; }
auto formatBefore() const -> std::string { return m_formatBefore; }
auto formatAfter() const -> std::string { return m_formatAfter; }
auto taskbarFormatBefore() const -> std::string { return m_taskbarFormatBefore; }
auto taskbarFormatAfter() const -> std::string { return m_taskbarFormatAfter; }
auto taskbarIconSize() const -> int { return m_taskbarIconSize; }
auto taskbarOrientation() const -> Gtk::Orientation { return m_taskbarOrientation; }
auto taskbarReverseDirection() const -> bool { return m_taskbarReverseDirection; }
auto onClickWindow() const -> std::string { return m_onClickWindow; }
auto getIgnoredWindows() const -> std::vector<std::regex> { return m_ignoreWindows; }
enum class ActiveWindowPosition { NONE, FIRST, LAST };
auto activeWindowPosition() const -> ActiveWindowPosition { return m_activeWindowPosition; }
std::string getRewrite(std::string window_class, std::string window_title);
std::string& getWindowSeparator() { return m_formatWindowSeparator; }
bool isWorkspaceIgnored(std::string const& workspace_name);
bool windowRewriteConfigUsesTitle() const { return m_anyWindowRewriteRuleUsesTitle; }
const IconLoader& iconLoader() const { return m_iconLoader; }
private:
void onEvent(const std::string& e) override;
void updateWindowCount();
void sortSpecialCentered();
void sortWorkspaces();
void createWorkspace(Json::Value const& workspace_data,
Json::Value const& clients_data = Json::Value::nullRef);
static Json::Value createMonitorWorkspaceData(std::string const& name,
std::string const& monitor);
void removeWorkspace(std::string const& name);
void removeWorkspace(std::string const& workspaceString);
void setUrgentWorkspace(std::string const& windowaddress);
// Config
@@ -67,6 +87,7 @@ class Workspaces : public AModule, public EventHandler {
auto populateIgnoreWorkspacesConfig(const Json::Value& config) -> void;
auto populateFormatWindowSeparatorConfig(const Json::Value& config) -> void;
auto populateWindowRewriteConfig(const Json::Value& config) -> void;
auto populateWorkspaceTaskbarConfig(const Json::Value& config) -> void;
void registerIpc();
@@ -74,10 +95,11 @@ class Workspaces : public AModule, public EventHandler {
void onWorkspaceActivated(std::string const& payload);
void onSpecialWorkspaceActivated(std::string const& payload);
void onWorkspaceDestroyed(std::string const& payload);
void onWorkspaceCreated(std::string const& workspaceName,
void onWorkspaceCreated(std::string const& payload,
Json::Value const& clientsData = Json::Value::nullRef);
void onWorkspaceMoved(std::string const& payload);
void onWorkspaceRenamed(std::string const& payload);
static std::optional<int> parseWorkspaceId(std::string const& workspaceIdStr);
// monitor events
void onMonitorFocused(std::string const& payload);
@@ -88,16 +110,24 @@ class Workspaces : public AModule, public EventHandler {
void onWindowMoved(std::string const& payload);
void onWindowTitleEvent(std::string const& payload);
void onActiveWindowChanged(WindowAddress const& payload);
void onConfigReloaded();
int windowRewritePriorityFunction(std::string const& window_rule);
// event payload management
template <typename... Args>
static std::string makePayload(Args const&... args);
static std::pair<std::string, std::string> splitDoublePayload(std::string const& payload);
static std::tuple<std::string, std::string, std::string> splitTriplePayload(
std::string const& payload);
// Update methods
void doUpdate();
void removeWorkspacesToRemove();
void createWorkspacesToCreate();
static std::vector<std::string> getVisibleWorkspaces();
static std::vector<int> getVisibleWorkspaces();
void updateWorkspaceStates();
bool updateWindowsToCreate();
@@ -113,23 +143,26 @@ class Workspaces : public AModule, public EventHandler {
bool m_showSpecial = false;
bool m_activeOnly = false;
bool m_specialVisibleOnly = false;
bool m_persistentOnly = false;
bool m_moveToMonitor = false;
Json::Value m_persistentWorkspaceConfig;
// Map for windows stored in workspaces not present in the current bar.
// This happens when the user has multiple monitors (hence, multiple bars)
// and doesn't share windows accross bars (a.k.a `all-outputs` = false)
std::map<WindowAddress, std::string> m_orphanWindowMap;
// and doesn't share windows across bars (a.k.a `all-outputs` = false)
std::map<WindowAddress, WindowRepr, std::less<>> m_orphanWindowMap;
enum class SortMethod { ID, NAME, NUMBER, DEFAULT };
enum class SortMethod { ID, NAME, NUMBER, SPECIAL_CENTERED, DEFAULT };
util::EnumParser<SortMethod> m_enumParser;
SortMethod m_sortBy = SortMethod::DEFAULT;
std::map<std::string, SortMethod> m_sortMap = {{"ID", SortMethod::ID},
{"NAME", SortMethod::NAME},
{"NUMBER", SortMethod::NUMBER},
{"SPECIAL-CENTERED", SortMethod::SPECIAL_CENTERED},
{"DEFAULT", SortMethod::DEFAULT}};
std::string m_format;
std::string m_formatBefore;
std::string m_formatAfter;
std::map<std::string, std::string> m_iconsMap;
util::RegexCollection m_windowRewriteRules;
@@ -138,14 +171,35 @@ class Workspaces : public AModule, public EventHandler {
bool m_withIcon;
uint64_t m_monitorId;
std::string m_activeWorkspaceName;
int m_activeWorkspaceId;
std::string m_activeSpecialWorkspaceName;
std::vector<std::unique_ptr<Workspace>> m_workspaces;
std::vector<std::pair<Json::Value, Json::Value>> m_workspacesToCreate;
std::vector<std::string> m_workspacesToRemove;
std::vector<WindowCreationPayload> m_windowsToCreate;
IconLoader m_iconLoader;
bool m_enableTaskbar = false;
bool m_updateActiveWindow = false;
bool m_taskbarWithIcon = false;
bool m_taskbarWithTitle = false;
std::string m_taskbarFormatBefore;
std::string m_taskbarFormatAfter;
int m_taskbarIconSize = 16;
Gtk::Orientation m_taskbarOrientation = Gtk::ORIENTATION_HORIZONTAL;
bool m_taskbarReverseDirection = false;
util::EnumParser<ActiveWindowPosition> m_activeWindowEnumParser;
ActiveWindowPosition m_activeWindowPosition = ActiveWindowPosition::NONE;
std::map<std::string, ActiveWindowPosition> m_activeWindowPositionMap = {
{"NONE", ActiveWindowPosition::NONE},
{"FIRST", ActiveWindowPosition::FIRST},
{"LAST", ActiveWindowPosition::LAST},
};
std::string m_onClickWindow;
std::string m_currentActiveWindowAddress;
std::vector<std::regex> m_ignoreWorkspaces;
std::vector<std::regex> m_ignoreWindows;
std::mutex m_mutex;
const Bar& m_bar;

View File

@@ -31,7 +31,7 @@ class Image : public AModule {
std::string path_;
std::string tooltip_;
int size_;
int interval_;
std::chrono::milliseconds interval_;
util::command::res output_;
util::SleeperThread thread_;

View File

@@ -9,6 +9,7 @@
#include <sys/epoll.h>
#include <optional>
#include <vector>
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"
@@ -16,6 +17,8 @@
#include "util/rfkill.hpp"
#endif
enum ip_addr_pref : uint8_t { IPV4, IPV6, IPV4_6 };
namespace waybar::modules {
class Network : public ALabel {
@@ -25,8 +28,8 @@ class Network : public ALabel {
auto update() -> void override;
private:
static const uint8_t MAX_RETRY = 5;
static const uint8_t EPOLL_MAX = 200;
static const uint8_t MAX_RETRY{5};
static const uint8_t EPOLL_MAX{200};
static int handleEvents(struct nl_msg*, void*);
static int handleEventsDone(struct nl_msg*, void*);
@@ -42,40 +45,44 @@ class Network : public ALabel {
void parseFreq(struct nlattr**);
void parseBssid(struct nlattr**);
bool associatedOrJoined(struct nlattr**);
bool checkInterface(std::string name);
bool matchInterface(const std::string& ifname, const std::vector<std::string>& altnames,
std::string& matched) const;
auto getInfo() -> void;
const std::string getNetworkState() const;
void clearIface();
bool wildcardMatch(const std::string& pattern, const std::string& text) const;
std::optional<std::pair<unsigned long long, unsigned long long>> readBandwidthUsage();
int ifid_;
struct sockaddr_nl nladdr_ = {0};
struct nl_sock* sock_ = nullptr;
struct nl_sock* ev_sock_ = nullptr;
int efd_;
int ev_fd_;
int nl80211_id_;
int ifid_{-1};
ip_addr_pref addr_pref_{ip_addr_pref::IPV4};
struct sockaddr_nl nladdr_{0};
struct nl_sock* sock_{nullptr};
struct nl_sock* ev_sock_{nullptr};
int efd_{-1};
int ev_fd_{-1};
int nl80211_id_{-1};
std::mutex mutex_;
bool want_route_dump_;
bool want_link_dump_;
bool want_addr_dump_;
bool dump_in_progress_;
bool is_p2p_;
bool want_route_dump_{false};
bool want_link_dump_{false};
bool want_addr_dump_{false};
bool dump_in_progress_{false};
bool is_p2p_{false};
unsigned long long bandwidth_down_total_;
unsigned long long bandwidth_up_total_;
unsigned long long bandwidth_down_total_{0};
unsigned long long bandwidth_up_total_{0};
std::string state_;
std::string essid_;
std::string bssid_;
bool carrier_;
bool carrier_{false};
std::string ifname_;
std::string ipaddr_;
std::string ipaddr6_;
std::string gwaddr_;
std::string netmask_;
int cidr_;
std::string netmask6_;
int cidr_{0};
int cidr6_{0};
int32_t signal_strength_dbm_;
uint8_t signal_strength_;
std::string signal_strength_app_;
@@ -84,9 +91,9 @@ class Network : public ALabel {
util::SleeperThread thread_;
util::SleeperThread thread_timer_;
#ifdef WANT_RFKILL
util::Rfkill rfkill_;
util::Rfkill rfkill_{RFKILL_TYPE_WLAN};
#endif
float frequency_;
float frequency_{0};
};
} // namespace waybar::modules

View File

@@ -33,6 +33,7 @@ class Language : public ALabel, public EventHandler {
std::vector<Layout> layouts_;
unsigned current_idx_;
std::string last_short_name_;
};
} // namespace waybar::modules::niri

View File

@@ -13,7 +13,7 @@ namespace waybar::modules::privacy {
class Privacy : public AModule {
public:
Privacy(const std::string &, const Json::Value &, const std::string &pos);
Privacy(const std::string &, const Json::Value &, Gtk::Orientation, const std::string &pos);
auto update() -> void override;
void onPrivacyNodesChanged();
@@ -31,6 +31,8 @@ class Privacy : public AModule {
uint iconSpacing = 4;
uint iconSize = 20;
uint transition_duration = 250;
std::set<std::pair<PrivacyNodeType, std::string>> ignore;
bool ignore_monitor = true;
std::shared_ptr<util::PipewireBackend::PipewireBackend> backend = nullptr;
};

View File

@@ -17,8 +17,8 @@ namespace waybar::modules::privacy {
class PrivacyItem : public Gtk::Revealer {
public:
PrivacyItem(const Json::Value &config_, enum PrivacyNodeType privacy_type_,
std::list<PrivacyNodeInfo *> *nodes, const std::string &pos, const uint icon_size,
const uint transition_duration);
std::list<PrivacyNodeInfo *> *nodes, Gtk::Orientation orientation,
const std::string &pos, const uint icon_size, const uint transition_duration);
enum PrivacyNodeType privacy_type;

View File

@@ -24,6 +24,7 @@ class Layout : public waybar::ALabel {
private:
const waybar::Bar &bar_;
std::string name_;
struct wl_output *output_; // stores the output this module belongs to
struct wl_output *focused_output_; // stores the currently focused output
struct zriver_output_status_v1 *output_status_;

View File

@@ -21,6 +21,7 @@ class Tags : public waybar::AModule {
void handle_view_tags(struct wl_array *tags);
void handle_urgent_tags(uint32_t tags);
void handle_show();
void handle_primary_clicked(uint32_t tag);
bool handle_button_press(GdkEventButton *event_button, uint32_t tag);

View File

@@ -0,0 +1,43 @@
#pragma once
#include <json/json.h>
#include <spdlog/spdlog.h>
#include <string>
#include <unordered_map>
class IconManager {
public:
static IconManager& instance() {
static IconManager instance;
return instance;
}
void setIconsConfig(const Json::Value& icons_config) {
if (icons_config.isObject()) {
for (const auto& key : icons_config.getMemberNames()) {
std::string app_name = key;
const Json::Value& icon_value = icons_config[key];
if (icon_value.isString()) {
std::string icon_path = icon_value.asString();
icons_map_[app_name] = icon_path;
}
}
} else {
spdlog::warn("Invalid icon config format.");
}
}
std::string getIconForApp(const std::string& app_name) const {
auto it = icons_map_.find(app_name);
if (it != icons_map_.end()) {
return it->second;
}
return "";
}
private:
IconManager() = default;
std::unordered_map<std::string, std::string> icons_map_;
};

View File

@@ -26,7 +26,7 @@ struct ToolTip {
class Item : public sigc::trackable {
public:
Item(const std::string&, const std::string&, const Json::Value&, const Bar&);
~Item() = default;
~Item();
std::string bus_name;
std::string object_path;
@@ -62,6 +62,7 @@ class Item : public sigc::trackable {
void proxyReady(Glib::RefPtr<Gio::AsyncResult>& result);
void setProperty(const Glib::ustring& name, Glib::VariantBase& value);
void setStatus(const Glib::ustring& value);
void setCustomIcon(const std::string& id);
void getUpdatedProperties();
void processUpdatedProperties(Glib::RefPtr<Gio::AsyncResult>& result);
void onSignal(const Glib::ustring& sender_name, const Glib::ustring& signal_name,

View File

@@ -21,6 +21,7 @@ class Tray : public AModule {
void onRemove(std::unique_ptr<Item>& item);
static inline std::size_t nb_hosts_ = 0;
bool show_passive_ = false;
Gtk::Box box_;
SNI::Watcher::singleton watcher_;
SNI::Host host_;

View File

@@ -21,7 +21,7 @@ class Language : public ALabel, public sigc::trackable {
auto update() -> void override;
private:
enum class DispayedShortFlag { None = 0, ShortName = 1, ShortDescription = 1 << 1 };
enum class DisplayedShortFlag { None = 0, ShortName = 1, ShortDescription = 1 << 1 };
struct Layout {
std::string full_name;
@@ -58,7 +58,7 @@ class Language : public ALabel, public sigc::trackable {
std::map<std::string, Layout> layouts_map_;
bool hide_single_;
bool is_variant_displayed;
std::byte displayed_short_flag = static_cast<std::byte>(DispayedShortFlag::None);
std::byte displayed_short_flag = static_cast<std::byte>(DisplayedShortFlag::None);
util::JsonParser parser_;
std::mutex mutex_;

View File

@@ -19,10 +19,11 @@ class Window : public AAppIconLabel, public sigc::trackable {
auto update() -> void override;
private:
void setClass(std::string classname, bool enable);
void setClass(const std::string& classname, bool enable);
void onEvent(const struct Ipc::ipc_response&);
void onCmd(const struct Ipc::ipc_response&);
std::tuple<std::size_t, int, int, std::string, std::string, std::string, std::string, std::string>
std::tuple<std::size_t, int, int, std::string, std::string, std::string, std::string, std::string,
std::string>
getFocusedNode(const Json::Value& nodes, std::string& output);
void getTree();
@@ -35,6 +36,7 @@ class Window : public AAppIconLabel, public sigc::trackable {
std::string old_app_id_;
std::size_t app_nb_;
std::string shell_;
std::string marks_;
int floating_count_;
util::JsonParser parser_;
std::mutex mutex_;

View File

@@ -48,7 +48,7 @@ class Workspaces : public AModule, public sigc::trackable {
std::vector<std::string> high_priority_named_;
std::vector<std::string> workspaces_order_;
Gtk::Box box_;
std::string m_formatWindowSeperator;
std::string m_formatWindowSeparator;
util::RegexCollection m_windowRewriteRules;
util::JsonParser parser_;
std::unordered_map<std::string, Gtk::Button> buttons_;

View File

@@ -19,12 +19,15 @@ class SystemdFailedUnits : public ALabel {
std::string format_ok;
bool update_pending;
uint32_t nr_failed_system, nr_failed_user;
std::string system_state, user_state, overall_state;
uint32_t nr_failed_system, nr_failed_user, nr_failed;
std::string last_status;
Glib::RefPtr<Gio::DBus::Proxy> system_proxy, user_proxy;
void notify_cb(const Glib::ustring &sender_name, const Glib::ustring &signal_name,
const Glib::VariantContainerBase &arguments);
void RequestFailedUnits();
void RequestSystemState();
void updateData();
};

View File

@@ -0,0 +1,122 @@
#pragma once
#include <json/json.h>
#include <unistd.h>
#include <functional>
#include <list>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <unordered_map>
#include <utility>
namespace waybar::modules::wayfire {
using EventHandler = std::function<void(const std::string& event)>;
struct State {
/*
┌───────────┐ ┌───────────┐
│ output #1 │ │ output #2 │
└─────┬─────┘ └─────┬─────┘
└─┐ └─────┐─ ─ ─ ─ ─ ─ ─ ─ ┐
┌───────┴───────┐ ┌───────┴──────┐ ┌───────┴───────┐
│ wset #1 │ │ wset #2 │ │ wset #3 │
│┌────────────┐ │ │┌────────────┐│ │┌────────────┐ │
││ workspaces │ │ ││ workspaces ││ ││ workspaces │ │
│└─┬──────────┘ │ │└────────────┘│ │└─┬──────────┘ │
│ │ ┌─────────┐│ └──────────────┘ │ │ ┌─────────┐│
│ ├─┤ view #1 ││ │ └─┤ view #3 ││
│ │ └─────────┘│ │ └─────────┘│
│ │ ┌─────────┐│ └───────────────┘
│ └─┤ view #2 ││
│ └─────────┘│
└───────────────┘
*/
struct Output {
size_t id;
size_t w, h;
size_t wset_idx;
};
struct Workspace {
size_t num_views;
size_t num_sticky_views;
};
struct Wset {
std::optional<std::reference_wrapper<Output>> output;
std::vector<Workspace> wss;
size_t ws_w, ws_h, ws_x, ws_y;
size_t focused_view_id;
auto ws_idx() const { return ws_w * ws_y + ws_x; }
auto count_ws(const Json::Value& pos) -> Workspace&;
auto locate_ws(const Json::Value& geo) -> Workspace&;
auto locate_ws(const Json::Value& geo) const -> const Workspace&;
};
std::unordered_map<std::string, Output> outputs;
std::unordered_map<size_t, Wset> wsets;
std::unordered_map<size_t, Json::Value> views;
std::string focused_output_name;
size_t maybe_empty_focus_wset_idx = {};
size_t vswitch_sticky_view_id = {};
bool new_output_detected = {};
bool vswitching = {};
auto update_view(const Json::Value& view) -> void;
};
struct Sock {
int fd;
Sock(int fd) : fd{fd} {}
~Sock() { close(fd); }
Sock(const Sock&) = delete;
auto operator=(const Sock&) = delete;
Sock(Sock&& rhs) noexcept {
fd = rhs.fd;
rhs.fd = -1;
}
auto& operator=(Sock&& rhs) noexcept {
fd = rhs.fd;
rhs.fd = -1;
return *this;
}
};
class IPC {
static std::weak_ptr<IPC> instance;
Json::CharReaderBuilder reader_builder;
Json::StreamWriterBuilder writer_builder;
std::list<std::pair<std::string, std::reference_wrapper<const EventHandler>>> handlers;
std::mutex handlers_mutex;
State state;
std::mutex state_mutex;
IPC() { start(); }
static auto connect() -> Sock;
auto receive(Sock& sock) -> Json::Value;
auto start() -> void;
auto root_event_handler(const std::string& event, const Json::Value& data) -> void;
auto update_state_handler(const std::string& event, const Json::Value& data) -> void;
public:
static auto get_instance() -> std::shared_ptr<IPC>;
auto send(const std::string& method, Json::Value&& data) -> Json::Value;
auto register_handler(const std::string& event, const EventHandler& handler) -> void;
auto unregister_handler(EventHandler& handler) -> void;
auto lock_state() -> std::lock_guard<std::mutex> { return std::lock_guard{state_mutex}; }
auto& get_outputs() const { return state.outputs; }
auto& get_wsets() const { return state.wsets; }
auto& get_views() const { return state.views; }
auto& get_focused_output_name() const { return state.focused_output_name; }
};
} // namespace waybar::modules::wayfire

View File

@@ -0,0 +1,24 @@
#pragma once
#include "AAppIconLabel.hpp"
#include "bar.hpp"
#include "modules/wayfire/backend.hpp"
namespace waybar::modules::wayfire {
class Window : public AAppIconLabel {
std::shared_ptr<IPC> ipc;
EventHandler handler;
const Bar& bar_;
std::string old_app_id_;
public:
Window(const std::string& id, const Bar& bar, const Json::Value& config);
~Window() override;
auto update() -> void override;
auto update_icon_label() -> void;
};
} // namespace waybar::modules::wayfire

View File

@@ -0,0 +1,32 @@
#pragma once
#include <gtkmm/button.h>
#include <json/json.h>
#include <memory>
#include <vector>
#include "AModule.hpp"
#include "bar.hpp"
#include "modules/wayfire/backend.hpp"
namespace waybar::modules::wayfire {
class Workspaces : public AModule {
std::shared_ptr<IPC> ipc;
EventHandler handler;
const Bar& bar_;
Gtk::Box box_;
std::vector<Gtk::Button> buttons_;
auto handleScroll(GdkEventScroll* e) -> bool override;
auto update() -> void override;
auto update_box() -> void;
public:
Workspaces(const std::string& id, const Bar& bar, const Json::Value& config);
~Workspaces() override;
};
} // namespace waybar::modules::wayfire

View File

@@ -18,10 +18,12 @@ class Wireplumber : public ALabel {
private:
void asyncLoadRequiredApiModules();
void prepare();
void prepare(waybar::modules::Wireplumber* self);
void activatePlugins();
static void updateVolume(waybar::modules::Wireplumber* self, uint32_t id);
static void updateNodeName(waybar::modules::Wireplumber* self, uint32_t id);
static void updateSourceVolume(waybar::modules::Wireplumber* self, uint32_t id);
static void updateSourceName(waybar::modules::Wireplumber* self, uint32_t id); // NEW
static void onPluginActivated(WpObject* p, GAsyncResult* res, waybar::modules::Wireplumber* self);
static void onDefaultNodesApiLoaded(WpObject* p, GAsyncResult* res,
waybar::modules::Wireplumber* self);
@@ -32,6 +34,8 @@ class Wireplumber : public ALabel {
bool handleScroll(GdkEventScroll* e) override;
static std::list<waybar::modules::Wireplumber*> modules;
WpCore* wp_core_;
GPtrArray* apis_;
WpObjectManager* om_;
@@ -44,6 +48,12 @@ class Wireplumber : public ALabel {
double min_step_;
uint32_t node_id_{0};
std::string node_name_;
std::string source_name_;
gchar* type_;
uint32_t source_node_id_;
bool source_muted_;
double source_volume_;
gchar* default_source_name_;
};
} // namespace waybar::modules

View File

@@ -19,6 +19,7 @@
#include "bar.hpp"
#include "client.hpp"
#include "giomm/desktopappinfo.h"
#include "util/icon_loader.hpp"
#include "util/json.hpp"
#include "wlr-foreign-toplevel-management-unstable-v1-client-protocol.h"
@@ -89,9 +90,6 @@ class Task {
std::string state_string(bool = false) const;
void set_minimize_hint();
void on_button_size_allocated(Gtk::Allocation &alloc);
void set_app_info_from_app_id_list(const std::string &app_id_list);
bool image_load_icon(Gtk::Image &image, const Glib::RefPtr<Gtk::IconTheme> &icon_theme,
Glib::RefPtr<Gio::DesktopAppInfo> app_info, int size);
void hide_if_ignored();
public:
@@ -153,7 +151,7 @@ class Taskbar : public waybar::AModule {
Gtk::Box box_;
std::vector<TaskPtr> tasks_;
std::vector<Glib::RefPtr<Gtk::IconTheme>> icon_themes_;
IconLoader icon_loader_;
std::unordered_set<std::string> ignore_list_;
std::map<std::string, std::string> app_ids_replace_map_;
@@ -178,7 +176,7 @@ class Taskbar : public waybar::AModule {
bool show_output(struct wl_output *) const;
bool all_outputs() const;
const std::vector<Glib::RefPtr<Gtk::IconTheme>> &icon_themes() const;
const IconLoader &icon_loader() const;
const std::unordered_set<std::string> &ignore_list() const;
const std::map<std::string, std::string> &app_ids_replace_map() const;
};

View File

@@ -1,172 +0,0 @@
#pragma once
#include <fmt/format.h>
#include <gtkmm/button.h>
#include <gtkmm/image.h>
#include <gtkmm/label.h>
#include <functional>
#include <map>
#include <memory>
#include <vector>
#include "AModule.hpp"
#include "bar.hpp"
#include "ext-workspace-unstable-v1-client-protocol.h"
namespace waybar::modules::wlr {
class WorkspaceManager;
class WorkspaceGroup;
class Workspace {
public:
Workspace(const waybar::Bar &bar, const Json::Value &config, WorkspaceGroup &workspace_group,
zext_workspace_handle_v1 *workspace, uint32_t id, std::string name);
~Workspace();
auto update() -> void;
auto id() const -> uint32_t { return id_; }
auto is_active() const -> bool { return state_ & static_cast<uint32_t>(State::ACTIVE); }
auto is_urgent() const -> bool { return state_ & static_cast<uint32_t>(State::URGENT); }
auto is_hidden() const -> bool { return state_ & static_cast<uint32_t>(State::HIDDEN); }
auto is_empty() const -> bool { return state_ & static_cast<uint32_t>(State::EMPTY); }
auto is_persistent() const -> bool { return persistent_; }
// wlr stuff
auto handle_name(const std::string &name) -> void;
auto handle_coordinates(const std::vector<uint32_t> &coordinates) -> void;
auto handle_state(const std::vector<uint32_t> &state) -> void;
auto handle_remove() -> void;
auto make_persistent() -> void;
auto handle_duplicate() -> void;
auto handle_done() -> void;
auto handle_clicked(GdkEventButton *bt) -> bool;
auto show() -> void;
auto hide() -> void;
auto get_button_ref() -> Gtk::Button & { return button_; }
auto get_name() -> std::string & { return name_; }
auto get_coords() -> std::vector<uint32_t> & { return coordinates_; }
enum class State {
ACTIVE = (1 << 0),
URGENT = (1 << 1),
HIDDEN = (1 << 2),
EMPTY = (1 << 3),
};
private:
auto get_icon() -> std::string;
const Bar &bar_;
const Json::Value &config_;
WorkspaceGroup &workspace_group_;
// wlr stuff
zext_workspace_handle_v1 *workspace_handle_;
uint32_t state_ = 0;
uint32_t id_;
std::string name_;
std::vector<uint32_t> coordinates_;
static std::map<std::string, std::string> icons_map_;
std::string format_;
bool with_icon_ = false;
bool persistent_ = false;
Gtk::Button button_;
Gtk::Box content_;
Gtk::Label label_;
};
class WorkspaceGroup {
public:
WorkspaceGroup(const waybar::Bar &bar, Gtk::Box &box, const Json::Value &config,
WorkspaceManager &manager, zext_workspace_group_handle_v1 *workspace_group_handle,
uint32_t id);
~WorkspaceGroup();
auto update() -> void;
auto id() const -> uint32_t { return id_; }
auto is_visible() const -> bool;
auto remove_workspace(uint32_t id_) -> void;
auto active_only() const -> bool;
auto creation_delayed() const -> bool;
auto workspaces() -> std::vector<std::unique_ptr<Workspace>> & { return workspaces_; }
auto persistent_workspaces() -> std::vector<std::string> & { return persistent_workspaces_; }
auto sort_workspaces() -> void;
auto set_need_to_sort() -> void { need_to_sort = true; }
auto add_button(Gtk::Button &button) -> void;
auto remove_button(Gtk::Button &button) -> void;
auto fill_persistent_workspaces() -> void;
auto create_persistent_workspaces() -> void;
// wlr stuff
auto handle_workspace_create(zext_workspace_handle_v1 *workspace_handle) -> void;
auto handle_remove() -> void;
auto handle_output_enter(wl_output *output) -> void;
auto handle_output_leave() -> void;
auto handle_done() -> void;
auto commit() -> void;
private:
static uint32_t workspace_global_id;
const waybar::Bar &bar_;
Gtk::Box &box_;
const Json::Value &config_;
WorkspaceManager &workspace_manager_;
// wlr stuff
zext_workspace_group_handle_v1 *workspace_group_handle_;
wl_output *output_ = nullptr;
uint32_t id_;
std::vector<std::unique_ptr<Workspace>> workspaces_;
bool need_to_sort = false;
std::vector<std::string> persistent_workspaces_;
bool persistent_created_ = false;
};
class WorkspaceManager : public AModule {
public:
WorkspaceManager(const std::string &id, const waybar::Bar &bar, const Json::Value &config);
~WorkspaceManager() override;
auto update() -> void override;
auto all_outputs() const -> bool { return all_outputs_; }
auto active_only() const -> bool { return active_only_; }
auto workspace_comparator() const
-> std::function<bool(std::unique_ptr<Workspace> &, std::unique_ptr<Workspace> &)>;
auto creation_delayed() const -> bool { return creation_delayed_; }
auto sort_workspaces() -> void;
auto remove_workspace_group(uint32_t id_) -> void;
// wlr stuff
auto register_manager(wl_registry *registry, uint32_t name, uint32_t version) -> void;
auto handle_workspace_group_create(zext_workspace_group_handle_v1 *workspace_group_handle)
-> void;
auto handle_done() -> void;
auto handle_finished() -> void;
auto commit() -> void;
private:
const waybar::Bar &bar_;
Gtk::Box box_;
std::vector<std::unique_ptr<WorkspaceGroup>> groups_;
// wlr stuff
zext_workspace_manager_v1 *workspace_manager_ = nullptr;
static uint32_t group_global_id;
bool sort_by_name_ = true;
bool sort_by_coordinates_ = true;
bool sort_by_number_ = false;
bool all_outputs_ = false;
bool active_only_ = false;
bool creation_delayed_ = false;
};
} // namespace waybar::modules::wlr

View File

@@ -1,10 +0,0 @@
#include "ext-workspace-unstable-v1-client-protocol.h"
namespace waybar::modules::wlr {
void add_registry_listener(void *data);
void add_workspace_listener(zext_workspace_handle_v1 *workspace_handle, void *data);
void add_workspace_group_listener(zext_workspace_group_handle_v1 *workspace_group_handle,
void *data);
zext_workspace_manager_v1 *workspace_manager_bind(wl_registry *registry, uint32_t name,
uint32_t version, void *data);
} // namespace waybar::modules::wlr

View File

@@ -11,6 +11,11 @@
#include <type_traits>
#include <utility>
#ifdef __OpenBSD__
#define SIGRTMIN SIGUSR1 - 1
#define SIGRTMAX SIGUSR1 + 1
#endif
namespace waybar {
/**

View File

@@ -15,7 +15,7 @@
namespace date {
#if HAVE_CHRONO_TIMEZONES
using namespace std::chrono;
using namespace std;
using std::format;
#else
using system_clock = std::chrono::system_clock;
@@ -73,5 +73,3 @@ struct fmt::formatter<date::zoned_time<Duration, TimeZonePtr>> {
}
};
#endif
using namespace date;

View File

@@ -10,5 +10,7 @@ class DefaultGtkIconThemeWrapper {
public:
static bool has_icon(const std::string&);
static Glib::RefPtr<Gdk::Pixbuf> load_icon(const char*, int, Gtk::IconLookupFlags);
static Glib::RefPtr<Gdk::Pixbuf> load_icon(
const char*, int, Gtk::IconLookupFlags,
Glib::RefPtr<Gtk::StyleContext> style = Glib::RefPtr<Gtk::StyleContext>());
};

View File

@@ -0,0 +1,34 @@
#pragma once
#include <gdkmm/general.h>
#include <gio/gdesktopappinfo.h>
#include <giomm/desktopappinfo.h>
#include <glibmm/fileutils.h>
#include <gtkmm/image.h>
#include <spdlog/spdlog.h>
#include <string>
#include <vector>
#include "util/gtk_icon.hpp"
class IconLoader {
private:
std::vector<Glib::RefPtr<Gtk::IconTheme>> custom_icon_themes_;
Glib::RefPtr<Gtk::IconTheme> default_icon_theme_ = Gtk::IconTheme::get_default();
static std::vector<std::string> search_prefix();
static Glib::RefPtr<Gio::DesktopAppInfo> get_app_info_by_name(const std::string &app_id);
static Glib::RefPtr<Gio::DesktopAppInfo> get_desktop_app_info(const std::string &app_id);
static Glib::RefPtr<Gdk::Pixbuf> load_icon_from_file(std::string const &icon_path, int size);
static std::string get_icon_name_from_icon_theme(const Glib::RefPtr<Gtk::IconTheme> &icon_theme,
const std::string &app_id);
static bool image_load_icon(Gtk::Image &image, const Glib::RefPtr<Gtk::IconTheme> &icon_theme,
Glib::RefPtr<Gio::DesktopAppInfo> app_info, int size);
public:
void add_custom_icon_theme(const std::string &theme_name);
bool image_load_icon(Gtk::Image &image, Glib::RefPtr<Gio::DesktopAppInfo> app_info,
int size) const;
static Glib::RefPtr<Gio::DesktopAppInfo> get_app_info_from_app_id_list(
const std::string &app_id_list);
};

View File

@@ -30,15 +30,16 @@ class JsonParser {
std::istringstream jsonStream(modifiedJsonStr);
std::string errs;
if (!Json::parseFromStream(m_readerBuilder, jsonStream, &root, &errs)) {
// Use local CharReaderBuilder for thread safety - the IPC singleton's
// parser can be called concurrently from multiple module threads
Json::CharReaderBuilder readerBuilder;
if (!Json::parseFromStream(readerBuilder, jsonStream, &root, &errs)) {
throw std::runtime_error("Error parsing JSON: " + errs);
}
return root;
}
private:
Json::CharReaderBuilder m_readerBuilder;
static std::string replaceHexadecimalEscape(const std::string& str) {
static std::regex re("\\\\x");
return std::regex_replace(str, re, "\\u00");

View File

@@ -0,0 +1,26 @@
#pragma once
#include <json/value.h>
#include <cstdint>
namespace waybar::util {
enum class KillSignalAction : std::uint8_t {
TOGGLE,
RELOAD,
SHOW,
HIDE,
NOOP,
};
const std::map<std::string, KillSignalAction> userKillSignalActions = {
{"TOGGLE", KillSignalAction::TOGGLE},
{"RELOAD", KillSignalAction::RELOAD},
{"SHOW", KillSignalAction::SHOW},
{"HIDE", KillSignalAction::HIDE},
{"NOOP", KillSignalAction::NOOP}};
const KillSignalAction SIGNALACTION_DEFAULT_SIGUSR1 = KillSignalAction::TOGGLE;
const KillSignalAction SIGNALACTION_DEFAULT_SIGUSR2 = KillSignalAction::RELOAD;
}; // namespace waybar::util

View File

@@ -25,6 +25,7 @@ class PrivacyNodeInfo {
std::string media_name;
std::string node_name;
std::string application_name;
bool is_monitor = false;
std::string pipewire_access_portal_app_id;
std::string application_icon_name;

View File

@@ -6,14 +6,12 @@
namespace waybar {
using namespace Gio;
enum class Appearance {
UNKNOWN = 0,
DARK = 1,
LIGHT = 2,
};
class Portal : private DBus::Proxy {
class Portal : private Gio::DBus::Proxy {
public:
Portal();
void refreshAppearance();

View File

@@ -4,6 +4,6 @@
namespace waybar::util {
// Get a signal emited with value true when entering sleep, and false when exiting
// Get a signal emitted with value true when entering sleep, and false when exiting
SafeSignal<bool>& prepare_for_sleep();
} // namespace waybar::util

View File

@@ -5,6 +5,8 @@
#include <sigc++/signal.h>
#include <sigc++/trackable.h>
#include <atomic>
namespace waybar::util {
class Rfkill : public sigc::trackable {
@@ -17,7 +19,7 @@ class Rfkill : public sigc::trackable {
private:
enum rfkill_type rfkill_type_;
bool state_ = false;
std::atomic_bool state_ = false;
int fd_ = -1;
bool on_event(Glib::IOCondition cond);

View File

@@ -23,3 +23,26 @@ inline std::string capitalize(const std::string& str) {
[](unsigned char c) { return std::toupper(c); });
return result;
}
inline std::string toLower(const std::string& str) {
std::string result = str;
std::transform(result.begin(), result.end(), result.begin(),
[](unsigned char c) { return std::tolower(c); });
return result;
}
inline std::vector<std::string> split(std::string_view s, std::string_view delimiter,
int max_splits = -1) {
std::vector<std::string> result;
size_t pos = 0;
size_t next_pos = 0;
while ((next_pos = s.find(delimiter, pos)) != std::string::npos) {
result.push_back(std::string(s.substr(pos, next_pos - pos)));
pos = next_pos + delimiter.size();
if (max_splits > 0 && result.size() == static_cast<size_t>(max_splits)) {
break;
}
}
result.push_back(std::string(s.substr(pos)));
return result;
}

View File

@@ -0,0 +1,21 @@
#pragma once
#include <libudev.h>
namespace waybar::util {
struct UdevDeleter {
void operator()(udev *ptr) const { udev_unref(ptr); }
};
struct UdevDeviceDeleter {
void operator()(udev_device *ptr) const { udev_device_unref(ptr); }
};
struct UdevEnumerateDeleter {
void operator()(udev_enumerate *ptr) const { udev_enumerate_unref(ptr); }
};
struct UdevMonitorDeleter {
void operator()(udev_monitor *ptr) const { udev_monitor_unref(ptr); }
};
} // namespace waybar::util

View File

@@ -40,7 +40,7 @@ The brightness can be controlled by dragging the slider across the bar or clicki
```
"modules-right": [
"backlight-slider",
"backlight/slider",
],
"backlight/slider": {
"min": 0,

View File

@@ -91,6 +91,11 @@ The *battery* module displays the current capacity and state (eg. charging) of y
typeof: string ++
Command to execute when scrolling up on the module.
*weighted-average*: ++
typeof: bool ++
default: true ++
Option to combine multiple batteries with different capacities.
*on-scroll-down*: ++
typeof: string ++
Command to execute when scrolling down on the module.
@@ -116,7 +121,7 @@ The *battery* module displays the current capacity and state (eg. charging) of y
*menu-file*: ++
typeof: string ++
Location of the menu descriptor file. There need to be an element of type
GtkMenu with id *menu*
GtkMenu with id *menu*.
*menu-actions*: ++
typeof: array ++
@@ -127,6 +132,10 @@ The *battery* module displays the current capacity and state (eg. charging) of y
default: false ++
Enables this module to consume all left over space dynamically.
*events*: ++
typeof: object ++
Specifies commands to be executed on specific battery states. See *EVENTS* section below.
# FORMAT REPLACEMENTS
*{capacity}*: Capacity in percentage
@@ -166,6 +175,19 @@ The *battery* module allows one to define custom formats based on up to two fact
- The state can be addressed as a CSS class in the *style.css*. The name of the CSS class is the *<name>* of the state. Each class gets activated when the current capacity is equal to or below the configured *<value>*.
- Also each state can have its own *format*. Those can be configured via *format-<name>*. Or if you want to differentiate a bit more even as *format-<status>-<state>*. For more information see *custom-formats*.
# EVENTS
Every entry in the *events* object consists of a *<event-name>* (typeof: *string*) and a *<command>* (typeof: *string*). ++
*<event-name>* can be in one of the following formats:
- *on-<status>-<state>*
- *on-<status>-<capacity>*
Where:
- *<status>* is either *charging* or *discharging*,
- *<state>* is the name of one of the states specified in the *states* object,
- *<capacity>* is a battery level value (between *0-100*).
# EXAMPLES
@@ -178,6 +200,11 @@ The *battery* module allows one to define custom formats based on up to two fact
"warning": 30,
"critical": 15
},
"events": {
"on-discharging-warning": "notify-send -u normal 'Low Battery'",
"on-discharging-critical": "notify-send -u critical 'Very Low Battery'",
"on-charging-100": "notify-send -u normal 'Battery Full!'"
},
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""],
"max-length": 25

View File

@@ -8,6 +8,8 @@ waybar - cava module
*cava* module for karlstav/cava project. See it on github: https://github.com/karlstav/cava.
Module supports two different frontends starting from the 0.15.0 release. The frontend that
will be used is managed by the method parameter in the [output] section of the cava configuration file.
# FILES
@@ -32,6 +34,10 @@ libcava lives in:
:[ string
:[
:< Path where cava configuration file is placed to
|[ *method* \[output\]
:[ string
:[
:< Manages which frontend Waybar cava module should use. Values: raw, sdl_glsl
|[ *framerate*
:[ integer
:[ 30
@@ -43,7 +49,7 @@ libcava lives in:
|[ *sensitivity*
:[ integer
:[ 100
:[ Manual sensitivity in %. It's recommended to be omitted when *autosens* = 1
:[ Manual sensitivity in %. If autosens is enabled, this will only be the initial value. 200 means double height. Accepts only non-negative values
|[ *bars*
:[ integer
:[ 12
@@ -68,7 +74,7 @@ libcava lives in:
:[ string
:[
:[ Widget's text after sleep_timer elapsed (hide_on_silence has to be false)
|[ *method*
|[ *method* \[input\]
:[ string
:[ pulse
:[ Audio capturing method. Possible methods are: pipewire, pulse, alsa, fifo, sndio or shmem
@@ -105,9 +111,9 @@ libcava lives in:
:[ false
:[ Disables or enables the so-called "Monstercat smoothing" with or without "waves"
|[ *noise_reduction*
:[ double
:[ 0.77
:[ Range between 0 - 1. The raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth. 1 - will be very slow and smooth, 0 - will be fast but noisy
:[ integer
:[ 77
:[ Range between 0 - 100. The raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth. 100 will be very slow and smooth, 0 will be fast but noisy
|[ *input_delay*
:[ integer
:[ 2
@@ -119,11 +125,11 @@ libcava lives in:
|[ *data_format*
:[ string
:[ asci
:[ It's impossible to set it. Waybar sets it to = asci for internal needs
:[ Raw data format. Can be 'binary' or 'ascii'
|[ *raw_target*
:[ string
:[ /dev/stdout
:[ It's impossible to set it. Waybar sets it to = /dev/stdout for internal needs
:[ Raw output target. A fifo will be created if target does not exist
|[ *menu*
:[ string
:[
@@ -136,6 +142,50 @@ libcava lives in:
:[ array
:[
:[ The actions corresponding to the buttons of the menu.
|[ *bar_spacing*
:[ integer
:[
:[ Bars' space between bars in number of characters
|[ *bar_width*
:[ integer
:[
:[ Bars' width between bars in number of characters
|[ *bar_height*
:[ integer
:[
:[ Useless. bar_height is only used for output in "noritake" format
|[ *background*
:[ string
:[
:[ GLSL actual. Support hex code colors only. Must be within ''
|[ *foreground*
:[ string
:[
:[ GLSL actual. Support hex code colors only. Must be within ''
|[ *gradient*
:[ integer
:[ 0
:[ GLSL actual. Gradient mode(0/1 - on/off)
|[ *gradient_count*
:[ integer
:[ 0
:[ GLSL actual. The count of colors for the gradient
|[ *gradient_color_N*
:[ string
:[
:[ GLSL actual. N - the number of the gradient color between 1 and 8. Only hex defined colors are supported. Must be within ''
|[ *sdl_width*
:[ integer
:[
:[ GLSL actual. Manages the width of the waybar cava GLSL frontend module
|[ *sdl_height*
:[ integer
:[
:[ GLSL actual. Manages the height of the waybar cava GLSL frontend module
|[ *continuous_rendering*
:[ integer
:[ 0
:[ GLSL actual. Keep rendering even if no audio. Recommended to set to 1
Configuration can be provided as:
- The only cava configuration file which is provided through *cava_config*. The rest configuration can be skipped
@@ -153,16 +203,17 @@ Configuration can be provided as:
- iniparser
- fftw3
- epoxy (GLSL frontend only)
# SOLVING ISSUES
. On start Waybar throws an exception "error while loading shared libraries: libcava.so: cannot open shared object file: No such file or directory".
It might happen when libcava for some reason hasn't been registered in the system. sudo ldconfig should help
. Waybar is starting but cava module doesn't react to the music
1. In such cases at first need to make sure usual cava application is working as well
2. If so, need to comment all configuration options. Uncomment cava_config and provide the path to the working cava config
3. You might set too huge or too small input_delay. Try to setup to 4 seconds, restart waybar, and check again 4 seconds past. Usual even on weak machines it should be enough
4. You might accidentally switch action mode to pause mode
1. In such cases at first need to make sure usual cava application is working as well
2. If so, need to comment all configuration options. Uncomment cava_config and provide the path to the working cava config
3. You might set too huge or too small input_delay. Try to setup to 4 seconds, restart waybar, and check again 4 seconds past. Usual even on weak machines it should be enough
4. You might accidentally switch action mode to pause mode
# RISING ISSUES
@@ -205,3 +256,453 @@ In case when cava releases new version and you're wanna get it, it should be rai
- *#cava*
- *#cava.silent* Applied after no sound has been detected for sleep_timer seconds
- *#cava.updated* Applied when a new frame is shown
# FRONTENDS
## RAW
The cava raw frontend uses ASCII characters to visualize incoming audio data. Each ASCII symbol position corresponds to the value of the audio power pulse.
Under the hood:
```
. Incoming audio power pulse list is : 12684
. Configured array of ASCII codes is: ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ]. See `format-icons` https://github.com/Alexays/Waybar/wiki/Module:-Cava#example
```
As a result cava frontend will give ▁▂▆█▄
Examples:
waybar config
```
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_raw.conf",
"input_delay": 2,
"format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
"actions": {
"on-click-right": "mode"
}
},
```
waybar_raw.conf
```
## Configuration file for CAVA.
# Remove the ; to change parameters.
[general]
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
# Accepts only non-negative values.
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
# new as of 0.6.0 autosens of low values (dynamic range)
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
# 200 means double height. Accepts only non-negative values.
# The number of bars (0-512). 0 sets it to auto (fill up console).
# Bars' width and space between bars in number of characters.
bars = 12
# bar_height is only used for output in "noritake" format
# For SDL width and space between bars is in pixels, defaults are:
# sdl_glsl have these default values, they are only used to calculate max number of bars.
# Lower and higher cutoff frequencies for lowest and highest bars
# the bandwidth of the visualizer.
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
# Cava will automatically increase the higher cutoff if a too low band is specified.
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
sleep_timer = 5
[input]
# Audio capturing method. Possible methods are: 'fifo', 'portaudio', 'pipewire', 'alsa', 'pulse', 'sndio', 'oss', 'jack' or 'shmem'
# Defaults to 'oss', 'pipewire', 'sndio', 'jack', 'pulse', 'alsa', 'portaudio' or 'fifo', in that order, dependent on what support cava was built with.
# On Mac it defaults to 'portaudio' or 'fifo'
# On windows this is automatic and no input settings are needed.
#
# All input methods uses the same config variable 'source'
# to define where it should get the audio.
#
# For pulseaudio and pipewire 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
#
# For pipewire 'source' will be the object name or object.serial of the device to capture from.
# Both input and output devices are supported.
#
# For alsa 'source' will be the capture device.
# For fifo 'source' will be the path to fifo-file.
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
#
# For sndio 'source' will be a raw recording audio descriptor or a monitoring sub-device, e.g. 'rsnd/2' or 'snd/1'. Default: 'default'.
# README.md contains further information on how to setup CAVA for sndio.
#
# For oss 'source' will be the path to a audio device, e.g. '/dev/dsp2'. Default: '/dev/dsp', i.e. the default audio device.
# README.md contains further information on how to setup CAVA for OSS on FreeBSD.
#
# For jack 'source' will be the name of the JACK server to connect to, e.g. 'foobar'. Default: 'default'.
# README.md contains further information on how to setup CAVA for JACK.
#
# The options 'sample_rate', 'sample_bits', 'channels' and 'autoconnect' can be configured for some input methods:
# sample_rate: fifo, pipewire, sndio, oss
# sample_bits: fifo, pipewire, sndio, oss
# channels: sndio, oss, jack
# autoconnect: jack
# Other methods ignore these settings.
#
# For 'sndio' and 'oss' they are only preferred values, i.e. if the values are not supported
# by the chosen audio device, the device will use other supported values instead.
# Example: 48000, 32 and 2, but the device only supports 44100, 16 and 1, then it
# will use 44100, 16 and 1.
#
[output]
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake', 'sdl'
# or 'sdl_glsl'.
# 'noncurses' (default) uses a buffer and cursor movements to only print
# changes from frame to frame in the terminal. Uses less resources and is less
# prone to tearing (vsync issues) than 'ncurses'.
#
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
# stream of the bar heights that can be used to send to other applications.
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
#
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
# in graphic mode. It only support the 3000 series graphical VFDs for now.
#
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
# 'sdl_glsl' uses SDL to create an OpenGL context. Write your own shaders or
# use one of the predefined ones.
method = raw
# Orientation of the visualization. Can be 'bottom', 'top', 'left', 'right' or
# 'horizontal'. Default is 'bottom'. 'left and 'right' are only supported on sdl
# and ncruses output. 'horizontal' (bars go up and down from center) is only supported
# on noncurses output.
# Note: many fonts have weird or missing glyphs for characters used in orientations
# other than 'bottom', which can make output not look right.
# Visual channels. Can be 'stereo' or 'mono'.
# 'stereo' mirrors both channels with low frequencies in center.
# 'mono' outputs left to right lowest to highest frequencies.
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
# set 'reverse' to 1 to display frequencies the other way around.
# Raw output target. A fifo will be created if target does not exist.
raw_target = /dev/stdout
# Raw data format. Can be 'binary' or 'ascii'.
data_format = ascii
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
bar_delimiter = 0
# sdl window size and position. -1,-1 is centered.
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
# 'frequency' displays the lower cut off frequency of the bar above.
# Only supported on ncurses and noncurses output.
# enable synchronized sync. 1 = on, 0 = off
# removes flickering in alacritty terminal emulator.
# defaults to off since the behaviour in other terminal emulators is unknown
# Shaders for sdl_glsl, located in $HOME/.config/cava/shaders
; for glsl output mode, keep rendering even if no audio
# disable console blank (screen saver) in tty
# (Not supported on FreeBSD)
# show a flat bar at the bottom of the screen when idle, 1 = on, 0 = off
# show waveform instead of frequency spectrum, 1 = on, 0 = off
[color]
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
# default is to keep current terminal color
# SDL and sdl_glsl only support hex code colors, these are the default:
# Gradient mode, only hex defined colors are supported,
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
# You can define as many as 8 different colors. They range from bottom to top of screen
[smoothing]
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
# Noise reduction, int 0 - 100. default 77
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
# 100 will be very slow and smooth, 0 will be fast but noisy.
[eq]
# This one is tricky. You can have as much keys as you want.
# Remember to uncomment more than one key! More keys = more precision.
# Look at readme.md on github for further explanations and examples.
```
## GLSL
The Cava GLSL frontend delegates the visualization of incoming audio data to the GPU via OpenGL.
There are some mandatory dependencies that need to be satisfied in order for Cava GLSL to be built and function properly:
. epoxy library must be installed on the system
. Vertex and fragment shaders from the original project must be used. They should be downloaded, and the file paths must be configured correctly in the Waybar Cava configuration:
1. cava shaders [cava shaders](https://github.com/karlstav/cava/tree/master/output/shaders)
2. libcava shaders [libcava shaders](https://github.com/LukashonakV/cava/tree/master/output/shaders)
. It is highly recommended to have a separate cava configuration for the Waybar Cava GLSL module and to use this as the cava_config in the Waybar configuration.
. It is common for cava configurations to be placed in the XDG_CONFIG_HOME directory, including shaders as well. Consider keeping them in the $XDG_CONFIG_HOME/cava/shaders folder.
Key configuration options:
. bars. The more values the parameter has, the more interesting the visualization becomes.
. method in output section must be set to sdl_glsl
. sdl_width and sdl_height manage the size of the module. Adjust them according to your needs.
. Shaders for sdl_glsl, located in $HOME/.config/cava/shaders. Example: "vertex_shader" = "pass_through.vert" "fragment_shader" = "spectrogram.frag"
. Set continuous_rendering to 1 to enable smooth rendering; set it to 0 otherwise. It is recommended to keep it set to 1.
. background, foreground, and gradient_color_N (where N is a number between 1 and 8) must be defined using hex code
Example:
waybar config
```
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#3.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
```
waybar_raw.conf
```
## Configuration file for CAVA.
# Remove the ; to change parameters.
[general]
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
# Accepts only non-negative values.
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
# new as of 0.6.0 autosens of low values (dynamic range)
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
# 200 means double height. Accepts only non-negative values.
# The number of bars (0-512). 0 sets it to auto (fill up console).
# Bars' width and space between bars in number of characters.
bars = 50
# bar_height is only used for output in "noritake" format
# For SDL width and space between bars is in pixels, defaults are:
# sdl_glsl have these default values, they are only used to calculate max number of bars.
# Lower and higher cutoff frequencies for lowest and highest bars
# the bandwidth of the visualizer.
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
# Cava will automatically increase the higher cutoff if a too low band is specified.
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
sleep_timer = 5
[input]
# Audio capturing method. Possible methods are: 'fifo', 'portaudio', 'pipewire', 'alsa', 'pulse', 'sndio', 'oss', 'jack' or 'shmem'
# Defaults to 'oss', 'pipewire', 'sndio', 'jack', 'pulse', 'alsa', 'portaudio' or 'fifo', in that order, dependent on what support cava was built with.
# On Mac it defaults to 'portaudio' or 'fifo'
# On windows this is automatic and no input settings are needed.
#
# All input methods uses the same config variable 'source'
# to define where it should get the audio.
#
# For pulseaudio and pipewire 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
#
# For pipewire 'source' will be the object name or object.serial of the device to capture from.
# Both input and output devices are supported.
#
# For alsa 'source' will be the capture device.
# For fifo 'source' will be the path to fifo-file.
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
#
# For sndio 'source' will be a raw recording audio descriptor or a monitoring sub-device, e.g. 'rsnd/2' or 'snd/1'. Default: 'default'.
# README.md contains further information on how to setup CAVA for sndio.
#
# For oss 'source' will be the path to a audio device, e.g. '/dev/dsp2'. Default: '/dev/dsp', i.e. the default audio device.
# README.md contains further information on how to setup CAVA for OSS on FreeBSD.
#
# For jack 'source' will be the name of the JACK server to connect to, e.g. 'foobar'. Default: 'default'.
# README.md contains further information on how to setup CAVA for JACK.
#
# The options 'sample_rate', 'sample_bits', 'channels' and 'autoconnect' can be configured for some input methods:
# sample_rate: fifo, pipewire, sndio, oss
# sample_bits: fifo, pipewire, sndio, oss
# channels: sndio, oss, jack
# autoconnect: jack
# Other methods ignore these settings.
#
# For 'sndio' and 'oss' they are only preferred values, i.e. if the values are not supported
# by the chosen audio device, the device will use other supported values instead.
# Example: 48000, 32 and 2, but the device only supports 44100, 16 and 1, then it
# will use 44100, 16 and 1.
#
[output]
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake', 'sdl'
# or 'sdl_glsl'.
# 'noncurses' (default) uses a buffer and cursor movements to only print
# changes from frame to frame in the terminal. Uses less resources and is less
# prone to tearing (vsync issues) than 'ncurses'.
#
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
# stream of the bar heights that can be used to send to other applications.
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
#
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
# in graphic mode. It only support the 3000 series graphical VFDs for now.
#
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
# 'sdl_glsl' uses SDL to create an OpenGL context. Write your own shaders or
# use one of the predefined ones.
method = sdl_glsl
# Orientation of the visualization. Can be 'bottom', 'top', 'left', 'right' or
# 'horizontal'. Default is 'bottom'. 'left and 'right' are only supported on sdl
# and ncruses output. 'horizontal' (bars go up and down from center) is only supported
# on noncurses output.
# Note: many fonts have weird or missing glyphs for characters used in orientations
# other than 'bottom', which can make output not look right.
# Visual channels. Can be 'stereo' or 'mono'.
# 'stereo' mirrors both channels with low frequencies in center.
# 'mono' outputs left to right lowest to highest frequencies.
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
# set 'reverse' to 1 to display frequencies the other way around.
# Raw output target. A fifo will be created if target does not exist.
# Raw data format. Can be 'binary' or 'ascii'.
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
bar_delimiter = 0
# sdl window size and position. -1,-1 is centered.
sdl_width = 150
sdl_height = 39
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
# 'frequency' displays the lower cut off frequency of the bar above.
# Only supported on ncurses and noncurses output.
# enable synchronized sync. 1 = on, 0 = off
# removes flickering in alacritty terminal emulator.
# defaults to off since the behaviour in other terminal emulators is unknown
# Shaders for sdl_glsl, located in $HOME/.config/cava/shaders
vertex_shader = pass_through.vert
fragment_shader = bar_spectrum.frag
; for glsl output mode, keep rendering even if no audio
continuous_rendering = 1;
# disable console blank (screen saver) in tty
# (Not supported on FreeBSD)
# show a flat bar at the bottom of the screen when idle, 1 = on, 0 = off
# show waveform instead of frequency spectrum, 1 = on, 0 = off
[color]
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
# default is to keep current terminal color
# SDL and sdl_glsl only support hex code colors, these are the default:
background = '#282C34'
# Gradient mode, only hex defined colors are supported,
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
# You can define as many as 8 different colors. They range from bottom to top of screen
gradient = 1
gradient_count = 2
gradient_color_1 = '#282C34'
gradient_color_2 = '#45475A'
; gradient_color_1 = '#59cc33'
; gradient_color_2 = '#80cc33'
gradient_color_3 = '#a6cc33'
gradient_color_4 = '#cccc33'
gradient_color_5 = '#cca633'
gradient_color_6 = '#cc8033'
gradient_color_7 = '#cc5933'
gradient_color_8 = '#cc3333'
[smoothing]
# Percentage value for integral smoothing. Takes values from 0 - 100.
# Higher values means smoother, but less precise. 0 to disable.
# DEPRECATED as of 0.8.0, use noise_reduction instead
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
# DEPRECATED as of 0.8.0, use noise_reduction instead
# In bar height, bars that would have been lower that this will not be drawn.
# DEPRECATED as of 0.8.0
# Noise reduction, int 0 - 100. default 77
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
# 100 will be very slow and smooth, 0 will be fast but noisy.
[eq]
# This one is tricky. You can have as much keys as you want.
# Remember to uncomment more than one key! More keys = more precision.
# Look at readme.md on github for further explanations and examples.
```
Different waybar_cava#N.conf see at [cava GLSL](https://github.com/Alexays/Waybar/wiki/Module:-Cava:-GLSL)

View File

@@ -39,6 +39,12 @@ $XDG_CONFIG_HOME/waybar/config ++
:[ A list of timezones (as in *timezone*) to use for time display, changed using
the scroll wheel. Do not specify *timezone* option when *timezones* is specified.
"" represents the system's local timezone
|[ *timezone-tooltip-format*
:[ string
:[
:[ Format to use for displaying timezones in the tooltip. When set, this allows showing
timezone information (like timezone abbreviations) in the tooltip while keeping the
main display clean. Uses the same format options as *format*
|[ *locale*
:[ string
:[
@@ -117,7 +123,7 @@ View all valid format options in *strftime(3)* or have a look https://en.cpprefe
:[ 3
:[ Relevant for *mode=year*. Count of months per row
|[ *weeks-pos*
:[ integer
:[ string
:[
:[ The position where week numbers should be displayed. Disabled when is empty.
Possible values: left|right
@@ -126,6 +132,12 @@ View all valid format options in *strftime(3)* or have a look https://en.cpprefe
:[ 1
:[ Value to scroll months/years forward/backward. Can be negative. Is
configured under *on-scroll* option
|[ *iso8601*
:[ bool
:[ false
:[ When enabled, the calendar follows the ISO 8601 standard: weeks begin on
Monday, and the first week of the year is numbered 1. The default week format is
'{:%V}'.
3. Addressed by *clock: calendar: format*
[- *Option*
@@ -229,6 +241,25 @@ View all valid format options in *strftime(3)* or have a look https://en.cpprefe
}
```
4. Show timezone in tooltip only
```
"clock": {
"interval": 60,
"format": "{:%H:%M}",
"timezone-tooltip-format": "{:%H:%M %Z}",
"timezones": [
"",
"America/Chicago",
"America/Los_Angeles",
"Europe/Paris",
"UTC"
],
"tooltip": true,
"tooltip-format": "{tz_list}"
}
```
# STYLE
- *#clock*

View File

@@ -11,9 +11,10 @@ The *cpu* module displays the current CPU utilization.
# CONFIGURATION
*interval*: ++
typeof: integer ++
typeof: integer or float ++
default: 10 ++
The interval in which the information gets polled.
The interval in which the information gets polled. ++
Minimum value is 0.001 (1ms). Values smaller than 1ms will be set to 1ms.
*format*: ++
typeof: string ++

View File

@@ -35,15 +35,17 @@ Addressed by *custom/<name>*
See *return-type*
*interval*: ++
typeof: integer ++
typeof: integer or float ++
The interval (in seconds) in which the information gets polled. ++
Minimum value is 0.001 (1ms). Values smaller than 1ms will be set to 1ms. ++
Use *once* if you want to execute the module only on startup. ++
You can update it manually with a signal. If no *interval* or *signal* is defined, it is assumed that the out script loops itself. ++
If a *signal* is defined then the script will run once on startup and will only update with a signal.
*restart-interval*: ++
typeof: integer ++
typeof: integer or float ++
The restart interval (in seconds). ++
Minimum value is 0.001 (1ms). Values smaller than 1ms will be set to 1ms. ++
Can't be used with the *interval* option, so only with continuous scripts. ++
Once the script exits, it'll be re-executed after the *restart-interval*.
@@ -232,7 +234,6 @@ $text\\n$tooltip\\n$class*
```
"custom/pacman": {
"format": "{text} ",
"interval": 3600, // every hour
"exec": "checkupdates | wc -l", // # of updates
"exec-if": "exit 0", // always run; consider advanced run conditions
"on-click": "termite -e 'sudo pacman -Syu'; pkill -SIGRTMIN+8 waybar", // update system
@@ -240,7 +241,7 @@ $text\\n$tooltip\\n$class*
}
```
You can use the signal and update the number of available packages with *pkill -RTMIN+8 waybar*.
Under the premise that interval is not defined, you can use the signal and update the number of available packages with *pkill -RTMIN+8 waybar*.
# STYLE

View File

@@ -43,6 +43,7 @@ Addressed by *dwl/tags*
- *#tags button*
- *#tags button.occupied*
- *#tags button.empty*
- *#tags button.focused*
- *#tags button.urgent*

View File

@@ -10,7 +10,7 @@ The *workspaces* module displays the currently used workspaces in wayland compos
# CONFIGURATION
Addressed by *wlr/workspaces*
Addressed by *ext/workspaces*
*format*: ++
typeof: string ++
@@ -24,18 +24,18 @@ Addressed by *wlr/workspaces*
*sort-by-name*: ++
typeof: bool ++
default: true ++
Should workspaces be sorted by name.
Should workspaces be sorted by name. Workspace names will be sorted numerically when all names are numbers.
*sort-by-coordinates*: ++
typeof: bool ++
default: true ++
default: false ++
Should workspaces be sorted by coordinates. ++
Note that if both *sort-by-name* and *sort-by-coordinates* are true sort-by name will be first. If both are false - sort by id will be performed.
*sort-by-number*: ++
*sort-by-id*: ++
typeof: bool ++
default: false ++
If set to true, workspace names will be sorted numerically. Takes precedence over any other sort-by option.
Should workspaces be sorted by ID. Workspace ID will be sorted numerically when all ID are numbers. Takes precedence over any other sort-by option.
*all-outputs*: ++
typeof: bool ++
@@ -47,9 +47,16 @@ Addressed by *wlr/workspaces*
default: false ++
If set to true only active or urgent workspaces will be shown.
*ignore-hidden*: ++
typeof: bool ++
default: true ++
If set to false hidden workspaces will be shown.
# FORMAT REPLACEMENTS
*{name}*: Name of workspace assigned by compositor
*{name}*: Name of workspace assigned by compositor.
*{id}*: ID of workspace assigned by compositor.
*{icon}*: Icon, as defined in *format-icons*.
@@ -57,6 +64,8 @@ Addressed by *wlr/workspaces*
*activate*: Switch to workspace.
*deactivate*: Deactivate the workspace.
*close*: Close the workspace.
# ICONS
@@ -69,18 +78,18 @@ In addition to workspace name matching, the following *format-icons* can be set.
# EXAMPLES
```
"wlr/workspaces": {
"ext/workspaces": {
"format": "{name}: {icon}",
"on-click": "activate",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"Workspace 1": "",
"Workspace 2": "",
"Workspace 3": "",
"Workspace 4": "",
"active": "",
"default": ""
},
"sort-by-number": true
"sort-by-id": true
}
```

111
man/waybar-gps.5.scd Normal file
View File

@@ -0,0 +1,111 @@
waybar-gps(5) "waybar-gps" "User Manual"
# NAME
waybar - gps module
# DESCRIPTION
*gps* module for gpsd.
# FILES
$XDG_CONFIG_HOME/waybar/config ++
Per user configuration file
# ADDITIONAL FILES
libgps lives in:
. /usr/lib/libgps.so or /usr/lib64/libgps.so
. /usr/lib/pkgconfig/libgps.pc or /usr/lib64/pkgconfig/libgps.pc
. /usr/include/gps
# CONFIGURATION
*format*: ++
typeof: string ++
default: {glyph} ++
The text format.
*tooltip*: ++
typeof: bool ++
default: true ++
Option to disable tooltip on hover.
*tooltip-format*: ++
typeof: string ++
default: Games running: {glyph} ++
The text format of the tooltip.
*interval*: ++
typeof: integer ++
default: 5 ++
The interval in which the GPS information gets polled (e.g. current speed).
Significant updates (e.g. the current fix mode) are updated immediately.
*hide-disconnected*: ++
typeof: bool ++
default: true ++
Defines if the module should be hidden if there is no GPS receiver.
*hide-no-fix*: ++
typeof: bool ++
default: false ++
Defines if the module should be hidden if there is no GPS fix.
# FORMAT REPLACEMENTS
*{mode}*: Fix mode
*{status}*: Technology used for GPS fix. Not all GPS receivers report this.
*{latitude}*: Latitude, decimal degrees. Can be NaN.
*{latitude_error}*: Latitude uncertainty, meters. Can be NaN.
*{longitude}*: Longitude, decimal degrees. Can be NaN.
*{longitude_error}*: Longitude uncertainty, meters. Can be NaN.
*{altitude_hae}*: Altitude, height above ellipsoid, meters. Can be NaN.
*{altitude_msl}*: Longitude, MSL, meters. Can be NaN.
*{altitude_error}*: Altitude uncertainty, meters. Can be NaN.
*{speed}*: Speed over ground, meters/sec. Can be NaN.
*{speed_error}*: Speed uncertainty, meters/sec. Can be NaN.
*{climb}*: Vertical speed, meters/sec. Can be NaN.
*{climb_error}*: Vertical speed uncertainty, meters/sec. Can be NaN.
*{satellites_visible}*: Number of satellites visible from the GPS receiver.
*{satellites_used}*: Number of satellites used for the GPS fix.
# EXAMPLES
```
"gps": {
"format": "{mode}",
"format-disabled": "", // an empty format will hide the module
"format-no-fix": "No fix",
"format-fix-3d": "{status}",
"tooltip-format": "{mode}",
"tooltip-format-no-fix": "{satellites_visible} satellites visible",
"tooltip-format-fix-2d": "{satellites_used}/{satellites_visible} satellites used",
"tooltip-format-fix-3d": "Altitude: {altitude_hae}m",
"hide-disconnected": false
}
```
# STYLE
- *#gps*
- *#gps.disabled* Applied when GPS is disabled.
- *#gps.fix-none* Applied when GPS is present, but there is no fix.
- *#gps.fix-2d* Applied when there is a 2D fix.
- *#gps.fix-3d* Applied when there is a 3D fix.

View File

@@ -0,0 +1,46 @@
waybar-hyprland-windowcount(5)
# NAME
waybar - hyprland window count module
# DESCRIPTION
The *windowcount* module displays the number of windows in the current Hyprland workspace.
# CONFIGURATION
Addressed by *hyprland/windowcount*
*format*: ++
typeof: string ++
default: {} ++
The format for how information should be displayed. On {} the current workspace window count is displayed.
*format-empty*: ++
typeof: string ++
Override the format when the workspace contains no windows window
*format-windowed*: ++
typeof: string ++
Override the format when the workspace contains no fullscreen windows
*format-fullscreen*: ++
typeof: string ++
Override the format when the workspace contains a fullscreen window
*separate-outputs*: ++
typeof: bool ++
default: true ++
Show the active workspace window count of the monitor the bar belongs to, instead of the focused workspace.
# STYLE
- *#windowcount*
The following classes are applied to the entire Waybar rather than just the
windowcount widget:
- *window#waybar.empty* When no windows are in the workspace
- *window#waybar.fullscreen* When there is a fullscreen window in the workspace;
useful with Hyprland's *fullscreen, 1* mode

View File

@@ -26,17 +26,77 @@ Addressed by *hyprland/workspaces*
Regex rules to map window class to an icon or preferred method of representation for a workspace's window.
Keys are the rules, while the values are the methods of representation. Values may use the placeholders {class} and {title} to use the window's original class and/or title respectively.
Rules may specify `class<...>`, `title<...>`, or both in order to fine-tune the matching.
You may assign an empty value to a rule to have it ignored from generating any representation in workspaces.
You may assign an empty value to a rule to have it ignored from generating any representation in workspaces. ++
This setting is ignored if *workspace-taskbar.enable* is set to true.
*window-rewrite-default*:
*window-rewrite-default*: ++
typeof: string ++
default: "?" ++
The default method of representation for a workspace's window. This will be used for windows whose classes do not match any of the rules in *window-rewrite*.
The default method of representation for a workspace's window. This will be used for windows whose classes do not match any of the rules in *window-rewrite*. ++
This setting is ignored if *workspace-taskbar.enable* is set to true.
*format-window-separator*: ++
typeof: string ++
default: " " ++
The separator to be used between windows in a workspace.
The separator to be used between windows in a workspace. ++
This setting is ignored if *workspace-taskbar.enable* is set to true.
*workspace-taskbar*: ++
typeof: object ++
Contains settings for the workspace taskbar, an alternative mode for the workspaces module which displays the window icons as images instead of text.
*enable*: ++
typeof: bool ++
default: false ++
Enables the workspace taskbar mode.
*update-active-window*: ++
typeof: bool ++
default: false ++
If true, the active/focused window will have an 'active' class. Could cause higher CPU usage due to more frequent redraws.
*reverse-direction*: ++
typeof: bool ++
default: false ++
If true, the taskbar windows will be added in reverse order (right to left if orientation is horizontal, bottom to top if vertical).
*active-window-position*: ++
typeof: "none" | "first" | "last" ++
default: "none" ++
If set to "first", the active window will be moved at the beginning of the taskbar. If set to "last", it will be moved at the end. It will only work if *update-active-window* is set to true.
*format*: ++
typeof: string ++
default: {icon} ++
Format to use for each window in the workspace taskbar. Available placeholders are {icon} and {title}.
*icon-size*: ++
typeof: int ++
default: 16 ++
Size of the icons in the workspace taskbar.
*icon-theme*: ++
typeof: string | array ++
default: [] ++
Icon theme to use for the workspace taskbar. If an array is provided, the first theme that is found for a given icon will be used. If no theme is found (or the array is empty), the default icon theme is used.
*orientation*: ++
typeof: "horizontal" | "vertical" ++
default: horizontal ++
Direction in which the workspace taskbar is displayed.
*ignore-list*: ++
typeof: array ++
default: [] ++
Regex patterns to match against window class or window title. If a window's class OR title matches any of the patterns, it will not be shown.
*on-click-window*: ++
typeof: string ++
default: "" ++
Command to run when a window is clicked. Available placeholders are: ++
- {address} Hyprland address of the clicked window. ++
- {button} Pressed button number, see https://api.gtkd.org/gdk.c.types.GdkEventButton.button.html. ++
See https://github.com/Alexays/Waybar/wiki/Module:-Hyprland#workspace-taskbars-example for a full example.
*show-special*: ++
typeof: bool ++
@@ -48,6 +108,11 @@ Addressed by *hyprland/workspaces*
default: false ++
If this and show-special are to true, special workspaces will be shown only if visible.
*persistent-only*: ++
typeof: bool ++
default: false ++
If set to true, only persistent workspaces will be shown on bar.
*all-outputs*: ++
typeof: bool ++
default: false ++
@@ -76,6 +141,7 @@ Addressed by *hyprland/workspaces*
If set to number, workspaces will sort by number.
If set to name, workspaces will sort by name.
If set to id, workspaces will sort by id.
If set to special-centered, workspaces will sort by default with special workspaces in the center.
If none of those, workspaces will sort with default behavior.
*expand*: ++
@@ -178,3 +244,6 @@ Additional to workspace name matching, the following *format-icons* can be set.
- *#workspaces button.special*
- *#workspaces button.urgent*
- *#workspaces button.hosting-monitor* (gets applied if workspace-monitor == waybar-monitor)
- *#workspaces .workspace-label*
- *#workspaces .taskbar-window* (each window in the taskbar, only if 'workspace-taskbar.enable' is true)
- *#workspaces .taskbar-window.active* (applied to the focused window, only if 'workspace-taskbar.update-active-window' is true)

View File

@@ -125,3 +125,9 @@ screensaver, also known as "presentation mode".
"timeout": 30.5
}
```
# STYLE
- *#idle_inhibitor*
- *#idle_inhibitor.activated*
- *#idle_inhibitor.deactivated*

View File

@@ -24,8 +24,9 @@ The *image* module displays an image from a path.
The width/height to render the image.
*interval*: ++
typeof: integer ++
typeof: integer or float ++
The interval (in seconds) to re-render the image. ++
Minimum value is 0.001 (1ms). Values smaller than 1ms will be set to 1ms. ++
This is useful if the contents of *path* changes. ++
If no *interval* is defined, the image will only be rendered once.

View File

@@ -45,7 +45,7 @@ Addressed by *jack*
The format of information displayed in the tooltip.
*interval*: ++
typeof: integer ++
typeof: integer or float ++
default: 1 ++
The interval in which the information gets polled.

View File

@@ -120,6 +120,8 @@ Addressed by *memory*
*{swapAvail}*: Amount of available swap in GiB.
*{swapState}*: Signals if swap is activated or not
# EXAMPLES
```

View File

@@ -7,7 +7,7 @@ waybar - menu property
# OVERVIEW
Some modules support a 'menu', which allows to have a popup menu whan a defined
Some modules support a 'menu', which allows to have a popup menu when a defined
click is done over the module.
# PROPERTIES
@@ -87,15 +87,15 @@ Module config :
```
"custom/power": {
"format" : "⏻ ",
"tooltip": false,
"menu": "on-click",
"menu-file": "~/.config/waybar/power_menu.xml",
"menu-actions": {
"shutdown": "shutdown",
"reboot": "reboot",
"suspend": "systemctl suspend",
"hibernate": "systemctl hibernate",
},
"tooltip": false,
"menu": "on-click",
"menu-file": "~/.config/waybar/power_menu.xml",
"menu-actions": {
"shutdown": "shutdown",
"reboot": "reboot",
"suspend": "systemctl suspend",
"hibernate": "systemctl hibernate",
},
},
```
@@ -104,28 +104,28 @@ Module config :
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkMenu" id="menu">
<child>
<object class="GtkMenuItem" id="suspend">
<property name="label">Suspend</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="hibernat">
<property name="label">Hibernate</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="suspend">
<property name="label">Suspend</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="hibernate">
<property name="label">Hibernate</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="shutdown">
<property name="label">Shutdown</property>
</object>
<object class="GtkMenuItem" id="shutdown">
<property name="label">Shutdown</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="delimiter1"/>
</child>
<child>
<object class="GtkMenuItem" id="reboot">
<property name="label">Reboot</property>
</object>
<object class="GtkMenuItem" id="reboot">
<property name="label">Reboot</property>
</object>
</child>
</object>
</interface>

View File

@@ -204,6 +204,10 @@ Addressed by *mpd*
*{queueLength}*: The length of the current queue.
*{uri}*: The URI of the song relative to the MPD music directory.
*{filename}* The last part of the URI.
*{stateIcon}*: The icon corresponding to the playing or paused status of the player (see *state-icons* option)
*{consumeIcon}*: The icon corresponding the "consume" option (see *consume-icons* option)

View File

@@ -16,6 +16,11 @@ Addressed by *network*
typeof: string ++
Use the defined interface instead of auto-detection. Accepts wildcard.
*rfkill*: ++
typeof: bool ++
default: true ++
If enabled, the *disabled* format will be used when rfkill is blocking wlan interfaces.
*interval*: ++
typeof: integer ++
default: 60 ++
@@ -24,7 +29,7 @@ Addressed by *network*
*family*: ++
typeof: string ++
default: *ipv4* ++
The address family that is used for the format replacement {ipaddr} and to determine if a network connection is present.
The address family that is used for the format replacement {ipaddr} and to determine if a network connection is present. Set it to ipv4_6 to display both.
*format*: ++
typeof: string ++
@@ -49,7 +54,7 @@ Addressed by *network*
*format-disabled*: ++
typeof: string ++
This format is used when the displayed interface is disabled.
This format is used when rfkill is blocking wlan interfaces.
*format-icons*: ++
typeof: array/object ++
@@ -127,7 +132,7 @@ Addressed by *network*
*tooltip-format-disabled*: ++
typeof: string ++
This format is used when the displayed interface is disabled.
This format is used when rfkill is blocking wlan interfaces.
*menu*: ++
typeof: string ++
@@ -155,9 +160,13 @@ Addressed by *network*
*{gwaddr}*: The default gateway for the interface
*{netmask}*: The subnetmask corresponding to the IP.
*{netmask}*: The subnetmask corresponding to the IP(V4).
*{cidr}*: The subnetmask corresponding to the IP in CIDR notation.
*{netmask6}*: The subnetmask corresponding to the IP(V6).
*{cidr}*: The subnetmask corresponding to the IP(V4) in CIDR notation.
*{cidr6}*: The subnetmask corresponding to the IP(V6) in CIDR notation.
*{essid}*: Name (SSID) of the wireless network.
@@ -167,7 +176,7 @@ Addressed by *network*
*{signaldBm}*: Signal strength of the wireless network in dBm.
*{frequency}*: Frequency of the wireless network in MHz.
*{frequency}*: Frequency of the wireless network in GHz.
*{bandwidthUpBits}*: Instant up speed in bits/seconds.

View File

@@ -52,8 +52,8 @@ Addressed by *niri/language*
```
"niri/language": {
"format": "Lang: {long}"
"format-en": "AMERICA, HELL YEAH!"
"format": "Lang: {long}",
"format-en": "AMERICA, HELL YEAH!",
"format-tr": "As bayrakları"
}
```
@@ -61,3 +61,12 @@ Addressed by *niri/language*
# STYLE
- *#language*
Additionally, a CSS class matching the current layout's short name is added to the widget. This
allows per-language styling, for example:
```
#language.us { color: #00ff00; }
#language.de { color: #ff0000; }
#language.fr { color: #0000ff; }
```

View File

@@ -70,6 +70,8 @@ Additional to workspace name matching, the following *format-icons* can be set.
- *default*: Will be shown, when no string matches are found.
- *focused*: Will be shown, when workspace is focused.
- *active*: Will be shown, when workspace is active on its output.
- *urgent*: Will be shown, when workspace has urgent windows.
- *empty*: Will be shown, when workspace is empty.
# EXAMPLES
@@ -95,6 +97,7 @@ Additional to workspace name matching, the following *format-icons* can be set.
- *#workspaces button*
- *#workspaces button.focused*: The single focused workspace.
- *#workspaces button.active*: The workspace is active (visible) on its output.
- *#workspaces button.urgent*: The workspace has one or more urgent windows.
- *#workspaces button.empty*: The workspace is empty.
- *#workspaces button.current_output*: The workspace is from the same output as
the bar that it is displayed on.

View File

@@ -37,6 +37,17 @@ the screen or playing audio.
default: false ++
Enables this module to consume all left over space dynamically.
*ignore-monitor* ++
typeof: bool ++
default: true ++
Ignore streams with *stream.monitor* property.
*ignore* ++
typeof: array of objects ++
default: [] ++
Additional streams to be ignored. See *IGNORE CONFIGURATION* for++
more information.
# MODULES CONFIGURATION
*type*: ++
@@ -54,6 +65,14 @@ the screen or playing audio.
default: 24 ++
The size of each icon in the tooltip.
# IGNORE CONFIGURATION
*type*: ++
typeof: string
*name*: ++
typeof: string
# EXAMPLES
```
@@ -77,6 +96,17 @@ the screen or playing audio.
"tooltip": true,
"tooltip-icon-size": 24
}
],
"ignore-monitor": true,
"ignore": [
{
"type": "audio-in",
"name": "cava"
},
{
"type": "screenshare",
"name": "obs"
}
]
},
```

View File

@@ -77,12 +77,12 @@ The slider is a component with multiple CSS Nodes, of which the following are ex
min-height: 80px;
min-width: 10px;
border-radius: 5px;
background-color: black;
background: black;
}
#pulseaudio-slider highlight {
min-width: 10px;
border-radius: 5px;
background-color: green;
background: green;
}
```

View File

@@ -97,7 +97,11 @@ Additionally, you can control the volume by scrolling *up* or *down* while the c
*reverse-scrolling*: ++
typeof: bool ++
Option to reverse the scroll direction.
Option to reverse the scroll direction for touchpads.
*reverse-mouse-scrolling*: ++
typeof: bool ++
Option to reverse the scroll direction for mice.
*tooltip*: ++
typeof: bool ++
@@ -173,8 +177,8 @@ to be selected when the corresponding audio device is muted. This applies to *de
"format-icons": {
"alsa_output.pci-0000_00_1f.3.analog-stereo": "",
"alsa_output.pci-0000_00_1f.3.analog-stereo-muted": "",
"headphones": "",
"handsfree": "",
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"phone-muted": "",

View File

@@ -83,6 +83,7 @@ Addressed by *river/layout*
- *#layout*
- *#layout.focused* Applied when the output this module's bar belongs to is focused.
- *#layout.<layout>* Applied when the output this module's bar belongs uses this layout.
# SEE ALSO

View File

@@ -89,6 +89,11 @@ Addressed by *sway/window*
default: false ++
If the workspace itself is focused and the workspace contains nodes or floating_nodes, show the workspace name. If not set, text remains empty but styles according to nodes in the workspace are still applied.
*show-hidden-marks*: ++
typeof: bool ++
default: false ++
For the *{marks}* format replacement, include hidden marks that start with an underscore.
*rewrite*: ++
typeof: object ++
Rules to rewrite the module format output. See *rewrite rules*.
@@ -117,6 +122,8 @@ Addressed by *sway/window*
*{shell}*: The shell of the focused window. It's 'xwayland' when the window is
running through xwayland, otherwise, it's 'xdg-shell'.
*{marks}*: Marks of the window.
# REWRITE RULES
*rewrite* is an object where keys are regular expressions and values are

View File

@@ -31,6 +31,11 @@ Addressed by *sway/workspaces*
default: false ++
If set to false, you can scroll to cycle through workspaces. If set to true this behaviour is disabled.
*reverse-scroll*: ++
typeof: bool ++
default: false ++
If set to false, scrolling up will switch to the previous workspace and scrolling down will switch to the next workspace. If set to true, the behavior will be reversed.
*disable-click*: ++
typeof: bool ++
default: false ++
@@ -174,7 +179,6 @@ n.b.: the list of outputs can be obtained from command line using *swaymsg -t ge
"format": "<span size='larger'>{name}</span> {windows}",
"format-window-separator": " | ",
"window-rewrite-default": "{name}",
"window-format": "<span color='#e0e0e0'>{name}</span>",
"window-rewrite": {
"class<firefox>": "",
"class<kitty>": "k",

View File

@@ -62,6 +62,12 @@ Addressed by *systemd-failed-units*
*{nr_failed}*: Number of total failed units.
*{systemd_state}:* State of the systemd system session
*{user_state}:* State of the systemd user session
*{overall_state}:* Overall state of the systemd and user session. ("Ok" or "Degraded")
# EXAMPLES
```

View File

@@ -40,7 +40,7 @@ Addressed by *temperature*
The threshold before it is considered critical (Celsius).
*interval*: ++
typeof: integer ++
typeof: integer or float ++
default: 10 ++
The interval in which the information gets polled.
@@ -160,4 +160,5 @@ Addressed by *temperature*
# STYLE
- *#temperature*
- *#temperature.warning*
- *#temperature.critical*

View File

@@ -47,7 +47,11 @@ Addressed by *tray*
```
"tray": {
"icon-size": 21,
"spacing": 10
"spacing": 10,
"icons": {
"blueman": "bluetooth",
"TelegramDesktop": "$HOME/.local/share/icons/hicolor/16x16/apps/telegram.png"
}
}
```

View File

@@ -0,0 +1,82 @@
waybar-wayfire-window(5)
# NAME
waybar - wayfire window module
# DESCRIPTION
The *window* module displays the title of the currently focused window in wayfire.
# CONFIGURATION
Addressed by *wayfire/window*
*format*: ++
typeof: string ++
default: {title} ++
The format, how information should be displayed. On {} the current window title is displayed.
*rewrite*: ++
typeof: object ++
Rules to rewrite window title. See *rewrite rules*.
*icon*: ++
typeof: bool ++
default: false ++
Option to hide the application icon.
*icon-size*: ++
typeof: integer ++
default: 24 ++
Option to change the size of the application icon.
*expand*: ++
typeof: bool ++
default: false ++
Enables this module to consume all left over space dynamically.
# FORMAT REPLACEMENTS
See the output of "wayfire msg windows" for examples
*{title}*: The current title of the focused window.
*{app_id}*: The current app ID of the focused window.
# REWRITE RULES
*rewrite* is an object where keys are regular expressions and values are
rewrite rules if the expression matches. Rules may contain references to
captures of the expression.
Regular expression and replacement follow ECMA-script rules.
If no expression matches, the title is left unchanged.
Invalid expressions (e.g., mismatched parentheses) are skipped.
# EXAMPLES
```
"wayfire/window": {
"format": "{}",
"rewrite": {
"(.*) - Mozilla Firefox": "🌎 $1",
"(.*) - zsh": "> [$1]"
}
}
```
# STYLE
- *#window*
- *window#waybar.empty #window* When no windows are on the workspace
The following classes are applied to the entire Waybar rather than just the
window widget:
- *window#waybar.empty* When no windows are in the workspace
- *window#waybar.solo* When only one window is on the workspace
- *window#waybar.<app-id>* Where *app-id* is the app ID of the only window on
the workspace

View File

@@ -0,0 +1,86 @@
waybar-wayfire-workspaces(5)
# NAME
waybar - wayfire workspaces module
# DESCRIPTION
The *workspaces* module displays the currently used workspaces in wayfire.
# CONFIGURATION
Addressed by *wayfire/workspaces*
*format*: ++
typeof: string ++
default: {value} ++
The format, how information should be displayed.
*format-icons*: ++
typeof: array ++
Based on the workspace name, index and state, the corresponding icon gets selected. See *icons*.
*disable-click*: ++
typeof: bool ++
default: false ++
If set to false, you can click to change workspace. If set to true this behaviour is disabled.
*disable-markup*: ++
typeof: bool ++
default: false ++
If set to true, button label will escape pango markup.
*current-only*: ++
typeof: bool ++
default: false ++
If set to true, only the active or focused workspace will be shown.
*on-update*: ++
typeof: string ++
Command to execute when the module is updated.
*expand*: ++
typeof: bool ++
default: false ++
Enables this module to consume all left over space dynamically.
# FORMAT REPLACEMENTS
*{icon}*: Icon, as defined in *format-icons*.
*{index}*: Index of the workspace on its output.
*{output}*: Output where the workspace is located.
# ICONS
Additional to workspace name matching, the following *format-icons* can be set.
- *default*: Will be shown, when no string matches are found.
- *focused*: Will be shown, when workspace is focused.
# EXAMPLES
```
"wayfire/workspaces": {
"format": "{icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"focused": "",
"default": ""
}
}
```
# Style
- *#workspaces button*
- *#workspaces button.focused*: The single focused workspace.
- *#workspaces button.empty*: The workspace is empty.
- *#workspaces button.current_output*: The workspace is from the same output as
the bar that it is displayed on.

View File

@@ -19,6 +19,11 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
typeof: string ++
This format is used when the sound is muted.
*node-type*: ++
typeof: string ++
default: *Audio/Sink* ++
The WirePlumber node type to attach to. Use *Audio/Source* to manage microphones etc.
*tooltip*: ++
typeof: bool ++
default: *true* ++
@@ -108,6 +113,8 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
# EXAMPLES
## Basic:
```
"wireplumber": {
"format": "{volume}%",
@@ -116,6 +123,26 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
}
```
## Separate Sink and Source Widgets
```
"wireplumber#sink": {
"format": "{volume}% {icon}",
"format-muted": "",
"format-icons": ["", "", ""],
"on-click": "helvum",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"scroll-step": 5
},
"wireplumber#source": {
"node-type": "Audio/Source",
"format": "{volume}% ",
"format-muted": "",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
"scroll-step": 5
}
```
# STYLE
- *#wireplumber*

View File

@@ -86,7 +86,7 @@ The visual display elements for waybar use a CSS stylesheet, see *waybar-styles(
*no-center* ++
typeof: bool ++
default: false ++
Option to disable the center modules fully usefull together with expand-\*.
Option to disable the center modules fully useful together with expand-\*.
*spacing* ++
typeof: integer ++
@@ -151,6 +151,20 @@ The visual display elements for waybar use a CSS stylesheet, see *waybar-styles(
default: *false* ++
Option to enable reloading the css style if a modification is detected on the style sheet file or any imported css files.
*on-sigusr1* ++
typeof: string ++
default: *toggle* ++
Action that is performed when receiving SIGUSR1 kill signal. ++
Possible values: *show*, *hide*, *toggle*, *reload*, *noop*. ++
Default value: *toggle*.
*on-sigusr2* ++
typeof: string ++
default: *reload* ++
Action that is performed when receiving SIGUSR2 kill signal. ++
Possible values: *show*, *hide*, *toggle*, *reload*, *noop*. ++
Default value: *reload*.
# MODULE FORMAT
You can use PangoMarkupFormat (See https://developer.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat).
@@ -206,14 +220,36 @@ A minimal *config* file could look like this:
Waybar accepts the following signals:
*SIGUSR1*
Toggles the bar visibility (hides if shown, shows if hidden)
By default toggles the bar visibility (hides if shown, shows if hidden)
*SIGUSR2*
Reloads (resets) the bar
By default reloads (resets) the bar
*SIGINT*
Quits the bar
For example, to toggle the bar programmatically, you can invoke `killall -SIGUSR1 waybar`.
## User signal configuration
Config parameters *on-sigusr1* and *on-sigusr2* change what happens when bars receive
*SIGUSR1* and *SIGUSR2* signals.
This means that commands `killall -SIGUSR1 waybar` and `killall -SIGUSR2 waybar`
can perform user-configured action.
It also means that if an external script has the PID of the bar then it can
perform more complex `show`/`hide`/`reload` logic for each instance of Waybar.
One can find the PID e.g. by doing `pgrep -a waybar` which could then match
by config name or other parameters.
## Kill parameter meanings
*show* Switches state to visible (per bar).
*hide* Switches state to hidden (per bar).
*toggle* Switches state between visible and hidden (per bar).
*reload* Reloads all waybars of current waybar process (basically equivalent to
restarting with updated config which sets initial visibility values).
*noop* Does nothing when the kill signal is received.
# MULTI OUTPUT CONFIGURATION
## Limit a configuration to some outputs
@@ -272,6 +308,17 @@ When positioning Waybar on the left or right side of the screen, sometimes it's
Valid options for the "rotate" property are: 0, 90, 180, and 270.
## Swapping icon and label
If a module displays both a label and an icon, it might be desirable to swap them (for instance, for panels on the left or right of the screen, or for user adopting a right-to-left script). This can be achieved with the "swap-icon-label" property, taking a boolean. Example:
```
{
"sway/window": {
"swap-icon-label": true
}
}
```
## Grouping modules
Module groups allow stacking modules in any direction. By default, when the bar is positioned on the top or bottom of the screen, modules in a group are stacked vertically. Likewise, when positioned on the left or right, modules in a group are stacked horizontally. This can be changed with the "orientation" property.
@@ -390,4 +437,4 @@ A group may hide all but one element, showing them only on mouse hover. In order
# SEE ALSO
*sway-output(5)*
*waybar-styles(5)"
*waybar-styles(5)*

View File

@@ -1,6 +1,6 @@
project(
'waybar', 'cpp', 'c',
version: '0.12.0',
version: '0.14.0',
license: 'MIT',
meson_version: '>= 0.59.0',
default_options : [
@@ -69,7 +69,7 @@ is_openbsd = host_machine.system() == 'openbsd'
thread_dep = dependency('threads')
fmt = dependency('fmt', version : ['>=8.1.1'], fallback : ['fmt', 'fmt_dep'])
spdlog = dependency('spdlog', version : ['>=1.10.0'], fallback : ['spdlog', 'spdlog_dep'], default_options : ['external_fmt=enabled', 'std_format=disabled', 'tests=disabled'])
spdlog = dependency('spdlog', version : ['>=1.15.2'], fallback : ['spdlog', 'spdlog_dep'], default_options : ['std_format=disabled', 'tests=disabled'])
wayland_client = dependency('wayland-client')
wayland_cursor = dependency('wayland-cursor')
wayland_protos = dependency('wayland-protocols')
@@ -93,6 +93,7 @@ libmpdclient = dependency('libmpdclient', required: get_option('mpd'))
xkbregistry = dependency('xkbregistry')
libjack = dependency('jack', required: get_option('jack'))
libwireplumber = dependency('wireplumber-0.5', required: get_option('wireplumber'))
libgps = dependency('libgps', required: get_option('gps'))
libsndio = compiler.find_library('sndio', required: get_option('sndio'))
if libsndio.found()
@@ -182,6 +183,7 @@ src_files = files(
'src/util/sanitize_str.cpp',
'src/util/rewrite_string.cpp',
'src/util/gtk_icon.cpp',
'src/util/icon_loader.cpp',
'src/util/regex_collection.cpp',
'src/util/css_reload_helper.cpp'
)
@@ -275,6 +277,17 @@ if true
man_files += files('man/waybar-wlr-taskbar.5.scd')
endif
if wayland_protos.version().version_compare('>=1.39')
add_project_arguments('-DHAVE_EXT_WORKSPACES', language: 'cpp')
src_files += files(
'src/modules/ext/workspace_manager.cpp',
'src/modules/ext/workspace_manager_binding.cpp',
)
man_files += files(
'man/waybar-ext-workspaces.5.scd',
)
endif
if true
add_project_arguments('-DHAVE_RIVER', language: 'cpp')
src_files += files(
@@ -306,6 +319,7 @@ if true
'src/modules/hyprland/language.cpp',
'src/modules/hyprland/submap.cpp',
'src/modules/hyprland/window.cpp',
'src/modules/hyprland/windowcount.cpp',
'src/modules/hyprland/workspace.cpp',
'src/modules/hyprland/workspaces.cpp',
'src/modules/hyprland/windowcreationpayload.cpp',
@@ -333,6 +347,19 @@ if get_option('niri')
)
endif
if true
add_project_arguments('-DHAVE_WAYFIRE', language: 'cpp')
src_files += files(
'src/modules/wayfire/backend.cpp',
'src/modules/wayfire/window.cpp',
'src/modules/wayfire/workspaces.cpp',
)
endif
if get_option('login-proxy')
add_project_arguments('-DHAVE_LOGIN_PROXY', language: 'cpp')
endif
if libnl.found() and libnlgen.found()
add_project_arguments('-DHAVE_LIBNL', language: 'cpp')
src_files += files('src/modules/network.cpp')
@@ -470,27 +497,30 @@ else
man_files += files('man/waybar-clock.5.scd')
endif
if get_option('experimental')
add_project_arguments('-DHAVE_WLR_WORKSPACES', language: 'cpp')
src_files += files(
'src/modules/wlr/workspace_manager.cpp',
'src/modules/wlr/workspace_manager_binding.cpp',
)
man_files += files(
'man/waybar-wlr-workspaces.5.scd',
)
endif
cava = dependency('cava',
version : '>=0.10.3',
cava = dependency('libcava',
version : '>=0.10.7',
required: get_option('cava'),
fallback : ['cava', 'cava_dep'],
fallback : ['libcava', 'cava_dep'],
not_found_message: 'cava is not found. Building waybar without cava')
eproxy = dependency('epoxy', required: false)
if cava.found()
add_project_arguments('-DHAVE_LIBCAVA', language: 'cpp')
src_files += files('src/modules/cava.cpp')
src_files += files('src/modules/cava/cavaRaw.cpp',
'src/modules/cava/cava_backend.cpp')
man_files += files('man/waybar-cava.5.scd')
if eproxy.found()
add_project_arguments('-DHAVE_LIBCAVAGLSL', language: 'cpp')
src_files += files('src/modules/cava/cavaGLSL.cpp')
endif
endif
if libgps.found()
add_project_arguments('-DHAVE_LIBGPS', language: 'cpp')
src_files += files('src/modules/gps.cpp')
man_files += files('man/waybar-gps.5.scd')
endif
subdir('protocol')
@@ -531,7 +561,9 @@ executable(
libsndio,
tz_dep,
xkbregistry,
cava
cava,
eproxy,
libgps
],
include_directories: inc_dirs,
install: true,

Some files were not shown because too many files have changed in this diff Show More