From e595747874a7b5be3339a1c3422a47808638e8c3 Mon Sep 17 00:00:00 2001 From: natemaia Date: Sun, 2 Jan 2022 11:54:13 -0800 Subject: [PATCH] Update dk bar script --- dk-home/.local/bin/bar | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dk-home/.local/bin/bar b/dk-home/.local/bin/bar index 4924d8e3..c7371852 100755 --- a/dk-home/.local/bin/bar +++ b/dk-home/.local/bin/bar @@ -3,6 +3,7 @@ # simple lightweight lemonbar script for use with dk +set -o pipefail bg="#111111" fg="#666666" @@ -11,7 +12,16 @@ underline=3 separator="┃" # xfonts -font0="-xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1" +size=$(xrandr | awk '/ connected/{print $3}' | sed '1q' | sed 's/+.*+.*//' | awk -F'x' '{print $2}') +if (( size >= 2160 )); then + font0="-xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1" +elif (( size >= 1440 )); then + font0="-xos4-terminus-medium-r-normal--18-240-72-72-c-120-iso10646-1" +elif (( size >= 1080 )); then + font0="-xos4-terminus-medium-r-normal--12-240-72-72-c-120-iso10646-1" +else + font0="-xos4-terminus-medium-r-normal--10-240-72-72-c-120-iso10646-1" +fi font1="" font2="" font3=""