![]() |
2013-02-23
, 17:10
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#1142
|
Turns out setting an alarm from the command line is now extremely simple thanks to PMs executeAction method. Was that always there?
The Following User Says Thank You to ajalkane For This Useful Post: | ||
![]() |
2013-02-26
, 20:46
|
Posts: 11 |
Thanked: 3 times |
Joined on May 2012
|
#1144
|
![]() |
2013-02-27
, 07:08
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#1145
|
Hi, I'm running this on my N9, and ever since I updated to the latest, I've been having battery drain issues.
The only thing PM does is it puts my phone silent for a few (3) cell towers.
It could be my battery but this is the only app I use aside form the stock apps.
![]() |
2013-03-02
, 10:45
|
Posts: 594 |
Thanked: 1,094 times |
Joined on Aug 2012
@ Rhine
|
#1146
|
![]() |
2013-03-02
, 12:22
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#1147
|
Hi, there is this new feature, to start an application, when a rule becomes active.
Do you think, it is possible without too much effort, to add this possibility, when a rule becomes inactive?
This way, you could start all appllications you need in the morning before you are awake, when a "night-rule" ends for example...
![]() |
2013-03-03
, 06:54
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#1148
|
I recently flashed my N9 and now when i type sh script.sh it says #!/bin/sh not found, what i forgot to reinstall?
![]() |
2013-03-03
, 07:08
|
|
Posts: 491 |
Thanked: 299 times |
Joined on Jul 2012
@ Pordenone IT
|
#1149
|
There's nothing you forgot to install. Your script probably includes (non-visible) characters. The most usual scenario is windows end of line markings. You should create the script in n9's nano editor for example to avoid that situation.
sh /home/user/scripts/auto-wall.sh /home/user/scripts/auto-wall.sh: line 1: #!/bin/sh: not found sed: /etc/osso-af-init/%gconf.xml: Permission denied sh: mywall1.png: unknown operand sh: mywall2.png: unknown operand sh: mywall3.png: unknown operand sh: mywall4.png: unknown operand sh: mywall5.png: unknown operand sh: mywall6.png: unknown operand sh: mywall7.png: unknown operand
![]() |
2013-03-03
, 11:43
|
Posts: 1,313 |
Thanked: 2,978 times |
Joined on Jun 2011
@ Finland
|
#1150
|
but before flashing everithing was ok
this is the script
and the output
Code:sh /home/user/scripts/auto-wall.sh /home/user/scripts/auto-wall.sh: line 1: #!/bin/sh: not found sed: /etc/osso-af-init/%gconf.xml: Permission denied sh: mywall1.png: unknown operand sh: mywall2.png: unknown operand sh: mywall3.png: unknown operand sh: mywall4.png: unknown operand sh: mywall5.png: unknown operand sh: mywall6.png: unknown operand sh: mywall7.png: unknown operand
The Following User Says Thank You to ajalkane For This Useful Post: | ||
Here is a simple script that takes seconds as an argument. If you don't give it anything it defaults to 60 seconds. If you give it something that isn't a number it will fail with ValueError exception. Title, snooze and sound can, of course, be modified from within the script.
python and python-dbus need to be installed (apt-get install python python-dbus as root)
Argument is given simply with: python /path/to/script.py 120
This will set an alarm 120 seconds from now.
Last edited by slarti; 2013-12-04 at 19:49. Reason: Edited to be compatible with PM 2.4.2