fandreuz / TUI-ConsoleLauncher

Linux CLI Launcher for Android
Other
1.24k stars 257 forks source link

Point me in the right direction.... #313

Open tommy-mor opened 4 years ago

tommy-mor commented 4 years ago

I would like to make a alias/command to start a countdown timer on myphone. Something like timer 5 creates a 5 minute timer. This would be very useful to me.

Can I launch an app with cli args? Are there any apps that support that? Should I try to extend TUI with this feature? (I have made basic android apps before, I could manage probably)

RossmelMax commented 3 years ago

I found a way for you to set a timer, it is based on a timer web page, it works with parameters in aliases, you can read about here

If you just want it for minutes, you can try alias -add timer search -u https://www.bigtimer.net/?minutes=%&repeat=false

The % after minutes= is the parameter, so, if you want a 5 minutes timer, just type timer 5 it will launch your default web browser with the timer page

Now, if you want a complex timer, you can try alias -add complextimer search -u https://www.bigtimer.net/?hours=%&minutes=%&seconds=%&repeat=false it adds an hour, minutes, and seconds, so at writing the command you can input complextimer 1,20,30 and the page will start on 1hour 20 minutes 30 seconds, and of course if you input complextimer 0,5,0 the timer will start in 5 minutes, it requires adding some numbers, but is more complete

Having set that, you can even custom the repeat=false, by replacing repeat=% and the input will be complextimer 1,20,30,true

Hope will be useful 🙌

tommy-mor commented 3 years ago

thank you! that is very clever I did not think of something like this.