Commit Graph

2885 Commits

Author SHA1 Message Date
SWarrener 32d326ca4a Some missing backticks 2023-10-08 16:34:27 +01:00
SWarrener ae92d7d186 Updating man page with details of options to force specific units in disk size output 2023-10-08 16:26:06 +01:00
SWarrener c16e791cdc Adding options to allow disk outputs to always be in a specific unit 2023-10-08 16:24:50 +01:00
Alexis Rouillard 58e506a675
Merge pull request #2529 from Syndelis/feat/hyprland-window-workspaces
Feature: Hyprland dynamic window names on workspaces
2023-10-02 19:17:42 +02:00
Brenno Lemos 1b98a04c93 chore: lint unrelated files so the CI passes 2023-10-02 12:33:28 -03:00
Alexis Rouillard 4c0347d9f2
Merge pull request #2540 from Syndelis/fix/hyprland-special-workspaces 2023-09-25 22:33:36 +02:00
Brenno Lemos 9a3238c20b chore: avoid the creation and deletion of doubled-special workspaces
see hyprwm/Hyprland#3424 for more info

Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-25 17:13:26 -03:00
Brenno Lemos 6e48b236a1 fix: workspace special wasn't removed
fixes  #2505

Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-25 17:12:51 -03:00
Alexis Rouillard 16f6d9dfa0
Merge pull request #2534 from woojiq/fix-hyprland-default-icon 2023-09-24 09:25:37 +02:00
woojiq d37954322a fix(hyprland): use workspace `name` as default icon
Wlr and Sway modules use the workspace `name` as the default icon if no icon is provided. This adds the same behavior for the `hyprland/workspace` module.

Closes https://github.com/Alexays/Waybar/issues/2533
2023-09-23 21:55:18 +03:00
Brenno Lemos 258ab8b147 refactor: take window representation directly from old workspace on movewindow event 2023-09-22 21:12:42 -03:00
Brenno Lemos 6663ca3d75 chore: document new properties 2023-09-22 20:41:38 -03:00
Brenno Lemos adbc9d95de feat: optional default icon for 0-match classes
Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-22 19:16:59 -03:00
Brenno Lemos fbe544984c fix: ipc vs json window addr format mismatch
feat: ignore empty windows

Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-22 19:16:56 -03:00
Brenno Lemos b9d5912a4f feat: rewrite window classes
feat: cache window class rewrite resolution

Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-22 19:16:53 -03:00
Brenno Lemos 3e2761e81f feat: dynamically assign windows to workspaces
Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>
2023-09-22 19:12:50 -03:00
Alexis Rouillard 6997b34a81
Merge pull request #2517 from an-prata/master
Lighter Weight Signal-Based Custom Modules
2023-09-21 23:48:22 +02:00
Alexis Rouillard 5960e8f1ee
Merge pull request #2518 from idm1try/fix-bl-asahi
fix(backlight): wrong percentage numbers for device apple-panel-bl
2023-09-21 23:47:23 +02:00
idm1try 81ffeebfb1
fix: style
Co-authored-by: Alexis Rouillard <alexisr245@gmail.com>
2023-09-21 09:03:13 +05:00
Evan Overman f14fe96e19
add info to `interval` and `signal` in manpage for custom modules 2023-09-19 14:52:48 -07:00
idm1try 954bea36f4 chore: remove result dir by nix 2023-09-19 18:52:00 +05:00
idm1try 388c024298 fix(backlight): wrong percentage numbers for device apple-panel-bl 2023-09-19 18:50:39 +05:00
Alexis Rouillard 9b8adc1951
Merge pull request #2494 from KanuX-14/battery_fix
Fix battery not showing for some devices
2023-09-19 13:33:35 +02:00
Evan Overman bf371f70d1
add `waitingWorker()` to `Custom` 2023-09-18 14:56:14 -07:00
Evan Overman 7c28ffc856
add indefinite `sleep()` function to `SleeperThread` 2023-09-18 14:55:50 -07:00
Alexis Rouillard 4d32991bee
Merge pull request #2507 from hariseldon78/patch-1
Update workspaces.cpp
2023-09-13 18:21:22 +02:00
Roberto Previdi 69736d68aa
Update workspaces.cpp
Fix unchecked string to int conversion of workspace name (which can be a string)
Closes #2501
2023-09-13 18:20:13 +02:00
KanuX-14 28a2d15fef Update 'bat-compatibility' option to manual 2023-09-12 13:39:09 -03:00
Alexis Rouillard a90e275d5e
Merge pull request #2470 from 4e554c4c/darkmode
search for dark or light mode stylesheet
2023-09-11 09:36:05 +02:00
Alexis Rouillard fc67558717
Merge branch 'master' into darkmode 2023-09-11 09:25:45 +02:00
Alexis Rouillard 196b400abf
Merge pull request #2468 from khaneliman/persistent-rename
deprecate persistent_workspaces in favor of persistent-workspaces
2023-09-11 09:22:07 +02:00
Alexis Rouillard 05a2af2d7c
Merge pull request #2486 from khaneliman/workspace-sorting
feat: hyprland workspaces add sort-by
2023-09-11 09:21:35 +02:00
KanuX-14 1ff4464b2f Use adapter status if battery status is inexistent 2023-09-10 15:16:43 -03:00
KanuX-14 60611e9c2b Fix battery not showing for some devices
Adds 'bat-compatibility' boolean checking from configuration file.
2023-09-10 14:41:40 -03:00
Austin Horstman 79cf33b9f1
refactor: enumparser create implementation file 2023-09-09 17:59:40 -05:00
Austin Horstman b8630968b2
refactor: move capitalize string helper 2023-09-09 13:23:17 -05:00
Austin Horstman 2fee12d930
fix: enumparser capitalize everything to avoid issues 2023-09-09 12:14:52 -05:00
Austin Horstman 3ae2fe3272
refactor: PR review cleanup 2023-09-09 12:08:30 -05:00
Austin Horstman 2b8c92e8fd
refactor: enum utility allow overriding 2023-09-09 11:18:12 -05:00
Austin Horstman 8ce64ea784
refactor: make parsing sort-by more lenient 2023-09-09 10:04:49 -05:00
Austin Horstman 8ea2626de8
refactor: sort-by enum hyprland 2023-09-09 10:04:48 -05:00
Austin Horstman 65ba449460
chore: update man page index 2023-09-08 23:17:21 -05:00
Austin Horstman cbc12e5443
feat: hyprland workspaces add sort-by 2023-09-08 22:49:15 -05:00
Austin Horstman 587bd0cd62
refactor: cleanup hyprland workspaces constructor 2023-09-08 22:24:05 -05:00
Alexis Rouillard 309edd0585
Merge pull request #2485 from khaneliman/active-rename 2023-09-08 23:11:58 +02:00
Austin Horstman 2837b72064
fix: rename workspace active fix 2023-09-08 14:11:02 -05:00
Alexis Rouillard 38ef38b72f
Merge pull request #2477 from zjeffer/fix/urgent-icon 2023-09-07 20:33:22 +02:00
zjeffer 6c3565c520 Add urgent icon
Fixes #2476
2023-09-07 19:33:56 +02:00
Calvin Lee 9bb2c01a44 clean up client.cpp 2023-09-07 13:43:59 +00:00
Calvin Lee 09873f0ed9 search for dark or light mode stylesheet
summary:
-------
This commit adds xdg-desktop-portal support to waybar. If a portal
supporting `org.freedesktop.portal.Settings` exists, then it will be
queried for the current colorscheme. This colorscheme will then be used
to prefer a `style-light.css` or `style-dark.css` over the basic
`style.css`.

technical details:
-----------------
Appearance is provided by several libraries, such as libhandy (mobile)
and libadwaita. However, waybar links to neither of these libraries. As
the amount of code required to communicate with xdg-desktop portal as a
client is rather minimal, I believe doing so is better than linking to
an additional library.

The Gio library for communicating with dbus is rather messy, Instead of
the `Portal` class containing a `Gio::Dbus::Proxy`, it extends it which
simplifies signal handling.

`Portal` then exposes its own signal, which can be listened to by waybar
to update CSS.

For a reference implementation, please see another one of my projects:
https://github.com/4e554c4c/darkman.nvim/blob/main/portal.go

test plan:
---------
If no desktop portal which provides `Settings` exists, then waybar
continues with the log line
```
[2023-09-06 14:14:37.754] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
```

Furthermore, if `style-light.css` or `style-dark.css` do not exist, then
`style.css` will still be searched for.

Waybar has been tested with both light and dark startup. E.g. if the
appearance is dark on startup the log lines
```
[2023-09-06 14:27:45.379] [info] Discovered appearance 'dark'
[2023-09-06 14:27:45.379] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/style-dark.css
[2023-09-06 14:27:45.379] [debug] Found config file: $XDG_CONFIG_HOME/waybar/style-dark.css
[2023-09-06 14:27:45.379] [info] Using CSS file /home/pounce/.config/waybar/style-dark.css
```
will be observed.
If the color then changes to light during the operation of waybar, it
will change css files:
```
[2023-09-06 14:28:17.173] [info] Received new appearance 'dark'
[2023-09-06 14:28:17.173] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/style-light.css
[2023-09-06 14:28:17.173] [debug] Found config file: $XDG_CONFIG_HOME/waybar/style-light.css
[2023-09-06 14:28:17.173] [info] Using CSS file /home/pounce/.config/waybar/style-light.css
```

Finally, tested resetting waybar and toggling style (works, and style is
only changed once).

fixes: Alexays/Waybar#1973
2023-09-06 15:19:56 +00:00