SEARCH

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

You are not logged in.

#51 2015-03-17 10:35:44

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

Re: Conky Switcher (Pipe Menu)

I guess mine is the same a smacz said.  But I wouldn't have known how to put it so nicely.
And because I want to be on the same page I copied ~/conky-BL to ~/.config/conky

Using Conky Switcher Pipemenu at #2:

1.  command line: killall conkys (kfc) - to kill MY running conkys
2. start a conky - bl-right - OK
3. kill that conky - bl-right - OK
4. start a conky - bl-right2 - OK
5. start another conky - bl-top - OK- OK
6. Toggle/Replace
7. choose: load bl-right
8. choose: kill bl-right2
9. Toggle Load / Kill -  conkys still there
10 killed each individually and the went ...
11 tried again and got into a situation where the conkys were gone BUT the menu said they were there and so did the session log but "killall conky" reported no conkys, but look at the menu and the log:
CSP.jpg

I ended up having to "Restart OpenBox" to get it back to normal.

Don't ask me how - as I've said before "Give it to Sector11 - he can break anything."   smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Help fund CrunchBang, donate to the project!

#52 2015-03-18 06:01:26

kbmonkey
#! Die Hard
From: South Africa
Registered: 2011-01-14
Posts: 879
Website

Re: Conky Switcher (Pipe Menu)

detinith wrote:

Hey guys, I've finally been able to read up on this thread @woodape keeps telling me about. After reading through the thread and updating my understanding of the program a bit, I think I can help contribute now haha.

Welcome detinith!

I'm liking the direction this is taking and am keen to play with the modified code  8)

To make things easier I am going to update the original post to point to the GitHub repository woodape set up, to make getting new versions easier  O:)

Edit: had a quick look at the new look of this menu and, oh my hat, great work!

Last edited by kbmonkey (2015-03-18 06:27:42)

Offline

#53 2015-03-18 07:18:50

woodape
#! CrunchBanger
From: Cape Town, South Africa
Registered: 2014-03-27
Posts: 113

Re: Conky Switcher (Pipe Menu)

kbmonkey wrote:

I'm liking the direction this is taking and am keen to play with the modified code  8)
...
Edit: had a quick look at the new look of this menu and, oh my hat, great work!

Glad you're liking it! The headers idea is definitely attributable to @smacz

kbmonkey wrote:

To make things easier I am going to update the original post to point to the GitHub repository woodape set up, to make getting new versions easier  O:)

Thanks for point to the github, it is way easier than trying to continually update posts here. For those who are just looking at the end of this thread, the repository is https://github.com/woodape/bl-switcher and you can get the code for just the conky-switcher by saving https://raw.githubusercontent.com/wooda … witcher.py
or use kbmonkey's nifty command-line:

cd ~/bin && wget -N https://raw.githubusercontent.com/woodape/bl-switcher/master/bl-conky-switcher.py && chmod +x bl-conky-switcher.py

Any further bug reports can of course be posted in this thread, but I think it would be better to start logging them as issues on the github page.

Speaking of bugs...

smacz wrote:

EDIT: REVOKED -- behavior still present when invoked with -qc as well as just -c

Another reason to move to github:

woodape wrote:

pkill is already implemented in the script to handle any conkies launched outside of the script like

conky -q -c $HOME/.config/conky/bl-right.conky

so long as a full path is given when launching the conky. It wouldn't be so difficult to change it to kill conkies that only have the '-c' tag as well.

I would have logged this as an open issue when I posted it. In any case, the latest code handles conkies launched outside of the script with the  '-c' , '-qc', and '-q -c' arguments.

smacz wrote:

In REPLACE mode it acts as a "killall". The entries show up great on the menu, but the functionality is just not there.

I wasn't able to replicate this on my machine. Before the edit for additional arguments, trying to kill unmanaged conkies launched with only a '-c' or a '-qc' argument didn't kill the unmanaged conkies or any other conkies. Am I reading this weirdness wrong?

smacz wrote:

but I feel that the new functionality can be less ambiguous. Any chance you would put a separator tag at the top containing which method we're currently in?

Great idea! I put it in the latest version, much better looking I think smile

Sector11 wrote:

9. Toggle Load / Kill -  conkys still there
10 killed each individually and the went ...
11 tried again and got into a situation where the conkys were gone BUT the menu said they were there and so did the session log but "killall conky" reported no conkys, but look at the menu and the log:

I'm reading this as "if conkies that are launched by the script are killed outside of the script they should no longer appear in the 'session.log'". I've added the functionality that if no conkies are open, then the 'session.log' file is flushed to reflect that nothing is open. This needs to be changed when I get a chance to "if a conky is in the 'session.log' file but isn't open, remove it from the 'session.log' file". Issue opened in github smile

Also thanks to @detinith, the code in the github has comments throughout. It is a very bad habit of mine to not be continuously commenting throughout code, one which I'm trying to get rid of. Also @detinith has made it more 'python-y', another good habit I need to pick up.

Offline

#54 2015-03-18 08:28:53

smacz
#! Junkie
Registered: 2014-12-09
Posts: 250

Re: Conky Switcher (Pipe Menu)

woodape wrote:

...so long as a full path is given when launching the conky.

Missed that  one roll I knew that was too weird to be a bug. Works fine killing the unmanaged conky as long as...well, what @woodape said.

Beautiful code up at github. I think we got a winner here boys. I'll test out the tint2 variant. Thanks for porting that as well.

One last thing, can you put that 6-or-whatever-line script for autostart up in the repo too for a reference? Or I'm sure it'd be fine to just include it in the README or the commented-out intro of the code if that'd be more kosher.

@detinith any chance you could point out a couple things that may have been (glaringly) obviously non-pythonic (to you) in the script before the rewrite? I'm reading a lot of python code, and just starting to get a grasp on it (and coding in general). I especially latched onto (...i'm assuming that it's) your comment "ask for forgiveness instead of permission". I've heard that before and that makes total sense (in context). Any more nuggets of wisdom hidden in this script that you think might be worth internalizing? Either way, thanks for tossing some help our way.

Last edited by smacz (2015-03-18 10:13:12)

Offline

#55 2015-03-19 05:47:34

smacz
#! Junkie
Registered: 2014-12-09
Posts: 250

Re: Conky Switcher (Pipe Menu)

@woodape put up code today to actually manage any conky that was started, no matter how it was started. (It is currently it's own separate branch and has yet to be merged back into master on github.) So to put it through it's paces...

Load / Kill conkys through Root Menu in {Load / Replace} mode. Check.
Replace with one or more conkys initially running in {Replace} mode. Check.
Replace with no conkys initially running in {Replace} mode. Check.

Killing a conky the was started in the $PWD without a .conkyrc extension:

  1. Terminal: conky -c ./conky1

  2. Root Menu --> {Replace | Load / Kill}: Kill conky1

Check.

Killing a conky started with only cmd-line arguments:

  1. Terminal: conky -t '${time %D %H:%M}' -o -u 30

  2. Root Menu --> {Replace | Load / Kill}: Kill 30

Check.

Running conky like a noob:

  1. Terminal: conky

  2. Root Menu --> {Replace | Load / Kill}: Kill conky

Check.

Fix behavior from earlier:

  1. Terminal: conky  conky1.conkyrc

  2. Root menu --> {Load / Kill}: Load conky2

  3. Root menu --> {Replace}: Kill conky1

Kills only conky1. Check.

The 'session.log' file keeps everything up to date, so my menu always reflects the current state of the conkys. Keep in mind that if there's an existing session.log with one existing line that's blank, the script will return an invalid entry. Deleting the session.log file is as good a fix as any as it will be automatically generated by this script anyways if absent.

Honestly, I can't find any unexpected behavior in this program. I'll give my standing ovation to @woodape. Nice job man. And thanks.

Last edited by smacz (2015-03-19 06:16:04)

Offline

#56 2015-03-19 13:46:48

woodape
#! CrunchBanger
From: Cape Town, South Africa
Registered: 2014-03-27
Posts: 113

Re: Conky Switcher (Pipe Menu)

smacz wrote:

Honestly, I can't find any unexpected behavior in this program. I'll give my standing ovation to @woodape. Nice job man. And thanks.

Thanks for the thanks! I'd personally like the unmanaged conkies which are launched without config files to come up as "Unknown Conky 1", "Unknown Conky 2" etc. but the way it is right now is descriptive enough and functional. The tint2 version is basically the same thing. Together they make for some quick theming action smile

Here's the full menu:

mLkwtyQl.png

Here are some sequential screenshots to showcase the functionality:

H7mUDVCm.png

A2gzaNzm.png

x839wdGm.png

kHveRphm.png

ZofJfnem.png

lQOBf9Om.png

Last edited by woodape (2015-03-19 14:10:10)

Offline

#57 2015-03-20 05:24:16

kbmonkey
#! Die Hard
From: South Africa
Registered: 2011-01-14
Posts: 879
Website

Re: Conky Switcher (Pipe Menu)

I can't believe it has been 3 weeks already since this started and look at how it has grown.
smacz, nice test-pack you ran through there.
Thanks woodape!

Offline

#58 2015-03-26 17:33:03

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

Re: Conky Switcher (Pipe Menu)

woodape wrote:
smacz wrote:

Honestly, I can't find any unexpected behavior in this program. I'll give my standing ovation to @woodape. Nice job man. And thanks.

Thanks for the thanks! I'd personally like the unmanaged conkies which are launched without config files to come up as "Unknown Conky 1", "Unknown Conky 2" etc. but the way it is right now is descriptive enough and functional. The tint2 version is basically the same thing. Together they make for some quick theming action smile

Here's the full menu:

Again where is the completed code as sit in those images setups?

1. Please click on the "date" of the post that has the completed code and grab the ending number: http://crunchbang.org/forums/viewtopic.php?pid=423683#p423683
2. click on URL - and the Post button and insert the number.

The latest code can be seen here

Should look like this:

The latest code can be seen [post=423683]here[/post]

Does it also include the "tint2" pipemenu?

I have a zenity script for that as well: 2015_03_26_14_31_37_340x492_Sector11.jpg


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#59 2015-03-27 03:33:25

smacz
#! Junkie
Registered: 2014-12-09
Posts: 250

Re: Conky Switcher (Pipe Menu)

The latest code can be seen [url=https://github.com/woodape/bl-switcher]here[/url]

Like that? ]:D

Offline

#60 2015-03-27 04:09:55

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

Re: Conky Switcher (Pipe Menu)

^ Someone close enough - smack him  ]:D

- but that will get me there.  Thanks  wink


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#61 2015-03-27 06:52:52

woodape
#! CrunchBanger
From: Cape Town, South Africa
Registered: 2014-03-27
Posts: 113

Re: Conky Switcher (Pipe Menu)

Smack smacz?  8.(

For references though, @kbmonkey updated the first post of this thread with instructions on how to get the switcher from my github, what command to put in the rc.xml file to see the switcher in the menu, and the command to put in the openbox autostart file to get the conkies in the 'session.log' file produced by the script to be launched at startup.

The first post where I switched to github is here, and I haven't posted code directly in this thread since - it's a pain to try and update long code by editing posts, especially since in python spacing matters very much. Github makes it easy to obtain the code and any updates, as well as making it easy to keep track of bugs, feature requests, etc.

Sector11 wrote:

Does it also include the "tint2" pipemenu?

There is a tint2 version on the github page. It isn't much more than replacing any instance of the word "conky" with "tint2", and removing the "-q" arguments from the relevant lines.

In my screenshots, both pipemenus are listed under an "Appearance" menu because I intend to do a few more theming pipemenus. Probably one for terminal colors, lightdm, and wallpapers - these would all be somewhat simpler than the conky-switcher as there would be no 'Load/Kill' mode. I haven't got time to work them out just yet, but to anybody who wants to figure them out please fork my repo and then submit a pull request when you've got something working!

Offline

#62 2015-03-27 11:56:40

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

Re: Conky Switcher (Pipe Menu)

Colour me: DUH!  and OOPS!   :8

Thanks guys. Testing now.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#63 2015-03-27 12:25:49

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

Re: Conky Switcher (Pipe Menu)

2015_03_27_09_08_27_1920x1080_Sector11.jpg
I don't like the idea that every "Unmanaged Conky" is killed automatically when I choose to run "bl-top"


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#64 2015-03-27 12:57:36

woodape
#! CrunchBanger
From: Cape Town, South Africa
Registered: 2014-03-27
Posts: 113

Re: Conky Switcher (Pipe Menu)

Sector11 wrote:

I don't like the idea that every "Unmanaged Conky" is killed automatically when I choose to run "bl-top"

I can see in your picture that you're in replace mode. Click 'Toggle Load / Kill' mode at the bottom and then that won't happen. 'Replace' mode is made so that all open conkies are killed and the "replaced" with the conky / conky group that you select. 'Load / Kill' mode allows you to "load" and "kill" individual conkies / conky groups without interfering with any open conkies, including the ones that are "unmanaged".

Offline

#65 2015-03-27 14:03:40

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

Re: Conky Switcher (Pipe Menu)

DUH!!!  OK, that works ...

NICE!  I like it!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#66 2015-03-27 15:56:31

woodape
#! CrunchBanger
From: Cape Town, South Africa
Registered: 2014-03-27
Posts: 113

Re: Conky Switcher (Pipe Menu)

Sector11 wrote:

DUH!!!  OK, that works ...

NICE!  I like it!

Great! I think the code could use a little cleaning up, and I'd like to see a few more people give it a test run and try and break it (though you are notoriously good at that yourself  ]:D  ), but otherwise it seems to work as intended.

Offline

#67 2015-04-03 07:44:15

smacz
#! Junkie
Registered: 2014-12-09
Posts: 250

Re: Conky Switcher (Pipe Menu)

@woodape best way of subjecting it to breakage is to submit a pull request...

Do you want me to draft up a README and Help function? Pull request submitted.

Last edited by smacz (2015-04-03 08:48:01)

Offline

#68 2015-04-03 13:57:45

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

Re: Conky Switcher (Pipe Menu)

woodape wrote:

Great! I think the code could use a little cleaning up, and I'd like to see a few more people give it a test run and try and break it (though you are notoriously good at that yourself  ]:D  ), but otherwise it seems to work as intended.

I don't do "code". I'm the "Crash Dummy" - if it gets by me - it's good.

Here I am studying for the Beta test before installing the script.  lol


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#69 2015-04-29 17:34:05

smacz
#! Junkie
Registered: 2014-12-09
Posts: 250

Re: Conky Switcher (Pipe Menu)

BUMP for visibility and consideration in BunsenLabs seeing as a similar program is under scrutiny recently.

Github repo by @woodape

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