Add conky files

This commit is contained in:
Gregory Trolliet 2019-10-13 16:52:14 +02:00
parent 23b44baa7a
commit da251d1f4f
3 changed files with 183 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#!/bin/bash
## Gets current track time for a bar in Conky.
## Usage: Put ${execbar /path/to/script} in your .conkyrc.
## It might be useful to use ${goto x} or ${voffset x} to adjust position, and ${color #xxxxxx} for color.
## The 'default_bar_size x y' option can be used before the TEXT section in your .conkyrc to adjust height and width.
## Requires 'bc' for calculating percentage.
if cmus-remote -Q &>/dev/null ; then
DUR=$( cmus-remote -Q | grep "duration" | cut -c10- )
POS=$( cmus-remote -Q | grep "position" | cut -c10- )
echo "($POS/$DUR)*100" | bc -l
fi

15
.config/conky/conky-volume.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
## Gets current track time for a bar in Conky.
## Usage: Put ${execbar /path/to/script} in your .conkyrc.
## It might be useful to use ${goto x} or ${voffset x} to adjust position, and ${color #xxxxxx} for color.
## The 'default_bar_size x y' option can be used before the TEXT section in your .conkyrc to adjust height and width.
## Requires 'bc' for calculating percentage.
VOL=$(pactl list sinks | grep -m 1 "front-left:" | awk -F" " '{print $5}' | cut -d "%" -f1)
echo $VOL
#if cmus-remote -Q &>/dev/null ; then
# DUR=$( cmus-remote -Q | grep "duration" | cut -c10- )
# POS=$( cmus-remote -Q | grep "position" | cut -c10- )
# echo "($POS/$DUR)*100" | bc -l
#fi

155
.config/conky/conky.conf Normal file
View file

@ -0,0 +1,155 @@
# For ideas about how to modify the conky conf, please see:
# https://github.com/Toory/Conky-config
#
##############################################
# Settings
##############################################
alignment top_right
#background yes
border_width 1
color0 0077FF
color1 991F00
color2 0000FF
color3 eb91df
color4 f2c55a
color5 a7f0e3
cpu_avg_samples 2
default_color white
default_outline_color green
default_shade_color red
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
gap_x -1920
gap_y 0
maximum_width 325
minimum_height 1080
no_buffers yes
override_utf8_locale yes
own_window yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 100
own_window_type 'normal'
#own_window_color 000000
total_run_times 0
update_interval 1
uppercase no
use_spacer right
use_xft yes
xftalpha 0.8
xftfont Bitstream Vera Sans Mono:size=8
TEXT
##############################################
#DATE
##############################################
${color0}${font sans-serif:bold:size=8}DATE ${hr 2}$color
${alignc}${voffset 10}${alignc}${font Trebuchet MS:size=28}${time %H:%M:%S}${font}
${alignc}${alignc}${font Trebuchet MS:size=8}${time %a %d %b %Y}
${alignc}Volume: ${exec ~/.config/conky/conky-volume.sh}
#% ${execbar ~/.config/conky/conky-volume.sh}
##############################################
#SYSTEM
##############################################
${color0}${font sans-serif:bold:size=8}SYSTEM ${hr 2}$color
${font sans-serif:normal:size=8}$sysname $kernel $alignr $machine
Host:$alignr$nodename
Uptime:$alignr$uptime
File System: $alignr${fs_type}
Entropy: $alignr[${entropy_perc}]%
#Packages: $alignr${execi 1.0 pacman -Q | wc --lines}
##############################################
#CPU
##############################################
${color0}${font sans-serif:bold:size=8}CPU ${hr 2}$color
${font sans-serif:normal:size=8}${execi 600 lshw | grep CPU | grep produit | awk {'print $2 $4 $6 $7'}}
Core0: ${freq 0} Mhz ${exec sensors|grep 'Core 0'|awk '{print $3}'|cut -d "." -f 1} C ${alignr}Core1: ${freq 1} Mhz ${exec sensors|grep 'Core 1'|awk '{print $3}'|cut -d "." -f 1} C
${cpugraph cpu0 25,160 ff33ff 991f00} ${alignr}${cpugraph cpu1 25,160 ff33ff 991f00}
Core2: ${freq 2} Mhz ${exec sensors|grep 'Core 2'|awk '{print $3}'|cut -d "." -f 1} C ${alignr}Core3: ${freq 3} Mhz ${exec sensors|grep 'Core 3'|awk '{print $3}'|cut -d "." -f 1} C
${cpugraph cpu2 25,160 ff33ff 991f00} ${alignr}${cpugraph cpu3 25,160 ff33ff 991f00}
${top name 1}${alignr}${top cpu 1} %
${top name 2}${alignr}${top cpu 2} %
${top name 3}${alignr}${top cpu 3} %
${top name 4}${alignr}${top cpu 4} %
${top name 5}${alignr}${top cpu 5} %
##############################################
#MEMORY
##############################################
${color0}${font sans-serif:bold:size=8}MEMORY ${hr 2}$color
${font sans-serif:normal:size=8}Ram: $alignc $mem / $memmax $alignr $memperc%
$membar
${font sans-serif:normal:size=8}Swap: $alignc $swap / $swapmax $alignr $swapperc%
$swapbar
${top_mem name 1}${alignr}${top mem 1} %
${top_mem name 2}${alignr}${top mem 2} %
${top_mem name 3}${alignr}${top mem 3} %
${top_mem name 4}${alignr}${top mem 4} %
${top_mem name 5}${alignr}${top mem 5} %
##############################################
#DISK
##############################################
${color0}${font sans-serif:bold:size=8}DISK ${hr 2}$color
#you can uncomment to add the read/write speed of system hard drive
${font sans-serif:normal:size=8} / $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
${fs_bar /}
${font sans-serif:normal:size=8} /home $alignc ${fs_used /home/} / ${fs_size /home/} $alignr ${fs_used_perc /home/}%
${fs_bar /home/}
${font sans-serif:normal:size=8} /HDD1 $alignc ${fs_used /media/HDD1/} / ${fs_size /media/HDD1/} $alignr ${fs_used_perc /media/HDD1/}%
${fs_bar /media/HDD1/}
${font sans-serif:normal:size=8} /HDD2 $alignc ${fs_used /media/HDD2/} / ${fs_size /media/HDD2/} $alignr ${fs_used_perc /media/HDD2/}%
${fs_bar /media/HDD2/}
${font sans-serif:normal:size=8} /HDD3 $alignc ${fs_used /media/HDD3/} / ${fs_size /media/HDD3/} $alignr ${fs_used_perc /media/HDD3/}%
${fs_bar /media/HDD3/}
${font sans-serif:normal:size=8} /RAGNAS $alignc ${fs_used /media/ragnas/music/} / ${fs_size /media/ragnas/music/} $alignr ${fs_used_perc /media/ragnas/music}%
${fs_bar /media/ragnas/music/}
#${voffset 2}${font sans-serif:normal:size=8}| Read of /: ${font}${font Liberation Sans:size=8}$alignr${diskio_read sda}
#${font sans-serif:normal:size=8}|----${offset 5}${color3}${diskiograph_read sda 7,000 1793d0 ffffff}${font}${color}
#${voffset 0}${font sans-serif:normal:size=8}| Write of /: ${font}${font Liberation Sans:size=8}$alignr${diskio_write sda}
#${font sans-serif:normal:size=8}|----${offset 5}${color3}${diskiograph_write sda 7,000 1793d0 ffffff}${font}${color}
#${color4}${font sans-serif:normal:size=8} Disk D $alignc ${fs_used /run/media/giux/DISCO D/} / ${fs_size /run/media/giux/DISCO D/} $alignr ${fs_used_perc /run/media/giux/DISCO D/}%
#${fs_bar /run/media/giux/DISCO D/}$color
#${color5}${font sans-serif:normal:size=8} Disk E $alignc ${fs_used /run/media/giux/DISCO E/} / ${fs_size /run/media/giux/DISCO E/} $alignr ${fs_used_perc /run/media/giux/DISCO E/}%
#${fs_bar /run/media/giux/DISCO E/}$color
##############################################
#NETWORK
##############################################
${color0}${font sans-serif:bold:size=8}NETWORK ${hr 2}$color
${font sans-serif:normal:size=8}Private ${if_existing /proc/net/route enp0s31f6}${addr enp0s31f6}${else}${if_existing /proc/net/route enp0s31f6}${addr enp0s31f6}${else}Network disconnected${endif}${endif}
Public v4 ${execi 600 curl -s ipv4.icanhazip.com}
Public v6 ${execi 600 curl -s ipv6.icanhazip.com}
Down: ${downspeed enp0s31f6}/s $alignr Up: ${upspeed enp0s31f6}/s
Total: ${totaldown enp0s31f6} $alignr Total: ${totalup enp0s31f6}
${downspeedgraph enp0s31f6 25,160 99cc33 006600}$alignr${upspeedgraph enp0s31f6 25,160 ffcc00 ff0000}
#${color0}${font sans-serif:bold:size=8}GEOIP ${hr 2}$color
##############################################
#GEOIP
##############################################
#${font sans-serif:normal:size=8}Ping: $alignr${execi 450 ping www.google.com -c 1 | grep time= | rev | cut -c -6 | rev}
#${font sans-serif:normal:size=8}country $alignr${execi 450 curl ipinfo.io/country}
#${font sans-serif:normal:size=8}region $alignr${execi 450 curl ipinfo.io/region}
#${font sans-serif:normal:size=8}city $alignr${execi 450 curl ipinfo.io/city}
#${font sans-serif:normal:size=8}coords $alignr${execi 450 curl ipinfo.io/loc}
##############################################
#MUSIC
#Credit to Reddit user: /u/Rioku_jk
##############################################
${color0}${font sans-serif:bold:size=8}MUSIC ${hr 2}$color
$font${if_running cmus}${exec cmus-remote -Q 2>/dev/null | grep 'tag artist ' | cut -d " " -f 3-}
${exec cmus-remote -Q 2>/dev/null | grep 'date' | cut -d " " -f 3-} - ${exec cmus-remote -Q 2>/dev/null | grep 'tag album ' | cut -d " " -f 3-}
${exec cmus-remote -Q | grep tracknumber | cut -d " " -f 3}. ${exec cmus-remote -Q 2>/dev/null | grep 'title' | cut -d " " -f 3-}
${execbar ~/.config/conky/cmus-conky-timebar.sh}${color white}
${alignc}${exec cmus-remote -Q | grep 'position'| awk '{print strftime("%M:%S", $2, 1)}'} / ${exec cmus-remote -Q | grep 'duration' | awk '{print strftime("%M:%S", $2, 1)}'}
${else}$alignc Nothing is playing at the moment.
${endif}
${color DimGray}${execi 120 fortune -a -n 500 -s | fold -s -w54}$color