Last active
February 16, 2020 23:03
-
-
Save paulbdavis/4708828 to your computer and use it in GitHub Desktop.
conky rc for json output to i3 bar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out_to_x no | |
own_window no | |
out_to_console yes | |
background no | |
max_text_width 0 | |
# Update interval in seconds | |
update_interval 2.0 | |
# This is the number of times Conky will update before quitting. | |
# Set to zero to run forever. | |
total_run_times 0 | |
# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off. | |
short_units yes | |
# How strict should if_up be when testing an interface for being up? | |
# The value is one of up, link or address, to check for the interface | |
# being solely up, being up and having link or being up, having link | |
# and an assigned IP address. | |
if_up_strictness address | |
# Add spaces to keep things from moving about? This only affects certain objects. | |
# use_spacer should have an argument of left, right, or none | |
use_spacer left | |
# Force UTF8? note that UTF8 support required XFT | |
override_utf8_locale no | |
# number of cpu samples to average | |
# set to 1 to disable averaging | |
cpu_avg_samples 2 | |
# template {"full_text": "", "color":"\#"}, | |
# Stuff after 'TEXT' will be formatted on screen | |
TEXT | |
[{"full_text": "\ | |
${if_updatenr 1}host: ${exec hostname}${endif}\ | |
${if_updatenr 2}kernel: ${exec /home/paul/bin/kernel-codename -a}${endif}\ | |
${if_updatenr 3}distro: ${exec lsb_release -d -s | sed 's/"//g'} (${exec lsb_release -r -s})${endif}\ | |
${if_updatenr 4}up: ${uptime}${endif}\ | |
", "color":"\#DCDCCC"}, | |
{"full_text": "net:", "separator": false, "separator_block_width":3}, | |
{"full_text": "${wireless_essid wlp2s0}", "separator":false, "separator_block_width":3, "color":"\#dca3a3"}, | |
{"full_text": "${addr wlp2s0}", "color":"\#83b3a3", "separator":false, "separator_block_width":1}, | |
{"full_text": ":", "separator":false, "separator_block_width":1}, | |
{"full_text": "${exec /home/paul/bin/external-ip}", "color":"\#7f9f7f"}, | |
{"full_text": "mem:", "separator": false, "separator_block_width":3}, | |
{"full_text": "${memperc}%", "min_width":"000%", "separator": false, "separator_block_width":3, "color":"${if_match ${memperc} < 33}\#7f9f7f${else}${if_match ${memperc} > 66}\#dca3a3${else}\#c3bf9f${endif}${endif}"}, | |
{"full_text": "${mem}/${memmax}", "color":"\#83b3a3"}, | |
{"full_text": "cpu:", "separator": false, "separator_block_width":3}, | |
{"full_text": "${cpu}%", "min_width":"000%", "separator": false, "separator_block_width":3, "color":"${if_match ${cpu} < 33}\#7f9f7f${else}${if_match ${cpu} > 66}\#dca3a3${else}\#c3bf9f${endif}${endif}"}, | |
{"full_text": "${exec awk '{print $1}' /proc/loadavg}", "separator": false, "separator_block_width":3, "color":"${if_match ${exec awk '{print $1}' /proc/loadavg} < 1.0}\#7f9f7f${else}${if_match ${exec awk '{print $1}' /proc/loadavg} > 3.0}\#dca3a3${else}\#c3bf9f${endif}${endif}"}, | |
{"full_text": "${exec awk '{print $2}' /proc/loadavg}", "separator": false, "separator_block_width":3, "color":"${if_match ${exec awk '{print $2}' /proc/loadavg} < 1.0}\#7f9f7f${else}${if_match ${exec awk '{print $2}' /proc/loadavg} > 3.0}\#dca3a3${else}\#c3bf9f${endif}${endif}"}, | |
{"full_text": "${exec awk '{print $3}' /proc/loadavg}", "color":"${if_match ${exec awk '{print $3}' /proc/loadavg} < 1.0}\#7f9f7f${else}${if_match ${exec awk '{print $3}' /proc/loadavg} > 3.0}\#dca3a3${else}\#c3bf9f${endif}${endif}"}, | |
{"full_text": "bat:", "separator": false, "separator_block_width":3}, | |
{"full_text": "${battery_percent BAT0}%", "min_width":"000%", "color":"${if_match ${battery_percent BAT0} > 66}\#7f9f7f${else}${if_match ${battery_percent BAT0} < 33}\#dca3a3${else}\#c3bf9f${endif}${endif}"}, | |
{"full_text": "${time %m.%d.%Y}", "separator": false, "separator_block_width":3, "color":"\#ffcfaf"}, | |
{"full_text": "${time %I:%M %P}"} | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is an awesome config thanks alot.