To jest mój .conkyrc
Kod: Zaznacz cały
# the list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
# set to yes if you want Conky to be forked in the background
background yes
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
font 6x10
#font 7x10
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
# Use Xft?
use_xft yes
# Xft font when Xft is enabled
xftfont Monospace:size=8
# Text alpha when using Xft
xftalpha 0.8
# Print everything to stdout?
# out_to_console no
# Print everything to console?
# out_to_console no
# 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
# Create own window instead of using desktop (required in nautilus)
own_window yes
# If own_window is yes, you may use type normal, desktop or override
own_window_type normal
# Use pseudo transparency with own_window?
own_window_transparent yes
# If own_window_transparent is set to no, you can set the background colour here
own_window_colour black
# If own_window is yes, these window manager hints may be used
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_hints below,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 310 310
# Draw shades?
draw_shades yes
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Draw borders around graphs
draw_graph_borders yes
# Stippled borders?
stippled_borders 2
# border margins
border_inner_margin 5
# border width
border_width 5
# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color black
own_window_argb_visual yes
#own_window_argb_value 265
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment none
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 85
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer yes
TEXT
${color yellow}U B U N T U 17.04
${color red}Hostname: $nodename
${color goldenrod}Linux Kernel: $kernel
${color green}CPU: Intel Core i5-6200U $freq(MHz)
$color$stippled_hr
${color}CPU Historia: ${color darkgreen}${cpugraph 25,0 0000ff 00ff00}
${color}CPU Użycie:${color magenta2} $cpu% ${cpubar 5,0}
${color}CPU Temp: ${color red}${hwmon temp 1}
${color}RAM Użycie:${color green} $mem ($memperc%) ${membar 5,0}
${color}SWAP Użycie: ${color orange}${swap}
${if_match "$battery" != ""}
${color}Bateria: ${color DeepSkyBlue}$battery_short ${battery_bar 5,0}
$color$stippled_hr
$alignc${color yellow}Procesy:${color red} $processes ${color yellow}Pracuje:${color red} $running_processes
$alignc${color}(top 5 według użycia CPU)
${color green} NAZWA ${color goldenrod} PID CPU% RAM%
${color} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
$alignc${color}(top 5 według użycia RAM)
${color green} NAZWA ${color cyan} PID RAM% CPU%
${color} ${top_mem name 1} ${top_mem pid 1} ${top_mem mem 1} ${top_mem cpu 1}
${color} ${top_mem name 2} ${top_mem pid 2} ${top_mem mem 2} ${top_mem cpu 2}
${color} ${top_mem name 3} ${top_mem pid 3} ${top_mem mem 3} ${top_mem cpu 3}
${color} ${top_mem name 4} ${top_mem pid 4} ${top_mem mem 4} ${top_mem cpu 4}
${color} ${top_mem name 5} ${top_mem pid 5} ${top_mem mem 5} ${top_mem cpu 5}
$color$stippled_hr
$alignc${color cyan}Czas pracy systemu:${color orange} $uptime
${color green}/ ${fs_used /} ${fs_size /} ${fs_used_perc /}% ${goto 190} ${fs_bar /}
03 ${fs_used /mnt/03} ${fs_size /mnt/03} ${fs_used_perc /mnt/03}% ${goto 190} ${fs_bar /mnt/03}
04 ${fs_used /mnt/04} ${fs_size /mnt/04} ${fs_used_perc /mnt/04}% ${goto 190} ${fs_bar /mnt/04}
08 ${fs_used /mnt/08} ${fs_size /mnt/08} ${fs_used_perc /mnt/08}% ${goto 190} ${fs_bar /mnt/08}
#09 ${fs_used /mnt/09} ${fs_size /mnt/09} ${fs_used_perc /mnt/09}% ${goto 190} ${fs_bar /mnt/09}
10 ${fs_used /mnt/10} ${fs_size /mnt/10} ${fs_used_perc /mnt/10}% ${goto 190} ${fs_bar /mnt/10}
11 ${fs_used /mnt/11} ${fs_size /mnt/11} ${fs_used_perc /mnt/11}% ${goto 190} ${fs_bar /mnt/11}
12 ${fs_used /mnt/12} ${fs_size /mnt/12} ${fs_used_perc /mnt/12}% ${goto 190} ${fs_bar /mnt/12}
13 ${fs_used /mnt/13} ${fs_size /mnt/13} ${fs_used_perc /mnt/13}% ${goto 190} ${fs_bar /mnt/13}
$color$stippled_hr
${color green}Pobieranie: ${color}${alignr}${downspeedf wlp2s0} KiB/s
${color red}Wysyłanie: ${color}${alignr}${upspeedf wlp2s0} KiB/s
$color$stippled_hr
${color yellow}${execi 60 ~/.conky/gmail}
Kilka uwag. Wszystko to, co ma być wyświetlane, znajduje się poniżej wiersza TEXT. Musisz go wyedytować aby dostosować do swoich potrzeb np. punkty montowania itp. Zauważ, że jeśli dokonasz zmiany zawartości pliku i go zapiszesz, to conky na chwilę zniknie z pulpitu i po chwili się pojawi już ze zmianami.
Musisz zmienić urządzenie sieciowe, bo u mnie jest wlp2s0, u ciebie pewnie inaczej ( sprawdź poleceniem iwconfig). Możesz zmieniać kolory czcionek, rodzaj czcionki itp. Ja korzystam z poczty gmail, więc jeśli chcesz aby conky sprawdzał pocztę, pobierz sobie ten plik o nazwie gmail:
Kod: Zaznacz cały
#!/bin/bash
gmail_login="tutajwpiszswóllogindogmail" #login do skrzyki
gmail_password="tutajwpiszhasłodogmail" #hasło do konta
dane="$(wget -q --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \
--no-check-certificate | grep 'fullcount' \
| sed -e 's/.*<fullcount>//;s/<\/fullcount>.*//' 2>/dev/null)"
if [ -z "$dane" ]; then
echo "Błąd połączenia!"
else
echo "Wiadomości na GMail: $dane"
fi
Ten plik też musisz wyedytować aby wpisać w nim swój login i swoje hasło do gmail. Plik musi mieć prawa wykonywalnoci i powinien się znajdować w katalogu o nazwie .conky, a ten w twoim katalogu domowym. W katalogu .conky umieść też plik wykonywalny o nazwie conky i zawartości:
Następnie do autostartu dodaj plik conky znajdujący się w ukrytym katalogu .conky.