The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

Problem Displaying Conky in i3bar using JSON

asked 2014-03-18 02:14:06 +0000

mintybacon gravatar image

I have gone over several tutorials and can not figure out why my Conky script does not work for i3bar. When I run i3 / bar I either get the last line that was echo'd from the conky script in plain text or nothing at all. Ideas I have is maybe there is a problem running conky when I run conky with no config I get a Warning gnome-keyring couldn't connect to...

Here is my status wrapper:

#!/bin/sh
echo '{"version":1}'
echo '['
echo '[],'
exec conky -c ~/.i3/conkyrc2

here is the conkyrc2 file:

out_to_x no
own_window no
out_to_console yes
background no
max_text_width 0

# Update interval in seconds
update_interval 2.0

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes

# How strict should if_up be when testing an interface for being up?
# The value is one of up, link or address, to check for the interface
# being solely up, being up and having link or being up, having link
# and an assigned IP address.
#if_up_strictness route

# Add spaces to keep things from moving about?  This only affects certain objects.
# use_spacer should have an argument of left, right, or none
use_spacer left

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# Stuff after 'TEXT' will be formatted on screen
TEXT

# JSON for i3bar
[
{ "full_text" : " Uptime $uptime_short " , "color" : "\#ffffff" },
{ "full_text" : " RAM ${mem} " , "color" : ${if_match ${memperc}<90}"\#ffffff"${else}"\#ff0000"${endif} },
{ "full_text" : " Load ${loadavg 1} " , "color" : "\#ffffff" },
{ "full_text" : " I/O ${diskio /dev/sda} " , "color" : "\#ffffff" },
{ "full_text" : " $time " , "color" : "\#ffffff" }],

I currently get this as an output:

{"version":1}
[
[],
WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-dzpfwO/pkcs11: No such file or directory
[
{ "full_text" : " Uptime 2h 27m " , "color" : "#ffffff" },
{ "full_text" : " RAM 1.04G " , "color" : "#ffffff" },
{ "full_text" : " Load 0.26 " , "color" : "#ffffff" },
{ "full_text" : " I/O    0B " , "color" : "#ffffff" },
{ "full_text" : " 2014-03-17 22:11:57 " , "color" : "#ffffff" }],
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-03-28 11:46:19 +0000

Tahtisilma gravatar image

Your script works for me, so it must be the warning message. I remember that I had the same problem but now I am not sure how I solved it. Probably just by upgrading gnome-keyring package. You may try the solutions posted here: crunchbang.org/forums/viewtopic.php?pid=335149 or askubuntu.com/questions/243210/why-do-i-get-this-warning-from-gnome-keyring-in-xubuntu

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-03-18 02:14:06 +0000

Seen: 498 times

Last updated: Mar 28 '14