12

I have an external display that show the right part of my screen (--right-of option in xrandr),

And my conky panel was just gone. (occupies space, but not visible on both display)

What I want is the same view of conky, for both my laptop display and the external one, any thoughts?

Thanks

Part of my conkyrc, might be helpful

own_window yes 
if_up_strictness address
own_window_colour 262729
own_window_transparent no 
own_window_type panel
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
use_spacer right 
use_xft yes
font snap.se-7
xftalpha 1
text_buffer_size 2048 
#alignment tl
alignment bl
gap_x 0
gap_y 3

4 Answers 4

8

There are a lot of solutions to do it. The gap_x and gap_y is the worst one. The configuration of the display is much more complex. I also have an external monitor on a laptop.

My conky config files are in the startup list and they look like this. I use Ubuntu 12.04:

bash -c "sleep 30; conky -c conky1 -a top_right -x 7 -y 70 -d"

bash -c "sleep 30; conky -c conky2 -a top_left -x 150 -y 550 -d" 

gap_x and gap_y in both files are set to 1. Using relative coordinates will always output in the same place.

From terminal: conky -c conky1 -a top_right -x 7 -y 70 -d

I do not have to reset the value of gap-x or y every time I boot with a secondary display.

single monitor conky dual monitor conky

2
  • beautiful! it worked great in my Ubuntu 14.04.
    – logoff
    Aug 7, 2014 at 7:47
  • For me top_right always put conky on the top right of my left monitor (both monitor are set as one display :0), so I had to use a negative value for -x, the width of the right monitor: conky -c my.conkyrc -a top_right -x -1440
    – pawamoy
    Dec 15, 2017 at 11:58
7

The un-documented setting xinerama_head was added to simplify things since -x/-y approach is time-consuming and hard to maintain (or lack of flexibility) if different positions/resolutions/monitors are used.

conky.config = {
  xinerama_head = 1 (or 2, 3...)
}

For further reading.

3

Get the mouse position coordinates with xdotool

xdotool getmouselocation --shell

Just immediately get the coordinates, maybe you need time to move to a specified location

sleep 3 ;xdotool getmouselocation --shell

Use your mouse to move the stone side of the coordinates you want to show where conky

X=1920 Y=266 SCREEN=0 WINDOW=27263065

So this execution, the first to eat conkyrc settings (including coordinates ), and the second will be displayed on the right side at coordinates 1920

conky
conky -x 1920
1

I believe, this will also place the element on the right on various monitors. Even if you find the value for the gap_x variable to work on your 17" monitor, it will not work on another one with a different rezolution, say of 21".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .