Provides CSS classes empty, floating, tabbed, tiled, solo, stacked and
app_id.
Adds offscreen-css bool option (default false), only effective when
"all-outputs" is true. This adds styles on outputs without focused
node, according to its focused workspaces window situation.
Adds an "offscreen-css-text" string option (default empty), only
effective when "all-outputs" and "offscreen-style" are set. This
is shown as a text on outputs without a focused node.
Adds a "show-focused-workspace" bool option (default false) to indicate
the workspace name if the whole workspace is focused when nodes are
also present. If not set, empty text is shown, but css classes
according to nodes in the workspace are still applied.
Limitation:
When the top level layout changes, there is no sway event so the
module cannot react. Perhaps in the future recurring polling can
be added to go around this limitation.
for users who do not utilize any form of "workspace prev/next" commands,
it can be very handle to sort the workspaces alphabetically.
this commit adds a new "alphabetical_sort" to the `sway/workspaces`
module which allows the module to alway sort workspaces alphabetically.
this docs are updated to warn the user of the implications involved.
Signed-off-by: Louis DeLosSantos <louis.delos@gmail.com>
1. Calendar. Weeks. Fix right paddings when first days of the week is
Monday
2. Fix small perfomrance penalty(avoid of defining parameter in the
month loop)
3. Small name convention for format string variables
1. Let's do code simplier
2. Week format using regexp. Needs when user provide additional
characters in format string and need to align week days according
3. Week format has got default formats: ":%U",":%V"
4. Week number is based on the first day of the week now. The output is
the same as of date library now.
5. Avoiding of unnecessary operations
fix their format to correct
fix last number hide if the last day of the month is the last day of the week
some refactoring(mostly renaming abbreviations to the full phrases)
Linux power_supply sysfs interface allows checking if the battery powers
the whole system or a specific device/tree of devices with `scope`
attribute[1]. We can use it to skip the non-system power supplies in the
battery module and avoid adding HIDs or other peripheral devices to the
total.
The logic is based on UPower, where it is assumed that "Unknown" devices
or devices without a `scope` are system power supplies.
[1]: https://lore.kernel.org/lkml/alpine.LNX.2.00.1201031556460.24984@pobox.suse.cz/T/
The current output form of `hyprctl devices` is like this:
```
Keyboard at 6f80ad70:
ITE Tech. Inc. ITE Device(8910) Keyboard
rules: r "", m "", l "us,ru", v "", o "grp:alt_shift_toggle"
active keymap: Russian
main: no
```
That is, `Keyboard at` goes _before_ the keyboard name, so looking for `Keyboard at` only makes it skip to the keyboard _after_ the one that the user specified.
This fixes#1811 by falling back to `node.description` if `node.nick` is
not available. This can happen for bluetooth devices that do not have a
`node.nick`.
Adds basic icon support for the wireplumber module.
This can be achieved by using `{icon}` in the `format` config and
pairing it with the `format-icons` config as well.
Example:
```
"wireplumber": {
"format": "{volume}% {icon}",
"format-icons": ["", "", ""]
}
```
The first crash occurs when trying to parse the
ID of a workspace as an uint, since named
workspaces has negative IDs. This is fixed by
using ints for workspace IDs instead of uints.
The second crash occurs when converting a
workspace name that isn't a number to an integer.
This is fixed by wrapping std::stoi in a try
block and only sorting by number, when both names
can successfully be converted to integers.
Adds basic support for showing volume via wireplumber. Allows specifying
the node-id or falling back to the default Audio/Sink node id if node-id
is not set. If tooltip on hover is enabled, will show `{node_name}` by
default otherwise `tooltip-format`.
Format replacements:
`{volume}` - Volume in percentage
`{node_name}` - The node's nickname (`node.nick` property)
Buttons come with an intrinsic min-width but lack a method to alter this
property. Setting the requested size to zero has also no effect on it.
The only way found to work is to hard code the CSS into the button.
The hyprland/window widget had an assertion ensuring that the output
from hyprctl matched the currently selected workspace id. However this
assertion fails if workspaces are switched too quickly, causing the
selected workspace to differ in id from the one in hyprctl, failing this
assertion which then crashes the entire program.
This fix simply changes this assertion into an if statement, and if a
mismatch is found, empty string is returned as the window name.
gtk requires some chars (<>&"') to be encoded for them to render
properly. `sanitize_str` sanitizes raw strings that have such chars and
returns a properly encoded string
Mouse-over tooltips set on the label only appear once the mouse hovers
over exactly the label. Other apps (e.g. firefox) show the tooltip once
the pointer hovers the button. Not solely its label. With this commit we
get the same behaviour.
Fixes issue where the class parameters in style.css would have no
effect.
The CSS now references the GtkButton instead of the GtkLabel. Removing
all style-classes from the custom module GtkButton however removes
any properties set via style.css. Thus, the default classes 'flat' and
'text-button' are added on every update of these modules.
The AButton class is designed as full a substitute to ALabel. The
GtkButton attribute 'button_' is initialized with a label. This
label can the be referenced by the subsequent inheritors of AButton
instead of the GtkLabel attribute 'label_' of ALabel.
For convenience a GtkLabel* 'label_' attribute is added to AButton.
If the button cannot be clicked it is disabled, effectively acting
like its label predecessor.
GtkButton seems to catch one-click mouse events regardless of the
flags set on it. Therefore, 'signal_pressed' is connected to a
function creating a fake GdkEventButton* and calling 'handleToggle'
(for details on this possible bug in GTK see:
https://stackoverflow.com/questions/45334911 )
In accordance with other GtkButtons (i.e. the sway/workspace ones)
set_relief(Gtk::RELIEF_NONE) is called on the 'button_' instance.
This commit adds support to reading the config base path from the
environment variable `WAYBAR_CONFIG_DIR`. If it is set, but no
configuration is found there, it falls back to the previous mechanism
of using the default paths, without erroring.
currently, the orientation of group modules is always the opposite of
the bar. Change it so that:
* the default orientation of the group module is always the opposite of
its parent, even for nested groups
* the orientation can be overridden in the config
* css ID and class are set for the group element
Use inotify listening devices path changes to implement hotplug support.
The new hotplug thread is also an event loop, so the interval value has
no effect.
The evdev is now open on demand.
Fix libinput_interface object life-time.
Use libinput event for keyboard state updates.
The state will update when CAPS_LOCK, NUM_LOCK or SCROLL_LOCK has been
released,
`interval` will have no effect after this change.
-DSP load
-xruns
-connected/disconnected state
-only tested with Pipewire so far but should work with JACK2 as well
On branch dsp
Changes to be committed:
modified: include/factory.hpp
new file: include/modules/jack.hpp
modified: meson.build
modified: meson_options.txt
modified: src/factory.cpp
new file: src/modules/jack.cpp
when the module fails to get the pulseaudio device form factor, the
module persists the existing value, resulting in the incorrect
format-icon being used to format the label on device changes.
reset the form factor value so that the icon lookup properly falls back
to "default" when missing
When adding a custom module with a name, e.g.:
```jsonc
{
...,
"custom/foo#bar": { },
...
}
```
The custom module does not retain the `bar` class as it should, because
all the classes are replaced with the runtime output:
1b4a7b02f4/src/modules/custom.cpp (L141-L147)
Avoid removing the module instance name class so css class behavior is
consistent between all modules.
When parseCpuFrequencies returns an empty vector, getCpuFrequency
would attempt to dereference an invalid iterator.
Return early from getCpuFrequency when parseCpuFrequencies returns an
empty vector.
Resolves a segfault when waybar is run within a VM on apple silicon.
1. battery.hpp - added local bool variable. Force to print warnings the
only once in order to warn user about wrong battery configuraion. And
does not bring a mess when the battery is turned off (gamepads, etc.)
2. dir_name is an object which takes a part in comparison. So converted to the string.
Reading brightness value for backlight device can fail intermittently
(particularly when using ddcci-driver-linux). Handle this more
gracefully rather than crashing
Don't set the anchor for certain edges when the width or the height
is not set to a value of 'auto' (1).
When the bar is vertical, the top and bottom edges are not anchored
otherwise the left and right edges are not anchored.
This resolves an issue wherein the width and height set for the
layer-shell were ignored because the layer was set to anchor to all
edges.
If the modifier is pressed and release without another event, the
intended behaviour is to clear an urgency hint and hide the bar again.
Note that if multiple workspaces have the urgency hint set, the bar is
hidden again and an urgent workspace is focused, the bar does not stay
hidden anymore.
Add a second reason to show the bar besides visible by modifier.
Update the visibility based on changes in the workspace urgency.
Check all workspaces for urgency and keep the bar visible if at least
one has an urgency hint.
As we always use the enum to compare or initialize uint32_t values, it
would be better to declare it with the right type. This way we could
avoid `-Wnarrowing` warnings or unnecessary type casts.