You are not logged in.

#1 2016-12-30 12:05:44

seul
Member
Registered: 2016-12-30
Posts: 8

[SOLVED] choose conky, restart compositing, pick wallpaper by script

I have an external screen attached to my notebook. Whenever I change screen resolution (arandr or script), I have three issues:

a) taskbar items have striped bg

b) desktop backround is tiled, no matter the settting

c) conky is near screen center

I can make the issues go away

a) right click --> preferences --> compositor --> restart compositing

b) right click --> preferences --> conky --> conky chooser --> ok

c) right click --> preferences --> choose wallpaper --> apply --> close

How can I do those through a script? Or is there another command that reloads/restarts compositing/conky/wp?

Cheers!

Last edited by seul (2016-12-31 11:51:11)

Offline

#2 2016-12-30 13:25:05

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,740

Re: [SOLVED] choose conky, restart compositing, pick wallpaper by script

An example script (change to suit your needs, this one assumes its living in virtualbox, otherwise exits). Also the logic is far from perfect. You would start the script in openbox/autostart.
https://raw.githubusercontent.com/bront … /changeres
(However there should be a better solution that would not depend on a dumb eternal sleep/loop)

Last edited by brontosaurusrex (2016-12-30 13:33:57)

Offline

#3 2016-12-30 14:04:19

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

Re: [SOLVED] choose conky, restart compositing, pick wallpaper by script

Does this work:

bl-conky-session --autostart;bl-compositor --restart;nitrogen --restore

Offline

#4 2016-12-30 14:48:50

seul
Member
Registered: 2016-12-30
Posts: 8

Re: [SOLVED] choose conky, restart compositing, pick wallpaper by script

Thanks guys, that did it. Head_on_a_Stick's

 bl-compositor --restart;nitrogen --restore 

worked, but

bl-conky-session --autostart;

gave me a conky in the right place, albeit the other one stayed, too.

brontosaurusrex's

killall conky && sleep 2 && bl-conky-session &

worked but gave me a ton of errors:

seul@machine:~/apps$ killall conky && sleep 2 && bl-conky-session &
[1] 11898
seul@machine:~/apps$ Conky: received SIGINT or SIGTERM to terminate. bye!
Conky: forked to background, pid is 11905

Conky: desktop window (b0) is root window
Conky: window type - normal
Conky: drawing to created window (0x4600001)
Conky: drawing to double buffer
[    95.22 ] error 3 (BadWindow) request 138 minor 7 serial 36592 ("BadWindow (invalid Window parameter)")
[    95.22 ] error 140 (BadRegion) request 138 minor 17 serial 36593 ("BadRegion (invalid Region parameter)")
[    95.22 ] error 140 (BadRegion) request 138 minor 14 serial 36594 ("BadRegion (invalid Region parameter)")
[    95.22 ] error 140 (BadRegion) request 138 minor 10 serial 36595 ("BadRegion (invalid Region parameter)")
[    95.22 ] error 3 (BadWindow) request 129 minor 5 serial 36600 ("BadWindow (invalid Window parameter)")
[    95.22 ] error 3 (BadWindow) request 129 minor 5 serial 36608 ("BadWindow (invalid Window parameter)")

but works beautifully when I omitt the sleep 2

killall conky && bl-conky-session &

Thanks again!

EDIT:
hm, still getting the errors. Now trying

killall conky && bl-conky-session --autostart;

.

Last edited by seul (2016-12-30 15:21:14)

Offline

Board footer

Powered by FluxBB