Code Monkey home page Code Monkey logo

paperwm's Introduction

PaperWM

project chat

PaperWM is a Gnome Shell extension which provides 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.

PaperWM aims to continually support current stable Gnome shell versions (currently Gnome 45 & Gnome 46). Older versions of PaperWM can generally be installed on older Gnome Shell versions (see Install via Source for more information on targeting an older/EOL Gnome version).

New features and fixes aren't generally backported to older Gnome shell versions. Pull requests for fixes to older PaperWM versions (that run on previous Gnome versions) will be accepted if the submitter can help test and update related documentation.

Have questions or comments? Please ask on our Github Discussions board.

Installation

Install via extensions.gnome.org (recommended)

Install it on extensions.gnome.org

Install via Source

Clone the repo and check out the branch for the Gnome Shell version you're running:

then run the install.sh script from the repository. The installer will create a link to the repo in ~/.local/share/gnome-shell/extensions. It will then ask if you want to enable PaperWM.

./install.sh # install, load and enable paperwm

➡️ You'll need to restart Gnome shell after installing PaperWM, e.g. logout then login, or restart in place with an alt-F2 and entering r (X11 only).

After logging back in, you can then enable PaperWM via the Extensions application, or by running the following command from the command-line:

/usr/bin/gnome-extensions enable [email protected]

if you have run into issues, delete any older paperwm@... symlinks from ~/.local/share/gnome-shell/extensions and re-run the install.sh script.

Uninstall PaperWM (if installed via source)

To uninstall simply run ./uninstall.sh.

Running the extension will automatically install a user config file as described in User configuration & development.

Contributing

Users are encouraged to submit issues and Pull Requests!

➡️ Please ensure pull requests are based off, and submitted to, develop branch.

Pull requests submitted to the release branch will not be accepted (but don't worry, if you accidentally submit a PR to the release branch, the target branch will automatically be changed to develop branch).

Usage

Most functionality is available using a mouse, eg. activating a window at the edge of the monitor by clicking on it. Wayland support gestures (See the Touchpad Gestures section). PaperWM is designed to work work well with keyboard + mouse, trackpads etc.

Most keybindings start with the Super modifier (by default), which is usually the Windows key, or on mac keyboards it's the Command key. It's possible 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 Keyboard & 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.

All PaperWM keybinds can be changed (and disabled) via PaperWM extension settings, which can be accessed through ExtensionsPaperWMSettings.

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 (see here for dynamically changing the insertion position of new windows), taking up as much height as possible. SuperReturn 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. By default, 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. Navigating around windows brings up the minimap as can be seen in the above screenshot. The minimap will stay visible as long as Super is continually being pressed.

Pressing SuperI will move the window to the right below the active window, tiling them vertically in a column. SuperO will do the opposite, pushing the bottom window out of the current column.

Swiping the trackpad horizontally with three fingers (only available in Wayland) or swiping the panel horizontally on a touch screen will scroll the tiling.

AltTab is of course also available.

Default window Keybindings Can be changed in PaperWM extension settings
SuperReturn or SuperN Open a new windows (of the current application)
SuperBackspace Close the active window
Super. or Super, Switch to the next or previous window
SuperLeft or SuperRight Activate the window to the left or right
SuperUp or SuperDown Activate the window above or below
SuperHome or SuperEnd Activate the first or last window
Not set by default (set in extension settings) Switch to the [second to eleventh] window
SuperTab or AltTab Cycle through previously active windows
ShiftSuperTab or ShiftAltTab Cycle through previously active windows (backward order)
CtrlAltTab Cycle through previously active scratch windows
ShiftCtrlAltTab Cycle through previously active scratch windows (backward order)
ShiftSuperC Switch between window focus modes
ShiftSuperW Switch between positions for creating/dropping new windows
Not set by default (set in extension settings) Create/drop windows to the right of current window
Not set by default (set in extension settings) Create/drop windows to the left of current window
Not set by default (set in extension settings) Create/drop windows in vertical stack (down)
Not set by default (set in extension settings) Create/drop windows in vertical stack (up)
Not set by default (set in extension settings) Create/drop windows at start position
Not set by default (set in extension settings) Create/drop windows at end position
SuperCtrl, or SuperCtrl. Move the current window to the left or right
ShiftSuper, or ShiftSuper. Move the current window to the left or right
SuperCtrlLeft or SuperCtrlRight Move the current window to the left or right
SuperCtrlUp or SuperCtrlDown Move the current window up or down
SuperI Absorb window into the active column
SuperO Expel the bottom window from vertically tiled windows
ShiftSuperO Expel the active window from vertically tiled windows
SuperC Center windows horizontally
ShiftSuperF Toggle fullscreen
SuperF Maximize the width of a window
ShiftSuper+ Increment window height (scratch or vertically tiled windows)
ShiftSuper- Decrement window height (scratch or vertically tiled windows)
Super+ Increment window width
Super- Decrement window width
SuperR Resize the window (cycles through useful widths)
SuperAltR Resize the window (cycles backwards through useful widths)
SuperShiftR Resize the window (cycles through useful heights)
SuperShiftAltR Resize the window (cycles backwards through useful heights)
Supert Take window(s) dropping when finished navigating
Not set by default (set in extension settings) Activate the window under mouse cursor

The workspace stack & monitors

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 down. Above_Tab is the key above Tab (` in a US qwerty layout). Like alt-tab Shift is added to move in reverse order:

The most recently used workspace stack

Pressing SuperPage_Down and SuperPage_Up will slide between workspaces sequentially:

Sequential workspace navigation

By default SuperPage_Down and SuperPage_Down are bound to the keybindings "Switch to workspace below/above (ws from current monitor)". That means using the keybindings you can select all workspaces that were previously shown on the current monitor and all empty once.

Alternatively you can change these keybindings to "Switch to workspace below/above (ws from all monitors)" in the settings. That way you can switch to all workspaces (that are not currently shown on another monitor). Depending on your workflow this might feel more natural.

The workspace name is shown in the top left corner replacing the Activities button adding a few enhancements. Scrolling on the name will let you browse the workspace stack just like SuperAbove_Tab. Left clicking on the name opens Gnome overview, while right clicking the name lets you access and change the workspace name.

If you prefer to use Gnome workspace "pill", you can replace the workspace name element, and enable the Gnome pill from the General section of PaperWM preferences:

Using the Gnome pill

Swiping down on the trackpad vertically with three fingers will initiate the workspace stack, and then allow you navigate the workspace stack with 3-finger vertical swipes (only available in Wayland). See the Touchpad Gestures section for more information on gesture support in PaperWM.

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.

workspace keybindings Can be changed in PaperWM extension settings
Super` Switch to previously active workspace
ShiftSuper` Switch to previously active workspace (backwards order)
CtrlSuper` Move active window to previously active workspace
ShiftCtrlSuper` Move active window to previously active workspace (backwards order)
SuperPageUp Switch to workspace above
SuperPageDown Switch to workspace below
CtrlSuperPageUp Move active window one workspace up
CtrlSuperPageDown Move active window one workspace down
CtrlSuperB Toggle show/hide (GNOME) TopBar and Window Position Bar
Not set by default (set in extension settings) Toggle show/hide (GNOME) TopBar
Not set by default (set in extension settings) Toggle show/hide Window Position Bar
monitor keybindings Can be changed in PaperWM extension settings
SuperShiftRight Switch to the right monitor
SuperShiftLeft Switch to the left monitor
SuperShiftUp Switch to the above monitor
SuperShiftDown Switch to the below monitor
ShiftCtrlAltRight Move workspace to monitor on the right
ShiftCtrlAltLeft Move workspace to monitor on the left
ShiftCtrlAltUp Move workspace to monitor above
ShiftCtrlAltDown Move workspace to monitor below
SuperAltRight Swap workspace with monitor to the right
SuperAltLeft Swap workspace with monitor to the left
SuperAltUp Swap workspace with monitor above
SuperAltDown Swap workspace with monitor below
ShiftCtrlSuperRight Move active window to the right monitor
ShiftCtrlSuperLeft Move active window to the left monitor
ShiftCtrlSuperUp Move active window to the above monitor
ShiftCtrlSuperDown Move active window to the below monitor

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.

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. When the tiling is active SuperShiftTab selects the most recently used scratch window.

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

scratch keybindings Can be changed in PaperWM extension settings
ShiftSuperEscape Toggles the floating scratch layer
CtrlSuperEscape Attach/detach active window into scratch layer
SuperEscape Toggle the most recent scratch window

Touchpad Gestures

PaperWM implements the following touchpad gestures by default:

Gesture Action
three-finger swipe up Gnome Overview
three-finger swipe down PaperWM workspace stack view (see here)
three-finger swipe left/right Moves tiling viewport (windows) left / right

PaperWM touchpad gesture behaviour can be modified via the General tab in PaperWM settings:

Touchpad gesture settings

Window Position Bar (colored bar segment in Top Bar)

#476 added a coloured window position bar to the Gnome Top Bar. This allows users to visually identify the current selected window position of the scrollable viewport in the current workspace. This is demonstrated in the following video:

paperwm-window-position-bar.mp4

The window position bar can be disabled from PaperWM extension settings:

Window indicator bar

You can style both the coloured position bar and the dimmed "position bar backdrop" by overriding the paperwm-window-position-bar and paperwm-window-position-bar-backdrop CSS classes respectively (see user.css in User configuration & development section for more information). The paperwm-window-position-bar will also inherit the selection color (same as window borders) from tile-preview.

Note: PaperWM overrides the default Gnome Top Bar style to be completely transparent so that the dimmed window-position-bar-backdrop and window-position-bar elements are visible.

Window Focus Modes

#482 added the concept of window focus modes to PaperWM. A focus mode controls how windows are "focused". The following modes are currently available:

  • the DEFAULT focus mode is the traditional PaperWM behaviour (no snapping, just free scrolling)
  • the CENTER focus mode causes all windows to be centered horizontally on selection
  • the EDGE focus mode causes windows to snap to the closest edge horizontally on selection (but while there is only one window, it is centered)

Focus modes can be toggled by user-settable keybinding (default is Super+Shift+c), or by clicking the new focus-mode button in the Top Bar:

Focus mode button

Setting the default focus mode

The default focus mode is the standard PaperWM focus mode (i.e. not centered). This can be changed according to preference by changing the Default focus mode setting PaperWM settings.

Default focus mode

Note: changing this setting during a PaperWM session will set all spaces to the new default focus mode.

Hiding the focus mode icon

Users may also prefer to hide the focus mode icon. You can do so from the Advanced tab in PaperWM extension settings:

Hiding the focus mode icon

Setting window specific properties

It's possible to set window properties using simple rules that will be applied when placing new windows. Properties can applied to windows identified by their wm_class or title. The following properties are currently supported:

Property Input type Input example Description
scratch_layer Boolean true, false if true window will be placed on the scratch layer.
preferredWidth String value with % or px unit "50%", "450px" resizes the window width to the preferred width when it's created.
Note1: property not applicable to windows on scratch layer.

Window properties can be added using the Winprops tab of the PaperWM extension settings:

paperwm-winprops-settings.mp4

The wm_class or title of a window can be found by using looking glass: AltF2 lg Return Go to the "Windows" section at the top right and find the window. X11 users can also use the xprop command line tool (title is referred as WM_NAME in xprop). The match of wm_class and title are with an OR condition; and in addition to a plain string matching, a constructed RegExp() can be used to utilise regex matching. For example, e.g. /.*terminal.*/i would match on any value that contains the word "terminal" (case-insensitive).

Setting a default window property rule

You can use the functionality defined in the setting window specific properties section to define a default window property rule that will be applied to all windows NOT matched by a more specific window property rule.

You do this by using the special "match all" operator * as an input for wm_class or title. The below image shows setting a default Preferred width value of 50%.

Setting default window property rule

This special operator is at a lower precedence, so more specific properties that match a window will always take precedence and be applied.

Window insertion position for new windows (and dropped windows in take mode)

By default PaperWM inserts new windows (and drops windows in take mode, see Managing multiple windows at once) to the right of the currently active window. This behaviour can be changed via PaperWM settings, or with the Open Window Position button/icon (which is to the right of the focus mode icon):

Open positions button

There are several positions available for selection. Namely, right, left, start, end. The latter two will insert windows at the start or end of tiled windows container.

Options for these settings, as well as settings to enable/disable specific positions in the Open Window Position buttons, are provided in PaperWM settings:

Screencast.from.2024-04-19.08-06-43.webm

Managing multiple windows at once

PaperWM provides functionality to move, reorder, and close multiple windows at once. These "multi-window" operations are initialised with the Take the window, dropping it when finished navigating keybind (default SuperT).

This allows you to take multiple windows and temporarily store them in the bottom-right corner of the workspace. The following operations are available while there are one or more windows "taken":

Selectively take/drop windows (pressing spacebar to drop the latest taken window):

paperwm-selective-take-drop.mp4

Selecting all windows across spaces to close at once (pressing q):

paperwm-closing-all-windows-across-spaces.mp4

Reordering "taken" windows and selectively dropping them:

paperwm-take-window-cycling.1.mp4

User configuration & development

You can supply a custom user.css in ~/.config/paperwm/. This user stylesheet can override the default styles of paperwm (e.g. from ~/.local/share/gnome-shell/extensions/[email protected]/user.css or /usr/share/gnome-shell/extensions/[email protected]/user.css), gnome or even other extensions. The same rules as for CSS in the browser apply (i.e. CSS rules are additive).

You can reload the user.css by disabling (turning off) PaperWM and then re-enabling PaperWM (turning on), e.g via Extensions app, or by running Main.loadTheme() in looking glass (i.e. AltF2 lg Return). Note that the latter approach will reload all other .css files (e.g. from other extensions) and user.css needs to already be loaded for this to work. So after initially creating the file you'll need to disable then enable PaperWM (or restart Gnome).

Using PaperWM extension settings (UI) to modify settings

PaperWM provides an extension settings UI to modify many of PaperWM's more prevalent settings. This is available in the gnome-extensions application.

Using dconf-editor to modify settings

You can also use dconf-editor to view and modify all PaperWM user settings. You can view all settings by executing the following command from a terminal:

GSETTINGS_SCHEMA_DIR=::$HOME/.local/share/gnome-shell/extensions/[email protected]/schemas dconf-editor /org/gnome/shell/extensions/paperwm/ &>/dev/null

PaperWM user-configurable settings not available in settings UI

Below is a list of user-configurable settings that are not exposed in the PaperWM settings UI. These can be modified via dconf-editor.

Setting Description Input Type Default value
default‑background Sets the (default) background used for PaperWM workspaces. If set will use this background instead of colors defined in workspace-colors. absolute path empty

Note: you can override this for individual workspaces in the settings UI.

Example:

dconf write /org/gnome/shell/extensions/paperwm/default-background '"/home/user/Wallpaper/mars-sunset-2k.jpg"'
Setting Description Input Type Default value
workspace‑colors Sets the workspace background color palette. String array of colors ['#314E6C', '#565248', '#445632', '#663822', '#494066', '#826647', '#4B6983', '#807D74', '#5D7555', '#884631', '#625B81', '#B39169', '#7590AE', '#BAB5AB', '#83A67F', '#C1665A', '#887FA3', '#E0C39E']

Gnome Top Bar opacity / styling

PaperWM by default changes the opacity of the Gnome Top Bar. This styling is used for certain PaperWM features. However, this styling may conflict with the Top Bar styling of other extensions (that you may prefer have style the Top Bar instead).

Users can disable PaperWM's ability to change GNOME Top Bar styling from PaperWM settings:

Enable Top Bar Styling

Note: several PaperWM specific features are dependent on changing the Gnome Top Bar to function correctly. If you choose to disable PaperWM's ability to change the Top Bar styles (with the setting above), you may also want to disable the Window Position Bar.

Managed Gnome Shell Settings

There's a few Gnome Shell settings that are incompatible with, or work poorly with, PaperWM. Namely

  • workspaces-only-on-primary: Multi monitor support require workspaces spanning all monitors
  • edge-tiling: We don't support the native half tiled windows
  • attach-modal-dialogs: Attached modal dialogs can cause visual glitching

PaperWM manages these settings (disables them) during runtime. It will then restore these settings to their prior values when PaperWM is disabled.

Recommended extensions

These extensions are good complements to PaperWM:

Incompatible extensions

In most cases it should be enough to disable these extensions.

  • DING (Desktop Icons NG) (shipped by default with Ubuntu) or similar extensions that add desktop icons. Creates invisible windows and does not properly show icons. See #784, #266
  • Fedoras builtin desktop watermark (shipped with Fedora) See #706
  • Rounded Window Corners or similar extensions that change the window shape. See #763, #431
  • Space Bar or similar extensions that modify workspace names etc. See #720
  • Dash to Panel or similar panels. Works in some configurations and in some not. Is incompatible with PaperWMs window position bar. See #170, #199, #646, #382, #166, #258

See issues tagged with the extension-conflict label for current and closed issues related to extension conflicts.

In general extensions that do one of the following are problematic when used together with PaperWM (although they might partially work):

  • Modify the desktop
  • Modify window "shapes" (e.g. rounded corners)
  • Modify workspaces
  • Modify touch gestures

PaperWM will attempt to disable keybindings of some known extensions if they clash. E.g. the Ubuntu Tiling Assistant from Ubuntu 23.10.

Related / similar projects

More projects are embracing the scrollable tiling concept! The following projects may be of interest to others (especially if PaperWM doesn't quite work for you):

A similar idea was apparently tried out a while back: 10/GUI.

paperwm's People

Contributors

andrewkvalheim avatar christopher-l avatar davvid avatar elshimone avatar ganthern avatar gelbana avatar gombosg avatar goodwillcoding avatar gustavcedersjo avatar hedning avatar jtaala avatar kassick avatar lythenas avatar michaelhthomas avatar mogenson avatar mskorzhinskiy avatar olejorgenb avatar pajn avatar pjsxw avatar rski avatar smichel17 avatar soraxas avatar spissable avatar suleymancommits avatar tadfisher avatar thesola10 avatar timbertson avatar tlevani avatar valpackett avatar xanf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paperwm's Issues

Add per monitor workspace style

Multi monitor support

There's two main ways to incorporate workspaces and monitors:

  1. The usual DE way, where a workspace spans all monitors
  2. The usual tiling wm way where a workspace spans one monitor

The reason DEs mostly use the first style is the lack of any workspace layout. It's simply not very feasible to move the content of one monitor to another as the sizes might differ completely.

This can cleary be seen by how Gnome Shell handles adding new monitors. A new blank monitor gets added while windows remain on existing monitors. The new monitor being assigned primary status doesn't change the behavior.

A big problem with this approach is when it's time to remove a monitor and you're forced to move windows automatically, creating a big mess.

Mutter doesn't actually enforce style 1., it simply exposes what's essentially the X workspace standard, where a workspace is a list of windows.

With the new architecture we've become mostly independent of how Gnome Shell handles workspaces and monitors.

Implementation

  • Windows on a workspace would correspond exactly with the windows in a Space.

  • The Space would be attached to any monitor, and the windows would simply be moved to that monitor.

  • Every monitor would have a selected Space with a corresponding workspace.

  • When a window enters a monitor we look up the selected Space and insert it.

We can only do this cleanly by using the span workspaces across all monitors.

When a non-focused window is closed, focus is changed to its left neighbour

Open a terminal and type sleep 3 && exit to test.

When we get notified about closed windows in window-removed a new window have already received focus, so it's whether the closed window was focused or not is not directly available.

Haven't tested it, but from the mutter code it didn't look like the unmanage signal ran early enough either.

Make a click overlay for stacked windows with application icon

When a window is scaled and put on the left or right stack we want clicks on the window to only activate it.

A possible solution is creating a transparent clutter actor above the window, we could add an icon to the actor too, which would be a nice enhancement.

Behavior when a window is moved manually?

Eg. by super-mouse-dragging

Move the whole strip/space

Only allow horizontal movement and simply move the whole space when a window is moved.

As a bonus the built in shortcut for centering a window will work out of the box.

Proof of concept: (but quite sluggish to use due to the animation, and doesn't move the selection)

diff --git a/tiling.js b/tiling.js
index fbdc31f..53d8273 100644
--- a/tiling.js
+++ b/tiling.js
@@ -583,6 +583,7 @@ function registerWindow(metaWindow) {
         metaWindow.connect("focus", focus_wrapper),
         metaWindow.connect('notify::minimized', minimizeWrapper),
         metaWindow.connect('size-changed', sizeHandler),
+        metaWindow.connect('position-changed', moveHandler),
         metaWindow.connect('notify::fullscreen', fullscreenWrapper)
     ];
     actor[signals] = [
@@ -1167,6 +1168,19 @@ function sizeHandler(metaWindow) {
     space.selection.x = frame.x - Math.round(prefs.window_gap/2);
 }
 
+function moveHandler(metaWindow) {
+    debug('position-changed', metaWindow.title);
+    let space = spaces.spaceOfWindow(metaWindow);
+    if (space.selectedWindow !== metaWindow)
+        return;
+
+    let frame = metaWindow.get_frame_rect();
+    let monitor = space.monitor;
+    move_to(space, metaWindow, {x: frame.x - monitor.x, y: panelBox.height + prefs.vertical_margin - monitor.y,
+                                onComplete: () => space.emit('move-done')});
+
+}
+
 // `MetaWindow::focus` handling
 function focus_handler(meta_window, user_data) {
     debug("focus:", meta_window.title, utils.framestr(meta_window.get_frame_rect()));

Enter some sort of special mode

Allowing to reorder the window, docking it to one edge (#50), moving it to the scratch layer, moving it to other workspace (when dragged sufficiently up/down maybe), etc.

Simply moving it to the scratch layer

Add floating scratch layer

Make a floating scratch layer:

  • When visible should be always on top
  • Windows should be shown on all workspaces by default.

#22 is blocking here, since we can't remove windows from the tiling properly.

Handling of transients belonging to managed windows (on focus)

Transient windows are filtered out in add_handler since it's almost always desirable to let them float.

A consequence is that nothing is ensure_viewport'ed when such transient windows gain focus. The transient window is brought into the viewport by gnome-shell itself, but the parent window does not follow.

A simple way to test this is to open a transient window, go to another window and focus the transient using alt-tab.

This works ok and might even be useful sometimes (if the parent is a huge window and you want to see something else when working in the transient) but it felt a bit confusing at first.

One reasonable policy is that the transients should always positioned relative to the parent (possibly with an option to detach). Note that atm. it's not possible to move the transient - dragging the titlebar moves the both the parent and transient.

Another issue is that transients are not animated during left/right navigation (eg. when navigating to the parent the transient makes a huge jump on animation end)

image

Integrate the activity overview properly

Should at least support these things:

  • Overview should preserve the window order
  • Window animations should start and stop with the same actor properties
  • Drag and drop windows within the workspace

Add workspace configuration (name, icon, directory etc.)

Configuration

A workspace should have a customizable configuration, which at least includes a name, an icon, a color and a workspace folder.

Icon, colors and name

It's possible to provide a default icon ala. github avatars, and a default color chosen from a color palette.

The icon and name should be displayed in the statusbar, clicking on it should give you access to the configuration and other workspace related things, eg. notes.

Chapters/separators

Separators should be available to give a workspace internal structure. Like tabs in paper binders. Separators should be foldable.

Add the config directory to the search path

We add the config directory to the search path Extension.imports.searchPath.push(configDir) and run the config through that mechanism. This way we retain the scope making it easy to integrate gnome-shell-mode support.

When installing also install the config directory and a config template containing at the minimum something like this:

var Extension;
function init() {
  // Runs _only_ once on startup
  Extension = imports.misc.extensionUtils.getCurrentExtension();
}

function enable() {
  // Runs on extension reloads, eg. when unlocking the session
}

function disable() {
  // Runs on extension reloads eg. when locking the session (`<super>L).
}

Replace preview tiles in PreviewNavigator with a properly scaled minimap

The minimap should have windows in the horizontal direction, and optionally show workspaces in the vertical direction, while pseudo-focus should always remain within the center.

The left/right stack should spread out to a full minimap when selecting a workspace, and recede back in when it's unselected.

Very ugly mockup:
image

Fully override maximize

Ideally we want to fully customize the maximize action so eg. titlebar buttons will work correctly, and the window will correctly report itself as maximized.

Some Gnome applications «jumps» when gaining/losing focus

When gaining focus aligns to the statusbar for a little while, when losing focus moves down for a a bit.

Might be a bug with the frame -> actor coordinate translation in move.

Edit: Still triggers after full restart, which probably means it's computer/display related

Improve scratch layer

  • Make switch-windows scroll the tiling when a scratch window have focus (An alternative is including the scratch layer in the preview list, but not sure how it would work, or make sense)

  • Make the scratch layer transparent when focus or pseudo-focus is on tiling (transparency could increase based on mru).

  • Find a good hotkey for the toggle, <super>above_tab is probably best, but clashes with alt-tab group behavior. <super>escape is a good combo, but have some bad semantics and might clash with escaping from super-mode. <super>space is probably best used for the search/actions like Spacemacs or Spotlight.

  • Add a toggle icon to the top bar, potentially including the icon of the most recently used scratch window.

  • <super>number could work for quick switching with hints on super down.

  • New windows should open in the scratch layer while it have focus

  • Make a proper scratch layer group (or some tag) to enable coexisting with monitors that are shared between all workspaces (as they use visible on all workspaces)

Make it possible to dock windows at the edges of the monitor

The idea is to reduce the effective monitor size by the width of the docked window when positioning and resizing the tiled windows.

The docked window should probably be styled like a tiled window, ie. maximized vertically with square corners. It's not obvious if we want a margin between the edge of the docked window and the tiling as might look weird:
image

But the visual effect might be somewhat subtle without a margin (and means you can't always click on the next window):
image

Implement window selection

SuperShift</> should create a selection range, which then can eg. be moved to another workspace in one go.

Make navigation non-destructive

  • Navigate to another workspace X
  • Look around a bit (change the active window there)
  • Navigate to another workspace Y and activate a window there

Now the active window in X is changed. It's not obvious that this is "wrong" but I think we want to stick to the principle that navigation in the multimap is "exploitative"

Vertical workspace mru

Super PageUp/Down graphics is a good start, together with workspace previews in the overview. When combining with Super </> we need a transition between the workspace preview and tiling preview, This should work well when we transition to a more minimap like preview for `Super </>

  • Starting the action with shift should take the focused window with you.

  • Binding: Super Ctrl tab is an option, where Ctrl is only needed on the first tab

Make all <Super> keybindings work together

Eg. it should be possible to close/maximize/move windows when cycling through windows with eg. super+< and super+>

This require all relevant bindings to go through the same handler in some way.

switch-next/previous "mode" sometimes only work in one direction

So far the prime suspect is that mutter global.display.add_keybinding return 0 for all custom actions. (check the content of window.paperActionIds) We use the keybinding id to decide what to do for keypresses that occur in the mode.

Keywords: PreviewedWindowNavigator

Animate maximize-horizontally

Keep in mind that we'll need a to animate other operations that change the size of (possible multiple) windows. Eg. 'fit-partially-visible-windows'.

Prototype branch: animate-maximize

Implement extension `disable`

Need to disconnect all signal handler and remove all keybinding actions. This means we should probably make some sort of signal-connect wrapper that keep tracks of things for us.

Vertical tiling

Lots of design questions that need to be decided, but we do want some form of vertical tiling.

  1. Vertical "slurp": Tile the current and the next horizontal neighbor vertically.
  2. If it's enough vertical space below the current window when a new window is created it can make sense to tile this window vertically. Maybe conditioning on the wm_class.

Case where it would've been nice if the free vertical space had been automatically used:
image

Fix coordinates

We now deal with several coordinate systems:

  • Screen coordinates, MetaWindows and WindowActors live here
  • Monitor relative Space coordinates, the window clones live here.

This require some care about what system we're dealing with.

Regression: preserve tiling order across gnome-shell restart

The enable extension method runs before the windows are seen by gnome-shell so adding existing windows there doesn't work.

'window-added' signals are triggered for all existing windows after enable is called.

See init in main.js (gnome-shell)

Stack trace from enable:

enable@/home/ole/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/extension.js:14
enableExtension@resource:///org/gnome/shell/ui/extensionSystem.js:128
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:170
_loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:297
_emit@resource:///org/gnome/gjs/modules/signals.js:124
ExtensionFinder<._loadExtension@resource:///org/gnome/shell/misc/extensionUtils.js:174
bind/<@resource:///org/gnome/gjs/modules/lang.js:95
collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27
ExtensionFinder<.scanExtensions@resource:///org/gnome/shell/misc/extensionUtils.js:179
_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:299
enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:307
_sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:338
init@resource:///org/gnome/shell/ui/extensionSystem.js:346
_initializeUI@resource:///org/gnome/shell/ui/main.js:216
start@resource:///org/gnome/shell/ui/main.js:125
@<main>:1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.