maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] QtLockscreen: highly configurable lockscreen replacement (https://talk.maemo.org/showthread.php?t=75150)

sakya 2011-09-28 15:54

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by neboja (Post 1098182)
khm... reposting :)

Do you mean using the desktop wallpaper as the lockscreen backgound?
If yes: I don't know where the desktop wallpaper is but probably it's just a symbolic link to the real file.
If this is the case you can set this as the backgound in the config file.

Alfred 2011-09-28 15:59

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
I guess, he wants his background to be exactly the same as the current desktop's one. So there could be up to 9 backgrounds, that change depending on the desktop...
P.S. Which i personally find unattractive, since in my opinion, the background should be tied to the THEME.

sakya 2011-09-28 16:17

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
I noticed now that the latest update crashes when changing playlist (I didn't test it too much).
I'll fix this ASAP, wait for the next release to update.
Sorry for this problem. :)

antezz 2011-09-28 16:33

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
I would like to request the feature to fetch custom text either from a file or by passing it to qtlockscreens cache. Would add alot of options to have shell scripts doing all the process then just feed the lockscreen with the information somehow. Then you can make a widget with text + result.

sakya 2011-09-28 19:10

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Uploaded now version 0.1.18

Changelog:
* Fixed: crash when changing playlist

laith.m.y 2011-09-28 19:23

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
@ sakya

thanx for the updates

I wondering if qtlockscreen can support sliding date , time and other widgets we choose with slider ?

neboja 2011-09-28 20:42

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by sakya (Post 1098226)
Do you mean using the desktop wallpaper as the lockscreen backgound?
If yes: I don't know where the desktop wallpaper is but probably it's just a symbolic link to the real file.
If this is the case you can set this as the backgound in the config file.

YES! exactly that! i was searching trough whole system for where is stored info of desktop background.... but couldn't find it :p

and i think that it could be interesting, because you could use your theme wallpaper, no matter what theme is, and you don't need to replace manually wallpaper in config file for lockscreen ;)

thx for reading, and if it is doable, than ok, if not... oh well... :)

antezz 2011-09-28 21:13

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by neboja (Post 1098468)
YES! exactly that! i was searching trough whole system for where is stored info of desktop background.... but couldn't find it :p

and i think that it could be interesting, because you could use your theme wallpaper, no matter what theme is, and you don't need to replace manually wallpaper in config file for lockscreen ;)

thx for reading, and if it is doable, than ok, if not... oh well... :)

Code:

gconftool-2 -R /apps/osso/hildon-desktop/views
Will show you current active desktop and their background images.

neboja 2011-09-29 09:53

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
ok, so that means that we can get (extract) data from "schemas" files... or to follow gconf keys and use them, instead of using direct link to image???
i see there is a way to set background from a current one, or one of active desktops, just how???
(this is maybe kinda dumb question, but it is a best out of me :) , i'm no coder)

antezz 2011-09-29 18:39

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by neboja (Post 1098819)
ok, so that means that we can get (extract) data from "schemas" files... or to follow gconf keys and use them, instead of using direct link to image???
i see there is a way to set background from a current one, or one of active desktops, just how???
(this is maybe kinda dumb question, but it is a best out of me :) , i'm no coder)


Code:

gconftool-2 -g /apps/osso/hildon-desktop/views/`gconftool-2 -g /apps/osso/hildon-desktop/views/current`/bg-image
Will print current wallpaper location. But it will not work in qtlockscreen config file, but it's possible to make a script setting current wallpaper and kill it to refresh qtlockscreen cache. However that would be a ugly hack.

maras 2011-09-30 08:06

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Sakya, how about my question?

Quote:

Is there any possibility to show Qtlockscreen when someone is calling to me? I would like to unlock my lockscreen then answer a call.

neboja 2011-09-30 08:29

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by antezz (Post 1099141)
but it's possible to make a script setting current wallpaper and kill it to refresh qtlockscreen cache. However that would be a ugly hack.

maybe it is not ugly hack.... setting a script instead of classic background could be even resource friendly, (maybe???)

just instead of file patch it loads from few more lines of code, using a small script (am i right????)

Blaizzen 2011-09-30 15:26

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
1 Attachment(s)
Not sure if its been mentioned here before (I tried a google search etc), but I was wondering if its possible to have animated backgrounds. I tinkered a bit with the code and got this:
(sorry for the bad quality :( )
http://www.youtube.com/watch?v=OyvoB2ueDy8

Its very buggy though, and I think it died when I rotated the screen, however its more of a trial. Could this be implemented in the future? Or would this cause significant battery drain? I will try modify the code further to make it less buggy, but so far i've been guessing so not sure how it'll go :o

Btw awesome app :D

The code modifications I made are
Quote:

Originally Posted by lockscreen.cpp
#ifdef Q_WS_MAEMO_5

#include <QtGui/QMovie>

#include<QLabel>
#include<QGraphicsProxyWidget>

#include <QtGui/QWidget>
#include <QtGui/QX11Info>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <mce/dbus-names.h>
#include <mce/mode-names.h>

#endif

bool LockScreen::Debug;
bool LockScreen::ScreenshotMode;
QSettings* LockScreen::Settings;

LockScreen::LockScreen(QWidget *parent) :
QObject(parent)
{
.......

void LockScreen::setBackground()
{
bool isPortrait = LsWidget::isPortrait();

QString bkg;
if (isPortrait)
bkg = LockScreen::Settings->value("Main/BackGroundImageP", "/opt/usr/share/themes/alpha/backgrounds/lockslider.png").toString();
else
bkg = LockScreen::Settings->value("Main/BackGroundImageL", "/opt/usr/share/themes/alpha/backgrounds/lockslider.png").toString();

if (m_BkgPath != bkg){
if (!bkg.isEmpty())
{
QMovie *movie = new QMovie("/home/user/MyDocs/rotate.gif");
QLabel *processLabel = new QLabel();
processLabel->setGeometry(0,0,800,480);
processLabel->setMovie(movie);
movie->start();

QGraphicsProxyWidget *proxy = m_Scene.addWidget(processLabel);
m_Scene.setBackgroundBrush(QPixmap(bkg));
}
else
m_Scene.setBackgroundBrush(QBrush(QColor(0,0,0,0)) );

m_BkgPath = bkg;
}
}

edit: added image.

sakya 2011-09-30 15:31

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by Blaizzen (Post 1099643)
Or would this cause significant battery drain?

Stop that animated gif when the lockscreen is not visible...
Did you test the cpu and memory usage?

Blaizzen 2011-09-30 15:46

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by sakya (Post 1099644)
Stop that animated gif when the lockscreen is not visible...
Did you test the cpu and memory usage?

I only have conky available. At idle its using around 80% CPU and 8megs of ram. Let me know if you have a better logger I can use if you need more details :)

sakya 2011-09-30 15:59

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by Blaizzen (Post 1099650)
At idle its using around 80% CPU

80%? Wow! :)
Yes, this cause significant battery drain. :D

Blaizzen 2011-09-30 16:23

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
1 Attachment(s)
Quote:

Originally Posted by sakya (Post 1099656)
80%? Wow! :)
Yes, this cause significant battery drain. :D

I added some movie->stop(); and movie->start(); in places I thought might run when its hidden and got the usage down to 0 when its not visible (I think). Provided people don't constantly have the lockscreen up, it should be fine... maybe :p

Also fixed the issue with the background taking over everything :D

I've uploaded the lockscreen files with the changes cause I can't remember all the stuff I've modified tonight.

Edit: Forgot to attach... its a little late here :(

sakya 2011-09-30 16:49

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
I'll have a look at it, thanks.

ed_boner 2011-09-30 18:35

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
hi guys..great apps, congratulations to sakya and all the comunity members contributing...
one question...is it possible to change language locale from the configuration app globally to all the installed lockscreens?
also it would be nice if whatever the lockscreen is we could change the background to a custom image inside the configurator as well...just an ideia...tks once again to all.

ed_boner 2011-09-30 18:38

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
...sorry..i believe i should have posted this in another thread...

sakya 2011-10-01 09:33

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
OK, I added support to animated gif as background (just set an animated gif as BackGroundImageP/BackGroundImageL and it will work).
This is slow, I'd never use this as my lockscreen but maybe someone wants to (probably using a light gif with little animations).
The next update will have support to animated gif.
Please don't come here to say "It's slow" after having set a 2Mb gif as background. :p

marmistrz 2011-10-01 15:38

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
1. is it possible to have the stock lockscreen as an option in configurator without having to kill qtlockscreen? maybe it could be done just as an entry with pkill pause
2. @sakyu: maybe you could do conf utility as an entry in settings, not as an entry in menu

cloud596 2011-10-01 17:44

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
do u have idea to reduce amount of ram it take more than 20 mb ram, thanx anyway .love ur app

sakya 2011-10-01 18:14

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
1 Attachment(s)
Quote:

Originally Posted by cloud596 (Post 1100637)
do u have idea to reduce amount of ram it take more than 20 mb ram, thanx anyway .love ur app

I don't think I can do much.
Attached you can find the pmap output (I'm using the default theme).

As you can see most of the memory comes from the Qt libs like:
Code:

40234000  11204    1053      0      0  r-xp  /opt/lib/libQtGui.so.4.7.0
While the heap memory is:
Code:

0007f000    3336    2180    1984    972  rw-p  [heap]

marmistrz 2011-10-02 07:16

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
is it possible to have the stock lockscr as an option in configurator?

The way I see it it could be a dbus-script

[code]start on started qtlockscreen
stop on stopping qtlockscreen

script

pkill -STOP qtlockscreen

end script
[\code]

or something like that

and something that would reenable would be pkill -CONT qtlockscreen

Am I right?

Alfred 2011-10-02 07:50

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Sakya, thanks for gif. One quick question, will you be adding gif support to all images or just background?

WhiteWolf 2011-10-06 09:27

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
I love how you are staying. Even batterypatch uninstalled it for use with the best performance.

I wish we had the option of listening to FM from this application to not be unlocked to phone or you can control the change of stations in the radio application you are using. I am using "C FM Radio".

Another improvement would be not to lose the play list of songs when we have used the media player for watching videos. At this point if you view a video, QtLockscreen happens to have the list of videos and songs to play.

Thank you for your application.

sakya 2011-10-12 19:25

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Uploaded now version 0.1.19

Changelog:
* Added support to animated gif as background (slow, don't abuse of it) ;)
* Added TextCommand widget: displays text from an external command

To use a gif as background simply set the animated gif as you normally do. Don't abuse of this feature: animated gif are cpu heavy, I think you can safely use some "light" animated gif.

The TextCommand simply displays the text output of a command (or a script).
Here's an example that displays the current cpu clock (remember to escape the quotes inside the command):
Code:

...
Widgets\25\Name="TextCommand.CPUFreq"
Widgets\Size=25

[CPUFreq]
PosL="730;52"
PosP="410;52"
SizeP="64;40"
SizeL="64;40"
Font=";12;normal;0"
Command="awk '{print $1/1000\" MHz\"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq"
UpdateIntervalSeconds=1


Alfred 2011-10-12 20:35

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
I wonder, if the author of the iPhone theme could make "Slide to Unlock" text as a GIF background.... so it'll be the real deal

sakya 2011-10-13 19:22

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
1 Attachment(s)
Uploaded now version 0.1.20

Changelog:
* Added Multiline setting to Text and TextCommand widget
* Fixed TextCommand update

Set the multiline setting to 1 if the text you want to display is multiline.

Example of a multiline string in a TextCommand widget (screenshot attached):
Code:

...
Widgets\25\Name="Rect.SystemInfoBackground"
Widgets\26\Name="TextCommand.SystemInfo"
Widgets\27\Name="Text.SystemInfoText"
...

[SystemInfoBackground]
PosL="5;220"
PosP="5;220"
SizeP="120;70"
SizeL="120;70"
Radius=5
Color="0;0;0;150"

[SystemInfoText]
PosL="8;220"
PosP="8;220"
SizeP="120;70"
SizeL="120;70"
Font=";12;normal;0"
Alignment="left;center"
Multiline=1
Text="CPU:\nIP:\nMem:"
UpdateIntervalSeconds=1

[SystemInfo]
PosL="5;220"
PosP="5;220"
SizeP="117;70"
SizeL="117;70"
Font=";12;normal;0"
Alignment="right;center"
Multiline=1
Command="/opt/qtlockscreen/sysinfo.sh"
UpdateIntervalSeconds=1

and this is the script sysinfo.sh
Code:

#!/bin/sh
echo `awk '{print $1/1000" MHz"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`

CONN=$(/sbin/route | awk '/default/ {print $NF}')
IP="-"
if [ "$CONN" == "wlan0" ]; then
    IP=$(/sbin/ifconfig wlan0 | awk -F "[: ]" '/Bc/ {print $13}')
fi

if [ "$CONN" == "gprs0" ]; then
    IP=$(/sbin/ifconfig gprs0 | awk -F "[: ]" '/P-t-P/ {print $13}')
fi
echo $IP

echo -n `awk '/mT/ {memttl = $2}; /mF/ {memfre = $2}; /Bu/ {membff = $2}; $1 == "Cached:" {memcch = $2} END {printf ("%.1f MB\n",(memttl-memfre-membff-memcch)/1024)}' /proc/meminfo`


awroax 2011-10-14 02:41

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
How can I prevent qtlockscreen from rotating to portait with CSSU forcerotation on?
I've set landscape mode in the qtlockscreen settings, and added qtlockscreen in the blacklist in transitions.ini, but it still rotates to portrait.

zifis 2011-10-14 06:23

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Thanks for the updates Sakya :)

I tried the new gif feature by assigning a 480x800 7 frame animated gif as a background just to see how it runs.

It appeared as a very small thumbnail (10x20 or so) on the top left hand corner of the screen leaving the rest of the backround black. The animation speed was accurate though.

It this a bug or is it resizing to keep up with the animation speed?

Correction: On a closer look it's not resizing it only shows that very small part of the gif

sakya 2011-10-14 07:42

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by zifis (Post 1108570)
It appeared as a very small thumbnail (10x20 or so) on the top left hand corner of the screen leaving the rest of the backround black.

Can you please give me the animated gif you used?
It works fine with the gif I used for testing...

zifis 2011-10-14 13:27

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Ok, here is my test animated gif

And here's a printscreen of how it appears (follow arrow) :p
lol and it moves really fast :eek:

http://media.share.ovi.com/m1/s/3167...d67513e75b.jpg

sakya 2011-10-14 13:55

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by zifis (Post 1108704)
And here's a printscreen of how it appears (follow arrow) :p

What's that image?
The background (the gif) is the lower layer (you should see nothing of the gif, don't know why that slice in the corner is visible).
I tried the gif and it works fine for me (but I don't obviously have other images in front of it)

zifis 2011-10-14 15:09

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Um... there are no images in front of it. :confused:

If you mean the harmattan style slider, I slid it have way open for the printscreen to be accurate. (I had someone keep it open as I prtsrnd)

Anyway I tried it on a basic slider theme and again the gif is a little box on the top left :confused:

neboja 2011-10-14 16:25

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by sakya (Post 1098226)
Do you mean using the desktop wallpaper as the lock-screen background?
If yes: I don't know where the desktop wallpaper is but probably it's just a symbolic link to the real file.
If this is the case you can set this as the background in the config file.

OH IT IS THAT SIMPLE!!!!!!!!!!!!!!!!!!!!!!!!!!!! :D

the current theme wallpapers (or just non-theme but still current) are stored in a home/user/.backgrounds/ and has names:
background-1.png, background-2.png, background-3.png, background-4.png

so just in settings for qtlockscreen you should put a path to some of these files (if you like)... names of files are not changing (system default)

ONLY thing is that you could not link to portrait background... :P

@sakya, could you help with these??? is there way to put option to choose NON rotated pic for portrait background (eg to stay always landscape, and just to rotate widgets????

zifis 2011-10-17 12:55

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Can someone please try this test animated gif configuration and post me a printscreen?

All I get is black background instead of the animated gif :confused:

Please help because this is driving me crazy...

sakya 2011-10-17 13:14

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by zifis (Post 1109942)
All I get is black background instead of the animated gif :confused:

There's seem to be a bug. If I set the ortation to "auto" it works, but with "portrait" all I get is a black background.
I'll look at it, thanks

zifis 2011-10-17 13:20

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by sakya (Post 1109953)
There's seem to be a bug. If I set the ortation to "auto" it works, but with "portrait" all I get is a black background.
I'll look at it, thanks

Ah thank you Sakya :D (again) I was just about to call the mental institution... :D


All times are GMT. The time now is 23:22.

vBulletin® Version 3.8.8