1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 23:12:32 +01:00
eoli3n-dotfiles/.i3/conkyrc-top
2016-12-27 19:40:18 +01:00

217 lines
11 KiB
Plaintext

#!/usr/bin/conky
out_to_x no
own_window no
out_to_console yes
background no
max_text_width 0
# Update interval in seconds
update_interval 1.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
# Stuff after 'TEXT' will be formatted on screen
# JSON for i3bar
TEXT
[
#IF INTERNET CONNECTED PART
${if_match "${execi 120 ping -q -w 2 -c 1 176.34.135.167 > /dev/null && echo ok}"=="ok"}
# TEST UPGRADES
${if_match "${execi 300 (checkupdates;cower -u;pip list --outdated --timeout 1 --retries 1) | wc -l }"!="0"}\
#LOGO
{"full_text":"[","color":"\#dc322f","separator":false,"separator_block_width":3},\
#PACMAN
${if_match "${execi 300 checkupdates | wc -l }"!="0"}\
{"full_text":"pac${execi 200 checkupdates | wc -l}","color":"\#dc322f","separator":false,"separator_block_width":2},\
$endif
#AUR
${if_match "${execi 300 cower -u | wc -l }"!="0"}\
{"full_text":"aur${execi 1900 cower -u | wc -l}","color":"\#F15D25","separator":false,"separator_block_width":2},\
$endif
#PIP
${if_match "${execi 300 pip list --outdated --timeout 1 --retries 1 | wc -l }"!="0"}\
{"full_text":"pip${execi 1900 pip list --outdated --timeout 1 --retries 1| wc -l}","color":"\#E7AD00","separator":false,"separator_block_width":2},\
$endif
{"full_text":"]","color":"\#dc322f","separator":false,"separator_block_width":3},\
$endif
$endif
#SEPARATOR
{"full_text":" ","separator":false,"separator_block_width":15},\
#VOLUME
${if_match "${exec amixer get 'Master' | grep '\[on\]' | grep Left | cut -d"[" -f2 | cut -d"%" -f1}" == "" }\
{"full_text":" ","color":"\#dc322f","separator":false,"separator_block_width":6},\
${else}
${if_match ${exec amixer get 'Master' | grep '\[on\]' | grep Left | cut -d"[" -f2 | cut -d"%" -f1} >= 75 }\
{"full_text":"  ${exec amixer get 'Master' | grep '\[on\]' | grep Left | cut -d"[" -f2 | cut -d"%" -f1}%","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
${else}
${if_match ${exec amixer get 'Master' | grep '\[on\]' | grep Left | cut -d"[" -f2 | cut -d"%" -f1} >= 50 }\
{"full_text":"  ${exec amixer get 'Master' | grep '\[on\]' | grep Left | cut -d"[" -f2 | cut -d"%" -f1}%","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
${else}
{"full_text":"  ${exec amixer get 'Master' | grep '\[on\]' | grep Left | cut -d"[" -f2 | cut -d"%" -f1}%","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
$endif
$endif
$endif
#SEPARATOR
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
#BACKLIGHT
{"full_text":"  ${exec light -G | cut -d"." -f1}","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
#SEPARATOR
#WIRED
${if_match "${addr br0}" != "No Address" }\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
${if_match "${exec ip a | grep -A 1 ' br0:' | grep ether | awk '{print $2}'}" == "${exec cat ~/.i3/mac_orig}" }\
{"full_text":"ORIG  ${addr br0}","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
${else}
{"full_text":" ${exec ip a | grep -A 1 ' br0:' | grep ether | awk '{print $2}'}  ${addr br0}","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
$endif
$endif
#WIFI
${if_match "${wireless_essid wlp2s0}" != "off/any" }\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
${if_match ${wireless_link_qual_perc wlp2s0} >= 75 }\
{"full_text":"${wireless_essid wlp2s0}","color":"\#2aa198","separator":false,"separator_block_width":6},\
${else}
${if_match ${wireless_link_qual_perc wlp2s0} <= 25 }\
{"full_text":"${wireless_essid wlp2s0}","color":"\#dc322f","separator":false,"separator_block_width":6},\
${else}
{"full_text":"${wireless_essid wlp2s0}","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
$endif
$endif
$endif
#VPN CONNECTED
${if_match "${exec ip address show | grep tun}" != "" }\
{"full_text":"  VPN","color":"\#F15D25","separator":false,"separator_block_width":6},\
$endif
#TOR CONNECTED
${if_match "${exec systemctl status tor | grep 'active (running)'}" != "" }\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
{"full_text":" TOR${execi 10 proxychains wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1}","color":"\#F15D25","separator":false,"separator_block_width":6},\
$endif
#SEPARATOR
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
#BATTERY
${if_match "${exec cat /sys/class/power_supply/BAT0/status}" == "Charging" }\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_percent BAT0}%","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
${else}
${if_match "${exec cat /sys/class/power_supply/BAT0/status}" != "Full" }\
${if_match ${battery_percent BAT0} >= 80}\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_percent BAT0}%","color":"\#2aa198","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_time BAT0}","color":"\#2aa198","separator":false,"separator_block_width":6},\
${else}
${if_match ${battery_percent BAT0} >= 50}\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_percent BAT0}%","color":"\#2aa198","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_time BAT0}","color":"\#2aa198","separator":false,"separator_block_width":6},\
${else}
${if_match ${battery_percent BAT0} >= 30}\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_percent BAT0}%","color":"\#2aa198","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_time BAT0}","color":"\#2aa198","separator":false,"separator_block_width":6},\
${else}
${if_match ${battery_percent BAT0} >= 10}\
{"full_text":" ","color":"\#E56C08","separator":false,"separator_block_width":6},\
{"full_text":"${battery_percent BAT0}%","color":"\#E56C08","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_time BAT0}","color":"\#E56C08","separator":false,"separator_block_width":6},\
${else}
{"full_text":" ","color":"\#dc322f","separator":false,"separator_block_width":6},\
{"full_text":"${battery_percent BAT0}%","color":"\#dc322f","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
{"full_text":" ","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_time BAT0}","color":"\#dc322f","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":6},\
$endif
$endif
$endif
$endif
$endif
$endif
#SEPARATOR
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":15},\
#DATE
#{"full_text":"","color":"\#268bd2","separator":false,"separator_block_width":0},\
#{"full_text":" ${time %d}","color":"\#073642","background":"\#268bd2","separator":false,"separator_block_width":0},\
#{"full_text":"/","color":"\#073642","background":"\#268bd2","separator":false,"separator_block_width":0},\
#{"full_text":"${time %m}","color":"\#073642","background":"\#268bd2","separator":false,"separator_block_width":0},\
#{"full_text":"/","color":"\#073642","background":"\#268bd2","separator":false,"separator_block_width":0},\
#{"full_text":"${time %Y}","color":"\#073642","background":"\#268bd2","separator":false,"separator_block_width":0},\
#{"full_text":" ","color":"\#073642","background":"\#268bd2","separator":false,"separator_block_width":0},\
#TIME
#{"full_text":" ${time %H:%M:%S}","color":"\#268bd2","background":"\#073642","separator":false,"separator_block_width":0},\
#{"full_text":" ","background":"\#073642","separator":false,"separator_block_width":6}\
#DATE
{"full_text":"${time %d}","color":"\#c5c5c5","separator":false,"separator_block_width":0},\
{"full_text":"/","color":"\#2aa198","separator":false,"separator_block_width":0},\
{"full_text":"${time %m}","color":"\#c5c5c5","separator":false,"separator_block_width":0},\
{"full_text":"/","color":"\#2aa198","separator":false,"separator_block_width":0},\
{"full_text":"${time %Y}","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":6},\
#TIME
{"full_text":"${time %H:%M:%S}","color":"\#c5c5c5","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#2aa198","separator":false,"separator_block_width":6}\
],