Compare commits
522 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41de8964f1 | ||
|
|
7e0cbf4a1f | ||
|
|
b3fbe1b5ed | ||
|
|
477f30705c | ||
|
|
07d3a4da10 | ||
|
|
61b3c6d7d1 | ||
|
|
c63e332fb2 | ||
|
|
79c30e77a7 | ||
|
|
b0983e9c37 | ||
|
|
3dce0956ec | ||
|
|
9a545e75e4 | ||
|
|
7cfa708b1a | ||
|
|
f1b7d829c2 | ||
|
|
6679801a9c | ||
|
|
13a4e5d43d | ||
|
|
b9a26f51b6 | ||
|
|
ff69525e29 | ||
|
|
1e0037a873 | ||
|
|
5bbace1d43 | ||
|
|
4c72033309 | ||
|
|
b5093f3e58 | ||
|
|
f824ae9334 | ||
|
|
90f2490407 | ||
|
|
a6ac75983f | ||
|
|
7cb1a0e3d6 | ||
|
|
91e57376ef | ||
|
|
0776e694df | ||
|
|
bb190409de | ||
|
|
39d6d80f64 | ||
|
|
b4d95b405c | ||
|
|
71b01fe58f | ||
|
|
2baa93174b | ||
|
|
321ed85a67 | ||
|
|
e526afb963 | ||
|
|
8dcdd97879 | ||
|
|
2dc2b5ccfd | ||
|
|
a4f200cdb5 | ||
|
|
64ed2cd970 | ||
|
|
e45883088d | ||
|
|
061c561762 | ||
|
|
506fd5c597 | ||
|
|
682fc34c1d | ||
|
|
f91889ce1c | ||
|
|
94777921d9 | ||
|
|
ee9dc6ae05 | ||
|
|
1cb30e0f85 | ||
|
|
50711bfb87 | ||
|
|
19360462ba | ||
|
|
73d9c5f560 | ||
|
|
b85f0c17c3 | ||
|
|
b02694caef | ||
|
|
2dfbaabf31 | ||
|
|
f991af2893 | ||
|
|
0e07c7ac5c | ||
|
|
46a152abc8 | ||
|
|
310a473e65 | ||
|
|
d808c00324 | ||
|
|
0cb605b529 | ||
|
|
04796988e9 | ||
|
|
4d74bb3004 | ||
|
|
fd67002662 | ||
|
|
c98cb7095d | ||
|
|
cae5f9a56f | ||
|
|
10c116e54a | ||
|
|
6d3b93bbf7 | ||
|
|
9ef6dc7380 | ||
|
|
f409f53131 | ||
|
|
88766de1ee | ||
|
|
b6c13ba58b | ||
|
|
e7a4bafede | ||
|
|
6c48db6cee | ||
|
|
984d0de1fc | ||
|
|
29bf5d5da1 | ||
|
|
255c0ebe28 | ||
|
|
8516d457ad | ||
|
|
7505e2c3f3 | ||
|
|
c8dc3e7024 | ||
|
|
b7ff47fb05 | ||
|
|
7463be9b6a | ||
|
|
125b59e23b | ||
|
|
3c7a9bf432 | ||
|
|
aaea814217 | ||
|
|
c336bc5466 | ||
|
|
460b19ba1b | ||
|
|
0fcda9afa5 | ||
|
|
53d8d3cd2a | ||
|
|
eae22f3273 | ||
|
|
08da7b5282 | ||
|
|
4730fc4d77 | ||
|
|
2b9601b9a4 | ||
|
|
6a1d89e80d | ||
|
|
35d5203b4e | ||
|
|
13ed499999 | ||
|
|
0c1f1f2df9 | ||
|
|
ee91d18ad9 | ||
|
|
f27df33280 | ||
|
|
ea1ee2c027 | ||
|
|
54f7991325 | ||
|
|
9246297d63 | ||
|
|
630f85dcb1 | ||
|
|
77b42105a6 | ||
|
|
df138e12c4 | ||
|
|
373fd77f7a | ||
|
|
f5e6e5e9fc | ||
|
|
a88e5795a4 | ||
|
|
e9d0f2254d | ||
|
|
71c6c6032b | ||
|
|
780e96bd78 | ||
|
|
a563a3fceb | ||
|
|
286cff2e3d | ||
|
|
cbdbc492bb | ||
|
|
d6b6158ae9 | ||
|
|
f314150736 | ||
|
|
6206cebd75 | ||
|
|
0cae53747e | ||
|
|
249b452829 | ||
|
|
bfedb7c446 | ||
|
|
9ca04ee2fd | ||
|
|
eea9561525 | ||
|
|
bef539e4de | ||
|
|
456c3add4a | ||
|
|
a48116799a | ||
|
|
74a6726f4f | ||
|
|
3d00c4bed4 | ||
|
|
d8218a301d | ||
|
|
44a8910022 | ||
|
|
341e39fbcf | ||
|
|
7b9db134dd | ||
|
|
7d5905b38c | ||
|
|
5a013bdba0 | ||
|
|
ae777c65a6 | ||
|
|
103487f672 | ||
|
|
3c197811e2 | ||
|
|
0bdea1e46f | ||
|
|
8daaad1e13 | ||
|
|
25f432b0ce | ||
|
|
e4dd2ecc5a | ||
|
|
a40c53bd5d | ||
|
|
84bd0d452e | ||
|
|
d4f61ad271 | ||
|
|
c6fceb03c8 | ||
|
|
cfb47790ad | ||
|
|
d5e3a9f894 | ||
|
|
0731117679 | ||
|
|
4bb06b86bc | ||
|
|
74255d0c7e | ||
|
|
5c2cf4c65c | ||
|
|
dcbbe3bb97 | ||
|
|
37a6106d3e | ||
|
|
b8a985d606 | ||
|
|
8f35dc17b8 | ||
|
|
dfbf1ff2a0 | ||
|
|
93d85a0cea | ||
|
|
3abbdb849d | ||
|
|
7da053f1bd | ||
|
|
2f6f9620d2 | ||
|
|
c266befe0a | ||
|
|
76d0b44214 | ||
|
|
bdcab011ee | ||
|
|
f8f795ac38 | ||
|
|
af9d61fa8f | ||
|
|
800c4b56cc | ||
|
|
bd28bb959f | ||
|
|
f4496c9648 | ||
|
|
07468357f4 | ||
|
|
2c482a2917 | ||
|
|
5e14698b4e | ||
|
|
250f58eed6 | ||
|
|
3ebf2d96e5 | ||
|
|
4d9403601a | ||
|
|
f73d26722c | ||
|
|
6cfaf4ff63 | ||
|
|
831602a913 | ||
|
|
703be13b00 | ||
|
|
fca159ad01 | ||
|
|
35c6e9c21c | ||
|
|
b36a283f83 | ||
|
|
715503ec3e | ||
|
|
81fb0daad2 | ||
|
|
c26978eca8 | ||
|
|
34484919d6 | ||
|
|
05cfd73804 | ||
|
|
c0e7aad60e | ||
|
|
d53135f834 | ||
|
|
15f54cd6ef | ||
|
|
24a30b7ffd | ||
|
|
4f55d7da90 | ||
|
|
7613069a40 | ||
|
|
d41a664779 | ||
|
|
cdf3ca910d | ||
|
|
19d2430516 | ||
|
|
47e0f42523 | ||
|
|
6319569ed0 | ||
|
|
0340760e12 | ||
|
|
f4b68f41e6 | ||
|
|
7b5206128c | ||
|
|
9bf8c8277a | ||
|
|
ff4ed82693 | ||
|
|
4ae2b6f1ba | ||
|
|
c9215ad818 | ||
|
|
72184b2205 | ||
|
|
61c5dad895 | ||
|
|
998fd7a192 | ||
|
|
72404a77f0 | ||
|
|
59c270ec06 | ||
|
|
a816812f81 | ||
|
|
451d458545 | ||
|
|
4222032fa1 | ||
|
|
afeea62214 | ||
|
|
0332d2ebf8 | ||
|
|
7cbdce5064 | ||
|
|
ba8ea3d952 | ||
|
|
8b48982bf6 | ||
|
|
5382a09db0 | ||
|
|
20642f47df | ||
|
|
d0c6e91094 | ||
|
|
956e39d3d3 | ||
|
|
22ec8e0770 | ||
|
|
d331331b76 | ||
|
|
dfa40d6a00 | ||
|
|
45ebf45343 | ||
|
|
55f52c3457 | ||
|
|
5c48373cfe | ||
|
|
c8484ebb1d | ||
|
|
bf4f3ab064 | ||
|
|
913e0665e7 | ||
|
|
e85025f805 | ||
|
|
517eb7651e | ||
|
|
67272cc47f | ||
|
|
1dfde583df | ||
|
|
3e16c3f74e | ||
|
|
252e4f78bf | ||
|
|
dbd3ffd732 | ||
|
|
97591c825a | ||
|
|
b03ecb3d74 | ||
|
|
7e845f506e | ||
|
|
afb1ee5422 | ||
|
|
682492f7a9 | ||
|
|
633bf9e00f | ||
|
|
addf44d945 | ||
|
|
e92b0a86b5 | ||
|
|
9ca52a48c8 | ||
|
|
056295cbc6 | ||
|
|
80669f7134 | ||
|
|
5ff6b0ad0f | ||
|
|
84162ec604 | ||
|
|
91ef6e51ed | ||
|
|
c5bc3bc59a | ||
|
|
569445f8b3 | ||
|
|
eb254db867 | ||
|
|
c0b8c4d468 | ||
|
|
9d2b137594 | ||
|
|
4a8d527dd5 | ||
|
|
b98e717433 | ||
|
|
fda7abb33d | ||
|
|
9681cfd2e8 | ||
|
|
567ae16a68 | ||
|
|
2fdfd1028a | ||
|
|
8476a7dc84 | ||
|
|
e74844b8d4 | ||
|
|
a622dfd072 | ||
|
|
775067f2da | ||
|
|
508d3cd3dd | ||
|
|
eb2df58f5a | ||
|
|
4ba1947a50 | ||
|
|
6fd859c0c4 | ||
|
|
8a15cbad5c | ||
|
|
e541936df9 | ||
|
|
f631d5eaf9 | ||
|
|
906170400e | ||
|
|
5e4dac1c0a | ||
|
|
f7b4451564 | ||
|
|
4a6c417ef5 | ||
|
|
9f71de5227 | ||
|
|
17cee0d876 | ||
|
|
0c6ca8321c | ||
|
|
26a344b131 | ||
|
|
8bd0285c88 | ||
|
|
212c676251 | ||
|
|
8490a1d9b9 | ||
|
|
a3ee5f1125 | ||
|
|
0b87af9372 | ||
|
|
fe3dda4c23 | ||
|
|
0d8d42573b | ||
|
|
d098dbbeb0 | ||
|
|
533d5de243 | ||
|
|
d3c7ff6525 | ||
|
|
bcee548f5e | ||
|
|
37c6cd42f5 | ||
|
|
a4989cedae | ||
|
|
5b8839ab5c | ||
|
|
4be1f3bf42 | ||
|
|
ddf5b3e07b | ||
|
|
d1998de47a | ||
|
|
78d5c3ef3a | ||
|
|
937b62ea9a | ||
|
|
6c4f0af2fe | ||
|
|
cc94278c4e | ||
|
|
0abb2166a4 | ||
|
|
a26ed50d0f | ||
|
|
4dbb874f7c | ||
|
|
c32d5e3883 | ||
|
|
834868e0b5 | ||
|
|
b2d11f9ec0 | ||
|
|
e32a678478 | ||
|
|
0d5a4f82ec | ||
|
|
8bdb5c1906 | ||
|
|
8a741f6ec7 | ||
|
|
1a9f5aced7 | ||
|
|
7b854112ed | ||
|
|
b4519c0819 | ||
|
|
e0f3695523 | ||
|
|
42affa4eda | ||
|
|
5ee0d1c7fe | ||
|
|
3948c0d154 | ||
|
|
53ca5a4883 | ||
|
|
e1649b001f | ||
|
|
5e1d6d1cc5 | ||
|
|
fdb9004048 | ||
|
|
1c07ca0099 | ||
|
|
69e2e249a6 | ||
|
|
bc2e143ac5 | ||
|
|
481b01d9af | ||
|
|
90911a15b6 | ||
|
|
bb2c67ebad | ||
|
|
dc64b3542b | ||
|
|
ba12ca71c0 | ||
|
|
6004316f1a | ||
|
|
36a1c89e30 | ||
|
|
a4241d7008 | ||
|
|
ab0acd07fe | ||
|
|
4ec121822a | ||
|
|
0992bf1b87 | ||
|
|
369c81d6f2 | ||
|
|
6a29abb49e | ||
|
|
9d9f1d6819 | ||
|
|
865121b21d | ||
|
|
d7e4a7d91f | ||
|
|
d1dac2854a | ||
|
|
565602114e | ||
|
|
ac08b752e3 | ||
|
|
fe2f847e6d | ||
|
|
3555417a4f | ||
|
|
884550964e | ||
|
|
d100e78872 | ||
|
|
5346649fc6 | ||
|
|
6ce881abd5 | ||
|
|
dbb708c88e | ||
|
|
d29a17d703 | ||
|
|
cf64b2c88c | ||
|
|
622f22d6b5 | ||
|
|
8e276bb3f6 | ||
|
|
157ea44510 | ||
|
|
01ae117cfe | ||
|
|
8e0964ad15 | ||
|
|
8024df0430 | ||
|
|
43af1b9ea0 | ||
|
|
e959f1d230 | ||
|
|
347c44209d | ||
|
|
758c14c5d8 | ||
|
|
78d2ce3791 | ||
|
|
db943dae98 | ||
|
|
6bac784b51 | ||
|
|
6d28740896 | ||
|
|
3abac0abfd | ||
|
|
0e5728b533 | ||
|
|
4e05659109 | ||
|
|
334fc6e0e4 | ||
|
|
20ca48c3b8 | ||
|
|
b863627c22 | ||
|
|
1e481b7ac0 | ||
|
|
f9acc1fed9 | ||
|
|
17d7cea4fd | ||
|
|
86ce9f7278 | ||
|
|
8645115619 | ||
|
|
63edb402ef | ||
|
|
ddb3016440 | ||
|
|
52d582b93a | ||
|
|
724a4a5ed3 | ||
|
|
77b50b4c7a | ||
|
|
3f80e507fd | ||
|
|
5f260516af | ||
|
|
9d89ddae9b | ||
|
|
bb40e169fd | ||
|
|
dacecb9b26 | ||
|
|
92242f0b9d | ||
|
|
0e03c7a811 | ||
|
|
6df26ccba7 | ||
|
|
278588b1a3 | ||
|
|
280f11e247 | ||
|
|
95eaffcfb1 | ||
|
|
e7b2d33d99 | ||
|
|
281911c9b3 | ||
|
|
e53497bab6 | ||
|
|
a1adf6847f | ||
|
|
6322fa28f3 | ||
|
|
e394485857 | ||
|
|
edab49f291 | ||
|
|
486b99c22f | ||
|
|
e46a1c6bfc | ||
|
|
d684a6de21 | ||
|
|
cad18f39f5 | ||
|
|
47f767b0ee | ||
|
|
04bda9f443 | ||
|
|
c88a86f510 | ||
|
|
2dfef1c213 | ||
|
|
71a53eb79d | ||
|
|
07f75e303c | ||
|
|
b4e97eb2f4 | ||
|
|
773b1d4806 | ||
|
|
57156bce7e | ||
|
|
e3095c6d1d | ||
|
|
951b89ffcb | ||
|
|
d6bfeb5a44 | ||
|
|
8b1d73690d | ||
|
|
9c47b2e9dd | ||
|
|
dedee8cd14 | ||
|
|
21af48fdc9 | ||
|
|
b5395f4e6f | ||
|
|
3462769fc1 | ||
|
|
ac1a42291d | ||
|
|
a3e7031fe2 | ||
|
|
254111ff91 | ||
|
|
de170fa579 | ||
|
|
83992d29a0 | ||
|
|
3bb3c2d23f | ||
|
|
ff66b5dd57 | ||
|
|
9e8ebe668d | ||
|
|
9cfb1e38fa | ||
|
|
ae997ad73b | ||
|
|
085a1ede97 | ||
|
|
636ef21f6e | ||
|
|
0d02f6877d | ||
|
|
e0be3ac178 | ||
|
|
45fec7bcbb | ||
|
|
7b23d58684 | ||
|
|
0006e4713a | ||
|
|
f60c291b82 | ||
|
|
4cb2bf06b7 | ||
|
|
8e2a742042 | ||
|
|
4a6af0da99 | ||
|
|
d177969f51 | ||
|
|
59b7715309 | ||
|
|
d56dd6ee7f | ||
|
|
1142979581 | ||
|
|
8a89706d03 | ||
|
|
a4d31ab10d | ||
|
|
34bfefcd2e | ||
|
|
fef0bb995c | ||
|
|
46e7ed35de | ||
|
|
d623a89cd1 | ||
|
|
1210bcd2b5 | ||
|
|
30f6ed05ec | ||
|
|
3ade275d10 | ||
|
|
4354da2849 | ||
|
|
6417782af6 | ||
|
|
64d99a5884 | ||
|
|
627e4a4a50 | ||
|
|
c2f1a7894b | ||
|
|
6560e32bc1 | ||
|
|
70f3c1d9e9 | ||
|
|
5b1826d2f6 | ||
|
|
1fa8019ad5 | ||
|
|
7a6960842a | ||
|
|
9b5c2dc7ed | ||
|
|
0ee519753c | ||
|
|
bf36f2abed | ||
|
|
5d184f74d8 | ||
|
|
4d89c64bed | ||
|
|
f665d1da52 | ||
|
|
fd67c6e915 | ||
|
|
b82bcdb515 | ||
|
|
13bc497abd | ||
|
|
8254bd72b7 | ||
|
|
9254ef6f2f | ||
|
|
a5e322ee66 | ||
|
|
6aa8aa3b22 | ||
|
|
f7e1d34251 | ||
|
|
38ffb24c52 | ||
|
|
1b282e67a7 | ||
|
|
1806edcb06 | ||
|
|
e40bc27257 | ||
|
|
58e4f89a82 | ||
|
|
d64c80e234 | ||
|
|
5c859bf520 | ||
|
|
29459371b9 | ||
|
|
26329b660a | ||
|
|
0fb1957dae | ||
|
|
c5a4266329 | ||
|
|
fd478bf2ab | ||
|
|
1f23b30b56 | ||
|
|
36497cd41a | ||
|
|
367f156eb0 | ||
|
|
ed40168d89 | ||
|
|
62cb61c670 | ||
|
|
21906f07b3 | ||
|
|
c468119f52 | ||
|
|
79d3a1a296 | ||
|
|
4ae144a724 | ||
|
|
fdc8431709 | ||
|
|
9d15c666b2 | ||
|
|
2131678f6b | ||
|
|
17f07b2452 | ||
|
|
05d69ae822 | ||
|
|
3ae81d62bc | ||
|
|
4efa123183 | ||
|
|
24a9886952 | ||
|
|
7ec1343ad5 | ||
|
|
7e1fffc455 | ||
|
|
f4608b3e31 | ||
|
|
003dd3a9a2 | ||
|
|
cece04e02f | ||
|
|
58e21e876e | ||
|
|
cb8fc1c10d | ||
|
|
a544f4b2cd | ||
|
|
ee0912a254 | ||
|
|
ea4b95fdd2 | ||
|
|
d831a45622 | ||
|
|
2de8a83d84 | ||
|
|
ee0958973b | ||
|
|
15132aeec3 | ||
|
|
38af4a6f16 |
9
.github/workflows/clang-format.yml
vendored
9
.github/workflows/clang-format.yml
vendored
@@ -7,13 +7,16 @@ 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: "."
|
||||
extensions: "hpp,h,cpp,c"
|
||||
clangFormatVersion: 16
|
||||
style: "file:.clang-format"
|
||||
clangFormatVersion: 19
|
||||
|
||||
2
.github/workflows/clang-tidy.yml.bak
vendored
2
.github/workflows/clang-tidy.yml.bak
vendored
@@ -7,7 +7,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: alexays/waybar:debian
|
||||
|
||||
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
@@ -1,13 +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.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:
|
||||
|
||||
6
.github/workflows/freebsd.yml
vendored
6
.github/workflows/freebsd.yml
vendored
@@ -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
.github/workflows/nix-update-flake-lock.yml
vendored
1
.github/workflows/nix-update-flake-lock.yml
vendored
@@ -9,6 +9,7 @@ on:
|
||||
jobs:
|
||||
lockfile:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'schedule' || github.repository == 'Alexays/Waybar'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Alex
|
||||
Copyright (c) 2025 Alex
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
33
README.md
33
README.md
@@ -8,7 +8,8 @@
|
||||
- Sway (Workspaces, Binding mode, Focused window name)
|
||||
- River (Mapping mode, Tags, Focused window name)
|
||||
- Hyprland (Window Icons, Workspaces, Focused window name)
|
||||
- DWL (Tags, Focused window name) [requires dwl ipc patch](https://github.com/djpohly/dwl/wiki/ipc)
|
||||
- Niri (Workspaces, Focused window name, Language)
|
||||
- DWL (Tags, Focused window name) [requires dwl ipc patch](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/ipc)
|
||||
- Tray [#21](https://github.com/Alexays/Waybar/issues/21)
|
||||
- Local time
|
||||
- Battery
|
||||
@@ -115,6 +116,36 @@ sudo apt install \
|
||||
libxkbregistry-dev
|
||||
```
|
||||
|
||||
On Arch, you can use this command:
|
||||
|
||||
```
|
||||
pacman -S \
|
||||
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>
|
||||
|
||||
19
default.nix
19
default.nix
@@ -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
12
flake.lock
generated
@@ -3,11 +3,11 @@
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -18,11 +18,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1720957393,
|
||||
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
|
||||
"lastModified": 1753694789,
|
||||
"narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
|
||||
"rev": "dc9637876d0dcc8c9e5e22986b857632effeb727",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
129
flake.nix
129
flake.nix
@@ -9,47 +9,96 @@
|
||||
};
|
||||
};
|
||||
|
||||
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-rfc-style
|
||||
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-rfc-style;
|
||||
includes = [ "*.nix" ];
|
||||
};
|
||||
};
|
||||
tree-root-file = ".git/index";
|
||||
}
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
overlays = {
|
||||
default = self.overlays.waybar;
|
||||
@@ -58,11 +107,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");
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -16,13 +16,15 @@ class AModule : public IModule {
|
||||
|
||||
~AModule() override;
|
||||
auto update() -> void override;
|
||||
virtual auto refresh(int shouldRefresh) -> void{};
|
||||
virtual auto refresh(int shouldRefresh) -> void {};
|
||||
operator Gtk::Widget &() override;
|
||||
auto doAction(const std::string &name) -> void override;
|
||||
|
||||
/// Emitting on this dispatcher triggers a update() call
|
||||
Glib::Dispatcher dp;
|
||||
|
||||
bool expandEnabled() const;
|
||||
|
||||
protected:
|
||||
// Don't need to make an object directly
|
||||
// Derived classes are able to use it
|
||||
@@ -34,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_;
|
||||
@@ -50,8 +53,8 @@ class AModule : public IModule {
|
||||
private:
|
||||
bool handleUserEvent(GdkEventButton *const &ev);
|
||||
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_;
|
||||
|
||||
@@ -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 {
|
||||
@@ -42,7 +43,7 @@ struct bar_margins {
|
||||
};
|
||||
|
||||
struct bar_mode {
|
||||
std::optional<bar_layer> layer;
|
||||
bar_layer layer;
|
||||
bool exclusive;
|
||||
bool passthrough;
|
||||
bool visible;
|
||||
@@ -54,7 +55,7 @@ class BarIpcClient;
|
||||
}
|
||||
#endif // HAVE_SWAY
|
||||
|
||||
class Bar {
|
||||
class Bar : public sigc::trackable {
|
||||
public:
|
||||
using bar_mode_map = std::map<std::string, struct bar_mode>;
|
||||
static const bar_mode_map PRESET_MODES;
|
||||
@@ -66,9 +67,13 @@ class Bar {
|
||||
~Bar();
|
||||
|
||||
void setMode(const std::string &mode);
|
||||
void setVisible(bool visible);
|
||||
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 {
|
||||
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
|
||||
|
||||
@@ -20,6 +20,9 @@ class Config {
|
||||
static std::optional<std::string> findConfigPath(
|
||||
const std::vector<std::string> &names, const std::vector<std::string> &dirs = CONFIG_DIRS);
|
||||
|
||||
static std::vector<std::string> tryExpandPath(const std::string &base,
|
||||
const std::string &filename);
|
||||
|
||||
Config() = default;
|
||||
|
||||
void load(const std::string &config);
|
||||
@@ -32,6 +35,7 @@ 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::optional<std::string> findIncludePath(const std::string &name);
|
||||
|
||||
std::string config_file_;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace waybar {
|
||||
class Group : public AModule {
|
||||
public:
|
||||
Group(const std::string &, const std::string &, const Json::Value &, bool);
|
||||
virtual ~Group() = default;
|
||||
~Group() override = default;
|
||||
auto update() -> void override;
|
||||
operator Gtk::Widget &() override;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ 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_;
|
||||
@@ -43,6 +44,7 @@ class Battery : public ALabel {
|
||||
int global_watch_fd_;
|
||||
std::mutex battery_list_mutex_;
|
||||
std::string old_status_;
|
||||
std::string last_event_;
|
||||
bool warnFirstTime_{true};
|
||||
const Bar& bar_;
|
||||
|
||||
|
||||
@@ -5,7 +5,16 @@
|
||||
|
||||
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
|
||||
|
||||
@@ -23,11 +32,11 @@ class Cava final : public ALabel {
|
||||
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{}};
|
||||
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
|
||||
@@ -39,11 +48,12 @@ class Cava final : public ALabel {
|
||||
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_{
|
||||
static inline std::map<const std::string, void (waybar::modules::Cava::* const)()> actionMap_{
|
||||
{"mode", &waybar::modules::Cava::pause_resume}};
|
||||
};
|
||||
} // namespace waybar::modules
|
||||
|
||||
@@ -38,39 +38,39 @@ 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)
|
||||
std::string cldText_{""}; // calendar text to print
|
||||
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
|
||||
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
|
||||
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();
|
||||
@@ -79,7 +79,7 @@ class Clock final : public ALabel {
|
||||
void tz_up();
|
||||
void tz_down();
|
||||
// Module Action Map
|
||||
static inline std::map<const std::string, void (waybar::modules::Clock::*const)()> actionMap_{
|
||||
static inline std::map<const std::string, void (waybar::modules::Clock::* const)()> actionMap_{
|
||||
{"mode", &waybar::modules::Clock::cldModeSwitch},
|
||||
{"shift_up", &waybar::modules::Clock::cldShift_up},
|
||||
{"shift_down", &waybar::modules::Clock::cldShift_down},
|
||||
|
||||
143
include/modules/ext/workspace_manager.hpp
Normal file
143
include/modules/ext/workspace_manager.hpp
Normal file
@@ -0,0 +1,143 @@
|
||||
#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_;
|
||||
|
||||
bool needs_updating_ = false;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::ext
|
||||
10
include/modules/ext/workspace_manager_binding.hpp
Normal file
10
include/modules/ext/workspace_manager_binding.hpp
Normal 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
40
include/modules/gps.hpp
Normal 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
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <filesystem>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
||||
#include "util/json.hpp"
|
||||
@@ -19,7 +19,9 @@ class EventHandler {
|
||||
|
||||
class IPC {
|
||||
public:
|
||||
IPC() { startIPC(); }
|
||||
IPC();
|
||||
~IPC();
|
||||
static IPC& inst();
|
||||
|
||||
void registerForIPC(const std::string& ev, EventHandler* ev_handler);
|
||||
void unregisterForIPC(EventHandler* handler);
|
||||
@@ -32,14 +34,17 @@ class IPC {
|
||||
static std::filesystem::path socketFolder_;
|
||||
|
||||
private:
|
||||
void startIPC();
|
||||
void socketListener();
|
||||
void parseIPC(const std::string&);
|
||||
|
||||
std::thread ipcThread_;
|
||||
std::mutex callbackMutex_;
|
||||
util::JsonParser parser_;
|
||||
std::list<std::pair<std::string, EventHandler*>> callbacks_;
|
||||
int socketfd_; // the hyprland socket file descriptor
|
||||
bool running_ = true;
|
||||
};
|
||||
|
||||
inline std::unique_ptr<IPC> gIPC;
|
||||
inline bool modulesReady = false;
|
||||
inline std::unique_ptr<IPC> gIPC;
|
||||
}; // namespace waybar::modules::hyprland
|
||||
|
||||
@@ -37,6 +37,8 @@ class Language : public waybar::ALabel, public EventHandler {
|
||||
util::JsonParser parser_;
|
||||
|
||||
Layout layout_;
|
||||
|
||||
IPC& m_ipc;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::hyprland
|
||||
|
||||
@@ -28,6 +28,8 @@ class Submap : public waybar::ALabel, public EventHandler {
|
||||
std::string submap_;
|
||||
bool always_on_ = false;
|
||||
std::string default_submap_ = "Default";
|
||||
|
||||
IPC& m_ipc;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::hyprland
|
||||
|
||||
@@ -60,6 +60,8 @@ class Window : public waybar::AAppIconLabel, public EventHandler {
|
||||
bool swallowing_;
|
||||
bool fullscreen_;
|
||||
bool focused_;
|
||||
|
||||
IPC& m_ipc;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::hyprland
|
||||
|
||||
41
include/modules/hyprland/windowcount.hpp
Normal file
41
include/modules/hyprland/windowcount.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "AAppIconLabel.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "modules/hyprland/backend.hpp"
|
||||
#include "util/json.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;
|
||||
};
|
||||
|
||||
static auto getActiveWorkspace(const std::string&) -> Workspace;
|
||||
static 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_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::hyprland
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -54,15 +54,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 +81,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;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::hyprland
|
||||
|
||||
@@ -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,39 @@ 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 onClickWindow() const -> std::string { return m_onClickWindow; }
|
||||
auto getIgnoredWindows() const -> std::vector<std::regex> { return m_ignoreWindows; }
|
||||
|
||||
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 +83,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 +91,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 +106,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 +139,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,18 +167,32 @@ 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;
|
||||
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;
|
||||
Gtk::Box m_box;
|
||||
IPC& m_ipc;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::hyprland
|
||||
|
||||
@@ -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,41 +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_;
|
||||
sa_family_t family_;
|
||||
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_;
|
||||
@@ -85,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
|
||||
|
||||
52
include/modules/niri/backend.hpp
Normal file
52
include/modules/niri/backend.hpp
Normal file
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "util/json.hpp"
|
||||
|
||||
namespace waybar::modules::niri {
|
||||
|
||||
class EventHandler {
|
||||
public:
|
||||
virtual void onEvent(const Json::Value& ev) = 0;
|
||||
virtual ~EventHandler() = default;
|
||||
};
|
||||
|
||||
class IPC {
|
||||
public:
|
||||
IPC() { startIPC(); }
|
||||
|
||||
void registerForIPC(const std::string& ev, EventHandler* ev_handler);
|
||||
void unregisterForIPC(EventHandler* handler);
|
||||
|
||||
static Json::Value send(const Json::Value& request);
|
||||
|
||||
// The data members are only safe to access while dataMutex_ is locked.
|
||||
std::lock_guard<std::mutex> lockData() { return std::lock_guard(dataMutex_); }
|
||||
const std::vector<Json::Value>& workspaces() const { return workspaces_; }
|
||||
const std::vector<Json::Value>& windows() const { return windows_; }
|
||||
const std::vector<std::string>& keyboardLayoutNames() const { return keyboardLayoutNames_; }
|
||||
unsigned keyboardLayoutCurrent() const { return keyboardLayoutCurrent_; }
|
||||
|
||||
private:
|
||||
void startIPC();
|
||||
static int connectToSocket();
|
||||
void parseIPC(const std::string&);
|
||||
|
||||
std::mutex dataMutex_;
|
||||
std::vector<Json::Value> workspaces_;
|
||||
std::vector<Json::Value> windows_;
|
||||
std::vector<std::string> keyboardLayoutNames_;
|
||||
unsigned keyboardLayoutCurrent_;
|
||||
|
||||
util::JsonParser parser_;
|
||||
std::mutex callbackMutex_;
|
||||
std::list<std::pair<std::string, EventHandler*>> callbacks_;
|
||||
};
|
||||
|
||||
inline std::unique_ptr<IPC> gIPC;
|
||||
|
||||
}; // namespace waybar::modules::niri
|
||||
38
include/modules/niri/language.hpp
Normal file
38
include/modules/niri/language.hpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "ALabel.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "modules/niri/backend.hpp"
|
||||
|
||||
namespace waybar::modules::niri {
|
||||
|
||||
class Language : public ALabel, public EventHandler {
|
||||
public:
|
||||
Language(const std::string &, const Bar &, const Json::Value &);
|
||||
~Language() override;
|
||||
void update() override;
|
||||
|
||||
private:
|
||||
void updateFromIPC();
|
||||
void onEvent(const Json::Value &ev) override;
|
||||
void doUpdate();
|
||||
|
||||
struct Layout {
|
||||
std::string full_name;
|
||||
std::string short_name;
|
||||
std::string variant;
|
||||
std::string short_description;
|
||||
};
|
||||
|
||||
static Layout getLayout(const std::string &fullName);
|
||||
|
||||
std::mutex mutex_;
|
||||
const Bar &bar_;
|
||||
|
||||
std::vector<Layout> layouts_;
|
||||
unsigned current_idx_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::niri
|
||||
28
include/modules/niri/window.hpp
Normal file
28
include/modules/niri/window.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm/button.h>
|
||||
#include <json/value.h>
|
||||
|
||||
#include "AAppIconLabel.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "modules/niri/backend.hpp"
|
||||
|
||||
namespace waybar::modules::niri {
|
||||
|
||||
class Window : public AAppIconLabel, public EventHandler {
|
||||
public:
|
||||
Window(const std::string &, const Bar &, const Json::Value &);
|
||||
~Window() override;
|
||||
void update() override;
|
||||
|
||||
private:
|
||||
void onEvent(const Json::Value &ev) override;
|
||||
void doUpdate();
|
||||
void setClass(const std::string &className, bool enable);
|
||||
|
||||
const Bar &bar_;
|
||||
|
||||
std::string oldAppId_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::niri
|
||||
30
include/modules/niri/workspaces.hpp
Normal file
30
include/modules/niri/workspaces.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm/button.h>
|
||||
#include <json/value.h>
|
||||
|
||||
#include "AModule.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "modules/niri/backend.hpp"
|
||||
|
||||
namespace waybar::modules::niri {
|
||||
|
||||
class Workspaces : public AModule, public EventHandler {
|
||||
public:
|
||||
Workspaces(const std::string &, const Bar &, const Json::Value &);
|
||||
~Workspaces() override;
|
||||
void update() override;
|
||||
|
||||
private:
|
||||
void onEvent(const Json::Value &ev) override;
|
||||
void doUpdate();
|
||||
Gtk::Button &addButton(const Json::Value &ws);
|
||||
std::string getIcon(const std::string &value, const Json::Value &ws);
|
||||
|
||||
const Bar &bar_;
|
||||
Gtk::Box box_;
|
||||
// Map from niri workspace id to button.
|
||||
std::unordered_map<uint64_t, Gtk::Button> buttons_;
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::niri
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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_;
|
||||
|
||||
43
include/modules/sni/icon_manager.hpp
Normal file
43
include/modules/sni/icon_manager.hpp
Normal 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_;
|
||||
};
|
||||
@@ -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,
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -48,8 +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_windowRewriteDefault;
|
||||
std::string m_formatWindowSeparator;
|
||||
util::RegexCollection m_windowRewriteRules;
|
||||
util::JsonParser parser_;
|
||||
std::unordered_map<std::string, Gtk::Button> buttons_;
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ class Temperature : public ALabel {
|
||||
private:
|
||||
float getTemperature();
|
||||
bool isCritical(uint16_t);
|
||||
bool isWarning(uint16_t);
|
||||
|
||||
std::string file_path_;
|
||||
util::SleeperThread thread_;
|
||||
|
||||
122
include/modules/wayfire/backend.hpp
Normal file
122
include/modules/wayfire/backend.hpp
Normal 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
|
||||
24
include/modules/wayfire/window.hpp
Normal file
24
include/modules/wayfire/window.hpp
Normal 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
|
||||
32
include/modules/wayfire/workspaces.hpp
Normal file
32
include/modules/wayfire/workspaces.hpp
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -19,11 +19,16 @@
|
||||
#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"
|
||||
|
||||
namespace waybar::modules::wlr {
|
||||
|
||||
struct widget_geometry {
|
||||
int x, y, w, h;
|
||||
};
|
||||
|
||||
class Taskbar;
|
||||
|
||||
class Task {
|
||||
@@ -42,6 +47,7 @@ class Task {
|
||||
};
|
||||
// made public so TaskBar can reorder based on configuration.
|
||||
Gtk::Button button;
|
||||
struct widget_geometry minimize_hint;
|
||||
|
||||
private:
|
||||
static uint32_t global_id;
|
||||
@@ -82,9 +88,8 @@ class Task {
|
||||
private:
|
||||
std::string repr() const;
|
||||
std::string state_string(bool = false) const;
|
||||
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 set_minimize_hint();
|
||||
void on_button_size_allocated(Gtk::Allocation &alloc);
|
||||
void hide_if_ignored();
|
||||
|
||||
public:
|
||||
@@ -146,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_;
|
||||
|
||||
@@ -171,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;
|
||||
};
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -11,6 +11,11 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
#define SIGRTMIN SIGUSR1 - 1
|
||||
#define SIGRTMAX SIGUSR1 + 1
|
||||
#endif
|
||||
|
||||
namespace waybar {
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,6 +38,8 @@ class AudioBackend {
|
||||
std::string desc_;
|
||||
std::string monitor_;
|
||||
std::string current_sink_name_;
|
||||
std::string default_sink_name;
|
||||
bool default_sink_running_;
|
||||
bool current_sink_running_;
|
||||
// SOURCE
|
||||
uint32_t source_idx_{0};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
class pow_format {
|
||||
public:
|
||||
pow_format(long long val, std::string&& unit, bool binary = false)
|
||||
: val_(val), unit_(unit), binary_(binary){};
|
||||
: val_(val), unit_(unit), binary_(binary) {};
|
||||
|
||||
long long val_;
|
||||
std::string unit_;
|
||||
|
||||
@@ -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>());
|
||||
};
|
||||
|
||||
34
include/util/icon_loader.hpp
Normal file
34
include/util/icon_loader.hpp
Normal 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);
|
||||
};
|
||||
26
include/util/kill_signal.hpp
Normal file
26
include/util/kill_signal.hpp
Normal 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
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -31,11 +31,16 @@ The brightness can be controlled by dragging the slider across the bar or clicki
|
||||
typeof: string ++
|
||||
The name of the preferred device to control. If left empty, a device will be chosen automatically.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
```
|
||||
"modules-right": [
|
||||
"backlight-slider",
|
||||
"backlight/slider",
|
||||
],
|
||||
"backlight/slider": {
|
||||
"min": 0,
|
||||
|
||||
@@ -38,7 +38,7 @@ The *backlight* module displays the current backlight level.
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*states*: ++
|
||||
typeof: object ++
|
||||
@@ -81,6 +81,11 @@ The *backlight* module displays the current backlight level.
|
||||
default: 1.0 ++
|
||||
The speed at which to change the brightness when scrolling.
|
||||
|
||||
*min-brightness*: ++
|
||||
typeof: double ++
|
||||
default: 0.0 ++
|
||||
The minimum brightness of the backlight.
|
||||
|
||||
*menu*: ++
|
||||
typeof: string ++
|
||||
Action that popups the menu.
|
||||
@@ -94,6 +99,11 @@ The *backlight* module displays the current backlight level.
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# EXAMPLE:
|
||||
|
||||
```
|
||||
|
||||
@@ -69,7 +69,7 @@ The *battery* module displays the current capacity and state (eg. charging) of y
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*on-click*: ++
|
||||
typeof: string ++
|
||||
@@ -116,12 +116,21 @@ 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 ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
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
|
||||
@@ -161,6 +170,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
|
||||
@@ -173,6 +195,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
|
||||
|
||||
@@ -54,7 +54,7 @@ Addressed by *bluetooth*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -142,6 +142,11 @@ Addressed by *bluetooth*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{status}*: Status of the bluetooth device.
|
||||
|
||||
@@ -64,6 +64,10 @@ libcava lives in:
|
||||
:[ bool
|
||||
:[ false
|
||||
:[ Hides the widget if no input (after sleep_timer elapsed)
|
||||
|[ *format_silent*
|
||||
:[ string
|
||||
:[
|
||||
:[ Widget's text after sleep_timer elapsed (hide_on_silence has to be false)
|
||||
|[ *method*
|
||||
:[ string
|
||||
:[ pulse
|
||||
@@ -196,3 +200,8 @@ In case when cava releases new version and you're wanna get it, it should be rai
|
||||
}
|
||||
},
|
||||
```
|
||||
# STYLE
|
||||
|
||||
- *#cava*
|
||||
- *#cava.silent* Applied after no sound has been detected for sleep_timer seconds
|
||||
- *#cava.updated* Applied when a new frame is shown
|
||||
|
||||
@@ -15,6 +15,11 @@ Addressed by *cffi/<name>*
|
||||
typeof: string ++
|
||||
The path to the dynamic library to load to control the widget.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
Some additional configuration may be required depending on the cffi dynamic library being used.
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ $XDG_CONFIG_HOME/waybar/config ++
|
||||
|[ *rotate*
|
||||
:[ integer
|
||||
:[
|
||||
:[ Positive value to rotate the text label
|
||||
:[ Positive value to rotate the text label (in 90 degree increments)
|
||||
|[ *on-click*
|
||||
:[ string
|
||||
:[
|
||||
@@ -96,6 +96,10 @@ $XDG_CONFIG_HOME/waybar/config ++
|
||||
:[ array
|
||||
:[
|
||||
:[ The actions corresponding to the buttons of the menu.
|
||||
|[ *expand*:
|
||||
:[ bool
|
||||
:[ false
|
||||
:[ Enables this module to consume all left over space dynamically.
|
||||
|
||||
View all valid format options in *strftime(3)* or have a look https://en.cppreference.com/w/cpp/chrono/duration/formatter
|
||||
|
||||
@@ -113,7 +117,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
|
||||
|
||||
@@ -43,7 +43,7 @@ The *cpu* module displays the current CPU utilization.
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*states*: ++
|
||||
typeof: object ++
|
||||
@@ -82,6 +82,11 @@ The *cpu* module displays the current CPU utilization.
|
||||
default: true ++
|
||||
Option to disable tooltip on hover.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{load}*: Current CPU load.
|
||||
|
||||
@@ -55,8 +55,8 @@ Addressed by *custom/<name>*
|
||||
|
||||
*format*: ++
|
||||
typeof: string ++
|
||||
default: {} ++
|
||||
The format, how information should be displayed. On {} data gets inserted.
|
||||
default: {text} ++
|
||||
The format, how information should be displayed. On {text} data gets inserted.
|
||||
|
||||
*format-icons*: ++
|
||||
typeof: array ++
|
||||
@@ -64,7 +64,7 @@ Addressed by *custom/<name>*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -138,6 +138,11 @@ Addressed by *custom/<name>*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# RETURN-TYPE
|
||||
|
||||
When *return-type* is set to *json*, Waybar expects the *exec*-script to output its data in JSON format.
|
||||
@@ -160,7 +165,7 @@ $text\\n$tooltip\\n$class*
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{}*: Output of the script.
|
||||
*{text}*: Output of the script.
|
||||
|
||||
*{percentage}* Percentage which can be set via a json return type.
|
||||
|
||||
@@ -172,7 +177,7 @@ $text\\n$tooltip\\n$class*
|
||||
|
||||
```
|
||||
"custom/spotify": {
|
||||
"format": " {}",
|
||||
"format": " {text}",
|
||||
"max-length": 40,
|
||||
"interval": 30, // Remove this if your script is endless and write in loop
|
||||
"exec": "$HOME/.config/waybar/mediaplayer.sh 2> /dev/null", // Script in resources folder
|
||||
@@ -185,7 +190,7 @@ $text\\n$tooltip\\n$class*
|
||||
|
||||
```
|
||||
"custom/mpd": {
|
||||
"format": "♪ {}",
|
||||
"format": "♪ {text}",
|
||||
//"max-length": 15,
|
||||
"interval": 10,
|
||||
"exec": "mpc current",
|
||||
@@ -199,7 +204,7 @@ $text\\n$tooltip\\n$class*
|
||||
|
||||
```
|
||||
"custom/cmus": {
|
||||
"format": "♪ {}",
|
||||
"format": "♪ {text}",
|
||||
//"max-length": 15,
|
||||
"interval": 10,
|
||||
"exec": "cmus-remote -C \"format_print '%a - %t'\"", // artist - title
|
||||
@@ -214,7 +219,7 @@ $text\\n$tooltip\\n$class*
|
||||
```
|
||||
|
||||
"custom/pacman": {
|
||||
"format": "{} ",
|
||||
"format": "{text} ",
|
||||
"interval": "once",
|
||||
"exec": "pacman_packages",
|
||||
"on-click": "update-system",
|
||||
@@ -226,7 +231,7 @@ $text\\n$tooltip\\n$class*
|
||||
|
||||
```
|
||||
"custom/pacman": {
|
||||
"format": "{} ",
|
||||
"format": "{text} ",
|
||||
"interval": 3600, // every hour
|
||||
"exec": "checkupdates | wc -l", // # of updates
|
||||
"exec-if": "exit 0", // always run; consider advanced run conditions
|
||||
|
||||
@@ -29,7 +29,7 @@ Addressed by *disk*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*states*: ++
|
||||
typeof: object ++
|
||||
@@ -106,6 +106,11 @@ Addressed by *disk*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{percentage_used}*: Percentage of disk in use.
|
||||
|
||||
@@ -26,6 +26,11 @@ Addressed by *dwl/tags*
|
||||
default: false ++
|
||||
If set to false, you can left-click to set focused tag. Right-click to toggle tag focus. If set to true this behaviour is disabled.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# EXAMPLE
|
||||
|
||||
```
|
||||
|
||||
@@ -19,7 +19,7 @@ Addressed by *dwl/window*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -84,6 +84,11 @@ Addressed by *dwl/window*
|
||||
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
|
||||
|
||||
*{title}*: The title of the focused window.
|
||||
|
||||
@@ -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*.
|
||||
|
||||
@@ -69,18 +76,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
|
||||
}
|
||||
```
|
||||
|
||||
@@ -61,6 +61,11 @@ Feral Gamemode optimizations.
|
||||
default: 4 ++
|
||||
Defines the spacing between the icon and the text.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{glyph}*: The string icon glyph to use instead.
|
||||
|
||||
111
man/waybar-gps.5.scd
Normal file
111
man/waybar-gps.5.scd
Normal 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.
|
||||
@@ -38,6 +38,11 @@ Addressed by *hyprland/language*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
@@ -54,9 +59,9 @@ Addressed by *hyprland/language*
|
||||
|
||||
```
|
||||
"hyprland/language": {
|
||||
"format": "Lang: {long}"
|
||||
"format-en": "AMERICA, HELL YEAH!"
|
||||
"format-tr": "As bayrakları"
|
||||
"format": "Lang: {long}",
|
||||
"format-en": "AMERICA, HELL YEAH!",
|
||||
"format-tr": "As bayrakları",
|
||||
"keyboard-name": "at-translated-set-2-keyboard"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -19,7 +19,7 @@ Addressed by *hyprland/submap*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -93,6 +93,11 @@ Addressed by *hyprland/submap*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
|
||||
@@ -35,6 +35,11 @@ Addressed by *hyprland/window*
|
||||
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 "hyprctl clients" for examples
|
||||
|
||||
|
||||
46
man/waybar-hyprland-windowcount.5.scd
Normal file
46
man/waybar-hyprland-windowcount.5.scd
Normal 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
|
||||
@@ -26,17 +26,49 @@ 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.
|
||||
|
||||
*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.
|
||||
|
||||
*show-special*: ++
|
||||
typeof: bool ++
|
||||
@@ -48,6 +80,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,8 +113,14 @@ 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*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{id}*: id of workspace assigned by compositor
|
||||
@@ -173,3 +216,4 @@ 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 .taskbar-window* (each window in the taskbar)
|
||||
|
||||
@@ -21,7 +21,7 @@ screensaver, also known as "presentation mode".
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -102,6 +102,11 @@ screensaver, also known as "presentation mode".
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{status}*: status (*activated* or *deactivated*)
|
||||
@@ -120,3 +125,9 @@ screensaver, also known as "presentation mode".
|
||||
"timeout": 30.5
|
||||
}
|
||||
```
|
||||
|
||||
# STYLE
|
||||
|
||||
- *#idle_inhibitor*
|
||||
- *#idle_inhibitor.activated*
|
||||
- *#idle_inhibitor.deactivated*
|
||||
|
||||
@@ -64,6 +64,11 @@ The *image* module displays an image from a path.
|
||||
default: true ++
|
||||
Option to enable tooltip on hover.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# SCRIPT OUTPUT
|
||||
|
||||
Similar to the *custom* module, output values of the script are *newline* separated.
|
||||
|
||||
@@ -25,7 +25,7 @@ See *systemd-inhibit*(1) for more information.
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -89,6 +89,11 @@ See *systemd-inhibit*(1) for more information.
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{status}*: status (*activated* or *deactivated*)
|
||||
|
||||
@@ -51,7 +51,7 @@ Addressed by *jack*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -98,6 +98,11 @@ Addressed by *jack*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{load}*: The current CPU load estimated by JACK.
|
||||
|
||||
@@ -53,6 +53,11 @@ You must be a member of the input group to use this module.
|
||||
default: [58, 69, 70] ++
|
||||
Customize the key to trigger this module, the key number can be found in /usr/include/linux/input-event-codes.h or running sudo libinput debug-events --show-keycodes.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{name}*: Caps, Num, or Scroll.
|
||||
|
||||
@@ -29,7 +29,7 @@ Addressed by *memory*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*states*: ++
|
||||
typeof: object ++
|
||||
@@ -97,6 +97,11 @@ Addressed by *memory*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{percentage}*: Percentage of memory in use.
|
||||
@@ -115,6 +120,8 @@ Addressed by *memory*
|
||||
|
||||
*{swapAvail}*: Amount of available swap in GiB.
|
||||
|
||||
*{swapState}*: Signals if swap is activated or not
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -91,7 +91,7 @@ Addressed by *mpd*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -175,6 +175,11 @@ Addressed by *mpd*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
## WHEN PLAYING/PAUSED
|
||||
@@ -199,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)
|
||||
|
||||
@@ -107,7 +107,7 @@ The *mpris* module displays currently playing media via libplayerctl.
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -148,6 +148,11 @@ The *mpris* module displays currently playing media via libplayerctl.
|
||||
typeof: map[string]string ++
|
||||
Allows setting _{status_icon}_ based on player status (playing, paused, stopped).
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
|
||||
@@ -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 ++
|
||||
@@ -58,7 +63,7 @@ Addressed by *network*
|
||||
|
||||
*rotate*: ++
|
||||
typeof: integer ++
|
||||
Positive value to rotate the text label.
|
||||
Positive value to rotate the text label (in 90 degree increments).
|
||||
|
||||
*max-length*: ++
|
||||
typeof: integer ++
|
||||
@@ -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 ++
|
||||
@@ -142,6 +147,11 @@ Addressed by *network*
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{ifname}*: Name of the network interface.
|
||||
@@ -150,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.
|
||||
|
||||
@@ -162,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.
|
||||
|
||||
|
||||
63
man/waybar-niri-language.5.scd
Normal file
63
man/waybar-niri-language.5.scd
Normal file
@@ -0,0 +1,63 @@
|
||||
waybar-niri-language(5)
|
||||
|
||||
# NAME
|
||||
|
||||
waybar - niri language module
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
The *language* module displays the currently selected language in niri.
|
||||
|
||||
# CONFIGURATION
|
||||
|
||||
Addressed by *niri/language*
|
||||
|
||||
*format*: ++
|
||||
typeof: string ++
|
||||
default: {} ++
|
||||
The format, how information should be displayed.
|
||||
|
||||
*format-<lang>* ++
|
||||
typeof: string++
|
||||
Provide an alternative name to display per language where <lang> is the language of your choosing. Can be passed multiple times with multiple languages as shown by the example below.
|
||||
|
||||
*menu*: ++
|
||||
typeof: string ++
|
||||
Action that popups the menu.
|
||||
|
||||
*menu-file*: ++
|
||||
typeof: string ++
|
||||
Location of the menu descriptor file. There need to be an element of type GtkMenu with id *menu*
|
||||
|
||||
*menu-actions*: ++
|
||||
typeof: array ++
|
||||
The actions corresponding to the buttons of the menu.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
Enables this module to consume all left over space dynamically.
|
||||
|
||||
# FORMAT REPLACEMENTS
|
||||
|
||||
*{short}*: Short name of layout (e.g. "us"). Equals to {}.
|
||||
|
||||
*{shortDescription}*: Short description of layout (e.g. "en").
|
||||
|
||||
*{long}*: Long name of layout (e.g. "English (Dvorak)").
|
||||
|
||||
*{variant}*: Variant of layout (e.g. "dvorak").
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
```
|
||||
"niri/language": {
|
||||
"format": "Lang: {long}"
|
||||
"format-en": "AMERICA, HELL YEAH!"
|
||||
"format-tr": "As bayrakları"
|
||||
}
|
||||
```
|
||||
|
||||
# STYLE
|
||||
|
||||
- *#language*
|
||||
86
man/waybar-niri-window.5.scd
Normal file
86
man/waybar-niri-window.5.scd
Normal file
@@ -0,0 +1,86 @@
|
||||
waybar-niri-window(5)
|
||||
|
||||
# NAME
|
||||
|
||||
waybar - niri window module
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
The *window* module displays the title of the currently focused window in niri.
|
||||
|
||||
# CONFIGURATION
|
||||
|
||||
Addressed by *niri/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*.
|
||||
|
||||
*separate-outputs*: ++
|
||||
typeof: bool ++
|
||||
Show the active window of the monitor the bar belongs to, instead of the focused window.
|
||||
|
||||
*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 "niri 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
|
||||
|
||||
```
|
||||
"niri/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
|
||||
105
man/waybar-niri-workspaces.5.scd
Normal file
105
man/waybar-niri-workspaces.5.scd
Normal file
@@ -0,0 +1,105 @@
|
||||
waybar-niri-workspaces(5)
|
||||
|
||||
# NAME
|
||||
|
||||
waybar - niri workspaces module
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
The *workspaces* module displays the currently used workspaces in niri.
|
||||
|
||||
# CONFIGURATION
|
||||
|
||||
Addressed by *niri/workspaces*
|
||||
|
||||
*all-outputs*: ++
|
||||
typeof: bool ++
|
||||
default: false ++
|
||||
If set to false, workspaces will only be shown on the output they are on. If set to true all workspaces will be shown on every output.
|
||||
|
||||
*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
|
||||
|
||||
*{value}*: Name of the workspace, or index for unnamed workspaces,
|
||||
as defined by niri.
|
||||
|
||||
*{name}*: Name of the workspace for named workspaces.
|
||||
|
||||
*{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.
|
||||
- *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
|
||||
|
||||
```
|
||||
"niri/workspaces": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
// Named workspaces
|
||||
// (you need to configure them in niri)
|
||||
"browser": "",
|
||||
"discord": "",
|
||||
"chat": "<b></b>",
|
||||
|
||||
// Icons by state
|
||||
"active": "",
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Style
|
||||
|
||||
- *#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.
|
||||
- *#workspaces button#niri-workspace-<name>*: Workspaces named this, or index
|
||||
for unnamed workspaces.
|
||||
@@ -35,6 +35,13 @@ $XDG_CONFIG_HOME/waybar/config
|
||||
:[ object
|
||||
:[ See default value in the example below.
|
||||
:[ Icons used to represent the various power-profile. *Note*: the default configuration uses the font-awesome icons. You may want to override it if you don't have this font installed on your system.
|
||||
|[ *expand*:
|
||||
:[ bool
|
||||
:[ false
|
||||
:[ Enables this module to consume all left over space dynamically.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# CONFIGURATION EXAMPLES
|
||||
|
||||
@@ -32,6 +32,22 @@ the screen or playing audio.
|
||||
Which privacy modules to monitor. See *MODULES CONFIGURATION* for++
|
||||
more information.
|
||||
|
||||
*expand*: ++
|
||||
typeof: bool ++
|
||||
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*: ++
|
||||
@@ -49,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
|
||||
|
||||
```
|
||||
@@ -72,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"
|
||||
}
|
||||
]
|
||||
},
|
||||
```
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user