Go to file
2018-06-05 21:23:42 +02:00
examples user.js: Add mode decoration 2018-05-03 16:01:19 +02:00
schemas Add missing <Super><Ctrl>Left/Right binding 2018-05-29 18:32:43 +02:00
.dir-locals.el Add gnome-shell-mode to dir-locals 2017-09-14 09:27:10 +02:00
app.js Handle gnome-terminal specially in newWindow 2018-05-21 14:32:06 +02:00
convenience.js Add the canonical convenience.js file for accessing settings 2017-09-21 16:38:02 +02:00
debug debug log viewer: skip-crap didn't skip everything 2018-05-01 14:15:29 +02:00
extension.js <Super>Up/Down: bind to workspace mru stack 2018-05-29 18:30:35 +02:00
install.sh Minor bugfix: Use absolute path to local extension dir in install script 2017-09-21 10:29:55 +02:00
kludges.js Use var for all top level declarations to avoid warnings 2018-04-30 00:03:08 +02:00
LICENSE Add license 2017-09-17 14:19:37 +02:00
liveAltTab.js Avoid killing eg. minimize animations on alt-tab 2018-06-01 17:02:36 +02:00
metadata.json Update supported versions 2018-04-22 15:01:57 +02:00
minimap.js Bugfix: selected window in minimap somtimes out of view for large maps 2018-06-03 10:19:15 +02:00
navigator.js Position windows at half the screen, when moving them to another space 2018-06-05 00:27:42 +02:00
notes.org Notes 2018-06-03 14:16:16 +02:00
prefs.js Minor future proofing: Replace all '-' occurrences (not just the first) 2018-05-20 13:23:56 +02:00
README.md <Super>Up/Down: bind to workspace mru stack 2018-05-29 18:30:35 +02:00
repl.js Move _repl to own file 2017-09-20 13:32:27 +02:00
scratch.js Hide the clickoverlay when unwanted, show again on focus 2018-06-03 00:49:49 +02:00
shell.nix Custom schema (let us create new keybindings/actions) 2017-09-11 18:02:55 +02:00
stackoverlay.js clickoverlays: show a preview on hover 2018-06-05 21:23:42 +02:00
stylesheet.css stylesheet.css 2017-09-28 13:29:11 +02:00
tiling.js disable: Only show windows on active workspace 2018-06-05 18:57:08 +02:00
topbar.js Minor cleanup 2018-05-17 14:18:43 +02:00
utils.js Turn off debugging by default 2018-04-30 20:20:13 +02:00

PaperWM

PaperWM is an experimental gnome shell extension providing scrollable tiling of windows and per monitor workspaces. It's inspired by paper notebooks and tiling window managers.

While technically an extension it's to a large extent built on top of the Gnome desktop rather than merely extending it.

Installation

Clone the repo and run the install.sh script from the directory:

./install.sh

It will link the repo to ~/.local/share/gnome-shell-extensions/ where gnome-shell can find it. You can then enable the extension in Gnome Tweaks. Running the extension will automatic install of a user config file as described in Development & user configuration.

Usage

Most functionality is available using a mouse, eg. by clicking on a window at the edge of a monitor. But the primary focus is making an environment which works well with a keyboard.

All keybindings start with the Super modifier. On most keyboards it's the Windows key, on mac keyboards it's the Command key. It's possible and recommended to modify the keyboard layout so that Super is switched with Alt making all the keybindings easier to reach. This can be done through Gnome Tweaks under Keybard & MouseAdditional Layout OptionsAlt/Win key behaviorLeft Alt is swapped with Left Win.

Most keybindings will grab the keyboard while Super is held down, only switching focus when Super is released. Escape will abort the navigation taking you back to the previously active window.

Adding Ctrl to a keybinding will take the current window with you when navigating.

Window management and navigation is based around the three following concepts.

Scrollable window tiling

The window tiling with the minimap shown

New windows are automatically tiled to the right of the active window. SuperN will open a new window of the same type as the active window.

Activating a window will ensure it's fully visible, scrolling the tiling if necessary. Pressing Super. activates the window to the right. Super, activates the window to the left. On a US keyboard these keys are intuitively marked by < and >, they are also ordered the same way on almost all keyboard layouts.

A minimap will be shown when Super is continually being pressed, as can be seen in the above screenshot.

AltTab is of course also available.

Keybindings
Super, or SuperLeft Activate the window to the left
Super. or SuperRight Activate the window to the right
SuperHome or SuperEnd Activate the first or last window
SuperCtrl, or SuperCtrl. Move the current window to the left or right
SuperTab or AltTab Cycle through the most recently used windows
SuperShiftTab or AltShiftTab Cycle backwards through the most recently used windows
SuperR Resize the window (cycles through useful widths)
SuperF Maximize the width of a window
SuperShiftF Toggle fullscreen
SuperN Create a new window from the active application
SuperC or SuperBackspace Close the active window

The workspace stack & monitors

The most recently used workspace stack

Pressing SuperAbove_Tab will slide the active workspace down revealing the stack as shown in the above screenshot. You can then flip through the most recently used workspaces with repeated Above_Tab presses while holding Super downe. Above_Tab is the key above Tab (` in a US qwerty layout). Like alt-tab Shift is added to move in reverse order.

A workspace has a name and background color. Clicking on the workspace name lets you change them easily:

The workspace menu

There's a single scrollable tiling per workspace. Adding another monitor simply makes it possible to have another workspace visible. The workspace stack is shared among all the monitors, windows being resized vertically as necessary when workspace is displayed on another monitor.

Keybindings
SuperAbove_Tab or SuperDown Cycle through the most recently used workspaces
SuperShiftAbove_Tab or SuperUp Cycle backwards through the most recently used workspaces
SuperCtrlAbove_Tab or SuperCtrlDown Cycle through the most recently used, taking the active window with you
SuperCtrlShiftAbove_Tab or SuperCtrlUp Cycle backwards through the most recently used, taking the active window with you

Note: Multi monitor support only works when Gnome Shell is configured to use the Workspaces span displays option in Gnome Tweaks (under the Workspaces heading).

Scratch layer

The floating scratch layer, with the alt tab menu open

The scratch layer is an escape hatch to a familiar floating layout. This layer is intended to store windows that are globally useful like chat applications and in general serve as the kitchen sink. When the scratch layer is active it will float above the tiled windows, when hidden the windows will be minimized.

Opening a window when the scratch layer is active will make it float automatically.

Pressing SuperEscape toggles between showing and hiding the windows in the scratch layer. Activating windows in the scratch layer is done using SuperTab, the floating windows having priority in the list while active.

SuperCtrlEscape will move a tiled window into the scratch layer or alternatively tile an already floating window. This functionality can also be accessed in the windows context menu (AltSpace).

Keybindings
SuperEscape Toggle between showing and hiding the scratch windows
SuperCtrlEscape Toggle between floating and tiling the current window
SuperTab Cycle through the most recently used scratch windows
SuperH Minimize the current window

Development & user configuration

A default user configuration, user.js, is created in ~/.config/paperwm/ with three functions init, enable and disable. init will run only once on startup, enable and disable will be run whenever extensions are being told to disable and enable themselves. Eg. when locking the screen with SuperL.

We also made an emacs package, gnome-shell-mode, to make hacking on the config and writing extensions a more pleasant experience. To support this out of the box we also install a metadata.json so gnome-shell-mode will pick up the correct file context, giving you completion and interactive evaluation ala. looking glass straight in emacs.

Pressing SuperInsert will assign the active window to a global variable metaWindow, its window actor to actor, its workspace to workspace and its PaperWM style workspace to space. This makes it easy to inspect state and test things out.

Winprops

It's possible to create simple rules for placing new windows. Currently mostly useful when a window should be placed in the scratch layer automatically. An example, best placed in the init part of user.js:

    let Tiling = Extension.imports.Tiling;
    Tiling.defwinprop({
        wm_class: "Spotify",
        scratch_layer: true,
        oneshot: true
    });

Prior work

A similar idea was apparently tried out a while back: http://10gui.com/