~raphi/public-inbox

somebar: Fix status bar background color v1 APPLIED

Jerónimo Navarro: 1
 Fix status bar background color
jeron: 1
 Fix status bar background color

 2 files changed, 2 insertions(+), 1 deletions(-)
#1121661 archlinux.yml success
#1121662 freebsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~raphi/public-inbox/patches/48081/mbox | git am -3
Learn more about email & git

[PATCH somebar] Fix status bar background color Export this patch

I don't know if this is the best way to do it but this one-liner
makes it look exactly like dwm's.
---
 src/bar.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bar.cpp b/src/bar.cpp
index af92f49..ea2e5bc 100644
--- a/src/bar.cpp
+++ b/src/bar.cpp
@@ -263,6 +263,7 @@ void Bar::renderStatus()
	beginBg();
	auto start = _bufs->width - _statusCmp.width() - paddingX*2;
	cairo_rectangle(_painter, _x, 0, _bufs->width-_x+start, _bufs->height);
	setColorScheme(colorInactive, false);
	cairo_fill(_painter);

	_x = start;
-- 
2.43.0
somebar/patches: SUCCESS in 1m7s

[Fix status bar background color][0] from [jeron][1]

[0]: https://lists.sr.ht/~raphi/public-inbox/patches/48081
[1]: mailto:jeron08@gmail.com

✓ #1121662 SUCCESS somebar/patches/freebsd.yml   https://builds.sr.ht/~raphi/job/1121662
✓ #1121661 SUCCESS somebar/patches/archlinux.yml https://builds.sr.ht/~raphi/job/1121661
Thanks, applied with minor changes to remove the padding if no status exists.

To git.sr.ht:~raphi/somebar
   7433a1f..6572b98  master -> master

Re: [PATCH somebar] Fix status bar background color Export this patch

FWIW, I instead initialize the variable lastStatus to "dwl" in
main.cpp to avoid the empty padding. Plus I like how it looks :)
Cheers,

diff --git a/src/main.cpp b/src/main.cpp
index 15a749a..f784e6b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -76,7 +76,7 @@ static std::list<Monitor> monitors;
static std::vector<std::pair<uint32_t, wl_output*>> uninitializedOutputs;
static std::list<Seat> seats;
static Monitor* selmon;
static std::string lastStatus;
static std::string lastStatus = "dwl";
static std::string statusFifoName;
static std::vector<pollfd> pollfds;
static std::array<int, 2> signalSelfPipe;

El vie, 16 feb 2024 a las 9:19, Raphael Robatsch
(<raphael@tapesoftware.net>) escribió:
>
> Thanks, applied with minor changes to remove the padding if no status exists.
>
> To git.sr.ht:~raphi/somebar
>    7433a1f..6572b98  master -> master



-- 
         ··············································