Commit graph

215 commits

Author SHA1 Message Date
scorpion-26
d8eae96e50 Widgets: Avoid redraws by reducing gtk calls 2023-02-24 22:34:30 +01:00
scorpion-26
e1cf8f2475 PulseAudio: Optimizations
Instead of always polling audio volume, gBar subscribes to events,
causing the update to only happen on demand.
Plus we can block poll updates when there is audio change through gBar,
which results in a much smoother slider.

This change reduces (at least on my end) CPU times from 4-6% per core
to 2-4% per core.
2023-02-24 14:34:11 +01:00
scorpion-26
38116636ae Workspaces: Optimize GetStatus
We previously called DispatchIPC 18 times every 100ms
Now it is only 2 times per 100ms
2023-02-24 13:28:09 +01:00
scorpion-26
d2d66171df Buildsystem: More aggressive optimizations
- Enable LTO by default
- Enable Full optimizations by default
- Statically link to libgBar by default
2023-02-24 13:28:09 +01:00
scorpion-26
682f0a4c2f
Mention NF 2.3.0 requirement 2023-02-23 17:10:41 +01:00
scorpion-26
35a6670868 Fix issue with audio slider
Due to the fact, that we needed to manually propagate hover events from
the slider, two hover events are sent when coming from the side of the
slider. This we need to await BOTH close events until we can call the
leave function.
2023-02-22 17:23:47 +01:00
scorpion-26
3c8c93d774 Add Microphone support
This commit adds a new widget for the bar: A Microphone widget. It is
disabled by default and can can
be enabled with AudioInput: true.
Implements a flyin as well.

https://github.com/scorpion-26/gBar/issues/5 for the ping
2023-02-22 17:13:14 +01:00
scorpion-26
f5adfebfe9 PulseAudio: Improve iterator loop
We now store sthe pa_operation and check if they were done'd, cancelled or still running.
2023-02-21 22:47:30 +01:00
scorpion-26
16933c24ff Add log file
Plus refactoring out the logging.
2023-02-21 22:20:02 +01:00
scorpion-26
0e4b877654 PulseAudio: Make FlushLoop more robust
When PA_CONTEXT_READY is called multiple times, PulseAudio::FlusLoop() would get stuck to to integer underflow.
Now there are multiple things preventing that.

Possible fix for https://github.com/scorpion-26/gBar/issues/7
2023-02-21 21:19:22 +01:00
scorpion-26
60b9355e88 System: Don't crash when dbus isn't installed. 2023-02-21 11:39:39 +01:00
scorpion-26
991864775b
Mention AUR in README 2023-02-21 11:27:40 +01:00
scorpion-26
3d2129ca4e Build: Remove ../lib rpath 2023-02-21 10:05:13 +01:00
scorpion-26
a12cb9af5d AudioSlider: Add option for scroll speed
There seems to be a floating point error somewhere though, since
sometimes it goes up by AudioScrollSpeed - 1 instead of
AudioScrollSpeed...

For the ping https://github.com/scorpion-26/gBar/issues/5
2023-02-20 23:04:37 +01:00
scorpion-26
906a1259c3 Add Net sanity checking
This disables network if the tx_bytes file is not found on Init()
2023-02-12 20:45:05 +01:00
scorpion-26
35b7065879 Implement Workspace scroll
Scrolling the workspace widgets now scroll through the workspaces. The
exact behaviour is governed by
'WorkspaceScrollOnMonitor'(either 'm[+/-]1' or 'e[+/-]1'). The direction
can be inverted with 'WorkspaceScrollInvert'.

For the ping: https://github.com/scorpion-26/gBar/issues/5
2023-02-12 14:57:32 +01:00
scorpion-26
c29d752cb8 EventBox: Fix fault callback parameter. 2023-02-12 14:56:59 +01:00
scorpion-26
b4dfaa62b1 EventBox: Add scroll event 2023-02-12 14:28:46 +01:00
scorpion-26
6f3f398ead Bump faulty meson version hint 2023-02-10 17:30:02 +01:00
scorpion-26
e5d160018a
Mention Network widget 2023-02-10 17:26:59 +01:00
scorpion-26
3134c82245 Add a Network Widget
This new widget visualizes the up and download speeds for a
specified network adapter. It is on by default, but can be disabled.
2023-02-10 17:20:26 +01:00
scorpion-26
c901b59ab4 Add missing files
I accidently forgot to add them when commiting 883037029f
2023-02-10 17:14:57 +01:00
scorpion-26
f916b00de7 Fix bogus comment removal
The previous substr call would remove everything but the comment, which
    is not what we want.
2023-02-10 17:10:35 +01:00
scorpion-26
883037029f Refactor CSS out of Window.cpp
It has nothing to do with *windows* and obviously doesn't belong there.
Plus I don't know whether I may need static access to the provider.
2023-02-09 16:16:18 +01:00
scorpion-26
9e48830dc8 Abstract out quad calculation from Sensor
The calculation of the bounding quad is now in CairoArea, as it is quite
useful
2023-02-09 16:16:18 +01:00
scorpion-26
5654ab6f0b
Mention AMD support in README 2023-02-06 10:04:34 +01:00
scorpion-26
902f445757 Abstract out the cairo drawing area
And rename CairoSensor to Sensor
2023-02-04 16:09:08 +01:00
scorpion-26
c0038d83b8 Add audio revealer
This adds an option to hide the audio slider behind a revealer, which
works similar to the sensors.
For the ping: https://github.com/scorpion-26/gBar/issues/5
2023-02-04 15:48:06 +01:00
scorpion-26
6c007f7c49 Default the audio revealer to be disabled 2023-02-04 15:46:54 +01:00
scorpion-26
df1e62f501 Revealer + slider combi now works as intended 2023-02-04 15:43:51 +01:00
scorpion-26
78f3119544 Fix issues with opening the bluetooth widget
On my system, the bluetooth widget wouldn't execute the first time the
button is clicked. This probably due to the fact I forgot a NULL at the
end of the execl call. Now I just call system and "call" it a day
2023-02-04 15:33:06 +01:00
scorpion-26
7f867aa0fb Initial impl for audio revealer
System events are now propagated to the slider. Problems: Rest of the
revealers don't work...
2023-02-04 15:07:05 +01:00
scorpion-26
4373ab7654 AMD GPU: Add temperature
That should be it for the AMD GPU part of https://github.com/scorpion-26/gBar/issues/5
2023-01-30 20:43:24 +01:00
scorpion-26
27bb118d9a Initial AMD GPU implementation
Partially implements https://github.com/scorpion-26/gBar/issues/5
The spammy logs will remain, until it is confirmed, that it works.
2023-01-30 17:23:28 +01:00
scorpion-26
812e689c77 Disable opt. dependencies dynamically
This lifts the requirement of needing to disable the dependencies by
hand if you don't have them installed.
It also enables us to have a single package, that works for all.
2023-01-30 16:58:38 +01:00
scorpion-26
9aaf6d1884 Fix header install logic
Really dumb mistake...
2023-01-30 16:58:38 +01:00
scorpion-26
a34e4d6adc
Add bug report template 2023-01-30 08:41:47 +01:00
scorpion-26
16e7d8aa50 Remove the unused GTK dependency from example 2023-01-29 21:53:35 +01:00
scorpion-26
dce92a63f8 Add option to not center the time
Setting this will make https://github.com/scorpion-26/gBar/issues/4 less
likely.
2023-01-29 21:31:00 +01:00
scorpion-26
a623018ee2 Add install rpath.
Should make installing to /usr/local work out of the box
2023-01-29 19:42:12 +01:00
scorpion-26
3231407c13
Update README.md 2023-01-29 17:49:36 +01:00
scorpion-26
e38f27b784 Improve the configuration language
Plus it is now much easier to add new config variables
2023-01-29 17:42:32 +01:00
scorpion-26
7cc929f773 Refactored out config 2023-01-29 16:47:50 +01:00
scorpion-26
dfae74e169 Switch audio loop to late dispatch 2023-01-29 12:43:05 +01:00
scorpion-26
3c6850b530 Fix regressions caused by immediate dispatch 2023-01-29 12:36:29 +01:00
scorpion-26
3473da36f4 Widget: Add immediate timer dispatch
gLib will not immediately run the callback after the timeout has been
added.
This caused everything to be a few ms late.
Now the timeout will trigger early by default.
2023-01-29 12:23:44 +01:00
Moss
7c7c58f384
Add workspace symbol configuration (#2)
Also added an example line to the config at data/config.
Config syntax is: "WorkspaceSymbol-[workspace_number]: [symbol]".
If no default is provided it will default to the circle with dot.
2023-01-29 12:07:24 +01:00
scorpion-26
75527924c4
README: Add bluetooth widget 2023-01-28 23:59:59 +01:00
scorpion-26
ef32d62de3
README: Mention battery widget 2023-01-28 23:58:27 +01:00
Moss
2c64d6da79
Add Battery Widget (#1)
Added a battery widget which only shows if the battery folder is set in the config and exists.
2023-01-28 23:47:55 +01:00