gui-apps/somebar: new package, add 1.0.3-r1
This commit is contained in:
parent
851a6d419d
commit
6cd741139b
1
gui-apps/somebar/Manifest
Normal file
1
gui-apps/somebar/Manifest
Normal file
|
@ -0,0 +1 @@
|
|||
DIST somebar-1.0.3.tar.gz 34555 BLAKE2B b6f4cbd4222c44eb072c58ef4a90eba93c60fae03e6ff70e4d36a3019473b3e0b2a673a1f35f72a4a3c09738edae0debb09226e351b9caea8454b23da1d0f651 SHA512 6294aaf3e9bc20b6fbc2221038f044ca505096e78b96981a234d0b0858d4a57bd1ffd5d1b53930b820e97b1fddf9a5149eaa1cb22e300629f92d197e3d5d7e5d
|
15
gui-apps/somebar/files/colorless-status.patch
Normal file
15
gui-apps/somebar/files/colorless-status.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
From: medanisjbara anis2834133766619@gmail.com
|
||||
Date: Mon, 14 Nov 2022 10:28:00
|
||||
Description: sets the color of status component to inactive
|
||||
diff --git a/src/bar.cpp b/src/bar.cpp
|
||||
index fab5a8f..aebe28b 100644
|
||||
--- a/src/bar.cpp
|
||||
+++ b/src/bar.cpp
|
||||
@@ -266,6 +266,7 @@ void Bar::renderStatus()
|
||||
cairo_fill(_painter);
|
||||
|
||||
_x = start;
|
||||
+ setColorScheme(colorInactive);
|
||||
renderComponent(_statusCmp);
|
||||
}
|
||||
|
54
gui-apps/somebar/files/hide-vacant-tags.patch
Normal file
54
gui-apps/somebar/files/hide-vacant-tags.patch
Normal file
|
@ -0,0 +1,54 @@
|
|||
From: medanisjbara anis2834133766619@gmail.com
|
||||
Date: Mon, 14 Nov 2022 22:52:00
|
||||
Description: somebar equivalent of https://dwm.suckless.org/patches/hide_vacant_tags
|
||||
diff --git a/src/bar.cpp b/src/bar.cpp
|
||||
index fab5a8f..38e7b5f 100644
|
||||
--- a/src/bar.cpp
|
||||
+++ b/src/bar.cpp
|
||||
@@ -240,13 +240,36 @@ void Bar::render()
|
||||
|
||||
void Bar::renderTags()
|
||||
{
|
||||
+ // Check if all tags are active (Mod+0)
|
||||
+ bool allActive = true;
|
||||
for (auto &tag : _tags) {
|
||||
+ if (tag.state & TagState::Active){
|
||||
+ if (!allActive){
|
||||
+ allActive = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ allActive = false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ bool renderThis;
|
||||
+ for (auto &tag : _tags) {
|
||||
+ renderThis = false;
|
||||
setColorScheme(
|
||||
tag.state & TagState::Active ? colorActive : colorInactive,
|
||||
tag.state & TagState::Urgent);
|
||||
- renderComponent(tag.component);
|
||||
+ // Reder active tag if it's the only one active
|
||||
+ if (!allActive && tag.state & TagState::Active)
|
||||
+ renderThis = true;
|
||||
auto indicators = std::min(tag.numClients, static_cast<int>(_bufs->height/2));
|
||||
for (auto ind = 0; ind < indicators; ind++) {
|
||||
+ // render tags having indicators
|
||||
+ if (tag.focusedClient == -1)
|
||||
+ renderThis = true;
|
||||
+ // render tags having the focused client
|
||||
+ if (tag.focusedClient == 0){
|
||||
+ renderThis = true;
|
||||
+ }
|
||||
auto w = ind == tag.focusedClient ? 7 : 1;
|
||||
cairo_move_to(_painter, tag.component.x, ind*2+0.5);
|
||||
cairo_rel_line_to(_painter, w, 0);
|
||||
@@ -254,6 +277,8 @@ void Bar::renderTags()
|
||||
cairo_set_line_width(_painter, 1);
|
||||
cairo_stroke(_painter);
|
||||
}
|
||||
+ if (renderThis)
|
||||
+ renderComponent(tag.component);
|
||||
}
|
||||
}
|
||||
|
25
gui-apps/somebar/files/set-bar-color.patch
Normal file
25
gui-apps/somebar/files/set-bar-color.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
From 9fd8038a0f0e1a9d14de9ad0c7b9cc9af0e97380 Mon Sep 17 00:00:00 2001
|
||||
From: odrling <florianbadie@odrling.xyz>
|
||||
Date: Thu, 19 Oct 2023 01:28:49 +0200
|
||||
Subject: [PATCH] set bar color
|
||||
|
||||
---
|
||||
src/config.def.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/config.def.hpp b/src/config.def.hpp
|
||||
index 40a8c95..5cd07ac 100644
|
||||
--- a/src/config.def.hpp
|
||||
+++ b/src/config.def.hpp
|
||||
@@ -13,7 +13,7 @@ constexpr int paddingY = 3;
|
||||
constexpr const char* font = "Sans 12";
|
||||
|
||||
constexpr ColorScheme colorInactive = {Color(0xbb, 0xbb, 0xbb), Color(0x22, 0x22, 0x22)};
|
||||
-constexpr ColorScheme colorActive = {Color(0xee, 0xee, 0xee), Color(0x00, 0x55, 0x77)};
|
||||
+constexpr ColorScheme colorActive = {Color(0xee, 0xee, 0xee), Color(0x99, 0x44, 0xcc)};
|
||||
constexpr const char* termcmd[] = {"foot", nullptr};
|
||||
|
||||
static std::vector<std::string> tagNames = {
|
||||
--
|
||||
2.42.0
|
||||
|
8
gui-apps/somebar/metadata.xml
Normal file
8
gui-apps/somebar/metadata.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>efe.izbudak@metu.edu.tr</email>
|
||||
<name>Efe İzbudak</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
42
gui-apps/somebar/somebar-1.0.3-r1.ebuild
Normal file
42
gui-apps/somebar/somebar-1.0.3-r1.ebuild
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit savedconfig meson
|
||||
|
||||
DESCRIPTION="dwm-like bar for dwl"
|
||||
HOMEPAGE="https://git.sr.ht/~raphi/somebar"
|
||||
SRC_URI="https://git.sr.ht/~raphi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/wayland
|
||||
x11-libs/cairo
|
||||
x11-libs/pango
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="
|
||||
dev-libs/wayland-protocols
|
||||
dev-util/wayland-scanner
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/colorless-status.patch"
|
||||
"${FILESDIR}/hide-vacant-tags.patch"
|
||||
"${FILESDIR}/set-bar-color.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
use savedconfig && restore_config src/config.hpp
|
||||
[[ -f src/config.hpp ]] || cp src/config.def.hpp src/config.hpp
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
save_config src/config.hpp
|
||||
}
|
Loading…
Reference in a new issue