From 2f514fbc86291534d464bbf922d28baf31077f50 Mon Sep 17 00:00:00 2001 From: adi1090x Date: Mon, 4 Oct 2021 17:13:18 +0530 Subject: [PATCH] Updated --- PKGBUILD | 2 +- files/polybar/adaptive/config.ini | 2 +- files/polybar/adaptive/launch.sh | 25 +++-- files/polybar/adaptive/modules.ini | 61 ++++++++++-- files/polybar/beach-bitmap/launch.sh | 25 +++-- files/polybar/beach-bitmap/modules.ini | 37 +++++-- files/polybar/beach/launch.sh | 25 +++-- files/polybar/beach/modules.ini | 36 +++++-- files/polybar/bouquet/config.ini | 2 +- files/polybar/bouquet/launch.sh | 25 +++-- files/polybar/bouquet/modules.ini | 62 ++++++++++-- files/polybar/default/config.ini | 2 +- files/polybar/default/launch.sh | 25 +++-- files/polybar/default/modules.ini | 65 ++++++++++-- files/polybar/eleven/launch.sh | 25 +++-- files/polybar/eleven/modules.ini | 34 +++++-- files/polybar/forest-bitmap/bars.ini | 9 ++ files/polybar/forest-bitmap/config.ini | 2 +- files/polybar/forest-bitmap/launch.sh | 25 +++-- files/polybar/forest-bitmap/modules.ini | 52 ++++++++-- files/polybar/forest/bars.ini | 9 ++ files/polybar/forest/config.ini | 2 +- files/polybar/forest/launch.sh | 25 +++-- files/polybar/forest/modules.ini | 52 ++++++++-- files/polybar/hack/bars.ini | 8 ++ files/polybar/hack/config.ini | 2 +- files/polybar/hack/launch.sh | 25 +++-- files/polybar/hack/modules.ini | 127 ++++++++++++++++++++++-- files/polybar/keyboards/config.ini | 2 +- files/polybar/keyboards/launch.sh | 25 +++-- files/polybar/keyboards/modules.ini | 64 ++++++++++-- files/polybar/kiss/launch.sh | 25 +++-- files/polybar/kiss/modules.ini | 41 ++++++-- files/polybar/landscape/config.ini | 2 +- files/polybar/landscape/launch.sh | 25 +++-- files/polybar/landscape/modules.ini | 60 +++++++++-- files/polybar/launch.sh | 6 +- files/polybar/manhattan/launch.sh | 25 +++-- files/polybar/manhattan/modules.ini | 39 ++++++-- files/polybar/mountain/launch.sh | 25 +++-- files/polybar/mountain/modules.ini | 41 ++++++-- files/polybar/nordic/config.ini | 2 +- files/polybar/nordic/launch.sh | 25 +++-- files/polybar/nordic/modules.ini | 61 ++++++++++-- files/polybar/spark/launch.sh | 25 +++-- files/polybar/spark/modules.ini | 37 +++++-- files/polybar/tealize/config.ini | 2 +- files/polybar/tealize/launch.sh | 25 +++-- files/polybar/tealize/modules.ini | 60 +++++++++-- files/polybar/wave/launch.sh | 25 +++-- files/polybar/wave/modules.ini | 42 ++++++-- 51 files changed, 1181 insertions(+), 294 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index e4225ea..4d1eb8c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ pkgname=archcraft-openbox pkgver=1.0 -pkgrel=1 +pkgrel=2 pkgdesc="Openbox WM Configurations for Archcraft" url="https://github.com/archcraft-os/archcraft-openbox" arch=('any') diff --git a/files/polybar/adaptive/config.ini b/files/polybar/adaptive/config.ini index e6bfd5e..46af859 100644 --- a/files/polybar/adaptive/config.ini +++ b/files/polybar/adaptive/config.ini @@ -134,7 +134,7 @@ font-2 = "Iosevka Nerd Font:size=20;5" ; modules-right = ipc clock # Default -modules-left = sepL menu 1LD openbox 2LD cpu 3LD memory 4LD filesystem 5LD +modules-left = sepL menu 1LD openbox 2LD cpu 3LD used-memory 4LD filesystem 5LD modules-center = mpd modules-right = 2RD volume 3RD backlight 4RD battery 5RD network 6RD date 7RD sysmenu sepR # Alternate diff --git a/files/polybar/adaptive/launch.sh b/files/polybar/adaptive/launch.sh index 9971e80..d294d16 100755 --- a/files/polybar/adaptive/launch.sh +++ b/files/polybar/adaptive/launch.sh @@ -4,16 +4,20 @@ ## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -CARD="$(ls /sys/class/backlight | head -n 1)" +CARD="$(light -L | grep 'backlight' | head -n1 | cut -d'/' -f3)" +INTERFACE="$(ip link | awk '/state UP/ {print $2}' | tr -d :)" RFILE="$DIR/.module" -# Fix backlight module for non intel machines -backlight() { - if [[ "$CARD" != *"intel_"* ]]; then - if [[ ! -f "$RFILE" ]]; then - sed -i -e 's/backlight/brightness/g' "$DIR"/config.ini - touch "$RFILE" - fi +# Fix backlight and network modules +fix_modules() { + if [[ -z "$CARD" ]]; then + sed -i -e 's/backlight/bna/g' "$DIR"/config.ini + elif [[ "$CARD" != *"intel_"* ]]; then + sed -i -e 's/backlight/brightness/g' "$DIR"/config.ini + fi + + if [[ "$INTERFACE" == e* ]]; then + sed -i -e 's/network/ethernet/g' "$DIR"/config.ini fi } @@ -30,5 +34,8 @@ launch_bar() { } # Execute functions -backlight +if [[ ! -f "$RFILE" ]]; then + fix_modules + touch "$RFILE" +fi launch_bar diff --git a/files/polybar/adaptive/modules.ini b/files/polybar/adaptive/modules.ini index 380c3f6..25a3fb4 100644 --- a/files/polybar/adaptive/modules.ini +++ b/files/polybar/adaptive/modules.ini @@ -90,6 +90,17 @@ ramp-headphones-1 =  ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ +[module/bna] +type = custom/text + +content = " NA" +content-prefix =  +content-prefix-font = 2 +content-prefix-foreground = ${color.RED} +content-background = ${color.BG2} + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + [module/backlight] type = internal/xbacklight @@ -449,6 +460,27 @@ label = " %mb_used%" ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ +[module/used-memory] +type = custom/script + +exec = free -m | sed -n 's/^Mem:\s\+[0-9]\+\s\+\([0-9]\+\)\s.\+/\1/p' + +tail = true +interval = 5 + +format =