You are not logged in.

#1 2019-10-15 13:06:56

clusterF
Member
Registered: 2019-05-07
Posts: 257

Lemonbar

Messing about with lemonbar using mostly awk commands.

#!/usr/bin/env bash

# lemonbar awkwardness
# call lemonbar(autostart etc) =  /usr/local/bin/citrus.sh | lemonbar -g 1366x24+0+0 -pb -f "Terminus-Bold-14"

WIFIDOWN() {
        WIFIDOWN=$(ifconfig | awk 'BEGIN {print "Down:"};NR==14 { print $6" "$7 }' | fmt -20)

        echo -n "$WIFIDOWN"
}

WIFIUP() {
	WIFIUP=$(ifconfig | awk 'BEGIN {print "Up:"};NR==16 { print $6" "$7 }' | fmt -20)

	echo -n "$WIFIUP"
}

UNAME() {
	UNAME=$(uname -a | awk '{ print $1" "$3" "$8 }')

	echo -n "$UNAME"

}

MEM() {
	MEM=$(free -h --kilo | awk 'NR==2 { print $1" " $3 " / " $2}')

	echo -n "$MEM"

}

CPU() {
	CPU=$(top -bn1 -p0 | awk 'NR==3 { print $1" "$4 }' | tr -d ["(s)"])

	echo -n "$CPU"

}

ROOT() {
	ROOT=$(df -h | awk 'NR==4 { print $6"root: "$3" / "$2}')

	echo -n "$ROOT"

}

HOME() {
	HOME=$(df -h | awk 'NR==7 { print $6": "$3" / "$2}')

	echo -n "$HOME"

}
while true; do
        echo -e "%{c}%{F#cecece}%{B#E6414141} $(UNAME) | $(WIFIDOWN) | $(WIFIUP) | $(CPU) | $(MEM) | $(ROOT) | $(HOME) %{F-}%{B-}"
        sleep 1
done

2019-10-15-230502-1366x768-scrot.png

Last edited by clusterF (2019-10-15 13:13:19)


"Thou Wanderer, Father of all! Thou Wanderer, Spirit of all!"

Offline

#2 2019-10-16 12:35:32

clusterF
Member
Registered: 2019-05-07
Posts: 257

Re: Lemonbar

A Lemonbar example done with conky.

Autostart / command =

conky | lemonbar -g x22 -B "#373737" -F "#DFDFDF" -pb -f "Roboto-12"

conky =

conky.config = {
	out_to_x = false,
    out_to_console = true,
    update_interval = 1,
}

conky.text = [[
 Linux: ${kernel} | Mem: ${mem} / ${memmax} | Cpu:${cpu cpu0}% ${freq_g} GHz | Root: ${fs_used /} / ${fs_size /} | \
T/up: ${totalup wlan0} T/down: ${totaldown wlan0} |

]]

Need xft support to display more fonts, you can build it from this git repo here https://github.com/krypt-n/bar

https://manpages.debian.org/buster/lemo … .1.en.html

Last edited by clusterF (2019-10-16 12:36:14)


"Thou Wanderer, Father of all! Thou Wanderer, Spirit of all!"

Offline

Board footer

Powered by FluxBB