Clickable Conky Using dzen2

Has anyone had success making dzconky work? I can’t make the conky link work… I’m just a slow learner, I guess.

https://www.linuxsecrets.com/archlinux-wiki/wiki.archlinux.org/index.php/Dzen.html#Dzen_and_Conky

1 Like

You mean the ArchWiki examples, or something different?

Post your conkyrc and other code if it’s something different.

I think a couple users in the BL conky thread are using conky and dozen. You might get a quicker response asking there.

I haven’t done anything with dzen2 in quite a while.

Yeah, I have never really ever used dzen2. @manyroads can you post your configs and I’ll take a look-see.

@PackRat @Dobbie03 I was just trying to follow the arch wiki example. I can get the dzen2 to launch from cli (on st). However… the following conky command does not work in any variation I create:

^ca(1,<path to your script>)Sysinfo^ca()

I have seen others (on reddit) with similar problems. I have yet to find anyone who has anything similar functioning. I guess I could use i3blocks instead of conky…

@manyroads talking with @mrgreen in Telegram, he seems to be encountering the same issues as you.

@Dobbie03 Thank you for checking this out. I am glad to hear that it is not just me… Although I am not averse to breaking things, I do like it better when they work. :wink:

This is about the last time I used a clickable area with conky and dzen2

Take a look at some of Nili’s screenshots. I think he has some clickable conky/dzen2 configurations. If you see something interesting, it may be worth a PM.

Here is the other clickable conky-dzen2 - and no, I do not have those configuration files any more; scroll down and there is a link to the menuxy file (dzen2 app menu) that is still good.

This is working. I didn’t do anything special:

conky-dzen.png

conkyrc -

conky.config = {
	out_to_console = true,
	out_to_x = false,
	background = false,
	cpu_avg_samples = 2,
	net_avg_samples = 2,
	no_buffers = true,
	out_to_stderr = false,
	update_interval = 1.0,
	uppercase = false,
	use_spacer = 'none',
};

conky.text = [[
^ca(1,jgmenu_run)Menu^ca()   ^ca(1,xterm)Term^ca()   ^ca(1,subl3)Editor^ca()   ^ca(1,firefox)Web^ca()   ^ca(1,thunderbird)Mail^ca()   Uptime: ${uptime_short}   CPU:  ${cpu cpu0}%   Mem:  ${memperc}%   Net:  Up - ${upspeedf enp2s0} kb/s   Down - ${downspeedf enp2s0} kb/s   ${time %a %e %b  %k:%M}   ^ca(1,/home/doug/temp/sysinfo-dzen.sh)Extra Info^ca()
]];

sysinfo-dzen.sh (pacman is commented out because I’m doing this on Void)

#/bin/bash

 #A simple popup showing system information

 HOST=$(uname -n)
 KERNEL=$(uname -r)
 UPTIME=$( uptime | sed 's/.* up //' | sed 's/[0-9]* us.*//' | sed 's/ day, /d /'\
          | sed 's/ days, /d /' | sed 's/:/h /' | sed 's/ min//'\
            |  sed 's/,/m/' | sed 's/  / /')
 PACKAGES=$(pacman -Q | wc -l)
 UPDATED=$(awk '/upgraded/ {line=$0;} END { $0=line; gsub(/[\[\]]/,"",$0); \
          printf "%s %s",$1,$2;}' /var/log/pacman.log)

 (
 echo "System Information" # Fist line goes to title
 # The following lines go to slave window
 echo "Host: $HOST "
 echo "Kernel: $KERNEL"
 echo "Uptime: $UPTIME "
 # echo "Pacman: $PACKAGES packages"
 echo "Last updated on: $UPDATED"
 ) | dzen2 -p -x "500" -y "30" -w "220" -l "5" -sa 'l' -ta 'c'\
    -title-name 'popup_sysinfo' -e 'onstart=uncollapse;button1=exit;button3=exit'

 # "onstart=uncollapse" ensures that slave window is visible from start.
1 Like

Curious… I just tried running your script and get the following Error:

Error: Could not parse JSON (lexical error: invalid char in jason text.)

:frowning:

Syntax error somewhere?

Just the script fails or the entire conky?

Did you do a cut-and-paste for the script? I’ve had conky fail when I’ve done that; either a conky or a lua error. I suppose it could also cause a JSON error.

Try re-creating the script manually.

1 Like

I both typed a snippet (extract) of the bit I needed into my working script and also created an entirely new text only pasted version of your entire script.

I do all my work in geany, which I always found to be good at not bringing bizarre special characters along (free baggage). It seems weird…

2 Likes

Was trying to get conky panel working on my laptop, so far no real progress. I really just want a clock and possibly a indicator of what workspace/tag/desktop I am on.

In Openbox I did set margins in rc.xml to stop any open windows covering conky so it would work as a panel.

Going to test PackRats scripts to see if it works for me…

1 Like

For openbox you can use the:

own_window_type = panel

For what you need.

That first link in my first post has a clickable desktop indicator configuration that works with dzen2.

1 Like
background = false,
use_xft = true,
font = 'monospace:size=9',
xftalpha = 1,
update_interval = 1.0,
total_run_times = 0,
own_window = false,
own_window_transparent = false,
own_window_type = 'panel',
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_colour = 'black',
double_buffer = true,
minimum_height = 20,
maximum_width = 1024,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
default_color = 'white',
default_shade_color = '000000',
default_outline_color = 'd9d7d6',
alignment = 'top_right',
gap_x = 0,
gap_y = 0,
no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
override_utf8_locale = false,
color1 = '272C30',
color2 = '007300',
}


conky.text = [[
${color1}Stuff I want on screen  ${time %a %e %b  %k:%M}
]];








This gives me a panel at top of screen, reduced margin to 15 in openbox. Going to change it a dark background then add in what I really need…

Thanks :wink:

2 Likes

Thanks Many
This looks interesting just wondering how the workspace numbers will work.

They work just the same Ctrl-Shift-#