View Single Post
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#25
A little help required please guys. I have read the rest of this thread. I have tried Schturman's suggestions on different commands used in either script or desktop file, but after 3 evenings or so, I'm not getting the effect I would like.

Basically, my script tells mcetool to 'disable flipover detection' from a launcher icon, then when icon is executed again, it 'enables flipover detection'. (All of my files are currently in /home/nemo/.local/share/applications).

My script does definitely work, I can check mcetool status output after each execution and I can see the setting is either 'disabled' or 'enabled'.

Thing is, when the enabling or disabling is done, I would like to see fingerterm close, as it opens to display 'flip-detection - enabled/disabled'. (I realise there are other ways to show notifications to user, but I would like to understand this approach first).
I have tried so many different commands and variations within my desktop file and sh file, but to be honest, I don't fully know what I'm doing and am now going round in ever decreasing circles!, I just know what I want to achieve! (closing fingerterm automatically after command/execution is done).

Code from my 'flipdisabled.desktop' file;

Code:
#!/usr/bin/env xdg-open

[Desktop Entry]
Type=Application
Terminal=false
Name=Flip Disabled
Icon=/home/nemo/.local/share/applications/flipdisabled.png
Exec=fingerterm -e /home/nemo/.local/share/applications/flipdisabled.sh
and my 'flipdisabled.sh' file;

Code:
#!/bin/sh
#toggle mcetool flipover-gesture detection
#Markkyboy 2016

TOGGLE=$HOME/.toggle

if [ ! -e $TOGGLE ]; then
    touch $TOGGLE
    mcetool --set-flipover-gesture-detection=disabled
    echo flip-detection - disabled
else
    rm $TOGGLE
    mcetool --set-flipover-gesture-detection=enabled
    echo flip-detection - enabled
fi
Where and how do I tell the terminal/script to wait 5 seconds, then close fingerterm back to desktop?

All info appreciated
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..

Last edited by Markkyboy; 2016-04-01 at 19:55.