Patch: Custom Power Menu with Swipe to Lock

Rating: 
5
Your rating: None Average: 5 (6 votes)

Customizable Power Menu for Sailfish 1.1.9.28
Now with Swipe To Lock!!

There's a tutorial at the end of this description on how to enable Swipe to Lock, which will familiarize you with the new Quick Buttons feature!

With this patch you are able to customize the Lock Menu ( swipe down from outside screen ) and Power Menu ( Long press Power Button ), you can find a page in Settings to access these options.

You can add up to 5 widgets in each page, the available widgets are:

- Lock Screen
- Shutdown
- Reboot
- Restart HomeScreen
- Change Profile
- Take Screenshot ( The screenshot will be taken right after the menu closes, and is saved in Pictures/Screenshots. To take a screenshots in places like App Launcher I recommend other apps, like coderus' ScreenTapShot ;) )
- Lock Device ( Thanks to alina's idea )
 

New Quick Button option for fast Swipe actions!

In settings menu set the buttons you want to enable for Quick Button, in the order you prefer, and set an interval.

Now when you swipe from outside screen a timer on the first Quick Button you enabled will start, if you release the swiping the action of that button will be executed! When the timer ends it switches to the next button! When there are no more Quick Buttons selected, after the last timer you can release the swipe and tap on any button or select your ambience!

There's also the possibility to activate one Quick Button after Long Pressing the power button, the selected Quick Button wll activate after the set amount of time, you can block the Quick Button by pressing anywhere on the top bar of the Power Menu, where all the buttons are.

TUTORIAL
How To enable Swipe to Lock:
- Go to Settings > Power Menu Controls
- Add a Lock widget to LockMenu
- Tap on the Quick Button circle under the lock button ( It should be set to 1 )
- Add More widgets and Quick Buttons as you prefer
- Set an interval ( it should be longer of your fastest swipe, the minimum is 0.1, it should be enough. Make this longer if you want to use more Quick Buttons )
- Enjoy your Swipe To Lock feature!
- Try other Quick Buttons configurations!

Planned Features:

- Add settings favouritres to widgets
- Display notification after action
- Haptic Feedback when quick buttons switch from one to another

Known Issues:

- Settings page restore profile when opened, install Ancelad's Patch: Return profile control from lockscreen it is compatible and offers a clever workaround, i'll work on my own method trying not to make these patches incompatible in the mean time ;)

This patch is not compatible with Ancelad's Patch: Enhanced Power Menu and eugenio's Patch: restore swipe to lock

Please remove and uninstall these patches before installing Custom Power Menu to avoid any inconvenient.

A lot of credits go to Ancelad since I came up with the whole idea after looking at is patch, and I also used his icons, so feel free to thank him, and even donate him something, you can find the link on the pages of his apps ;)
Also I used a piece of code from eugenio's patch, i want to give some credit to him too, so consider donating him something, they're both good developers, surely better than me ;)
I hope i didn't upset neither of them with my work.

If you still want to thank me, please consider donating something to me, too!

GitHub

Screenshots: 
Application versions: 
Changelog: 

v 0.5.1
- Included Lock Device Widget (Thanks to alina's idea)

v 0.4.1
- Included Screenshot Widget ( To use in Lock Menu the "Swipe to close app" function should be disabled in Settings->System->Gestures )

v 0.3.1
- Included Quick Button options for Power Key Menu

v 0.2.3
- Fixed remove buttons

v 0.2.2
- Fixed Quick Buttons
- Fixed remove buttons

v 0.0.2
- Included Quick Button actions with Swipe ( Swipe to Lock )

Comments

eisen's picture

i like your solution of the powermenu, please update it for OS 2.0.2+

BillyHalley's picture

Hi! It's been a while since i worked on jolla, since i don't use it anymore as my main phone.

I have a job right now, and since it's summer i don't have a lot of free time to develop, but i'll see what i can do in the next weeks!

Thanks for the interest, is really appreciated!

Schturman's picture

Please update for v2.0.2.45.. Thanks

mautz's picture

I'll second that! :-)

BillyHalley's picture

Hi! It's been a while since i worked on jolla, since i don't use it anymore as my main phone.

I have a job right now, and since it's summer i don't have a lot of free time to develop, but i'll see what i can do in the next weeks!

Thanks for the interest, is really appreciated!

malibu's picture

Included Screenshot Widget ( To use in Lock Menu the "Swipe to close app" function should be disabled in Settings->System->Gestures ) ... :/

In both cases, for me the screenshot doesn't appear

See http://m60.imgup.net/shotfinal9d9e.jpg

BillyHalley's picture

what about the lock device button?
try this:
- remove the patch
- restart homescreen
- uninstall from warehouse
- install from warehouse
- apply patch
- restart homescreen

malibu's picture

It was the same thing for lock device icon, but i tried to unapply, uninstall and reinstall, reapply, it works fine now.
Sorry i didn't tried myself. Thanks for patch and support.

BillyHalley's picture

Don't worry ;) Thanks to you!

danfin's picture

now if there was a button to switch mobile data and wifi.. wouldn't that be great? Often, I have mobile data off but sometimes I want it on.

BillyHalley's picture

Yeah, i had in mind to add settings favourites to choices
I started following classes at university so i have less time for "hobby coding" , but i hope to add this soon :)

itdoesntmatt's picture

i cannot afford whats the problem...ok i agree he should have credited ancelad previously but now all is ok. code is public so it is perfectly ok have implemented another idea using that code. it would be bad if he created closed code, but his code is public and available for all. someone talks about stolen,copied code..but you guys seems like big companies fighting for rights over their code..i think i would be glad if someone takes my code and uses it because it means i have done great job. whats the fight about? donations? if he had credited ancelad an user ,wich is not idiot,will consider it. and i underline that i actually prefer ancelad's patch which i find more immediate and simple.

Ancelad's picture

My code wasn't public, as you know. There is no fight anymore, but I'm really disappointed that I've spent my time to add some new features, but Billy has released them first without even asking. By the way, I think that the better way was "suggestion" - our common nice project. But Billy prefered his one. No problems.

itdoesntmatt's picture

ah i didnt know it was public ,this change things of course...and in addition i didnt know you were adding some gestures,maybe could have had both same ideas. sure it would be better suggestions way ( i dont mean permission to modify patch, but just checking developer wasnt already implementing features), but i guess he have done it without bad intention..peace and love :)

Ancelad's picture

To all - I think it isn't polite to use something without author's agreement, even "opensource" projects. By the way I had a big workaround about this patch, but Billy was first and release his version. So, I think he should continue this work. I'm late.

BillyHalley's picture

Well, i'm sorry, i didn't mean anything bad, but at least i should have asked, i understand my error
I really didn't think about the fact that you could have been working on some improvements like mine, if i had thought of it, i wouldn't have published my own patch

You shoud continue developing your patch, if you like, it's right to give people a choice :)

itdoesntmatt's picture

i think u can be glad of having coded something that someone else have found useful for his idea...because since you publish code on github, i guess is available for all. he could have asked to you in order to be just more polite, but on the other side he would have the right to use it, without doing wrong, even if you disagreed

coderus's picture

You now can just fork this patch and say it's your own. And everybody will be happy ;)

coderus's picture

I suspect you just stolen this patch and idea from Ancelad and didn't asked for any permission befure making "improvements".

HtheB's picture

Yes, you're right. He didn't asked Ancelad any permission, neither from eugenio.

Hey BillyHalley, why not add all available patches from coderus too and make them into one whole patch...
/sarcasm

BillyHalley's picture

Hey people, chill.

I credited Ancelad for using his idea, and then reinvented it. The Swipe to Lock feature was in Sailfish 1.0, did we stole it from Jolla so? My swipe function is also very different from eugenio's one.
Yes, I used one line of code from his patch, and not mentioned it, i'm sorry, i'll credit him from that.

I thought an open community would be more open

eugenio's picture

FWIW there is no need to mention me at all: "my" line could have been written by anyone and actually it's unrelated to the swipe to lock feature, which is pretty different than mine (at least by looking at the code, haven't tried your patch yet).

No harm done :)

coderus's picture

Ancelad was very disappointed when you released this patch without any permission of original author. Opensource doesnt mean you can do anything you want with sources. Simple rules and responsibility is still there. You should resolve this problem with Ancelad if you dont want to be discredited in this community.

BillyHalley's picture

Well i'm sorry he was disappointed, he should have contacted me directly though.

May i point your attention to something?
Are we talking about ideas?
There are several screenshot apps, and torch apps for example, and this is not a problem.
Are we talking about actual pieces of code?
Well if i used some code i saw in project and i "can't" use it becouse the author doesn't want me to, i'll see what to do, my code is on github, feel free to tell me what i can't use

Mariusmssj's picture

I don't see what's the massibe issue. It would have been nice if you credidted Ancelad from the start but you have now so no worries. That's what open source is about, I guess just need more communtication next time :)

 

Anyways grea patch :)

 

Sanpo's picture

Just brilliant! Tänks :)

BillyHalley's picture

Thanks to you!