Skip to content

Instantly share code, notes, and snippets.

@matmunn
Last active February 9, 2019 06:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save matmunn/9143677 to your computer and use it in GitHub Desktop.
Conky Configuration
conky.config = {
alignment='top_left',
background=true,
border_width=1,
cpu_avg_samples=2,
default_color='black',
default_outline_color='white',
default_shade_color='white',
double_buffer=true,
draw_borders=false,
draw_graph_borders=true,
draw_outline=false,
draw_shades=false,
extra_newline=false,
font="DejaVu Sans Mono:size=10",
gap_y=0,
minimum_width=350,
minimum_height=5,
net_avg_samples=2,
out_to_console=false,
out_to_stderr=false,
own_window=true,
own_window_argb_value=255,
own_window_argb_visual=true,
own_window_hints='undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_transparent=true,
own_window_type='normal',
show_graph_range=false,
show_graph_scale=false,
stippled_borders=0,
update_interval=1.0,
uppercase=false,
use_spacer='none',
use_xft=true
};
conky.text = [[
${color #FFFFFF}
$nodename_short | macOS ${execi 86400 sw_vers | awk 'NR == 2 { print $2 }'}
$hr
Uptime: $uptime
Frequency: ${freq_g} GHz
RAM Usage: $mem/$memmax - $memperc% ${membar 6}
Swap Usage: $swap/$swapmax - $swapperc% ${swapbar 6}
$hr
CPU:
Usage: $cpu% ${cpubar}
${voffset 1}${cpugraph cpu0}
Processes: $processes Running:$running_processes
$hr
File systems:
/ ${goto 80}${fs_used /}/${fs_size /} ${goto 220}${fs_bar 6 /}
$hr
Networking: ${goto 180}Ext. ${texeci 3600 curl ipinfo.io/ip}
LAN (${addr en6})
Up: ${upspeed en6} ${goto 180}Down: ${downspeed en6}
${upspeedgraph en6 16,150}${goto 180}${downspeedgraph en6 16,150}
WLAN (${addr en0})
Up: ${upspeed en0} ${goto 180}Down: ${downspeed en0}
${upspeedgraph en0 16,150}${goto 180}${downspeedgraph en0 16,150}
$hr
Name PID CPU% MEM%
${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
]]
conky.config = {
alignment='top_left',
background=true,
border_width=1,
cpu_avg_samples=2,
default_color='black',
default_outline_color='white',
default_shade_color='white',
double_buffer=true,
draw_borders=false,
draw_graph_borders=true,
draw_outline=false,
draw_shades=false,
extra_newline=false,
font="DejaVu Sans Mono:size=10",
gap_y=0,
minimum_width=350,
minimum_height=5,
net_avg_samples=2,
out_to_console=false,
out_to_stderr=false,
own_window=true,
own_window_argb_value=255,
own_window_argb_visual=true,
own_window_hints='undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_transparent=true,
own_window_type='normal',
show_graph_range=false,
show_graph_scale=false,
stippled_borders=0,
update_interval=1.0,
uppercase=false,
use_spacer='none',
use_xft=true
};
conky.text = [[
${color #FFFFFF}
$nodename_short | macOS ${execi 86400 sw_vers | awk 'NR == 2 { print $2 }'}
$hr
Uptime: $uptime
Frequency: ${freq_g} GHz
RAM Usage: $mem/$memmax - $memperc% ${membar 6}
Swap Usage: $swap/$swapmax - $swapperc% ${swapbar 6}
$hr
CPU:
Usage: $cpu% ${cpubar}
${voffset 1}${cpugraph cpu0}
Processes: $processes Running:$running_processes
$hr
File systems:
/ ${goto 80}${fs_used /}/${fs_size /} ${goto 220}${fs_bar 6 /}
$hr
Networking: ${goto 180}Ext. ${texeci 3600 curl ipinfo.io/ip}
LAN (${addr en6})
Up: ${upspeed en6} ${goto 180}Down: ${downspeed en6}
${upspeedgraph en6 16,150}${goto 180}${downspeedgraph en6 16,150}
WLAN (${addr en0})
Up: ${upspeed en0} ${goto 180}Down: ${downspeed en0}
${upspeedgraph en0 16,150}${goto 180}${downspeedgraph en0 16,150}
$hr
Name PID CPU% MEM%
${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
]]
#!/bin/bash
a=`dmesg | grep "smpboot: CPU0:"`;
strindex() {
x="${1%%$2*}"
[[ $x = $1 ]] && echo -1 || echo ${#x}
}
b=`strindex "$a" "@"`;
c=${a:b+2:4}
echo $c;
exit 0
@matmunn
Copy link
Author

matmunn commented Feb 21, 2014

I wrote a small script to get my max CPU freq to compare it against the current speed. For me this script lives in /usr/local/bin.

I've also recently purchased a Microsoft Surface Pro and put Ubuntu Gnome on it. The conky file for this is also above, with a few minor tweaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment