Last active
August 29, 2015 14:10
-
-
Save mubeeniqbal/80b22b024fee53f11959 to your computer and use it in GitHub Desktop.
Config file for Conky.
This file contains 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 | |
# Keep digits at their constant positions. | |
pad_percents 3 | |
# Update interval (seconds) | |
update_interval 0.5 | |
# 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 UTF-8. Note that UTF-8 support required XFT. | |
override_utf8_locale no | |
# Number of CPU samples to average. | |
# Set 1 to disable averaging | |
cpu_avg_samples 2 | |
# Stuff after "TEXT" will be formatted on screen. | |
TEXT | |
# JSON for i3bar | |
[ | |
# Hostname | |
#{ "full_text" : " [${nodename}]", "color" : "\#aaff00" }, | |
# Current user | |
#{ "full_text" : " [${exec whoami}]", "color" : "\#aaff00" }, | |
# Free disk space at / | |
{ "full_text" : " [${fs_free /}]", "color" : "\#aaff00" }, | |
# Free disk space at /home | |
{ "full_text" : " [${fs_free /home}]", "color" : "\#aaff00" }, | |
# Free disk space at /tmp | |
{ "full_text" : " /tmp [${fs_free /tmp}]", "color" : "\#aaff00" }, | |
# Free disk space at /dev/shm | |
{ "full_text" : " /dev/shm [${fs_free /dev/shm}]", "color" : "\#aaff00" }, | |
# System memory usage | |
{ "full_text" : " [${memperc}%]", "color" : ${if_match ${memperc} < 80} "\#aaff00" ${else} "\#ff0000" ${endif} }, | |
# Ethernet connectivity check | |
${if_match "${addr enp7s0}"!="No Address"} | |
# Ethernet IP address | |
{ "full_text" : " [${addr enp7s0}]", "color" : "\#aaff00" }, | |
# Ethernet upload speed | |
{ "full_text" : " [${upspeed enp7s0}]", "color" : "\#aaff00" }, | |
# Ethernet download speed | |
{ "full_text" : " [${downspeed enp7s0}]", "color" : "\#aaff00" }, | |
# End ethernet connectivity check | |
${endif} | |
# Wireless connectivity check | |
${if_match "${addr wlp8s0}"!="No Address"} | |
# Wireless IP address | |
{ "full_text" : " [${addr wlp8s0}]", "color" : "\#aaff00" }, | |
# Wireless upload speed | |
{ "full_text" : " [${upspeed wlp8s0}]", "color" : "\#aaff00" }, | |
# Wireless download speed | |
{ "full_text" : " [${downspeed wlp8s0}]", "color" : "\#aaff00" }, | |
# End wireless connectivity check | |
${endif} | |
# Battery status | |
{ "full_text" : " \ | |
${if_match ${battery_percent BAT1} >= 90}\ | |
\ | |
${else}${if_match ${battery_percent BAT1} >= 40}\ | |
\ | |
${else}${if_match ${battery_percent BAT1} >= 10}\ | |
\ | |
${else}\ | |
\ | |
${endif}\ | |
${endif}\ | |
${endif} [${battery_percent BAT1}%\ | |
${if_match ${execi 2 cat /sys/class/power_supply/ACAD/online}==1}\ | |
\ | |
${endif}\ | |
]", "color" : "\#aaff00" }, | |
# TODO(mubeeniqbal): Calculate battery status color using battery capacity/percentage. Use awk for floating point arithmetic. | |
#{ "full_text" : " [batt: ${execi 2 cat /sys/class/power_supply/BAT1/capacity}]", "color" : "\#aaff00" }, | |
# TODO(mubeeniqbal): Add backlight brightness. | |
#{ "full_text" : " [backlight: ${execi 2 cat /sys/class/backlight/intel_backlight/brightness}]", "color" : "\#aaff00" }, | |
# CPU usage | |
{ "full_text" : " [${cpu cpu0}%]", "color" : "\#aaff00" }, | |
# Load | |
{ "full_text" : " [${loadavg}]", "color" : "\#aaff00" }, | |
# Date | |
#{ "full_text" : " [${time %Y-%m-%d}]", "color" : "\#aaff00" }, | |
# Time | |
#{ "full_text" : " [${time %H:%M}]", "color" : "\#aaff00" }, | |
# Date and time | |
{ "full_text" : " [${time %Y-%m-%d %H:%M}]", "color" : "\#aaff00" }, | |
# Volume | |
{ "full_text" : " \ | |
${if_match "${exec amixer get Master | grep -om1 "\[on\]"}" == "[on]"}\ | |
${if_match ${exec amixer get Master | grep -om1 "\[.*%\]" | tr -d [%]} >= 50}\ | |
\ | |
${else}\ | |
\ | |
${endif}${else}\ | |
\ | |
${endif} [${exec printf %3d `exec amixer get Master | grep -om1 "\[.*%\]" | tr -d [%]`}%]", "color" : "\#aaff00" } | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment