Code: Select all
demo@antiX1:~
$ antix-hotcorners -h
antix-hotcorners description:
A utility which tracks mouse cursor during desktop session,
associates a user-configurable program (commandline) with each of
the 4 screen corners (top-left, bottom-left, top-right, bottom-right)
and launches the assigned program when cursor is moved to a corner of the screen.
usage options:
long form shorthand equivalent
--help -h show this message and exit
--kill -k attempt to kill any running instances
--config -c open the antix-hotcorners configfile in text editor
--daemon -d run daemon, listen for corner-hover cursor events
--silent -s run daemon, omit startup confirmation dialog
(eliminates 7.9MB session overhead by not loading pygtk lib)
When antix-hotcorners starts, it reads the configuration file
~/.config/antix-hotcorners/.hotcornersrc
which specifies launch actions associated with each corner.
During first-run, a configuration file is automatically created
and is presented to you in a text editor window, for editing.
The preconfigured default actions associated with each of the 4 corners are:
top-left: NO DEFAULT ASSIGNED FOR THIS CORNER
bottom-left: launch roxterm (multi-tabbed terminal emulator
top-right: launch spacefm (multi-tabbed file manager)
bottom-right: launch leafpad /tmp/blah.txt
The latter serves to illustrate that any corner-associated command
can pass commandline args along with the to-be-launched program name.
When you edit the config file, changes will take effect immediately
(next time you hover a corner) without needing to restart the daemon.
After downloading and extracting the attached zipped python script,
sudo mv antix-hotcorners /usr/local/bin/antix-hotcorners
sudo chmod 755 antix-hotcorners
sudo apt update && apt install python-xlib
The antix-hotcorners"program" is a python script.
About 200 lines long, it is easily readable in a text editor, and I invite you to `take a peek` prior to using.
(to rule out suspicion of malware, and so you'll get a sense of"what makes it tick")
During first run it will open the autocreated config file in a text editor, and exit.
You can customize the program associated with each corner then, for a test drive, run antix-hotcorners -d
To adopt it as a permanent feature of your desktop environment, add a line
antix-hotcorners &
to your session startup file.
FWIW, antix-hotcorners -s adds approx 8Mb overhead to your desktop session.
What to expect / how to use it:
When you move your mouse cursor to a corner of the screen, after a half-second hover delay (to preclude accidental launches)
the utility will kick/bounce the mouse cursor away from the corner
(serves as feedback that it has activated -- in case the associated program being launched has a startup delay, or has no GUI)
and your preconfigured program-of-choice for that corner hotspot will launch.
On-the-fly, you can edit the config file. Changes will take effect immediately (next time you hover a corner) without needing to restart the daemon.
The default configfile illustrates the optional use of inline comments
technical note:[HotCorners]
top_left_corner_command =
top_right_corner_command = roxterm
bottom_left_corner_command = spacefm
bottom_right_corner_command = leafpad /tmp/blah.txt
#
#bottom_right_corner_command = iceweasel about:newtab
#
# INLINE COMMENTS ARE FINE
# LINES BEGINNING WITH HASH CHARACTER ARE IGNORED
# do NOT tack"comments" to end of line (ouch! would be interpreted as intended commandline args)
# and do NOT leave BLANK LINES
The script employs os.system() to launch associated commands.
Consider the merit in modding it to utilize subprocess.call() instead
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://docs.python.org/2/library/subprocess.html"
linktext was:"https://docs.python.org/2/library/subprocess.html"
====================================