You are not logged in.

#1 2016-06-04 14:22:12

mangstadt
Member
Registered: 2016-05-28
Posts: 20

Move conky to taskbar

I was wondering if it's possible to move conky to the taskbar, so it is always visible at the top of the screen.  That way, I don't have to switch to the desktop to see my CPU usage, memory usage, etc.

Apologies if this has been asked before.  Thank you!

Offline

#2 2016-06-04 14:51:24

vasa1
Member
Registered: 2015-09-29
Posts: 204

Re: Move conky to taskbar

I have something like that. Conky in the top left corner of my screen (~50% screen width) and tint2 taking up the remaining 50%.

-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
# Conky, a system monitor, based on torsmo
]]

conky.config = {
alignment = 'top_left',
background = false,
default_color = '555555',
double_buffer = true,
draw_shades = false,
extra_newline = false,
font = 'Ubuntu Mono:bold:size=16',
gap_x = 3,
gap_y = 4,
minimum_height = 50,
minimum_width = 700,
out_to_console = false,
out_to_stderr = false,
own_window_class = 'Conky',
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_transparent = true,
own_window = true,
own_window_type = 'override', 
short_units = true,
text_buffer_size = 256,
update_interval = 2.0,
uppercase = false,
use_spacer = 'right',
use_xft = true
}

conky.text = [[
  ${time %a, %d %b} ${color 7D5126}${time %H:%M}$color ${utime (%H:%M)} ${acpitemp} ${cpu}% ${goto 400} ${execpi 360 bash curl-aes} - ${execpi 300 bash curl-neg}
]]

Using the Openbox (3.5.2) session of Lubuntu 14.04 LTS but very interested in BL :)

Offline

#3 2016-06-04 14:54:29

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 537

Re: Move conky to taskbar

You can put tint2 and conky side by side.
In tint2rc:

panel_position = top left horizontal
panel_size = 50% 24

In conkyrc:

minimum_size 640 0
alignment top_right
gap_x 0
gap_y 0

Of course you change position and pixel values according to your screen size and visual taste.

Edit: ninja'd by vasa1, good work!
Edit2: if you want your conky to appear in the middle of your panel, you can split tasks and system tray in two different rc files.

Last edited by nore (2016-06-04 15:01:54)

Offline

#4 2016-06-04 16:18:05

mangstadt
Member
Registered: 2016-05-28
Posts: 20

Re: Move conky to taskbar

Thanks for your replies.

@vasa1: I'd really like to try your configuration, sounds like just what I need.  What file should I be editing?  My "~/.conkyrc" file doesn't look anything like that.  Thank you.

Offline

#5 2016-06-04 16:26:40

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Move conky to taskbar

mangstadt wrote:

@vasa1: I'd really like to try your configuration, sounds like just what I need.  What file should I be editing?  My "~/.conkyrc" file doesn't look anything like that.  Thank you.

vasa's file is using conky 1.10 syntax (lua based) which differs from the older syntax.
bunsenlabs still uses conky 1.9 afaik, so the syntaxes are not compatible.

however, there's about one million conky configs floating around the web, and many of them do exactly what you want, and still use the old syntax.
get creative! copy-paste, adapt, make your own! that's the appeal of conky (and linux, i'd say).

Offline

#6 2016-06-04 16:43:59

vasa1
Member
Registered: 2015-09-29
Posts: 204

Re: Move conky to taskbar

My bad. I'm using conky 1.10 and that has a different syntax.

Here's a .conkyrc from a previous version:

# Conky, a system monitor, based on torsmo

use_spacer right
double_buffer yes
alignment top_left
background no
default_color 796645
use_xft yes
xftfont Ubuntu Mono:bold:size=16
gap_x 3
gap_y 4
minimum_size 670 700
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
#own_window_type normal 
own_window_type override 
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager  
own_window_transparent yes
update_interval 2.0
uppercase no
draw_shades no ### gets rid of text shadow (seen when desktop background is light)!
draw_graph_borders no
short_units yes
text_buffer_size 2048

TEXT
${time %a, %d %b} \
${color B3492B}${time %H:%M}${color} \
${utime (%H:%M)}  \
${acpitemp}  \
${color 006000}${cpu}%${color} \
${goto 400}  \
${execpi 360 bash curl-aes}/${execpi 300 bash curl-neg} \
${goto 500} \
${mem}

Using the Openbox (3.5.2) session of Lubuntu 14.04 LTS but very interested in BL :)

Offline

#7 2016-06-04 17:21:45

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 537

Re: Move conky to taskbar

mangstadt wrote:

What file should I be editing?  My "~/.conkyrc" file doesn't look anything like that.  Thank you.

Copy your ~/.conkyrc to a new file, like ~/.conky_bar, and launch conky with -c switch:

conky -c ~/.conky_bar

Start editing and refresh your conky after saving. Always test your conky before making another change!
Check also the Show us your conky-thread, there are a couple of oneliners there, too.
More in Deviantart, Conky PitStop etc.

Last edited by nore (2016-06-04 18:10:03)

Offline

#8 2016-06-04 19:15:56

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Move conky to taskbar

Some excellent advice - here's another tip:
Settings » Openbox » GUI Config Tool » Margins - and set a space.
2016_06_04_15_47_44_Scrot11.jpg
NOTE: Top margin set to 42 and bottom to 0
ALL edges have conkys on them.
On the bottom three conkys, basically email, weather and time date and the margin is st to 0 BUT the panel systray sits in the middle with the qasmixer icon on it.

maximize the GUI Config Tool window and as you see, top conky visible because of the margin and and the bottom three, or parts of, are visible because of the panel.
2016_06_04_15_48_27_Scrot11.jpg

Always more than one way to do something in Linux.

Also to touch on something nore just said:
kill a conky and restart it to test things as you are working/creating/tweaking a conky - sometimes a plain save will fail to refresh.

start your conky in a terminal - ie this one:

conky -c /media/5/Conky/test.conky &

and when want to kill it hit enter again and the up arrow and edit that line to look like this:

pkill -xf "conky -c /media/5/Conky/test.conky" &

and hit enter to kill just that one conky leaving all others running.

Now it's just a few up arrows away to kill / start a conky repeatedly as you work on it.

It's why I use a line like that as the first line in my conkys:

## pkill -xf "conky -q -c /media/5/Conky/test.conky" &
## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent no
own_window_hints skip_taskbar,skip_pager,undecorated,below #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title Test conky
## ARGB can be used for real transparency
  own_window_argb_visual yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
  own_window_argb_value 100

minimum_size 250 0
maximum_width 800
etc
etc

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#9 2016-06-11 13:12:00

mangstadt
Member
Registered: 2016-05-28
Posts: 20

Re: Move conky to taskbar

ohnonot wrote:

however, there's about one million conky configs floating around the web, and many of them do exactly what you want, and still use the old syntax.
get creative! copy-paste, adapt, make your own! that's the appeal of conky (and linux, i'd say).

But, but...you're supposed to do the work for me! xD

Thanks everyone for pointing me in the right direction.  @vasa1's config doesn't quite work for me because it's hidden behind my taskbar.  I'll have to play around with it!  Thanks again.

Offline

#10 2016-06-11 14:20:55

mangstadt
Member
Registered: 2016-05-28
Posts: 20

Re: Move conky to taskbar

I used the default conky config as a starting point and tweaked it to my liking.  I'd like to position it so it's always visible at the bottom of the screen, but I can't get it to move there.  I tried changing the "alignment" setting to "bottom_left", but that doesn't do anything.  Does anyone know how to get it to move?  It always stays in the top-left corner of the screen.  Thanks.

alignment bottom_left
background false
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
double_buffer yes
draw_borders false
draw_graph_borders true
draw_outline false
draw_shades false
use_xft true
font DejaVu Sans Mono:size=10
gap_x 5
gap_y 60
minimum_size 5 5
net_avg_samples 2
no_buffers true
out_to_console false
out_to_stderr false
extra_newline false
own_window true
own_window_class Conky
own_window_type panel
stippled_borders 0
update_interval 2.0
uppercase false
use_spacer none
show_graph_scale false
show_graph_range false

TEXT
${color grey}CPU:$color $cpu% \
${color grey}RAM:$color $memperc% \
${color grey}Swap:$color $swap \
${color grey}Network: ▲$color ${upspeed wlan0} ${color grey} ▼$color ${downspeed wlan0}

Offline

#11 2016-06-11 14:23:06

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,063
Website

Re: Move conky to taskbar

mangstadt wrote:

I'd like to position it so it's always visible at the bottom of the screen, but I can't get it to move there.  I tried changing the "alignment" setting to "bottom_left", but that doesn't do anything.  Does anyone know how to get it to move?  It always stays in the top-left corner of the screen.

gap_x 5
gap_y 60

Remove those lines wink

Offline

#12 2016-06-11 14:39:23

mangstadt
Member
Registered: 2016-05-28
Posts: 20

Re: Move conky to taskbar

Head_on_a_Stick wrote:
mangstadt wrote:

I'd like to position it so it's always visible at the bottom of the screen, but I can't get it to move there.  I tried changing the "alignment" setting to "bottom_left", but that doesn't do anything.  Does anyone know how to get it to move?  It always stays in the top-left corner of the screen.

gap_x 5
gap_y 60

Remove those lines wink

Didn't work. sad

Offline

#13 2016-06-11 14:44:54

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,063
Website

Re: Move conky to taskbar

Weird, I just tried your exact .conkyrc and for me it shows in the bottom-left (even with the gap_* bits  :8 ):
2016_06_11_154309_456x177_scrot.jpg

Are you sure it is reading the correct configuration file?

What command are you using to start the conky and what is the configuration file called?

Offline

#14 2016-06-11 15:30:31

mangstadt
Member
Registered: 2016-05-28
Posts: 20

Re: Move conky to taskbar

Head_on_a_Stick wrote:

Weird, I just tried your exact .conkyrc and for me it shows in the bottom-left (even with the gap_* bits  :8 ):
http://s33.postimg.org/r6vbvy7h7/2016_06_11_154309_456x177_scrot.jpg

Are you sure it is reading the correct configuration file?

What command are you using to start the conky and what is the configuration file called?

Thanks for your help.

I'm sure it's reading the right config file because when I edit the file, the panel automatically reloads.  My conky file is called "default2.conky" and it's located in my home directory.

The command I'm using the start conky is: "conky -c default2.conky &"

Here is what it looks like:

Y9xoXbL.png

Offline

#15 2016-06-11 15:44:03

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Move conky to taskbar

EDIT:  I got ninja'd but will leave this here as well.

I get the same problem as mangstadt and when I max a window it uses the width of the conky as limits:
2016_06_11_12_01_17_Scrot11.jpg

However as I said in post #8 - obviously from seeing HoaS's reply, it's a temp fix but it works, give it a try:

## pkill -xf "conky -q -c /media/5/conky/mangstadt.conky" &
alignment bottom_left
background false
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white

own_window yes
own_window_type normal
own_window_transparent yes #no
own_window_hints skip_taskbar,skip_pager,undecorated,below,sticky
own_window_colour 000000
own_window_class Conky
own_window_title mangstadt mangstadt test conky

double_buffer yes
draw_borders false
draw_graph_borders true
draw_outline false
draw_shades false
use_xft true
font DejaVu Sans Mono:size=10
gap_x 0
gap_y 0
minimum_size 5 5
net_avg_samples 2
no_buffers true
out_to_console false
out_to_stderr false
extra_newline false
stippled_borders 0
update_interval 2.0
uppercase false
use_spacer none
show_graph_scale false
show_graph_range false
TEXT
${color grey}CPU:$color $cpu% \
${color grey}RAM:$color $memperc% \
${color grey}Swap:$color $swap \
${color grey}Network: ▲$color ${upspeed wlan0} ${color grey} ▼$color ${downspeed wlan0}

Some tests ... with the code above:2016_06_11_11_55_01_Scrot11.jpg 2016_06_11_12_07_59_Scrot11.jpg

Some things I'd like to point out (even though I use some of the "not needed: default" stuff it's nice to know.

alignment bottom_left
background false
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white   <<--- not required .. below you say no to draw_outline
default_shade_color white   <<--- not required .. below you say no to draw_shade

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below,sticky
.... if you want the conky to show ALWAYS - even if you force a window over it change "below" to "above"
own_window_colour 000000 <<-- not needed - see own_window_transparent
own_window_class Conky <<-- keeps boxes away in Bunsen
own_window_title mangstadt mangstadt test conky <<-- not really required but sets a title on the bar if you remove "undecorated" from own_window_hints

double_buffer yes
draw_borders false <<-- not needed: default
draw_graph_borders true  <<-- not using graphs not needed.
draw_outline false <<-- not needed: default
draw_shades false << --- see above - also:  not needed: default
use_xft true <<-- you are not using it though
font DejaVu Sans Mono:size=10
## xftfont DejaVu Sans Mono:size=10 <<-- use this if you want with an alfa setting:
xftalpha 1.0 <<-- if using xftfont
gap_x 0
gap_y 0
minimum_size 5 5
net_avg_samples 2
no_buffers true
out_to_console false <<-- not needed: default
out_to_stderr false <<-- not needed: default
extra_newline false <<-- not needed: default
stippled_borders 0 <<-- not needed: default
update_interval 2.0
uppercase false <<-- not needed: default
use_spacer none
show_graph_scale false <<-- not needed: default
show_graph_range false <<-- not needed: default

NOTE NOTE NOTE NOTE NOTE NOTE
While testing I ran:

pkill -xf "conky -q -c /media/5/conky/mangstadt.conky" &

with the code I posted above and then changed:

own_window_type panel ##normal

and then:

conky -q -c /media/5/conky/mangstadt.conky &

Well I'll be! It worked.

Last edited by Sector11 (2016-06-11 15:46:07)


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#16 2016-06-11 15:48:33

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Move conky to taskbar

mangstadt wrote:

The command I'm using the start conky is: "conky -c default2.conky &"

That command should be:

conky -c ~/default2.conky &

or

conky -c /home/mangstadt/default2.conky &

if that's your log in name.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#17 2016-06-11 16:53:25

mangstadt
Member
Registered: 2016-05-28
Posts: 20

Re: Move conky to taskbar

Sector11 wrote:

However as I said in post #8 - obviously from seeing HoaS's reply, it's a temp fix but it works, give it a try:

## pkill -xf "conky -q -c /media/5/conky/mangstadt.conky" &
alignment bottom_left
background false
border_width 1
...

Thanks Sector11.  When I tried the configuration in your post, it moved to the bottom of the screen.  But it was on the desktop, so any open windows covered it.  So, I changed the Openbox bottom margin like you suggested and it worked!  Thanks! smile

W2mVsDh.png

It would be nice if there was a way to keep it on top of all windows.  When I open a window that is not maximized, it can get covered up.

EDIT: Another problem is that, when I press "Meta+D" to show the desktop, it disappears. sad

Last edited by mangstadt (2016-06-11 16:54:32)

Offline

#18 2016-06-11 17:56:55

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Move conky to taskbar

mangstadt wrote:

It would be nice if there was a way to keep it on top of all windows.  When I open a window that is not maximized, it can get covered up.

EDIT: Another problem is that, when I press "Meta+D" to show the desktop, it disappears. sad

what is your config now, esp. the own_window* values?

Offline

#19 2016-06-11 18:59:33

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Move conky to taskbar

mangstadt wrote:

It would be nice if there was a way to keep it on top of all windows.  When I open a window that is not maximized, it can get covered up.


EDIT: Another problem is that, when I press "Meta+D" to show the desktop, it disappears. sad

own_window_hints skip_taskbar,skip_pager,undecorated,below,sticky

.... if you want the conky to show ALWAYS - even if you force a window over it change "below" to "above"
2016_06_11_12_28_37_Scrot11.jpg

RE: Meta-D - that will always happen, conky, is an app just like others and if you want to show the desktop, it reacts as other apps.  To the best of my knowledge.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#20 2016-06-11 20:47:27

mangstadt
Member
Registered: 2016-05-28
Posts: 20

Re: Move conky to taskbar

Sector11 wrote:

if you want the conky to show ALWAYS - even if you force a window over it change "below" to "above"

Cool, thanks! smile

ohnonot wrote:

what is your config now, esp. the own_window* values?

Here it is (screenshot).  Thanks for your help, everyone!

#Note: Configure Openbox with a 20px bottom margin

background false

#SAMPLING
update_interval 2.0
cpu_avg_samples 2
net_avg_samples 2
no_buffers true

#POSITION
alignment bottom_left
gap_x 0
gap_y 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,above,sticky

#FONT
default_color white
color0 grey
font DejaVu Sans Mono:size=10
short_units yes
double_buffer yes

TEXT
${color0}CPU:$color $cpu% ${tab 15} \
${color0}RAM:$color $mem  \
${color0}Swap:$color $swap  \
${color0}Wifi: ▲ $color${upspeed wlan0} ${color0}▼ $color${downspeed wlan0}

Not sure if I'm using the ${tab} variable correctly.  I'm trying to prevent it from jumping around when the CPU percentage goes from single digits to double digits.  Looks like it's working, but I don't really know why. xD Tried to do the same for the Wifi stats, but was having some trouble.

Offline

Board footer

Powered by FluxBB