From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: windowmanager binding for emacs? Date: Thu, 8 Sep 2016 09:52:52 +0200 Message-ID: <20160908075252.GA2662@tuxteam.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed X-Trace: blaine.gmane.org 1473324164 27511 195.159.176.226 (8 Sep 2016 08:42:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Sep 2016 08:42:44 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) Cc: help-gnu-emacs@gnu.org To: joakim@verona.se Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 08 10:42:33 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhuuj-0005kR-LI for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Sep 2016 10:42:29 +0200 Original-Received: from localhost ([::1]:46331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhuuh-0000wQ-BO for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Sep 2016 04:42:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhu8w-00068k-OB for help-gnu-emacs@gnu.org; Thu, 08 Sep 2016 03:53:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhu8t-0002TA-LB for help-gnu-emacs@gnu.org; Thu, 08 Sep 2016 03:53:06 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:36602 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhu8t-0002Rm-Eb for help-gnu-emacs@gnu.org; Thu, 08 Sep 2016 03:53:03 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1bhu8i-0000w1-Of; Thu, 08 Sep 2016 09:52:52 +0200 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111307 Archived-At: -----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-----