Skip to content
Make emacs play nicely with tiling window managers by setting it up to use frames rather than windows
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
features Use ecukes Oct 22, 2016
load-test Modify even unbound vars, but unbind them again when disabling the mode Jan 21, 2017
test Add better error reporting when wmctrl fails Aug 2, 2017
.gitignore Update .gitignore Oct 22, 2016
.travis.yml Don't test emacs24 because magit doesn't support it Nov 6, 2018
Cask
ISSUE_TEMPLATE.md Create ISSUE_TEMPLATE.md Jan 20, 2019
LICENSE.txt Add license Mar 17, 2014
Makefile Disable some warnings about unbound functions Jan 21, 2017
README.md Remove old install instructions Apr 8, 2018
frames-only-mode.el Fix frames-only-mode creating two customization groups Jan 14, 2018

README.md

Frames only mode

travis MELPA

An emacs global minor mode to use emacs frames (i.e. operating system windows) instead of emacs' internal windowing system. This combines particularly well with tiling window managers such as XMonad.

There's a fairly rough screencast showing the kind of things you can do with this here.

Typical Setup

In combination with frames-only-mode I recommend:

  • Running emacs as server-client.
  • Binding a hotkey to open new emacs frames (see below).
  • Using helm, ivy or ido instead of the default completion interface.

Bind this shell command to a hotkey to automatically open a useful buffer in a new frame (usually your most recently viewed buffer which isn't currently open):

emacsclient -c -n -e '(switch-to-buffer nil)'

Changelog

Unstable

  • Add support for eshell completion
  • Add some support for reopening frames on hidden virtual desktops (currently buggy and hidden behind a customize variable).
  • Fix some customize group weirdness

Advanced Configuration

Integration with virtual desktops under X11

By default when a frame is open on a hidden virtual desktop emacs will not reopen the frame. frames-only-mode can try to detect when this is the case and open a new frame anyway.

To enable this you need to install wmctrl (sudo apt-get install wmctrl on Ubuntu) and set frames-only-mode-reopen-frames-from-hidden-x11-virtual-desktops to t. (In the future this may be enabled by default when running under X11 with wmctrl installed, but it needs more testing first.)

If you use this feature with a window manager other than XMonad please let me know if it works here.

This feature is only applicable to X11 (I'm not sure what happens on Wayland/OSX/Windows).

Integrating with command line git

To make this work nicely with git (e.g. to pop up a new frame when we run git commit from the command line) we need to set the editor to run an emacsclient in a new frame. However, unlike the case for running emacsclient instances from the window manager, we don't want it to detach from the console. We can achieve this by adding the following to the ~/.gitconfig file:

[core]
    editor = emacsclient -c

If instead we only used editor = emacsclient it would try to open a new buffer in an existing frame. This often results in the commit message buffer showing up in a different workspace(!), or in the terminal.

Integration with default emacs completion

If you use the default emacs completion (or ido with a popup completion buffer) then frames-only-mode-use-windows-for-completion can be used to control whether the *Completions* buffer is displayed in a frame or an emacs window. The default is to use an emacs window, which works well with any window manager. Alternatively the *Completions* buffer can be disabled entirely by setting completion-auto-help to nil.

Other links

This mode originated in a blog post which has some additional details.

You can’t perform that action at this time.