This commit is contained in:
Marcin Wozniak 2019-09-22 10:13:15 +02:00
parent 1e7d2fd63d
commit e08fde933d
2 changed files with 6 additions and 9 deletions

View File

@ -1,6 +1,6 @@
/* appearance */ /* appearance */
static const unsigned int borderpx = 4; /* border pixel of windows */ static const unsigned int borderpx = 4; /* border pixel of windows */
static const unsigned int gappx = 25; /* gaps between windows */ static const unsigned int gappx = 30; /* gaps between windows */
static const unsigned int snap = 32; /* snap pixel */ static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */ static const int topbar = 1; /* 0 means bottom bar */
@ -8,8 +8,8 @@ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows sel
static const unsigned int systrayspacing = 2; /* systray spacing */ static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */ static const int showsystray = 1; /* 0 means no systray */
static const char *fonts[] = { "mono:size=15", "Font Awesome 5 Free Solid:size=15"}; static const char *fonts[] = { "mono:size=16", "Font Awesome 5 Free Solid:size=16"};
static const char dmenufont[] = "mono:size=15"; static const char dmenufont[] = "mono:size=16";
static const char col_gray1[] = "#222222"; static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444"; static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb"; static const char col_gray3[] = "#bbbbbb";

View File

@ -16,7 +16,7 @@ dunst -config&
#/usr/bin/ibus-daemon -d& #/usr/bin/ibus-daemon -d&
transmission-daemon& transmission-daemon&
pl& pl&
#getforecast& (sleep 30 && getforecast)&
print_torrent(){ print_torrent(){
@ -101,7 +101,6 @@ batLevel() {
} }
usageData() { usageData() {
# Calculate CPU percentage
read cpu a b c pi rest < /proc/stat read cpu a b c pi rest < /proc/stat
pt=$((a+b+c+pi)) pt=$((a+b+c+pi))
sleep 0.1 sleep 0.1
@ -109,10 +108,7 @@ usageData() {
t=$((a+b+c+i)) t=$((a+b+c+i))
cpuUse=$((100*( (t-pt) - (i-pi) ) / (t-pt) )) cpuUse=$((100*( (t-pt) - (i-pi) ) / (t-pt) ))
# Find RAM use
# As "A/B"
ramUseA=$(free -m -h | grep Mem | awk '{print $3"/"$2}') ramUseA=$(free -m -h | grep Mem | awk '{print $3"/"$2}')
# As percentage
ramPer=$(free -m | grep Mem | awk '{print 100*($3/$2)}') ramPer=$(free -m | grep Mem | awk '{print 100*($3/$2)}')
ramUseB="${ramPer%.*}" ramUseB="${ramPer%.*}"
@ -140,6 +136,7 @@ esac
while true while true
do do
xsetroot -name "$(print_torrent) | $(print_temp) | $(usageData) | $(testweather) | $(print_wifi) | $(batLevel) | $(print_volume) | $(print_date)" #xsetroot -name "$(print_torrent)$(print_temp) | $(usageData) | $(testweather) | $(print_wifi) | $(batLevel) | $(print_volume) | $(print_date)"
xsetroot -name "$(print_wifi) | $(batLevel) | $(print_volume) | $(print_date)"
sleep 2 sleep 2
done done