Compare commits
4 Commits
a20777be37
...
master
Author | SHA1 | Date | |
---|---|---|---|
ea3f41d132 | |||
e87e50da8f | |||
22229846ed | |||
56a6e890dd |
@ -15,5 +15,3 @@ I have implemented `conky_printf`, a generalized function for printing conky
|
||||
data to the output string. It needs more testing, as I'm sure there are edge
|
||||
cases where it doesn't work properly.
|
||||
|
||||
TODO: Add color to the conky output! That will take if statments, and text
|
||||
for dmenu to consume.
|
||||
|
14
conky.conf
14
conky.conf
@ -7,7 +7,7 @@
|
||||
|
||||
-- Please see LICENSE for details
|
||||
|
||||
-- Copyright (c) 2020-10-23 Trey Blancher
|
||||
-- Copyright (c) 2021 Trey Blancher
|
||||
|
||||
-- This program is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@ -32,13 +32,12 @@ conky.config = {
|
||||
no_buffers = true,
|
||||
update_interval = 1.0,
|
||||
uppercase = false,
|
||||
use_spacer = false,
|
||||
use_spacer = "none",
|
||||
pad_percents = 3,
|
||||
short_units = false,
|
||||
};
|
||||
|
||||
conky.text =
|
||||
[[\
|
||||
conky.text = [[\
|
||||
${lua_parse printf %-20s ${nodename_short}} \
|
||||
RAM:${lua_parse printf %3.0f%% ${memperc}} \
|
||||
Swap:${lua_parse printf %3.0f%% ${swapperc}} \
|
||||
@ -47,7 +46,10 @@ CPU:${lua_parse printf %3.0f%% ${cpu cpu0}} \
|
||||
${loadavg} \
|
||||
${lua_parse printf %-20s ${top name 1}} \
|
||||
${lua_parse printf %8d ${top pid 1}} \
|
||||
${lua_parse printf %3.2f ${top cpu 1}} \
|
||||
${lua_parse printf %3.2f ${top mem 1}} \
|
||||
${lua_parse printf %6.2f ${top cpu 1}} \
|
||||
${lua_parse printf %6.2f ${top mem 1}} \
|
||||
Net: ${lua_parse printf %10s▲%10s▼ ${upspeed wlp4s0} ${downspeed wlp4s0}} \
|
||||
${exec ~/bin/core_temp.sh}${lua_parse printf %9s ${exec ~/bin/core_temp.sh -t}}^fg(\#ebdbb2) \
|
||||
${exec ~/bin/nvme_temp.sh}${lua_parse printf %9s ${exec ~/bin/nvme_temp.sh -t}}^fg(\#ebdbb2) \
|
||||
${exec ~/bin/virt_temp.sh}${lua_parse printf %9s ${exec ~/bin/virt_temp.sh -t}}^fg(\#ebdbb2) \
|
||||
]];
|
||||
|
18
core_temp.sh
Executable file
18
core_temp.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/zsh
|
||||
temp=$(sensors | grep 'Package id' | awk '{print $4}')
|
||||
|
||||
if [[ "${1}" == "-t" ]]; then
|
||||
shift
|
||||
echo -n "${temp}"
|
||||
else
|
||||
val=$(grep -Po '[\d.]+' <<< ${temp})
|
||||
|
||||
|
||||
if [[ ${val} -le 30.0 ]]; then
|
||||
printf "^fg(#0000cc)"
|
||||
elif [[ ${val} -le 60.0 ]]; then
|
||||
printf "^fg(#cc7700)"
|
||||
elif [[ ${val} -gt 60.0 ]]; then
|
||||
printf "^fg(#cc0000)"
|
||||
fi
|
||||
fi
|
17
nvme_temp.sh
Executable file
17
nvme_temp.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/zsh
|
||||
temp=$(sensors nvme-pci-3e00 | grep Composite | awk '{print $2}')
|
||||
|
||||
if [[ "${1}" == "-t" ]]; then
|
||||
shift
|
||||
echo -n "${temp}"
|
||||
else
|
||||
val=$(grep -Po '[\d.]+' <<< ${temp})
|
||||
|
||||
if [[ ${val} -le 30.0 ]]; then
|
||||
printf "^fg(#0000cc)"
|
||||
elif [[ ${val} -le 60.0 ]]; then
|
||||
printf "^fg(#cc7700)"
|
||||
elif [[ ${val} -gt 60.0 ]]; then
|
||||
printf "^fg(#cc0000)"
|
||||
fi
|
||||
fi
|
19
virt_temp.sh
Executable file
19
virt_temp.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/zsh
|
||||
|
||||
#!/bin/zsh
|
||||
temp=$(sensors pch_skylake-virtual-0 | grep temp1 | awk '{print $2}')
|
||||
|
||||
if [[ "${1}" == "-t" ]]; then
|
||||
shift
|
||||
echo -n "${temp}"
|
||||
else
|
||||
val=$(grep -Po '[\d.]+' <<< ${temp})
|
||||
|
||||
if [[ ${val} -le 30.0 ]]; then
|
||||
printf "^fg(#0000cc)"
|
||||
elif [[ ${val} -le 60.0 ]]; then
|
||||
printf "^fg(#cc7700)"
|
||||
elif [[ ${val} -gt 60.0 ]]; then
|
||||
printf "^fg(#cc0000)"
|
||||
fi
|
||||
fi
|
Reference in New Issue
Block a user