gui-apps/someblocks: new package, add 1.0.1

This commit is contained in:
odrling 2023-10-19 01:36:35 +02:00
parent 6cd741139b
commit aeca8624a2
No known key found for this signature in database
GPG key ID: A0145F975F9F8B75
4 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1 @@
DIST someblocks-1.0.1.tar.gz 4104 BLAKE2B 198f0d6eac7f09393900e305fda0d291bf2c95f3c47bee604f14007b04d9da65909ff4f30e40fe74484e62967d369ecbbe75ffc4d8de2f8210fb386c124b7911 SHA512 a2c5a37bbc699a61fc53a7bb15d8bff27d0e56d8bf132dd3afca2c30c88fb931c2dd74ffad738b9adbcf838b5ab6d6fedc379850ab99836dc9a642af649c2a1f

View file

@ -0,0 +1,41 @@
From 7484a7ce5ba45d7003eb9356a75486c45d13ea1e Mon Sep 17 00:00:00 2001
From: odrling <florianbadie@odrling.xyz>
Date: Thu, 19 Oct 2023 01:35:29 +0200
Subject: [PATCH] update config
---
blocks.def.h | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/blocks.def.h b/blocks.def.h
index 9c22d68..014ba63 100644
--- a/blocks.def.h
+++ b/blocks.def.h
@@ -1,11 +1,20 @@
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = {
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
- {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30, 0},
-
- {"", "date '+%b %d (%a) %I:%M%p'", 5, 0},
+ {" ", "load", 5, 0},
+ {" ",
+ "free | awk -v CONVFMT=%.3g '/^Mem/ { used = $3 / (1024*1024); "
+ "total = $2 / (1024*1024); print used \"G/\" total \"G\" }' | sed s/i//g",
+ 5, 0},
+ {" ", "volume", 0, 10},
+ {"☀ ", "backlight", 0, 11},
+ {"", "network", 5, 0},
+ {"", "battery", 5, 0},
+ /* {"🌡", "sensors | awk '/^temp1:/{print $2}'", 5, 0},
+ */
+ {"", "date '+%Y-%m-%d %H:%M:%S'", 1, 0},
};
//sets delimeter between status commands. NULL character ('\0') means no delimeter.
-static char delim[] = " | ";
+static char delim[] = " │ ";
static unsigned int delimLen = 5;
--
2.42.0

View 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>

View file

@ -0,0 +1,39 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit savedconfig
DESCRIPTION="Modular status bar for somebar written in c."
HOMEPAGE="https://git.sr.ht/~raphi/someblocks"
SRC_URI="https://git.sr.ht/~raphi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64"
PATCHES=(
"${FILESDIR}/0001-update-config.patch"
)
src_prepare() {
default
sed -i -e 's:$(LDFLAGS):$(CPPFLAGS) $(CFLAGS) $(LDFLAGS):' Makefile \
|| die "sed fix failed. Uh-oh..."
# prevent compilation in install phase
sed -i -e "s/install: output/install:/g" Makefile
restore_config blocks.h
}
src_compile() {
emake output
}
src_install() {
emake PREFIX="${ED}/usr" install
einstalldocs
save_config blocks.h
}