Skip to content

Instantly share code, notes, and snippets.

@yochananmarqos
Last active May 10, 2018 15:01
Show Gist options
  • Save yochananmarqos/7fbe43d817ee3db933323f46d22896e3 to your computer and use it in GitHub Desktop.
Save yochananmarqos/7fbe43d817ee3db933323f46d22896e3 to your computer and use it in GitHub Desktop.
conky WIP
-- Based on Arch News Conky: https://github.com/tr37ion/arch_news_conky
-- ConkyColors font: https://github.com/helmuthdu/conky_colors/tree/master/fonts/conkycolors
conky.config = {
double_buffer = true,
own_window = true,
own_window_type = 'panel',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_argb_visual = true,
own_window_argb_value = 255,
temperature_unit = 'fahrenheit',
-- Borders
draw_borders = false,
border_inner_margin = 5,
-- Contour
draw_outline = false,
-- Shades
draw_shades = false,
default_shade_color = '#000000',
-- Position
gap_y = 0,
gap_x = 10,
-- Alignment
alignment = 'bottom_left',
-- Interval
update_interval = 5,
update_interval_on_battery = 10,
-- Colors
default_color = '#FFFFFF',
color1 = '#005391',
color2 = '#777777',
color3 = '#FFFFFF',
color4 = '#CCCCCC',
color5 = '#109567',
-- Font
use_xft = true,
font = 'Noto Sans UI:pixelsize=10',
-- Text
use_spacer = left,
pad_percents = 3,
-- lua_load = ~/.conky/conky_lua_scripts.lua,
-- Text alpha when using Xft
-- xftalpha = 10
-- Graphs
-- default_graph_height = 25,
-- default_graph_width = 0,
-- Gauges
-- default_gauge_height = 25,
-- default_gauge_width = 40,
-- to prevent window from moving
-- use_spacer = 'none',
minimum_width = 0, minimum_height = 24,
maximum_width = 1366,
default_bar_width = 92, default_bar_height = 6,
--${color2}Temp: ${color3}${execi acpi -t }°C ${color5}| \
--${color2}CPU1: ${color3}${cpu cpu1}% \
--${color2}CPU2: ${color3}${cpu cpu2}% \
--${color2}CPU3: ${color3}${cpu cpu3}% \
--${color2}CPU4: ${color3}${cpu cpu4}% ${color5} | \
--${color2}Swap: ${color3}${swapperc}% ${color5} | \
--Install 'lm_sensors' and exec 'sensors-detect' then run 'sensors' to get your IDs | \
--${color2}MB Temp: $alignr ${execi 30 sensors | grep 'Physical id 0:' | cut -c17-18}°C ${color5} | \
--${color2}GPU Intel Temp: $alignr ${execi 30 sensors | grep 'Core 0:' | cut -c16-17}°C ${color5} | \
--${color2}GPU NV2 Temp: $alignr ${execi 30 sensors | grep 'Core 1:' | cut -c16-17}°C ${color5} | \
--${color2}CPU1: ${color1}${voffset 1}${cpugraph cpu1 8,50} ${color2} ${cpu cpu1}% ${voffset -1} \
--${color2}CPU2: ${color1}${voffset 1}${cpugraph cpu2 8,50} ${color2} ${cpu cpu2}% ${voffset -1} \
--${color2}CPU3: ${color1}${voffset 1}${cpugraph cpu3 8,50} ${color2} ${cpu cpu3}% ${voffset -1} \
--${color2}CPU4: ${color1}${voffset 1}${cpugraph cpu4 8,50} ${color2} ${cpu cpu4}% ${voffset -1} ${color5}|
--${color2}Battery: ${color3}${battery_short BAT1}
--${if_match "${battery_percent BAT1}" != "15"}
--${else}${color3}${battery_percent BAT1}%${endif} ${color5}${voffset 1}${battery_bar 6,30 BAT1} ${color3}${voffset -1}${battery_time BAT1} ${color5}| \
--${if_match "$battery_short"=="F"}${image ~/conky/full.png -p 209,491}${else}${if_match "$battery_short"<"D"}${image ~/conky/charging.png -p 209,491}$else${image ~/conky/discharging.png -p 209,491}${endif}
--${if_match ${wireless_link_qual wlan0} < 31}${color orange}bad$color$else${if_match ${wireless_link_qual wlan0} < 51}${color yellow}weak
};
conky.text = [[
${color2}${voffset 3}${font ConkyColors:size=12}e${font}${voffset -3} ${color5}${voffset 1}${cpugraph cpu1 8,50}${voffset -1} ${color3}${cpu cpu1}% \
${color5}${voffset 1}${cpugraph cpu2 8,50}${voffset -1} ${color3}${cpu cpu2}% \
${color5}${voffset 1}${cpugraph cpu3 8,50}${voffset -1} ${color3}${cpu cpu3}% \
${color5}${voffset 1}${cpugraph cpu4 8,50}${voffset -1} ${color3}${cpu cpu4}% \
${color2}Freq: ${color3}${freq_g} GHz ${color5}| \
${color2}Temp: ${color3}${execi 30 echo "`sensors | grep 'Core 0:' | cut -c16-17` *9/5+32" | bc}°F ${color5}| \
${color2}Battery: ${color3}${battery_short BAT1} ${color3} ${color5}${voffset 1}${battery_bar 6,30 BAT1} ${color3}${voffset -1}${battery_time BAT1} ${color5}| \
${color2}RAM: ${color3}${memperc}% ${color5}| \
${color2}Swap: ${color3}${swapperc}% ${color5}| \
${color2}${voffset -2}${font ConkyColors:size=12}i${font} ${color2}${voffset -4}${color3}${fs_used_perc /root}%${color5} | \
${color2}Uptime: ${color3}${uptime_short} ${color5}| \
${color2}${voffset -3}${font ConkyColors:size=12}k${font} ${color3}${voffset -3}${wireless_bitrate wlp2s0} ${color5} | \
${color2}${font ConkyColors:size=10}w${font} ${color5}${voffset -2}${downspeedgraph wlp2s0 8,20} ${color3}${voffset -1}${downspeed wlp2s0} \
${color2}${voffset -1}${font ConkyColors:size=10}x${font} ${color5}${voffset -1}${upspeedgraph wlp2s0 8,20} ${color3}${voffset -1}${upspeed wlp2s0} ${color5} | \
${color2}Top: ${color3}${top name 1} | ${color3}${top_mem name 1}
]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment