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
Posts: 37763
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest 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: and

There's more beginner projects at: (free PDF downloads)
and 92 issues of about 40 pages at:
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Beginners”