LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] enlightenment 0.16

[ILUG] enlightenment 0.16

Justin Mason jm at jmason.org
Thu Nov 11 14:11:22 GMT 1999


... is very cool. Time to ditch fvwm95 ;)

One of (IMHO) the must-have features of fvwm2/95 was the ability to move
windows to an arbitrary point on the screen using the keyboard; E didn't seem
to be able to do it, but I've hacked it up using eesh (which is really cool).
Details at the end of this mail.

But I have a question...

Does anyone know why I can't rebind the "windows start menu" key on my
keyboard?  Worked fine in fvwm, but E doesn't like it. It's supposedly rebound
to Mode_switch using xmodmap, and xev, xkeycaps, xmodmap etc. all suggest that
this is the case, but even though other keys bound to Mode_switch do what the
keybindings.cfg file says they should, this one won't.  Does E treat it as a
special key internally? Can't find anything in the source to suggest it...

I find this odd, though. xev reports the KeyRelease event with a state of 0x2000,
which seems to correspond to a ButtonMotionMask in X.h...

KeyPress event, serial 24, synthetic NO, window 0x4c00001,
    root 0x25, subw 0x0, time 1735037215, (108,103), root:(451,800),
    state 0x0, keycode 117 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 characters:  ""
KeyRelease event, serial 24, synthetic NO, window 0x4c00001,
    root 0x25, subw 0x0, time 1735037293, (153,107), root:(496,804),
    state 0x2000, keycode 117 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 characters:  ""



Anyway, if you're interested in the window-movement hack, here it is.
My keybindings.cfg now contains:

    __EVENT __MOUSE_PRESS
    __BUTTON 1
    __MODIFIER_KEY __CTRL_SHIFT
    __ACTION __A_EXEC "emovewindow . 2 2"

and 

    __EVENT __MOUSE_PRESS
    __BUTTON 3
    __MODIFIER_KEY __CTRL_SHIFT
    __ACTION __A_EXEC "emovewindow . 625 2"

where emovewindow is a script as follows:

  #!/bin/sh

  usage () {
    echo "usage: emovewindow window-id x y" 1>&2
    echo "x or y can be \".\", in which case they will stay the same." 1>&2
    echo "if window-id is \".\", the focused window will be moved." 1>&2
    exit 1
  }

  [ $# != 3 ] && usage
  window=$1
  x=$2
  y=$3

  if [ $window = . ] ; then
    set -- `eesh -ewait 'window_list' | head -1`
    window=$1
  fi

  if [ $x = . -o $y = . ] ; then
    set -- `eesh -ewait 'win_op '"$window"' move ? ?'`
    # window location: x y
    lastx=$3; lasty=$4
    [ $x = . ] && x=$lastx
    [ $y = . ] && y=$lasty
  fi

  exec eesh -e "win_op $window move $x $y"

Hey presto.

--j.




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell