From: <tomas@tuxteam.de>
To: joakim@verona.se
Cc: help-gnu-emacs@gnu.org
Subject: Re: windowmanager binding for emacs?
Date: Thu, 8 Sep 2016 09:52:52 +0200 [thread overview]
Message-ID: <20160908075252.GA2662@tuxteam.de> (raw)
In-Reply-To: <m3pooggmbc.fsf@exodia.verona.se>
-----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-----
next prev parent reply other threads:[~2016-09-08 7:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 8:12 windowmanager binding for emacs? joakim
2016-09-08 7:52 ` tomas [this message]
2016-09-08 9:02 ` Gian Uberto Lauri
2016-09-08 8:43 ` Bastian Beischer
2016-09-08 10:59 ` joakim
2016-09-08 14:07 ` tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160908075252.GA2662@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
--cc=joakim@verona.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.