Thank you very much for the help, There are plenty of resources on Linux, I do apologize for the lack of data I provided, I however do not know for freebsd,Hi,
Given information is light here.
You said what you want but not what you've done.
It won't be easy to help you in that situation.
In your case you should at least post your ~/.config/i3/config and ~/.config/i3blocks/config (or whatever name you gave them)
First did you read the given example by the readme on GitHub page ?
Then did you follow instructions listed in the "getting start" section ?![]()
GitHub - vivien/i3blocks: The hacker-friendly status_command for Sway and i3
The hacker-friendly status_command for Sway and i3 - GitHub - vivien/i3blocks: The hacker-friendly status_command for Sway and i3github.com
Also do not hesitate to the launch i3blocks in debugging mode, it helps a lot to find what's wrong.![]()
GitHub - vivien/i3blocks: The hacker-friendly status_command for Sway and i3
The hacker-friendly status_command for Sway and i3 - GitHub - vivien/i3blocks: The hacker-friendly status_command for Sway and i3github.com
![]()
GitHub - vivien/i3blocks: The hacker-friendly status_command for Sway and i3
The hacker-friendly status_command for Sway and i3 - GitHub - vivien/i3blocks: The hacker-friendly status_command for Sway and i3github.com
Once you've done all that you should be able to at least get one block to work, then slowly build others step by step, depending on how you feel comfortable with the configuration files it can take time.
#!/bin/sh
color0="#00ccff"
color1="#00e600"
color2="#ffff00"
color3="#ff9900"
color4="#ff0000"
temp_info="$(sysctl -n dev.cpu.0.temperature | cut -c 1-2)"
temp_print="$(sysctl -n dev.cpu.0.temperature | cut -c 1-2) °C"
if [ "$temp_info" -ge 01 ] && [ "$temp_info" -le 50 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color0"
elif [ "$temp_info" -gt 50 ] && [ "$temp_info" -le 60 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color1"
elif [ "$temp_info" -gt 60 ] && [ "$temp_info" -le 70 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color2"
elif [ "$temp_info" -gt 70 ] && [ "$temp_info" -le 80 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color3"
elif [ "$temp_info" -gt 80 ] && [ "$temp_info" -le 95 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color4"
fi
#!/bin/sh
# Color
color="#6666ff"
URGENT_VALUE=90
LOAD=$(sysctl -n vm.loadavg | awk '{print $(NF-1)}' | cut -d ' ' -f 3,6)
if [ "${LOAD}" != "" ]; then
LOAD_PERC=$(echo "scale=0; ${LOAD} * 100" | bc -l)
LOAD_PERC=${LOAD_PERC%5.*}
echo "${LOAD}"
echo "${LOAD}"
echo "$color"
if [ "${LOAD_PERC}" -ge "${URGENT_VALUE}" ]; then
exit 33
fi
fi
#!/bin/sh
# Display used, free and total memory with the help of freecolor utility
total_mem="$(freecolor -m -o | head -n 2 | tail -n 1 | cut -c14-18)"
used_mem="$(freecolor -m -o | head -n 2 | tail -n 1 | cut -c24-29)"
if [ "${used_mem}" -lt "${total_mem}" ]; then
echo "${used_mem}/${total_mem} MB"
echo " "
fi
#!/bin/sh
color0="#00ccff"
color1="#00e600"
color2="#ffff00"
color3="#ff9900"
color4="#ff0000"
temp_info="$(sysctl -n dev.cpu.0.temperature | cut -c 1-2)"
temp_print="$(echo $temp_info "*" "1.8" "+" "32" | bc ) °F"
#temp_print="$(sysctl -n dev.cpu.0.temperature | cut -c 1-2) °C"
if [ "$temp_info" -ge 01 ] && [ "$temp_info" -le 50 ]; then
echo "$temp_print"
echo "$temp_print"
echo "color0"
elif [ "$temp_info" -gt 50 ] && [ "$temp_info" -le 60 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color1"
elif [ "$temp_info" -gt 60 ] && [ "$temp_info" -le 70 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color2"
elif [ "$temp_info" -gt 70 ] && [ "$temp_info" -le 80 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color3"
elif [ "$temp_info" -gt 80 ] && [ "$temp_info" -le 95 ]; then
echo "$temp_print"
echo "$temp_print"
echo "$color4"
fi
What do I need for configs and packages
Do I place them in i3 blocks config?CPU_temp:
Bash:#!/bin/sh color0="#00ccff" color1="#00e600" color2="#ffff00" color3="#ff9900" color4="#ff0000" temp_info="$(sysctl -n dev.cpu.0.temperature | cut -c 1-2)" temp_print="$(sysctl -n dev.cpu.0.temperature | cut -c 1-2) °C" if [ "$temp_info" -ge 01 ] && [ "$temp_info" -le 50 ]; then echo "$temp_print" echo "$temp_print" echo "$color0" elif [ "$temp_info" -gt 50 ] && [ "$temp_info" -le 60 ]; then echo "$temp_print" echo "$temp_print" echo "$color1" elif [ "$temp_info" -gt 60 ] && [ "$temp_info" -le 70 ]; then echo "$temp_print" echo "$temp_print" echo "$color2" elif [ "$temp_info" -gt 70 ] && [ "$temp_info" -le 80 ]; then echo "$temp_print" echo "$temp_print" echo "$color3" elif [ "$temp_info" -gt 80 ] && [ "$temp_info" -le 95 ]; then echo "$temp_print" echo "$temp_print" echo "$color4" fi
CPU_load:
Bash:#!/bin/sh # Color color="#6666ff" URGENT_VALUE=90 LOAD=$(sysctl -n vm.loadavg | awk '{print $(NF-1)}' | cut -d ' ' -f 3,6) if [ "${LOAD}" != "" ]; then LOAD_PERC=$(echo "scale=0; ${LOAD} * 100" | bc -l) LOAD_PERC=${LOAD_PERC%5.*} echo "${LOAD}" echo "${LOAD}" echo "$color" if [ "${LOAD_PERC}" -ge "${URGENT_VALUE}" ]; then exit 33 fi fi
Memory:
eg.Bash:#!/bin/sh # Display used, free and total memory with the help of freecolor utility total_mem="$(freecolor -m -o | head -n 2 | tail -n 1 | cut -c14-18)" used_mem="$(freecolor -m -o | head -n 2 | tail -n 1 | cut -c24-29)" if [ "${used_mem}" -lt "${total_mem}" ]; then echo "${used_mem}/${total_mem} MB" echo " " fi
View attachment 15348
No, you make a separate folder in .config/i3 and put them there. Each block has his own file which needs to have executable rights since they are basically shell scripts. Also make sure that you include the path to blocks in Your i3blocks config.Do I place them in i3 blocks config?
This is really helpful, but is this the i3blocks config? where should I place the i3 blocks config?No, you make a separate folder in .config/i3 and put them there. Each block has his own file which needs to have executable rights since they are basically shell scripts. Also make sure that you include the path to blocks in Your i3blocks config.
e.g.:
View attachment 16071
View attachment 16072
In i3 folder ($HOME/.config/i3/). Follow the instructions from github.This is really helpful, but is this the i3blocks config? where should I place the i3 blocks config?