Sunday, August 7, 2022

Using Conky standard MX-antiX configuration as disk I/O monitor



Rev 8/15/22

 

A good option for a disk I/O monitor is to install Conky (conky-std) and use the standard MX-antiX configuration (see image). To obtain the corresponding configuration file from MX-Linux, open the Home directory, press Ctl-H to display hidden files, then open the .conky directory, then the MX-antiX directory, and copy the "MX-antiX17" file and rename it Standard_antiX_Conky_conf_file.txt. The same version is supposedly on the internet, but I tried the posted version, but it didn't produce the same results, so below I have included a copy of the version which I copied from MX-Linux, which you could test on a live installation.

There are various ways to use it as the configuration file, one of which is to put it in a text file, name it conky.conf, and place it in the Home/.conky directory created by installing Conky. The previous conky.conf directory would have to be removed or renamed. Another way is to put it in a text file named whatever you like and placed wherever you like, although I'd name it Standard_antiX_Conky_conf_file.txt and put it in the .conky directory. Then shut Conky down and restart it with the command "conky -c <path/name of configuration file>." To get the path of a file, right-click on it and select Properties in the menu which appears.

Standard MX/antiX Conky configuration-script:

conky.config = {
-- Standard antiX .conkyrc file written by Team antiX.
-- Feel free to use.
-- anticapitalista@riseup.net

-- Note: delete the line above to disable automatic scaling with DPI
-- on the live system.

-- set to yes if you want Conky to be forked in the background
    background = true,

    short_units = true,

    cpu_avg_samples = 1,
    net_avg_samples = 1,

    out_to_console = false,

-- X font when Xft is disabled, you can pick one with program xfontsel
--font 7x12
--font 6x10
--font 7x13
    font = '8x12',
--font 7x12
--font *mintsmild.se*
--font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
--font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

-- Use Xft?
    use_xft = true,

-- Xft font when Xft is enabled
--xftfont gentium:size=12
--ftfont DejaVu Sans:size=10
    font = 'DejaVu Sans:bold:size=9',
--xftfont DejaVu Sans:size=9

-- Create own window instead of using desktop (required in nautilus, pcmanfm and rox desktops)
    own_window = true,
    own_window_transparent = true,
    own_window_hints = 'undecorated,sticky,skip_taskbar',

-- Text alpha when using Xft
    xftalpha = 1.0,

--on_bottom no

-- mail spool
-- mail_spool $MAIL

-- Update interval in seconds
    update_interval = 1,

-- Use double buffering (reduces flicker, may not work for everyone)
    double_buffer = true,

-- Minimum size of text area
    minimum_width = 5, minimum_height = 5,
    maximum_width = 180,

-- Draw shades?
    draw_shades = false,

-- Draw outlines?
    draw_outline = false,

-- Draw borders around text
    draw_borders = false,

-- Stippled borders?
    stippled_borders = 0,

-- border margins
--border_margin 10

-- border width
    border_width = 1,

-- Default colors and also border colors
    default_color = 'white',
    default_shade_color = 'white',
    default_outline_color = 'white',

    color1 = 'ffffff',
    color2 = 'ffffff',
    color3 = 'ffffff',
    color4 = 'yellow',
    color8 = '77ccff',
    color9 = '5599cc',

-- Text alignment, other possible values are commented
-- alignment top_left
    alignment = 'top_right',
--alignment bottom_left
--alignment bottom_right

-- Gap between borders of screen and text

    gap_x = 30,
    gap_y = 30,

-- Add spaces to keep things from moving about?  This only affects certain objects.
    use_spacer = 'right',

-- Subtract file system buffers from used memory?
    no_buffers = true,

-- if_up_strictness link:  up | link | address
    if_up_strictness = 'address',

-- set to yes if you want all text to be in uppercase
    uppercase = false,

-- boinc (seti) dir
-- seti_dir /opt/seti

--# antiX additives examples. Add below Text##
--#Battery examples##
--#${color}battery: ${color}$acpiacadapter, ${battery_percent BAT1}%
--#${color}battery:${color} ${battery}
--${color}ACPI Battery: ${color}$battery
--${battery_bar 11,0}
--#Wireless example##
--${color}Wireless:
--${color}essid: ${wireless_essid $template6}
--${color}IP:${color} ${addr $template6}
--${color}speed: ${color} ${wireless_bitrate $template6}
--${color}link strength: ${color} ${wireless_link_bar 7,50 $template6}


    own_window_argb_value = 0,
    own_window_argb_visual = true,
    own_window_colour = '000000',

-- time template
    
    template0 = [[${if_match "pmfix${time %p}" == "pmfix"}${time \1}${else}${time %I:%M}${endif}]],

-- battery templates

    template1 = [[${if_existing /sys/class/power_supply/BAT\1}\n${color}bat\1:${color3}${alignr}${battery_percent BAT\1}%\n${color1}$alignr${battery_bar 4,170 BAT\1}${endif}]],
    template2 = [[${template1 0}${template1 1}]],
    
-- network templates

--    template3 = [[${color}\1 \2: $alignr${color3} ${\2speed \1}\n${color2}$alignr${\2speedgraph   \1 30,170 5599cc 5599cc}]],
--    template4 = [[${if_up \1}${template3 \1 up}\n${template3 \1 down}\n${endif}]],
--    template5 = [[${template4 $template4}${template4 $template5}${template4 $template6}${template4 $template7}]],

    template4 = 'eth0',
    template5 = 'eth1',
    template6 = 'wlan0',
    template7 = 'wlan1',

    
};

-- fluxbox adjustment
return_code = os.execute('pidof -q fluxbox')
if _VERSION == 'Lua 5.1' and math.floor(return_code/256) == 0 or
   _VERSION ~= 'Lua 5.1' and return_code then
   conky.config.own_window_transparent = true
   conky.config.own_window_argb_visual = false
end

-- stuff after 'TEXT' will be formatted on screen

conky.text = [[
${color3}${alignc}MX Linux
${color8}$alignc${font DejaVu Sans:size=12}${template0 %H:%M}$font
${color}${alignc}${time %a %d %b}
${color}${alignc}Uptime: $uptime

${color}res:${alignr}${color3}${execi 600 xdpyinfo | awk '/dimensions/ { print $2}' }
${color}dpi:${alignr}${color3}${execi 600 xdpyinfo | awk '/resolution/ { sub(/x[0-9]*/,"",$2); print $2}' }
${color}cpu use:${alignr}${color3}${cpu}${color}%
${color}cpu freq:${color3}${alignr}${freq}
${color}$alignr${cpugraph cpu0 30,170 5599cc 5599cc}\
# battery
${template2}
${color}disk I/O:${alignr}${color3}${diskio}
${color}${alignr}${diskiograph 30,170 5599cc 5599cc}\
# network
${if_up $template4}
${color}$template4 up: $alignr${color3} ${upspeed $template4}
${color}$alignr${upspeedgraph   $template4 30,170 5599cc 5599cc}
${color}$template4 down: $alignr${color3} ${downspeed $template4}
${color2}$alignr${downspeedgraph $template4 30,170  5599cc 5599cc}${endif}${if_up $template5}
${color}$template5 up: $alignr${color3} ${upspeed $template5}
${color}$alignr${upspeedgraph   $template5 30,170 5599cc 5599cc}
${color}$template5 down: $alignr${color3} ${downspeed $template5}
${color2}$alignr${downspeedgraph $template5 30,170  5599cc 5599cc}${endif}${if_up $template6}
${color}$template6 up: $alignr${color3} ${upspeed $template6}
${color2}$alignr${upspeedgraph   $template6 30,170 5599cc 5599cc}
${color}$template6 down: $alignr${color3} ${downspeed $template6}
${color2}$alignr${downspeedgraph $template6 30,170 5599cc 5599cc}${endif}${if_up $template7}
${color}$template7 up: $alignr${color3} ${upspeed $template7}
${color2}$alignr${upspeedgraph   $template7 30,170 5599cc 5599cc}
${color}$template7 down: $alignr${color3} ${downspeed $template7}
${color2}$alignr${downspeedgraph $template7 30,170 5599cc 5599cc}${endif}
${color}${alignr}${color8}Used / Total
${color}mem:${alignr}$mem ${color3} /${color} $memmax
${color}swap:${alignr}$swap ${color3} /${color} $swapmax
${color}root:${alignr}${fs_used /} ${color3} /${color} ${fs_size /}
]]