You are not logged in.
^ That would still have window decorations, though it would be better than vlc for what falldown wants to do.
I think that package does not have the buggy built-in mplayer GUI complied in.
Offline
correct on vlc.. still has a thin border after undecorated.
S11 gave me a great idea, but doing it the way I wanted sends the cpu usage up because of the amount of images..
so I am thinking bash video.
Last edited by falldown (2012-08-23 15:42:13)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Peachy my good friend.
Can your timer script be converted into a continuous loop?
a continuous loop would be quite easy
something like
updates=conky_parse("${updates}")
loop_length=10
step=(updates %loop_length)then step will count = 0 to 9 continuously
Offline
^ thank you sir!!
Hope you are feeling better today 
##I PLAYED A VIDEO FROM CONKY!!!##
I am not sure if it is the first time it has been done, but I am excited either way!!
It needs alot of work..
Button won't close until video has finished..
ugly text across the screen..
and mplayer opens above windows until you highlight window.
I will put a video up in a bit!!
also
The left side conky (the one with video) stops responding.
Last edited by falldown (2012-08-23 17:43:10)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^ thank you sir!!
Hope you are feeling better today##I PLAYED A VIDEO FROM CONKY!!!##
I am not sure if it is the first time it has been done, but I am excited either way!!It needs alot of work..
Button won't close until video has finished..
ugly text across the screen..
and mplayer opens above windows until you highlight window.I will put a video up in a bit!!
also
The left side conky (the one with video) stops responding.
The conky button won't close or some other button?
What text is on the screen?
The window opening problem sounds like a layering issue, seeing the video will help me understand it better.
The conky not responding sounds related to the button issue.
Could you post the line you are using to start mplayer?
I think I know what the problem is but I need to see the line to be sure.
Offline
Here is the video...
http://youtu.be/iXOPVcf-yK4
And I will grab the other info you requested.
Here is the bash..
#!/bin/bash
# conky-video
# calculate width in %
# get screen width in pixels
widthpx=`xrandr | grep "*" | sed -r 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/'`
# get 47% of that (just some number, use what you need here)
percentpx=`echo "$widthpx*10/100" | bc`
# open playlist and play
mplayer -geometry 25%:35% -xy $percentpx -fixed-vo /home/falldown/test-0000.mpeg
# endAnd the button I am referring to is the weather button..
Last edited by falldown (2012-08-23 17:55:29)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^ I also need to see the lua line you use to start that bash script.
I think that is where the problem is.
If the conky is not updating the buttons will not work because the buttons are part of the same script that is stuck.
Offline
weatherbutton..
if weatherbutton==1 then
starty=42
gap=15
ypos=wthb
ypos=starty+ypos
--image({x=5,y=weatherbuttony-10,w=600,h=220,file="/home/falldown/lua/trekv9000opened7.png"})
out({c=0xCD9712,a=1,f="starcine",fs=12,x=10,y=ypos-25,txt=weather_location})
ypos=gap+ypos
image({x=15,y=ypos-15,h=100,w=100,file=now["weather_icon"]})
image({x=100,y=ypos+gap*3,h=35,w=35,file=now["wind_icon"]})
--data titles
ypos=gap+ypos
ypos=gap+ypos
out({c=0x85B4E0,a=1,f="starcine",fs=12,x=132,y=ypos-12,txt="temperature-"})
ypos=gap+ypos
out({c=0x327DC1,a=1,f="starcine",fs=12,x=151,y=ypos-5,txt="feels like-"})
ypos=gap+ypos
out({c=0xFDFDFD,a=1,f="starcine",fs=12,x=130,y=ypos,txt="wind:"})
--out({c=0x327DC1,a=1,f="starcine",fs=14,x=160,y=ypos+gap*2-3,txt="today's"})
out({c=0x327DC1,a=1,f="starcine",fs=12,x=120,y=ypos+gap*2-1,txt="hi:"})
out({c=0x327DC1,a=1,f="starcine",fs=12,x=180,y=ypos+gap*2-1,txt="lo:"})
out({c=0x000000,a=1,f="starcine",fs=12,x=255,y=ypos+gap*4,txt="hum:"})
out({c=0x000000,a=1,f="starcine",fs=12,x=255,y=ypos+gap*2,txt="dp:"})
out({c=0x327DC1,a=1,f="starcine",fs=12,x=65,y=ypos+gap*3,txt="precip:"})
out({c=0x85B4E0,a=1,f="starcine",fs=12,x=68,y=ypos+gap*5,txt="cloud:"})
out({c=0x000000,a=1,f="starcine",fs=11,x=10,y=ypos+gap*2,txt="moon"})
out({c=0x000000,a=1,f="starcine",fs=11,x=10,y=ypos+gap*6,txt="phase"})
--output of data options
ypos=gap+ypos
out({c=0x327DC1,a=1,f="starcine",fs=14,x=10,y=ypos-85,txt=now["conditions_short"]})
ypos=gap+ypos
out({c=0x000000,a=1,f="starcine",fs=20,x=255,y=ypos-68,txt=now["temp"].."°"})
ypos=gap+ypos
out({c=0x000000,a=1,f="starcine",fs=20,x=255,y=ypos-50,txt=now["feels_like"].."°"})
ypos=gap+ypos
out({c=0xFDFDFD,a=1,f="starcine",fs=12,x=175,y=ypos-60,txt=now["wind_mph"]})
out({c=0xFD700A,a=1,x=140,y=ypos-31,txt=high_temp[1].."°"})
out({c=0xBCC5C5,a=1,x=205,y=ypos-31,txt=low_temp[1].."°"})
out({c=0x000000,a=1,x=265,y=ypos+30,txt=now["humidity"].."%"})
out({c=0x000000,a=1,x=275,y=ypos-30,txt=now["dew_point"].."°"})
out({c=0x327DC1,a=1,x=125,y=ypos-15,txt=precipitation[1].."%"})
out({c=0x85B4E0,a=1,x=125,y=ypos+15,txt=cloud_cover[1].."%"})
image({x=20,y=ypos-30,h=50,w=50,file=moon_icon[1]})
out({a=1,txt=conky_parse"${exec ~/lua/conky_video}"})
end--weatherbutton==1 functionPeachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
I can take the geometry out of the bash and leave that up to the lua script.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^^ As far as the freezing and weired text problems this line is your problem.
out({a=1,txt=conky_parse"${exec ~/lua/conky_video}"})exec prints the text returned by the command and stops all conky updates until the command is done running.
Since mplayer outputs text to the terminal as it plays it explains your text issue.
Since you did not put a " &" after the command it remains attached to the conky process so the update does not end until the mplayer process ends.
Lua has it's own built in way to execute programs you should use those instead, they are much better than the ones in conky.
Use this line instead.
os.execute("~/lua/conky_video &")I will explain it in a moment.
There are two ways to execute a command in lua.
The first is
os.execute()which runs a command but does not return any output produced by this command.
The command that is executed is not attached to the conky thread so it won't cause lockups of the lua script.
This is good for running things that are slow or that you don't care about the return value.
The second is
io.popen()which runs a command and returns anything printed to "stdout" by the command, "stderr" output ends up in the terminal conky is running in.
You use it like this to get the output into a script.
stdout = io.popen("command")
stdout = stdout:read("*a")This command is attached to the conky thread so it will cause lockups if it takes longer to run than the time remaining in the update interval.
This command is used when you want to run a command and use its output in some way in your lua script.
Last edited by arclance (2012-08-23 18:28:56)
Offline
##I PLAYED A VIDEO FROM CONKY!!!##
I am not sure if it is the first time it has been done, but I am excited either way!!
WOW!
YIPEEEE!
Holy Videos, Batman!
man oh man you are amazing!!!!!!!!!!!!!!!!!
Now just how did 'I' give you that idea?
Offline
WOW!
YIPEEEE!
Holy Videos, Batman!man oh man you are amazing!!!!!!!!!!!!!!!!!
Now just how did 'I' give you that idea?
Your wallpaper that you suggested sent me on a crazed google search for animated wallpaper which led me here.. 
Good stuff!! 
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
arclance
I am getting the
Conky: llua_do_call: function conky_weather execution failed: /home/falldown/lua/v9000.lua:981: attempt to call field '?' (a nil value)using the
os.execute("~/lua/conky_video &")Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^ Try replacing the "~" with "/home/yourusername" that might be the problem.
Also try restarting your conky process, it might be global variable issue.
If that does not fix it post line 981 in "/home/falldown/lua/v9000.lua" here so I can see what is causing the problem.
Last edited by arclance (2012-08-23 18:27:49)
Offline
Ok fixed that issue, but now my cpu % shot up 100% and my entire system froze.
edit
A stray { <--bracket needed removed
Last edited by falldown (2012-08-23 18:30:22)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^ Ah, right that would be because you are starting a new mplayer every second.
You need to add a check so it only starts the movie if it is not already playing.
Sorry I forgot about that.
Give me a second to and I will show you how to do it.
Last edited by arclance (2012-08-23 18:30:51)
Offline
Almost fried my VAIO!! 
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Okay this checks if your bash script is running and if it is not it starts the script.
local mplayer_running = conky_parse("${if_running -x conky_video}1${else}0${endif}")
if mplayer_running == "0" then
os.execute("~/lua/conky_video &")
end --# if mplayer_running == "0" thenPut it where the os.execute() line is now, making sure the os.execute() in the new code is the same as the one you are replacing.
If this does not work we will need to check for the mplayer process itself.
You also might need to have the button kill the script/mplayer when it is closed or it the mplayer will stay there.
Offline
if i understand correctly what has been going on, you need an execute type button to activate the movie rather than an on off
you currently have this
click button = button on until it is clicked again
if button is on execute movie script
but this leads to repeated executes if the script which causes the frying
what you need to control the movie is
click button = on
turn movie on
turn button off
Offline
arclance
Nope.. it loads multiple mplayers.
And the whole system goes into slow-mo.
Last edited by falldown (2012-08-23 18:50:24)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
if i understand correctly what has been going on, you need an execute type button to activate the movie rather than an on off
you currently have thisclick button = button on until it is clicked again
if button is on execute movie scriptbut this leads to repeated executes if the script which causes the frying
what you need to control the movie is
click button = on
turn movie on
turn button off
So a sub-button for the video?
if weatherbutton==1 then
--videobutton button
local videobuttonx=5
local videobuttony=wthb--425
local videobuttonw=45
local videobuttonbuttonh=45
--more stuff--
if videobutton==1 then
--data stuff--
endLast edited by falldown (2012-08-23 18:56:52)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
S11 wrote:WOW!
YIPEEEE!
Holy Videos, Batman!man oh man you are amazing!!!!!!!!!!!!!!!!!
Now just how did 'I' give you that idea?
Your wallpaper that you suggested sent me on a crazed google search for animated wallpaper which led me here..
Good stuff!!
Hahahahahahaha I'll say it again!
man oh man you are amazing!!
How you got 'animated' out of that I have no idea, but love the results.
Animated wallpapers ... never knew such things existed ... I see now they do.
Glad I could get some creativity flowing. 
Offline
arclance
Nope.. it loads multiple mplayers.
And the whole system goes into slow-mo.
So a sub-button for the video?
Okay so the script must end before the mplayer does.
You can either check for the mplayer process or run it with a sub-button.
What do you want to do?
Last edited by arclance (2012-08-23 18:55:00)
Offline
mrpeachy wrote:if i understand correctly what has been going on, you need an execute type button to activate the movie rather than an on off
you currently have thisclick button = button on until it is clicked again
if button is on execute movie scriptbut this leads to repeated executes if the script which causes the frying
what you need to control the movie is
click button = on
turn movie on
turn button offSo a sub-button for the video?
or set up an execute type button with the same size and position as the on/off button
a click there will activate both buttons but as the execute type button turns itself off immediately you only get the video playing once
...unless you were to continuously click the button
one condition would be that once the on/off button is on, that turning it off wouldnt cause the movie to launch (as you would be clicking the exec button again also)
you could do this by
if on_off_button==1 and exec_button==1 then
play movie
exec_button==0 --turn exec button off
endLast edited by mrpeachy (2012-08-23 19:01:58)
Offline
How about this..?
if weatherbutton==1 then
--videobutton button
local videobuttonx=5
local videobuttony=wthb--425
local videobuttonw=45
local videobuttonh=45
--calculate if click was inside box
if localx>=videobuttonx and localx<=videobuttonx+videobuttonw and localy>=videobuttony and localy<=videobuttony+videobuttonh and videobutton~=1 then
videobutton=1
elseif localx>=videobuttonx and localx<=videobuttonx+videobuttonw and localy>=videobuttony and localy<=videobuttony+videobuttonh and videobutton==1 then
videobutton=0
end
if weatherbuttonbutton==1 and videobutton==1 then
os.execute("~/lua/conky_video &")
videobutton==0 --turn videobutton off
end --videobutton functionPeachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.