1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-23 07:21:58 +01:00
eoli3n-dotfiles/.i3/conkyrc-top
2016-03-30 01:01:01 +02:00

185 lines
8.7 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"}
#PACMAN
${if_match "${execi 200 checkupdates | wc -l}"!="0"}\
{"full_text":" ${execi 200 checkupdates | wc -l}","color":"\#dc322f","separator":false,"separator_block_width":6},\
#SEPARATOR
{"full_text":" ","color":"\#037352","separator":false,"separator_block_width":6},\
$endif
#AUR
${if_match "${execi 1900 cower -u | wc -l}"!="0"}\
{"full_text":" ${execi 1900 cower -u | wc -l}","color":"\#F15D25","separator":false,"separator_block_width":0},\
#SEPARATOR
{"full_text":" ","color":"\#037352","separator":false,"separator_block_width":15},\
$endif
#WEATHER
{"full_text":"${execi 1800 ~/.i3/weather.sh | cut -d' ' -f1} ","color":"\#C5C5C5","separator":false,"separator_block_width":0},\
{"full_text":" ${execi 1800 ~/.i3/weather.sh | cut -d' ' -f2}","color":"\#4285F4","separator":false,"separator_block_width":0},\
{"full_text":" ${execi 1800 ~/.i3/weather.sh | cut -d' ' -f3}","color":"\#C5C5C5","separator":false,"separator_block_width":0},\
{"full_text":" ","color":"\#037352","separator":false,"separator_block_width":20},\
$endif
#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":"\#037352","separator":false,"separator_block_width":15},\
#BACKLIGHT
{"full_text":"  ${exec xbacklight -get | cut -d"." -f1}","color":"\#C5C5C5","separator":false,"separator_block_width":6},\
#SEPARATOR
{"full_text":" ","color":"\#037352","separator":false,"separator_block_width":15},\
#WIRED
${if_match "${addr br0}" != "No Address" }\
${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":"\#C5C5C5","separator":false,"separator_block_width":6},\
${if_match ${wireless_link_qual_perc wlp2s0} >= 75 }\
{"full_text":"${wireless_essid wlp2s0}","color":"\#037352","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":" 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":"\#073642","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" }\
{"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 ${battery_percent BAT0} >= 80}\
{"full_text":" ","color":"\#C5C5C5","separator":false,"separator_block_width":6},\
{"full_text":"${battery_percent BAT0}%","color":"\#073642","separator":false,"separator_block_width":6},\
{"full_text":"[${battery_time BAT0}]","color":"\#073642","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":"\#073642","separator":false,"separator_block_width":6},\
{"full_text":"[${battery_time BAT0}]","color":"\#073642","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":"\#073642","separator":false,"separator_block_width":6},\
{"full_text":"[${battery_time BAT0}]","color":"\#073642","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":"[${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":"[${battery_time BAT0}]","color":"\#dc322f","separator":false,"separator_block_width":6},\
$endif
$endif
$endif
$endif
$endif
$endif
#DATE
{"full_text":" ","color":"\#073642","separator":false,"separator_block_width":6},\
{"full_text":"${time %d}","color":"\#C5C5C5","separator":false,"separator_block_width":0},\
{"full_text":"/","color":"\#073642","separator":false,"separator_block_width":0},\
{"full_text":"${time %m}","color":"\#C5C5C5","separator":false,"separator_block_width":0},\
{"full_text":"/","color":"\#073642","separator":false,"separator_block_width":0},\
{"full_text":"${time %Y}","color":"\#C5C5C5","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#073642","separator":false,"separator_block_width":6},\
#TIME
{"full_text":"${time %H:%M:%S}","color":"\#C5C5C5","separator":false,"separator_block_width":6},\
{"full_text":" ","color":"\#073642","separator":false,"separator_block_width":6}\
],