Lipton
Posts: 19
Joined: Thu Mar 19, 2020 7:48 pm

Short script - boss button

Fri Mar 27, 2020 9:53 am

I'm trying to write my first script (routine? program? I'm new to all this). A simple thing where if I triple-tap the touchscreen (preferably with some degree of customization of the interval between presses) the Pi:
- minimizes all windows - I have wmctrl installed so that should be a breeze
- mutes all sound - I can make a simple bash file with amixer commands
- blanks the screen - I have xscreensaver installed so I can probably piggyback off this? I'm happy just activating the screensaver function instead of blanking.

I'm sure there are enough beginner guides out there to get me started but I'm struggling on the input part (the triple tap). Does anyone know where I should begin?

User avatar
DougieLawson
Posts: 37568
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Short script - boss button

Fri Mar 27, 2020 1:09 pm

What language would you like to use?
There's lots of python stuff to do just that sort of thing at: https://www.raspberrypi.org/education/ and https://projects.raspberrypi.org/en

There's more beginner projects at: https://magpi.raspberrypi.org/books (free PDF downloads)
and 92 issues of about 40 pages at: https://magpi.raspberrypi.org/issues
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Beginners”