Posts: 1,445
skidoo
Joined: 09 Feb 2012
#1

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.
to install:
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
[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
technical note:
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"
====================================
Last edited by skidoo on 19 Sep 2015, 03:03, edited 2 times in total.
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#2
interesting, thanks.
Posts: 307
eugen-b
Joined: 23 Aug 2015
#3
Indeed, interesting! I'll compare it with brightside (available for Wheezy) and report if it is better. Yours has an advantage, because it is more KISS.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#4
wondering / asking:
Does brightside enable you to define"custom actions"?
What memory overhead does it add to the desktop session?


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.webupd8.org/2011/04/set-up-hot-corners-edge-flipping-in.html"
linktext was:"http://www.webupd8.org/2011/04/set-up-h ... ng-in.html"
====================================

When I've seen blog/news pages describing brightside, I didn't expect it would be useful to me because
the"available actions" described aren't me (don't have a notebook, don't mess with powermanagement, nor screensaver, nor lockscreen).
The"warping" to another workspace that many reviewers seemed to be excited about... is redundant with my mouse scrollwheel navigation in fluxbox.

Apparently, Ubuntu Tweak Tool does support"custom actions" AND supports"edge bumps" in addition to corner bumps.

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://techgotcha.com/hot-corners-in-ubuntu/"
linktext was:"http://techgotcha.com/hot-corners-in-ubuntu/"
====================================


brightside carries a lot of dependencies (28Mb worth) including libbonobo and libgnomevfs (wtf? why?)
and AFAICT it presumes (requires?)"metacity" window decorator is present.
It's neat that it includes a"mute audio" action (toggles/untoggles?) but many reviewers claim that feature does not work in their testing.
From glancing at its source code today

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://http.debian.net/debian/pool/main/b/brightside/brightside_1.4.0.orig.tar.gz"
linktext was:"http://http.debian.net/debian/pool/main ... rig.tar.gz"
====================================

yeah, no wonder ~~ looks like it's written specificly for muting"oss" (pulseaudio?)

In contrast to those other utilities, I expect the antix-hotcorners script should be usable in any desktop environment.
In the spirit of"KISS", I suppose adding a -c option should be a TODO list item.
(typing"antix-hotcorners -c" at commandline would open the config file in a text editor)

I typically have a boatload of program windows open, and bumping a corner to"raise icewease window, bring to front, open new tab" feels pretty handy.
Other than that, so far, I haven't made much use of hot corners. FWIW, ultimately (as in, the reason i messed with this in the first place) i intend to setup
"bump a corner raises a dialog where I type a string...
which gets (appended to a logfile and) fed to"at" command (atd scheduler daemon) so that 15min from now
i get a popup reminder (my reminder note string is displayed back to me)".
Posts: 307
eugen-b
Joined: 23 Aug 2015
#5
Hi skidoo!
I simply upload some screenshots of brightside and skippy-xd which I use as one custom acion for a hot corner:
Image
Here I issued the command brightside-properties and got the dialog"Screen actions".
So you are completely right, it uses up to 30MB and up to 3% of 64Bit 2.1GHz CPU.
Dependencies:
alsa-lib
gconf
libglade
libgnomeui
libwnck
popt
I also upload an image of skippy-xd to show you that there is a visual bug. This is a bit off-topic but might be interesting:
Image

About switching virtual desktops, brightside makes it possible without a click or a mousewheel rolling, just place the cursor for an adjustable time at your screen border then pull it a bit into the new virtual desktop or back, depending on where you want to stay.

So, I would say your points are all valid.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#6
That visual glitch looks familiar. I wound up with that a while back (geforce8600+generic driver) testdriving various distros.
It didn't clear up until a later version of Xorg, or the video driver, I can't recall which.

I've updated the first post & uploaded a revised version of the script.
Changes:

~~ first run opens the config file in text editor for editing. Later,
you can run"antix-hotcorners -c" as a shortcut to reaching the config file.

~~ At launch, the daemon kills any earlier running instances of itself.
(Until now, you could wind up running multiple simultaneous copies. That worked, but wasted memory.)

~~ added the"-s" silent startup option to startup without gtk dialog box"success".
The"success" box, a visual confirmation in case launched via menu or gexec rather than via terminal, is now a feature of the -d option.

~~ changed the autocreated config so that one of the default corners is unassociated with a program, by default.
Hopefully this clearly illustrates the point that although lines mentioning each of the
4 corners are expected (are required) any of them can have an empty assignment.
Posts: 307
eugen-b
Joined: 23 Aug 2015
#7
A good app to add as a hot corner is Slingshot or Slingscold applications menu. It is not in the repos but available (as soursecode?) on Sourceforge
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://sourceforge.net/projects/slingscold/"
linktext was:"http://sourceforge.net/projects/slingscold/"
====================================
and from Noobslab PPA
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.noobslab.com/2015/03/slingscold-launcher-fixed-for-all.html"
linktext was:"http://www.noobslab.com/2015/03/slingsc ... r-all.html"
====================================
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#8
In the context of antiX, I can't agree that slingshot is"A good app".
It was written for elementaryOS (Pantheon desktop environment), written in vala programming language (no bindings for vala preinstalled in antiX),
uses"synapseSearch" (alien to antix) as its search backend... and is rife with bugs, vis
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://bugs.launchpad.net/slingshot"
linktext was:"https://bugs.launchpad.net/slingshot"
====================================


Click into some of those bug reports. Weird dependencies (the app"breaks" if certain iconset is not installed?)
Not so much the number or severity of the bugs, but consider how long (years!) most of the reported bugs have remained unpatched.
Slingscold is??? a hacked version, from someone who struggled"to get the thing to actually run, in ubuntu v.xx, with yy desktop..."

BTW:
"synapseSearch" oh-so-coincidentally sounds like"synaptic" (longtime staple program for many users).
I wouldn't touch it with a pole. In my book, it's even worse than KDE's adonadi+nepomuk
issues: performance, security, privacy
Posts: 307
eugen-b
Joined: 23 Aug 2015
#9
Oops, that's good to know. I only have it on Manjaro yet, but apparently not using it enough to have noticed the bug. And I don't use its search function.
Let me correct then not a"good app", but a good concept if you like visual effects on your desktop.
But I understand that I'm talking completely out of context here. antiX is about window managers, it is not supposed to look like Gnome 3.16. __{{emoticon}}__