help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: windowmanager binding for emacs?


From: tomas
Subject: Re: windowmanager binding for emacs?
Date: Thu, 8 Sep 2016 09:52:52 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Sep 07, 2016 at 10:12:55AM +0200, joakim@verona.se wrote:
> I would like to bind, for example, a window manager key such as super-x,
> to start a little emacs frame where I can then issue emacs commands.
> 
> I tried by creating a custom gnome binding for super-x, but I got
> confused by the gnome gui, and at any rate I would like a method that
> works the same across xfce, lxde and gnome, if possible.
> 
> Surely somebody has already achieved this. Does anyone have any
> pointers?

Over the years, bit by bit, I came up with a hack which suits me.
That said, a word of warning: I'm using (after a tour which took
me from twm up to Gnome and back to XFCE) Fvwm. Those "desktop"
environments are just too complex and heavy-handed for me. I can't
stand when software "knows" what's better for me and I have to
unravel an architecture which reminds of Hieronymus Bosch's worst
nightmares. Opinionated software? It's bad enough that people
have so much opinion :-)

That said, I mapped a pop-up Emacs (-client) X frame to the key
combo "left-windows key + space". This entailed:

 - separating left and right "windows" keys (they are mapped
   to the same modifier, I want to use them separately):

   +-- /etc/X11/Xmodmap -----------------------------
   | ! Xmodmap: global, machine-specific key mappings
   | 
   | ! Right super (the "Windows" menu key) shall be a different modifier
   | ! than the left super (mod3 vs. mod4):
   | remove mod4 = Super_R
   | add mod3 = Super_R
   +-------------------------------------------------

 - setting up my Fvwm config to invoke Emacs (wrapped up in a
   small shell script, which I called `imp'). ISTR that I had
   to massage things because my distribution thought it was a
   good idea to configure Fvwm to stop reading the config in
   my home dir. Sheesh:

   +-- ~/.fvwm/config ---------------------------------
   | ...
   | ## Miscellaneous utilities
   | # "the imp" -- an Emacs client window to take quick notes
   | # (NOTE: make sure there's an appropriate "imp" in your $PATH)
   | Key   Space   A   4  Exec exec imp
   | Style "imp" Sticky, StaysOnTop, BorderWidth 0
   | ...
   +-------------------------------------------------

 - Set up the imp. I have ~/bin in my $PATH:

   +-- ~/.bin/imp -----------------------------------
   | #!/bin/bash
   | emacsclient -n -c -F '((name . "imp") (menu-bar-lines 0))' \
   |             -e '(switch-to-buffer "*imp*")'
   +-------------------------------------------------
  
There are sure some bits missing, but as you see, it's a pretty
pedestrian setup which works pretty well (of course, I map more
hot keys to Super_R, typically window manager things -- the right
"window" key is reserved for Emacs things.

My environment is pretty exotic these days, I know, but perhaps
there's some idea in there you can steal.

regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlfRGNQACgkQBcgs9XrR2kZcegCdG2WqECifub9XOb16+GYY+Bke
BtIAoIHaB23yXHtaxKEVDM+4RVknuBBR
=vrR0
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]