mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-09 14:19:43 +00:00
Merge branch 'master' of https://github.com/thytom/dwmbar
This commit is contained in:
commit
b4cd124c6c
3 changed files with 26 additions and 3 deletions
2
dwmbar
2
dwmbar
|
@ -13,4 +13,6 @@ echo "dwmbar $VERSION"
|
|||
|
||||
}
|
||||
|
||||
while :; do
|
||||
xsetroot -name "$(exec $RC_LOCATION)"
|
||||
done
|
||||
|
|
4
dwmbarrc
4
dwmbarrc
|
@ -4,18 +4,18 @@ MODULES_DIR="modules/"
|
|||
|
||||
SEPARATOR=" | "
|
||||
|
||||
MODULES="test archupdates weather date time"
|
||||
MODULES="volume temperature date time battery"
|
||||
|
||||
run_modules(){
|
||||
for module in $MODULES; do
|
||||
[[ ! "$OUTPUT" = "" ]] && OUTPUT="$OUTPUT$SEPARATOR"
|
||||
|
||||
OUTPUT="$OUTPUT$(exec $MODULES_DIR$module)"
|
||||
done
|
||||
}
|
||||
|
||||
run(){
|
||||
run_modules
|
||||
sleep 5; # Delays script before it's called again
|
||||
echo $OUTPUT
|
||||
}
|
||||
|
||||
|
|
21
modules/temperature
Executable file
21
modules/temperature
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Gets temperature of the CPU
|
||||
# Dependencies: lm_sensors
|
||||
|
||||
get_temperature()
|
||||
{
|
||||
# CPU_T=$(cat /sys/devices/platform/coretemp.0/hwmon/hwmon?/temp2_input)
|
||||
# CPU_TEMP=$(expr $CPU_T / 1000)
|
||||
|
||||
CPU_TEMP="$(sensors | grep temp1 | awk '{print $2}')"
|
||||
|
||||
# elif [ "$CPU_TEMP" -le 10 ]; then
|
||||
# echo " $CPU_TEMP"
|
||||
# else
|
||||
# echo " $CPU_TEMP"
|
||||
# fi
|
||||
echo " $CPU_TEMP"
|
||||
}
|
||||
|
||||
get_temperature
|
Loading…
Reference in a new issue