SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#8726 2015-08-21 22:47:22

fuzamaru
New Member
Registered: 2015-08-21
Posts: 2

Re: Conky v1.9 Thread

	-- combine the clock
	local buffer = imlib_create_image(w_img, h_img)
	imlib_context_set_image(buffer)
	imlib_image_set_has_alpha(1)
	imlib_image_clear()
	imlib_context_set_blend(0)
	imlib_blend_image_onto_image(

Offline

Be excellent to each other!

#8727 2015-08-21 22:55:41

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

^ Try moving the "imlib_context_set_blend(0)" to here instead.

	local buffer = create_clock(theme, arc_s, arc_m, arc_h)
	imlib_context_set_image(buffer)

	imlib_context_set_blend(0)
	imlib_render_image_on_drawable_at_size(
		x-w/2, y-w/2, w, w)

I don't know exactly at what point in the script it needs to be set and can't test it here because I don't use a compositor.

Offline

#8728 2015-08-23 09:33:32

Temetka
#! CrunchBanger
From: California
Registered: 2014-08-25
Posts: 179

Re: Conky v1.9 Thread

${execi 60 fortune -sn 300 | fold -s -w 80}

Last edited by Temetka (2015-08-23 09:44:47)

Offline

#8729 2015-08-23 14:46:44

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

${execi 60 fortune -sn 300 | fold -s -w 80}

Offline

#8730 2015-08-24 05:31:16

Temetka
#! CrunchBanger
From: California
Registered: 2014-08-25
Posts: 179

Re: Conky v1.9 Thread

Weird, I'm still getting text cutoff at the bottom. I'll keep playing with it.

Thanks for you help.

Offline

#8731 2015-08-24 12:46:02

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

^ You probably need to set a larger "text_buffer_size" so the whole fortune is printed.
Try changing "#text_buffer_size 6144" to "text_buffer_size 6144" and see what happens.

Offline

#8732 2015-08-26 00:49:03

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Offline

#8733 2015-08-30 00:21:30

Temetka
#! CrunchBanger
From: California
Registered: 2014-08-25
Posts: 179

Re: Conky v1.9 Thread

# Text alignment, other possible values are commented
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Create own window instead of using desktop
own_window yes
own_window_hints undecorated,below,sticky,skip_pager,skip_taskbar
# normal, desktop, override
own_window_type normal

# Use pseudo transparency with own_window?
own_window_transparent yes

# If own_window_transparent is set to no, you can set the background colour here
#own_window_colour black

background no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer yes

# Use Xft?
use_xft yes
text_buffer_size 6144
minimum_size 400 750 width | height
maximum_width 400
xftfont mono:size=9

TEXT
${color orange}${execi 60 fortune | fold -s -w 57}${color}

Offline

#8734 2015-08-30 00:40:42

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Offline

#8735 2015-08-30 02:41:07

Temetka
#! CrunchBanger
From: California
Registered: 2014-08-25
Posts: 179

Re: Conky v1.9 Thread

I will add that switch.

Thanks for all the help. smile

Offline

#8736 2015-09-02 07:51:43

ghorvath
#! Member
Registered: 2015-05-20
Posts: 53

Re: Conky v1.9 Thread

I am not sure if this is the right thread or not. I am running bunsenlabs, conky-all is v1.9.0.6. I am wondering if anyone has figured out how to show the real uptime in conky. That is, the uptime from the last suspend and/or hibernation. I am running laptop-mode-tools, but I think the suspends and hibernations are done via systemd. Anyone with any ideas?

Offline

#8737 2015-09-02 12:34:51

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

^ I don't know of anything that tracks time since last suspend or hibernate.
uptime and uprecords tracks real uptime (the time since last boot) but that is not what you want.

Last edited by arclance (2015-09-02 15:42:28)

Offline

#8738 2015-09-02 12:42:31

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: Conky v1.9 Thread


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#8739 2015-09-02 21:12:33

ghorvath
#! Member
Registered: 2015-05-20
Posts: 53

Re: Conky v1.9 Thread

Yes, thank you, I was looking for exactly that!

Offline

#8740 2015-09-02 22:23:24

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

PackRat - that's awesome!

Offline

#8741 2015-09-05 11:38:03

ghorvath
#! Member
Registered: 2015-05-20
Posts: 53

Re: Conky v1.9 Thread

As a follow-up, I have now the following script:

#!/bin/bash
WAKEUPTIME=$(grep "PM: resume of devices complete" /var/log/messages | tail -1 $
let SECONDS=(`date +%s`-`date +%s -d "$WAKEUPTIME"`)
if [[ $SECONDS -ge 86400 ]]
then
    echo $((SECONDS/86400))"d" 
fi
echo $(date -d "1970-01-01 + $SECONDS seconds" "+%kh %Mm %Ss")

I use $exec in conkyrc and it gives me the real uptime. That is, it works exactly as it is intended:

Uptime:${alignr}${uptime}
Resume:${alignr}${exec ~/bin/lastwakeup}

However, I have an SSD drive, and I would not like to have my SSD read in every 3 seconds, especially when I am on battery. Does anyone have any idea how I could make it happen that I only read /var/log/messages for the date when the machine wakes up, stores it somehow in the memory, and ready it from the memory every after?

Thank you.

Edit: I just realized that the above code does not work well if the machine has been rebooted but not has been suspended since. It is easy to remedy that by altering the script, but then both Uptime and Resume would be the same and then only one would be needed. That is, in such a situation the line with "Resume" should not be shown. Is it possible to do this?

Thank you.

Last edited by ghorvath (2015-09-05 13:16:29)

Offline

#8742 2015-09-05 13:29:45

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Uptime:${alignr}${uptime}
Resume:${alignr}${pre_exec ~/bin/lastwakeup}

Offline

#8743 2015-09-05 14:22:40

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

tmpfs    /tmp   tmpfs   defaults,noatime,mode=1777,size=1g  0   0

Last edited by arclance (2015-09-05 14:44:24)

Offline

#8744 2015-09-05 14:39:54

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Offline

#8745 2015-09-05 15:26:58

ghorvath
#! Member
Registered: 2015-05-20
Posts: 53

Re: Conky v1.9 Thread

Offline

#8746 2015-09-06 00:21:39

ghorvath
#! Member
Registered: 2015-05-20
Posts: 53

Re: Conky v1.9 Thread

I have two more problems:

One is that somehow update_interval_on_battery does not have any effect when I disconnect the laptop from the charger. Here is the code:

update_interval_on_battery 6.0
update_interval 3.0

TEXT
${color}${alignc}S Y S T E M    I N F O
${hr}
Host:${alignr}${nodename}
$sysname $kernel $machine
Uptime:${alignr}${uptime}
Resume:${alignr}${exec ~/.config/conky/scripts/lastwakeup}

The other is that I have a partition mounted to a path which contains space. Is there any way to have some escape character for space in conky? I cannot use /dev/sda1 (even though that is the partition), because that is only readable by root, even if the user mounts it via, say, Thunar.

Thanks for any help.

Offline

#8747 2015-09-06 00:43:59

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

Last edited by arclance (2015-09-06 00:55:48)

Offline

#8748 2015-09-06 01:44:22

ghorvath
#! Member
Registered: 2015-05-20
Posts: 53

Re: Conky v1.9 Thread

Offline

#8749 2015-09-06 02:38:51

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

diskio   (device)   Displays current disk IO. Device is optional, and takes the form of sda for /dev/sda. Individual partitions are allowed.

Offline

Be excellent to each other!

#8750 2015-09-06 14:57:09

ghorvath
#! Member
Registered: 2015-05-20
Posts: 53

Re: Conky v1.9 Thread

${if_mounted /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}
Z${goto 60}${fs_used /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}${goto 120}\
${if_match ${fs_used_perc /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}<10}\
  ${fs_used_perc /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}%\
${else}${if_match ${fs_used_perc /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}<70}\
 ${fs_used_perc /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}%\
${else}${if_match ${fs_used_perc /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}<100}\
 $color9${fs_used_perc /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}%$color\
${else}
${endif}${endif}${endif}\
${alignr}${fs_size /run/user/1000/gvfs/smb-share:server=raspberrypi,share=usbhdd1/}${endif}\

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo