Commit graph

233 commits

Author SHA1 Message Date
scorpion-26
ffe2d07bec Fix wrong Widget name in hardcoded config
Sound != Audio
2023-10-28 23:05:06 +02:00
scorpion-26
996a6611ad Add options for reordering widget layout.
Partially implements https://github.com/scorpion-26/gBar/issues/48 and https://github.com/scorpion-26/gBar/issues/20
2023-10-21 18:32:51 +02:00
scorpion-26
b19b091c92 Layer audioflyin on top of fullscreen windows
LAYER_TOP (The previously hardcoded layer) draws below fullscreen
windows (at least on Hyprland). For the flyin we want it to be always on
top, so LAYER_OVERLAY is used instead now.
2023-10-21 16:40:41 +02:00
scorpion-26
3a0b0e0699 Add support for vector configs
This is the first step for arbitrary widget position
2023-10-18 18:32:56 +02:00
Edvin Källström
f5e4638297
Nix: NumWorkspaces, removed nulls, default HyrplandIPC (#54)
No option for NumWorkspaces and some options could be null while they
shouldn't. Also set UseHyprlandIPC to true by default as that is now
required by Hyprland 0.30.
2023-10-11 17:37:10 +09:00
scorpion-26
96485f408e
Check nvidia gpu features on init
When a required feature is not supported, gBar would crash inside the
query functions without a way to manually bypass NvidiaGPU. Now
NvidiaGPU checks whether all features are supported and disables the
module if any throw an error.

Fixes https://github.com/scorpion-26/gBar/issues/52
2023-09-21 19:30:42 +08:00
Sebastian Zerbe
471bc6e719
Make the partition monitored by disk sensor configurable (#50)
Allows to stat partitions other than the root partition

---------

Co-authored-by: Sebastian Zerbe <zerbe@phil.hhu.de>
2023-09-08 16:34:17 +02:00
scorpion-26
9afbfe3c1d Unify data/config formatting 2023-09-08 01:01:02 +02:00
scorpion-26
b215dfb145 Don't crash for empty string config
Fixes https://github.com/scorpion-26/gBar/issues/49
2023-09-07 18:49:25 +02:00
scorpion-26
0812c3680f Add option for sensor tooltips instead of sliders
Partially implements https://github.com/scorpion-26/gBar/issues/48
2023-09-07 17:24:41 +02:00
scorpion-26
d811b14767 Move WorkspaceSymbol parsing to other map configs 2023-09-02 00:15:04 +02:00
scorpion-26
df46c58244 Add config for number of workspaces
Adds NumWorkspaces config, https://github.com/scorpion-26/gBar/issues/45

The WorkspaceSymbols syntax was also upgraded to use maps, since the -n
was hardcoded to query for numbers from 1-9, which is now no longer
correct.
The old syntax for WorkspaceSymbols still works, but only for ws 1-9
2023-09-02 00:05:08 +02:00
scorpion-26
5c2ac6fa08 Generalize map config parsing
Maps like the one used by SNIIconSize and SNIPaddingTop are now
generalized, without requiring the awkward std::pair<_,_> buf and hasntFoundProperty helpers
2023-09-01 23:42:45 +02:00
scorpion-26
71278a3529 Use Hyprland IPC by default.
Hyprland will remove ext-workspace-unstable-v1 support in
v0.30.0 and Workspaces with UseHyprlandIPC: false will no longer work.
2023-09-01 17:55:22 +02:00
scorpion-26
7a7c6b5ce8 Nix: Add DateTimeLocale to module.nix 2023-09-01 03:24:01 +02:00
scorpion-26
6f9da7f7c9 Add PID to logfile
This avoid log corruption when multiple gBar instances are open at the same, as the logfile was the same
2023-09-01 03:19:07 +02:00
scorpion-26
9ecba84be5 Fix compilation without USE_LOGFILE 2023-09-01 03:19:07 +02:00
scorpion-26
7563f90a0c Mention more plugin examples 2023-09-01 03:19:07 +02:00
scorpion-26
b9f34f0632 Fix example plugin compilation 2023-09-01 03:19:07 +02:00
Sebastian Zerbe
2cc0ec0a66
Add config for time widget locale (#44)
This makes the `DateTimeStyle` string respect the current locale or
whatever valid locale is set via configuration option `DateTimeLocale`.

---------

Co-authored-by: Sebastian Zerbe <zerbe@phil.hhu.de>
2023-09-01 02:14:13 +02:00
scorpion-26
aee06ab49d SNI: Properly unsubscribe from item reload signal
I think not unsubscribing is the root cause of the mysterious calling of
ItemPropertyChanged from random names/object paths.
2023-08-24 00:09:05 +02:00
scorpion-26
383f25dbe1 SNI: Fix pixmap
g_variant_iter_n_children apparently returns 1 instead of 3 (array =
child, but I don't know).
I inverted the statement, because for empty property, it hasn't any
children.
2023-08-23 23:18:50 +02:00
scorpion-26
15ed9bfc66 SNI: Disallow watcher replacement
Should help against losing the name constantly, if another bar is
opened.
2023-08-23 15:29:13 +02:00
scorpion-26
ff22c08f01 Disable Nvidia on nvml init failure
https://github.com/scorpion-26/gBar/issues/39
2023-08-23 15:08:33 +02:00
Shivanshu Kant Prasad
49dbf074be
Bug Fix: NixOS Missing Semicolon in module.nix (#41)
Nix build was broken due to a missing semicolon.
2023-08-23 13:40:33 +02:00
scorpion-26
a15bb1e17e SNI: Gracefully handle empty IconPixmap
An empty pixmap caused extreme flickering.
https://github.com/scorpion-26/gBar/issues/38
2023-08-22 22:30:38 +02:00
scorpion-26
b246e9fad4 Log failure code for Nvidia polling 2023-08-22 22:10:25 +02:00
scorpion-26
ec478dec9c SNI: Fix crash with ToolTip of type String
TeamViewer exposes ToolTip as String (which is not compliant to the spec).
This caused gBar to crash, since we assume, that the tooltip variant is
always a container (struct), which glibc doesn't like.

We now fallback to g_variant_get_string if it is not according to spec

Fixes https://github.com/scorpion-26/gBar/issues/37
2023-08-22 15:17:18 +02:00
scorpion-26
1a25dbdec6 Add config for numbers instead of sliders
Currently doesn't affect the audio flyin.
Implementation for https://github.com/scorpion-26/gBar/issues/35
2023-08-21 18:22:29 +02:00
SnowPuppy429
c2c7395687
Fixed a typo in README.md
Changed "costum" to "custom"
2023-08-21 17:28:40 +02:00
scorpion-26
ed71da316e Only use workspace manager when not using IPC
Since we always init Wayland, we would previously have both
zext_workspace_manager_v1 and Hyprland IPC which is terrible
2023-08-08 17:52:35 +02:00
scorpion-26
ef925ef174 Retry hypr socket operations.
Don't immediately ASSERT when the hyprland socket operations fail.
Instead, retry them a few times and then return gracefully instead of
crashing.

https://github.com/scorpion-26/gBar/issues/32
2023-08-08 16:32:14 +02:00
scorpion-26
3bac707bf5 Fix compiler warnings 2023-07-28 19:11:13 +02:00
scorpion-26
4a52bb744a SNI: Flush before querying item properties
Some apps have a tendency to deadlock after registration (notably
KeePassXC). Now we flush before querying the item properties, so any
pending answer should have left the bus, hopefully avoiding the deadlock
2023-07-28 18:58:00 +02:00
scorpion-26
a7862a4242 SNI: Remove callback for erased items
Should fix DBusNameVanished spam as found in https://github.com/scorpion-26/gBar/issues/29
2023-07-28 18:56:51 +02:00
scorpion-26
ef8652f046 Don't ignore WS 9
Fixes https://github.com/scorpion-26/gBar/issues/28
2023-07-28 00:19:55 +02:00
scorpion-26
09ec1bfab6 SNI: Sort items
Reloading/adding new items causes jumps in the item order. Sorting
should stabilize the order
2023-07-26 14:04:36 +02:00
scorpion-26
884d3f1324 SNI: Only reload a given senderName once
Fix for: https://github.com/scorpion-26/gBar/issues/26
2023-07-26 14:03:52 +02:00
scorpion-26
39cf17c30f SNI: Use our object path for ItemPropertyChanged
ItemPropertyChanged is called multiple times per actual icon change.
senderName is the same, objectPath is the same, but our registered name
for the callback differs.
We can't use the provided name for item searching, since that *can*
differ from the one we registered with (Looking at you, Discord. Discord
registers with org.kde.StatusNotifierItem-*, but calls back with :*.*)
Since then the object path will sometimes be wrong for the name, we just
use the one from the icon we originally registered with. This causes
multiple icons to reload though

Potential fix for https://github.com/scorpion-26/gBar/issues/26
2023-07-26 13:37:11 +02:00
scorpion-26
fe7b02b10c SNI: Honor XDG_DATA_DIRS as icon directory
Also don't crash in Utils::FindFileWithName when directory doesn't exist

Potential fix for https://github.com/scorpion-26/gBar/issues/25
2023-07-25 01:47:17 +02:00
scorpion-26
73b5335024
Update README.md
- Mention breaking style.css changes.
- Link-ify "open an issue"
2023-07-23 18:10:24 +02:00
scorpion-26
c12bef29d2 BluetoothDevices: Honor Location 2023-07-23 17:56:24 +02:00
Edvin Källström
f7ff25f605
Nix: fix invalid default value and extend documentation (#24)
Previous default value of date creates null option in gBar config and
crashed the bar, removes null as accepted option in SNIIcon* options as
that also crashes the bar. I also felt like documentation lacked so
wrote this.
2023-07-23 12:15:37 +02:00
Edvin Källström
bb765c6468
Add parsed nix config (#23)
Add a way to write the gBar configuration in the nix language, like many
other home manager modules, this spares, atleast nix users, from the
trouble of using a new config language and integrates it nicer into
existing home manager configs.
2023-07-21 21:09:56 +02:00
scorpion-26
abd3774c7d Fix SNI angle for top bar 2023-07-21 01:29:25 +02:00
scorpion-26
42a0710551 Fix SNIPaddingTop for sideways bar 2023-07-21 01:24:25 +02:00
scorpion-26
f78758c4ee SNI: Allow bar rotation
Texture was also rewritten, so it doesn't need the SNIPaddingTop hack as much
anymore
2023-07-21 01:08:38 +02:00
scorpion-26
6e8e7f3f9e Fix typo in config 2023-07-19 03:01:56 +02:00
scorpion-26
4cbada766e Fix margins for the audio flyin 2023-07-19 01:49:31 +02:00
scorpion-26
c5d458b3f7
Update README.md
- Fixed typo
- Update the entry for the tmp files
- Added the scope of this project
2023-07-19 01:46:04 +02:00