What zcot said.. and also, if you have 2 commands that do the same thing, then time them and see which one is the fastest. time <command>
And for the script i gave you, remove the >> "$tmpfile" behind the echo's and you get direct output.
Also if you look closely in the script you see that it needs a tempfiles folder to work..
CODE: SELECT ALL
echo -e "$line1"
echo -e "$line2"
echo -e "$line3"
echo -e "$line4"
echo -e "$line5"
echo -e "$line6"
echo -e "$line7"
echo -e "$line8"
Somehow I managed to miss this entire post. I just realized it was there. I made a tempfiles directory inside .conky/Minimalis\ Conky and I did the edit of the bash file:
monitors.sh
Code: Select all
#!/bin/bash
dump="./tempfiles/dmidecode.dump"
tmpfile="./tempfiles/mem.tmp"
sudo dmidecode --type memory > "$dump"
line1=$(cat "$dump" | grep "Number Of Devices" | sed 's/^[ \t]*//')
line2=$(cat "$dump" | awk '/Memory Device/{flag=1; next} flag && $1=="Size:"{print "Size:", $2; exit}')
line3=$(cat "$dump" | grep "Maximum Capacity" | sed 's/^[ \t]*//')
line4=$(cat "$dump" | awk '/Memory Device/{flag=1; next} flag && $1=="Type:"{print "Type:", $2; exit}')
line5=$(cat "$dump" | awk '/Memory Device/{flag=1; next} flag && $1=="Speed:"{print "Speed:", $2" "$3; exit}')
line6=$(cat "$dump" | grep -m1 "Configured Voltage" | sed 's/^[[:blank:]]*//')
line7=$(cat "$dump" | awk '/Memory Device/ {flag=1; next} flag && $1=="Form" && $2=="Factor:" {print "Form Factor:", $3; exit}')
line8=$(cat "$dump" | awk '/Memory Device/,/Type Detail/ {if ($0 ~ /Type Detail/) {print "Type Detail:", $3; exit}}') #'
echo -e "$line1"
echo -e "$line2"
echo -e "$line3"
echo -e "$line4"
echo -e "$line5"
echo -e "$line6"
echo -e "$line7"
echo -e "$line8"
and my conky.conf to execute it:
Code: Select all
conky.config = {
alignment = 'middle_middle',
gap_x = 30,
gap_y = 15,
background = true,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'gray',
default_outline_color = 'black',
default_shade_color = 'white',
color0 = '#ffffff',
color1 = '#ff0000',
double_buffer = true,
draw_borders = false,
draw_graph_borders = true,
draw_outline = true,
draw_shades = false,
extra_newline = false,
font = 'Neon 80s:size=10',
minimum_height = 410,
minimum_width = 380,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_ncurses = false,
out_to_stderr = false,
out_to_x = true,
own_window = true,
own_window_class = 'Conky',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_type = 'desktop',
own_window_hints ='undecorated,sticky,skip_taskbar,skip_pager,below',
show_graph_range = false,
show_graph_scale = false,
stippled_borders = 0,
uppercase = false,
use_spacer = 'none',
use_xft = true,
}
conky.text = [[
${execpi 86400 monitors.sh}
]];
the tempfiles dir exists, the bash script has been given permission to run. I think I have followed all the directions but I have no display on screen