SEARCH

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

You are not logged in.

#51 2012-09-26 06:16:57

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

Well, since I tried using that Ubuntu Forums link above for setting the conkys to specific windows I couldn't get it to work properly so I asked on that thread what was wrong and the guy said he could never get it to work consistently in Compiz, but instead had a work around by removing sticky from own_window_hints to only have it on one workspace(which I knew that, but just didn't think about it) and since compiz sets the workspaces as one big desktop to set the gap_x position to whatever coordinate I wanted it at. So if I want it on workspace 2 then set the gap_x to between 1366 and 2731 etc ... on a 1366 resolution. Oh and own_window_type must be normal and alignment must be tl or top_left and set the x and y cooordinates respectively to where you want it on the screen. I used this method and your original lua file that I backed up to run your weather script on workspace 2 only.

In short:

alignment tl
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
gap_x (n) #between 0-5464

Sorry if this was a waste of time, but I at least learned something and you lead mein the right direction so thanx a great deal.

Last edited by Lateralus138 (2012-09-26 06:18:02)


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

Help fund CrunchBang, donate to the project!

#52 2012-09-26 17:52:24

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

Hey when I remove sticky it makes the buttons not work, do you know of a way to work around this?


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#53 2012-09-26 19:16:27

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

Re: arclances conky weather script - v6.2.1

^ I don't know could you try killing and restarting all your conkys and see if the fixes it.
Changing settings in the .conkyrc while the weather conky is running can make the buttons stop working.

If that does not work could you post your modified .conkyrc so I can see if you made any other changes that could have broken the buttons.

Offline

#54 2012-09-26 19:26:51

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

Oh I've already tried killing everything and then starting weather conky by itself and I've tried disabling all conkys at start up and then starting it by itself and I aslo tried using your original conkyrc and ONLY removing sticky so I am 100% sure it is a problem with sticky. So at this point the only thing I have modified from your original file is removing sticky. I re-added sticky back to it and the restarted it and it worked again. I imagine it's something to do with Compiz. Not a big deal, I have just made a script to kill all conkys and then start your weather conky whenever I want to use it and created a desktop shortcut so my girlfriend can start it up whenever she needs to look at it. Just so you can see for yourself:

#####
# conky configuration for conkyWeather_arclance_lua_v6.2 by arclance
# displays weather data and images
#####
### Position ###
alignment bottom_left
gap_x 622
gap_y 31
minimum_size 1057 270
maximum_width 1057
### End Position ###

### Borders ###
border_inner_margin 0
border_outer_margin 0
border_width 0
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
### End Borders ###

### Window ###
own_window yes
own_window_transparent yes
#own_window_argb_visual false
#own_window_argb_value 0
own_window_class conky
own_window_type normal
own_window_title weatherConky
own_window_hints undecorated,below,skip_taskbar,skip_pager
### End Window ###

### Color ###
default_color CC9900
default_outline_color 000000
default_shade_color 8B0000
color0 EE7600
color1 8B0000
### End Color ###

### Font ###
use_xft yes
xftfont DejaVu Sans Mono:size=10
xftalpha 1
override_utf8_locale yes
uppercase no
### End Font ###

### Conky Settings ###
double_buffer yes
background no
update_interval 1
total_run_times 0
no_buffers yes
use_spacer none
cpu_avg_samples 1
net_avg_samples 1
imlib_cache_size 0
### End Conky Settings ###

### Lua ###
lua_load /home/ian/conky/conkyWeather_arclance_v6.2_2012-09-16/lua/conkyWeather_arclance.lua
lua_draw_hook_pre main
lua_startup_hook start_xdotool
lua_shutdown_hook stop_xdotool
### End Lua ###

TEXT

Last edited by Lateralus138 (2012-09-26 19:30:30)


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#55 2012-09-26 19:59:09

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

Re: arclances conky weather script - v6.2.1

^ Yes it is probably a problem with getting the location of the conky window.
It is probably getting the location in the current workspace but needs the location in the giant workspace when not using "sticky".

To test this could you run the conky without "sticky" and then run

xwininfo -all -int -tree -name 'weatherConky'

in both workspace 1 and 2 and post the results here.

Then go to workspace 2 and run

xdotool search --sync --classname 'conky' behave %@ mouse-click getmouselocation

and then click on the weather conky and post the result here.

That might give me enough information to write a special case for compiz without "sticky" for the button script without setting up a Ubuntu virtual machine to test this on myself.

Offline

#56 2012-09-26 22:17:57

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

Should I change the gap_x position to move it to the second workspace before running these?


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#57 2012-09-26 22:18:35

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

Re: arclances conky weather script - v6.2.1

Lateralus138 wrote:

Should I change the gap_x position to move it to the second workspace before running these?

Yes.

Offline

#58 2012-09-26 22:52:15

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

Note: Before changing gap_x with your conky on Workspace 1 I am able to click the buttons, but I changed gap_x over to Workspace 2 and restarted my computer and then started your conky I couldn't click the buttons. I have changed the gap_x to 1367 and gap_y to 387.

^^xwininfo -all -int -tree -name 'weatherConky'^^
Workspace 1:

xwininfo: Window id: 16777217 "weatherConky"

  Root window id: 177 (the root window) (has no name)
  Parent window id: 12584106 (has no name)
     0 children.

  Absolute upper-left X:  1586
  Absolute upper-left Y:  386
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1059
  Height: 272
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +1586+386  --1279+386  --1279-110  +1586-110
  -geometry 1059x272+1586+386

  Bit gravity: ForgetGravity
  Window gravity: NorthWestGravity
  Backing-store hint: NotUseful
  Backing-planes to be preserved: 0xffffffff
  Backing pixel: 0
  Save-unders: No

  Someone wants these events:
      ButtonPress
      ButtonRelease
      EnterWindow
      Exposure
      StructureNotify
      FocusChange
      PropertyChange
  Do not propagate these events:
  Override redirection?: No

  Window manager hints:
      Client accepts input or input focus: No
      Initial state is Normal State
      Displayed on desktop 0
      Window type:
          Normal
      Window state:
          Skip Taskbar
          Skip Pager
          Below
      Process id: (unknown) on host Hell
      Frame extents: 0, 0, 0, 0

  No normal window size hints defined
  No zoom window size hints defined

  No window shape defined
  No border shape defined

Workspace 2:

xwininfo: Window id: 16777217 "weatherConky"

  Root window id: 177 (the root window) (has no name)
  Parent window id: 12584106 (has no name)
     0 children.

  Absolute upper-left X:  220
  Absolute upper-left Y:  386
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1059
  Height: 272
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +220+386  -87+386  -87-110  +220-110
  -geometry 1059x272-87+386

  Bit gravity: ForgetGravity
  Window gravity: NorthWestGravity
  Backing-store hint: NotUseful
  Backing-planes to be preserved: 0xffffffff
  Backing pixel: 0
  Save-unders: No

  Someone wants these events:
      ButtonPress
      ButtonRelease
      EnterWindow
      Exposure
      StructureNotify
      FocusChange
      PropertyChange
  Do not propagate these events:
  Override redirection?: No

  Window manager hints:
      Client accepts input or input focus: No
      Initial state is Normal State
      Displayed on desktop 0
      Window type:
          Normal
      Window state:
          Skip Taskbar
          Skip Pager
          Below
      Process id: (unknown) on host Hell
      Frame extents: 0, 0, 0, 0

  No normal window size hints defined
  No zoom window size hints defined

  No window shape defined
  No border shape defined

xdotool search --sync --classname 'conky' behave %@ mouse-click getmouselocation:

Note: I wasn't sure if you wanted me to click any where on the conky or on a button so I clicked on "Hourly" for this

x:911 y:455 screen:0 window:16777217

Last edited by Lateralus138 (2012-09-26 22:52:51)


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#59 2012-09-26 23:03:18

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

Re: arclances conky weather script - v6.2.1

^ That is what I suspected would happen.
xwininfo has different position output in different workspaces.
Since it is only run when conky starts up it does not have the correct data for the current workspace.
Could you try killing the weather conky and restarting it while you are in workspace 2.
That will tell me if the workspace 2 data is good or not.

It did not matter where you clicked in the conky as long as you clicked on it somewhere.

Offline

#60 2012-09-27 00:23:24

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

Well I may have forgot to mention that when I try to restart  your conky it never shows back up, I have to restart my computer to get it going again.
First of all I start your script with a script like this:

#!/bin/bash
#Arclane weather script
python /home/ian/conky/conkyWeather_arclance_v6.2_2012-09-16/conkyWeather_arclance_v6.2.py &
sleep 5s
conky -c /home/ian/conky/conkyWeather_arclance_v6.2_2012-09-16/conkyrc_conkyWeather_arclance &

If I kill it by:

killall conky

and restart it I get:

ian@Hell:~$ killall conky
ian@Hell:~$ Scripts/arclane_weather.sh
using cPickle
no pull yet

timeDifference = 687.212095022
using backup
backupUsed: True
pullFailure: False
pullFailure2: False
pullFailure3: False
pullFailure4: False
pullFailureSAT: False
lastUpdate =  | 07:10:02 PM CDT
Output Written
ian@Hell:~$ true
Conky: desktop window (1c00095) is subwindow of root window (b1)
Conky: window type - normal
Conky: drawing to created window (0xe00001)
Conky: drawing to double buffer
timeDifference = 692.239681959
waiting for 207.760318041 s
Next Update At: 2012-09-26 | 07:25:02 PM CDT
abstlx: 0 abstly: 24 winNum_Parent: 12583667 winNum_2: 14680065
isNight = true

abstlx: 1366 abstly: 386 winNum_Parent: 12583667 winNum_2: 14680065
abstlx: 1366 abstly: 386 winNum_Parent: 12583667 winNum_2: 14680065

and nothing comes up except a blacked out part of the screen where the conky should be.

That is restarted from WS2 by the way.


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#61 2012-09-27 00:37:45

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

Re: arclances conky weather script - v6.2.1

^ You can't restart it like.
If you want to restart using your "arclane_weather.sh" script you need to kill the python script as well as the conky first.
You will end up with multiple python scripts running that way.
That is a good way to get banned from the WU API for overuse.

I would use a script like this instead

#!/bin/bash
#Arclance weather script
pkill -f ".*conkyWeather_arclance_v6.2.py" &&
pkill -f ".*conkyrc_conkyWeather_arclance" &&
python /home/ian/conky/conkyWeather_arclance_v6.2_2012-09-16/conkyWeather_arclance_v6.2.py &
sleep 5
conky -c /home/ian/conky/conkyWeather_arclance_v6.2_2012-09-16/conkyrc_conkyWeather_arclance &

It kills the python script
then kills the weather conky only
then starts the python script
then waits 5 seconds and finally starts the weather conky.

Just run this script and it will kill and restart everything automatically.
You could also make a script just to kill and restart the conky and leave the python script alone.

If the darkness problems still persists try restarting compiz it could be a problem with "own_window_argb_visual true" and compiz.

Last edited by arclance (2012-09-27 00:43:44)

Offline

#62 2012-09-27 01:34:00

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

^OK no my settings are

own_window_transparent yes
#own_window_argb_visual false
#own_window_argb_value 0

Those are commented out, I had started from scratch.

I created a script using your method of pkill to just kill the python and conky and then use my normal startup script to start it again and now it actually displays so my problem is that I wasn't killing the python so thank you for that.

When I killed the weather script and started it back up from WS2 it then started back up on WS3! So the method I am using of gap_x and removing sticky just moves it the amount of pixels over from the originating screen.

I will try using your altered lua method again with the sticky removed and see if that works.

Or I could try setting my gaps back to the original settings and start your script straight from WS2. I tried starting a normal conky with sticky removed from WS2 and it started only in WS2.

Last edited by Lateralus138 (2012-09-27 01:38:52)


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#63 2012-09-27 01:38:19

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

Re: arclances conky weather script - v6.2.1

^ Okay let me know how that works.
If it does not work I think I can make a adjustment to the buttons to work without "sticky" after seeing your last post.

Last edited by arclance (2012-09-27 01:38:48)

Offline

#64 2012-09-27 02:02:44

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

OK I have edited my above post and tried 2 methods.

The first method with your altered lua file didn't work, but I don't think I expected it to. I was just covering all bases now that I know how to correctly kill everything and restart.

I tried my second method of setting gap_x to 0 and starting it from WS2 and it worked!!! I can click the buttons on WS2.

I can start it up like that, but of course I would certainly like to see your adjustment to the buttons so that I can start this up at system boot instead of having to do it manually every time. This is all mostly for my girlfriend and children. She isn't real familiar with Linux and if I am not here I would like her to be able to just start the computer and it all start up for her and all she has to do is navigate to WS2 like I showed her. We have tornados and other bad weather here so I worry about my family of course.

Edit: I have noticed that everytime I kill everything from the terminal it shows

killing xdotool

and just hangs there.

Last edited by Lateralus138 (2012-09-27 02:05:42)


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#65 2012-09-27 02:19:00

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

Re: arclances conky weather script - v6.2.1

Lateralus138 wrote:

Or I could try setting my gaps back to the original settings and start your script straight from WS2. I tried starting a normal conky with sticky removed from WS2 and it started only in WS2.

Try that it might work.
I have another option if it does not.

Lateralus138 wrote:

Edit: I have noticed that everytime I kill everything from the terminal it shows

killing xdotool

and just hangs there.

Are you sure it is hanging or is that just the last thing printed?

The script makes a check to be sure that there are no other button script enabled conkys running before it kills the xdotool process that is used to detect mouse clicks.
Since the weather script by default only checks for itself it prints that message to indicate that it is killing the xdotool process since it is the last button conky running.

If it really hangs I might need to change the pkill command I am using to stop the xdotool process.

Offline

#66 2012-09-27 02:28:29

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

Lateralus138 wrote:

Or I could try setting my gaps back to the original settings and start your script straight from WS2. I tried starting a normal conky with sticky removed from WS2 and it started only in WS2.

arclance wrote:

Try that it might work.
I have another option if it does not.

It did work I was saying above, but still want to see your option; especially if it allows me to run your script at startup.

Lateralus138 wrote:

Edit: I have noticed that everytime I kill everything from the terminal it shows

killing xdotool

and just hangs there.

arclance wrote:

Are you sure it is hanging or is that just the last thing printed?

The script makes a check to be sure that there are no other button script enabled conkys running before it kills the xdotool process that is used to detect mouse clicks.
Since the weather script by default only checks for itself it prints that message to indicate that it is killing the xdotool process since it is the last button conky running.

If it really hangs I might need to change the pkill command I am using to stop the xdotool process.

Well i'm not sure if it's hanging, I wouldn't know how to tell, I just see it in the terminal and I either hit ctrl+c and kill it or ctrl+shift+q to close the terminal


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#67 2012-09-27 02:35:35

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

Re: arclances conky weather script - v6.2.1

Lateralus138 wrote:
Lateralus138 wrote:

Or I could try setting my gaps back to the original settings and start your script straight from WS2. I tried starting a normal conky with sticky removed from WS2 and it started only in WS2.

arclance wrote:

Try that it might work.
I have another option if it does not.

It did work I was saying above, but still want to see your option; especially if it allows me to run your script at startup.

Okay I missed that I will post the other option after we figure out if it is hanging when being killed or not.
If I need to do something about that I will put a fix for that in the modified lua script as well.

Lateralus138 wrote:

Well i'm not sure if it's hanging, I wouldn't know how to tell, I just see it in the terminal and I either hit ctrl+c and kill it or ctrl+shift+q to close the terminal

When you think it has hung hit enter.
If you get a new line like

username@hostname:~$

it has not hung it just did not update the terminal correctly (the ~ is the current working directory and might be something else).
If you get a new blank line it has hung.

Last edited by arclance (2012-09-27 02:36:23)

Offline

#68 2012-09-27 02:40:38

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

^No it's not hanging, went back to a normal prompt.


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#69 2012-09-27 02:44:14

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

Re: arclances conky weather script - v6.2.1

Here is a link to a new modified lua script.
Set it up like the last one.
Run conky in Workspace 1 without "sticky" and with the "gap_x" that puts it in Workspace 2.
Then go to Workspace 2 and click on one of the buttons to see if it works.

Offline

#70 2012-09-27 02:54:31

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

Re: arclances conky weather script - v6.2.1

New Version Released
v6.2.1 - 2012-09-26
    Readme
        Fix accidentally removed installDirectory setup instructions for Lua Script. (Thanks AndyOpie150)
        Add names of required packages in Ubuntu.
        Update Wunderground API location string instructions.
            The old API documentation page for this is gone.
            I improved what I had about selecting the location string in this guide already.
            A full guide needs to be written later.
        Improve directions for setting latitude and longitude for the radar and satellite images.
            Added instructions that this value should be only a number.
            More complete directions for how to find these values should be written in the future.
       
    Lua Script
        Fix installDirectory variable altered by a pervious update.
        Add more terminal debugging output.
            Added version information to startup debug output.
            Added installDirectory information to startup debug output.
       
    Python Script
        Add more terminal debugging output.
            Added version information to startup debug output.
            Added installLocation information to startup debug output.
            Added check for radarWU_API_LAT and radarWU_API_LON not being numbers (catch non-number characters).

This is a bugfix release for the setup instructions which also adds more debugging output to make assisting with setup problems easier.
If you already have a working v6.2 setup running you do not need to update anything.

Offline

#71 2012-09-27 03:32:11

Lateralus138
Member
From: Decatur, Il.
Registered: 2012-09-19
Posts: 41
Website

Re: arclances conky weather script - v6.2.1

arclance wrote:

Here is a link to a new modified lua script.
Set it up like the last one.
Run conky in Workspace 1 without "sticky" and with the "gap_x" that puts it in Workspace 2.
Then go to Workspace 2 and click on one of the buttons to see if it works.

Awesome!!!! Works great!!!! Thank you so much for your time and patience. I'm sure you learned something too, but this helps me a great deal.


...to swing on the spiral of ...our divinity and ...still be a human.

Offline

#72 2012-09-27 03:46:29

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

Re: arclances conky weather script - v6.2.1

^ Very good.
I can add that as a option in future versions of the script since it can be turned on and off with the new "notSticky" variable.

Offline

#73 2012-10-17 11:54:34

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

@arclance, is there an easy way to change the default colors of orange and light orange to blue and dark blue?  Just curious.  I'd like it to match my desktop as much as possible.  I tried it in the conkyrc_conkyWeather_arclance file to no avail.  I see a section at the beginning of the conkyWeather_arclance.lua dealing with color, but I'm unfamiliar with that particular way of color selection...

Any help appreciated...

CHIMO
Jed

PS, here is an image of it to give you an idea of what I mean...
http://www.jedsdesk.com/tmp/lakeview1.jpg

Last edited by jed (2012-10-17 12:53:42)


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

Offline

#74 2012-10-17 13:20:49

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

Re: arclances conky weather script - v6.2.1

Yes there is, the instructions on how to do that are at the bottom of the readme in the "Customization" section.

Customization    
    Font and Font Color can be changed by editing these lines in the lua script (conkyWeather_arclance.lua)
        
        color0_R,color0_G,color0_B,color0_A = (204/255),(153/255),0,1 -- Yellow #CC9900
        color1_R,color1_G,color1_B,color1_A = (238/255),(118/255),0,1 -- Orange #EE7600
        color3_R,color3_G,color3_B,color3_A = (139/255),0,0,1 -- Shade Color #8B0000

Those lines take rgba colors in this order - R,G,B,A - as a decimal value between 0 and 1.
If you look up a rgb color and get values in the 0-255 range just divide that number by 255 to get the correct value to put here.
Leave the A value as 1 unless you want to change the text transparency.

Last edited by arclance (2012-10-17 13:22:35)

Offline

Help fund CrunchBang, donate to the project!

#75 2012-10-18 03:39:06

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: arclances conky weather script - v6.2.1

Sheesh, just read the directions already!  Sorry 'bout that.  Great explanation here as well.  The link will take you to a current screen-shot of my arclance weather conky in blue.  Still trying to adjust my lifestyle to better serve my recent conky addiction!  I'd take just 10% of arclance's knoweledge!

Thanks,
Jed

http://www.jedsdesk.com/tmp/bluesconky.jpg


Proud user of VSDIO: Jedi!  You can download it from here...  I'm on  the web at NixNut.com!

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