• Stars
    star
    4,276
  • Rank 10,085 (Top 0.2 %)
  • Language
    TypeScript
  • License
    GNU General Publi...
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pop!_OS Shell

Pop Shell

Pop Shell is a keyboard-driven layer for GNOME Shell which allows for quick and sensible navigation and management of windows. The core feature of Pop Shell is the addition of advanced tiling window management β€” a feature that has been highly sought within our community. For many β€” ourselves included β€” i3wm has become the leading competitor to the GNOME desktop.

Tiling window management in GNOME is virtually nonexistent, which makes the desktop awkward to interact with when your needs exceed that of two windows at a given time. Luckily, GNOME Shell is an extensible desktop with the foundations that make it possible to implement a tiling window manager on top of the desktop.

Therefore, we see an opportunity here to advance the usability of the GNOME desktop to better accommodate the needs of our community with Pop Shell. Advanced tiling window management is a must for the desktop, so we've merged i3-like tiling window management with the GNOME desktop for the best of both worlds.


Table of Contents


The Proposal

A proposal for integration of the tiling window management features from Pop Shell into GNOME is currently under development. It will be created as a GitLab issue on GNOME Shell for future discussion, once we have invested our time into producing a functioning prototype, and learned what does and does not work in practice.

Ideally, the features explored in Pop Shell will be available for any environment using Mutter β€” far extending the half-monitor tiling capability currently present. By starting out as a shell extension, anyone using GNOME Shell can install this onto their system, without having to install a Pop-specific fork of GNOME on their system.


The Problem

So, why is this a problem for us, and why do so many of our users switch to i3wm?

Displays are large, and windows are many

GNOME currently only supports half-tiling, which tiles one window to one side of the screen, and another window to the other side of the screen. If you have more than two windows, it is expected to place them on separate workspaces, monitors, or to alternate between windows with Alt + Tab.

This tends to work fine if you only have a small handful of applications. If you need more than two windows at a time on a display, your only option is to manually drag windows into position, and resize them to fit alongside each other β€” a very time-consuming process that could easily be automated and streamlined.

Displays are large. Very, very large

Suppose you are a lucky β€” or perhaps unlucky β€” owner of an ultra-wide display. A maximized window will have much of its preferences and controls dispersed across the far left and far right corners. The application may place a panel with buttons on the far left, while other buttons get shifted to either the distant center or far right.

Half-tiling in this scenario means that each window will be as large as an entire 2560x1440 or 4K display. In either scenario, at such extreme sizes, the mouse becomes completely useless β€” and applications become unbearable to use β€” in practice.

Fighting the window manager is futile

As you struggle with fighting the window manager, it quickly becomes clear that any attempt to manage windows in a traditional stacking manner β€” where you need to manually move windows into place, and then manually resize them β€” is futile. Humans are nowhere near as precise or as quick as algorithms at aligning windows alongside each other on a display.

Why not switch to i3wm?

The GNOME desktop comes with many useful desktop integration features, which are lost when switching to an i3wm session. Although possible to connect various GNOME session services to an i3wm session, much of the GNOME desktop experience is still lost in the process. The application overview, the GNOME panel, and GNOME extensions.

Even worse, many users are completely unfamiliar with tiling window managers, and may never feel comfortable switching "cold turkey" to one. By offering tiling window management as a feature that can be opted into, we can empower the user to ease into gaining greater control over their desktop, so that the idea of tiling window management suddenly becomes accessible.

There are additionally those who do want the traditional stacking window management experience, but they also want to be able to opt into advanced tiling window management, too. So it should be possible to opt into tiling window management as necessary. Other operating systems have successfully combined tiling window management features with the traditional stacking window management experience, and we feel that we can do this with GNOME as well.


Installation

To install this GNOME Shell extension, you MUST have the following:

  • GNOME Shell 3.36
  • TypeScript 3.8
  • GNU Make

Proper functionality of the shell requires modifying GNOME's default keyboard shortcuts. For a local installation, run make local-install.

If you want to uninstall the extension, you may invoke make uninstall, and then open the "Keyboard Shortcuts" panel in GNOME Settings to select the "Reset All.." button in the header bar.

Note that if you are packaging for your Linux distribution, many features in Pop Shell will not work out of the box because they require changes to GNOME's default keyboard shortcuts. A local install is necessary if you aren't packaging your GNOME session with these default keyboard shortcuts unset or changed.

Packaging status

  • Fedora: sudo dnf install gnome-shell-extension-pop-shell xprop
  • Gentoo: emerge gnome-shell-extension-pop-shell
  • openSUSE Tumbleweed: sudo zypper install gnome-shell-extension-pop-shell
  • Arch Linux (Using Yay as AUR helper):
    • yay -S gnome-shell-extension-pop-shell
    • For precompiled binary version: yay -S gnome-shell-extension-pop-shell-bin
    • For GitHub repository version: yay -S gnome-shell-extension-pop-shell-git

Shared Features

Features that are shared between stacking and auto-tiling modes.

Directional Keys

These are key to many of the shortcuts utilized by tiling window managers. This document will henceforth refer to these keys as <Direction>, which default to the following keys:

  • Left or h
  • Down or j
  • Up or k
  • Right or l

Overridden GNOME Shortcuts

  • Super + q: Close window
  • Super + m: Maximize the focused window
  • Super + ,: Minimize the focused window
  • Super + Esc: Lock screen
  • Super + f: Files
  • Super + e: Email
  • Super + b: Web Browser
  • Super + t: Terminal

Window Management Mode

This mode is activated with Super + Return.

Window management mode activates additional keyboard control over the size and location of the currently-focused window. The behavior of this mode changes slightly based on whether you are in auto-tile mode, or in the default stacking mode. In the default mode, an overlay is displayed snapped to a grid, which represents a possible future location and size of your focused window. This behavior changes slightly in auto-tiling mode, where resizes are performed immediately and overlays are only shown when swapping windows.

Activating this enables the following behaviors:

  • <Direction>
    • In default mode, this will move the displayed overlay around based on a grid
    • In auto-tile mode, this will resize the window
  • Shift + <Direction>
    • In default mode, this will resize the overlay
    • In auto-tile mode, this will do nothing
  • Ctrl + <Direction>
    • Selects a window in the given direction of the overlay
    • When Return is pressed, window positions will be swapped
  • Shift + Ctrl + <Direction>
    • In auto-tile mode, this resizes in the opposite direction
  • O: Toggles between horizontal and vertical tiling in auto-tile mode
  • ~: Toggles between floating and tiling in auto-tile mode
  • Return: Applies the changes that have been requested
  • Esc: Cancels any changes that were requested

Window Focus Switching

When not in window management mode, pressing Super + <Direction> will shift window focus to a window in the given direction. This is calculated based on the distance between the center of the side of the focused window that the window is being shifted from, and the opposite side of windows surrounding it.

Switching focus to the left will calculate from the center of the east side of the focused window to the center of the west side of all other windows. The window with the least distance is the window we pick.

Launcher

Pop Shell provides an integrated launcher which interfaces directly with our pop-launcher service. JSON IPC is used to communicate between the shell and the launcher in an asynchronous fashion. This functionality was separated from the shell due to performance and maintainability issues. The new launcher is written in Rust and fully async. The launcher has extensive features that would be useful for implementing desktop launchers beyond a shell extension.

Inner and Outer Gaps

Gaps improve the aesthetics of tiled windows and make it easier to grab the edge of a specific window. We've decided to add support for inner and outer gaps, and made these settings configurable in the extension's popup menu.

Hiding Window Title Bars

Windows with server-side decorations may have their title bars completely hidden, resulting in additional screen real estate for your applications, and a visually cleaner environment. This feature can be toggled in the extension's popup menu. Windows can be moved with the mouse by holding Super when clicking and dragging a window to another location, or using the keyboard shortcuts native to pop-shell. Windows may be closed by pressing Super + Q, and maximized with Super + M.


Floating Mode

This is the default mode of Pop Shell, which combines traditional stacking window management, with optional tiling window management features.

Display Grid

In this mode, displays are split into a grid of columns and rows. When entering tile mode, windows are snapped to this grid as they are placed. The number of rows and columns are configurable in the extension's popup menu in the panel.

Snap-to-Grid

An optional feature to improve your tiling experience is the ability to snap windows to the grid when using your mouse to move and resize them. This provides the same precision as entering window management mode to position a window with your keyboard, but with the convenience and familiarity of a mouse. This feature can be enabled through the extension's popup menu.


Tiling Mode

Disabled by default, this mode manages windows using a tree-based tiling window manager. Similar to i3, each node of the tree represents two branches. A branch may be a window, a fork containing more branches, or a stack that contains many windows. Each branch represents a rectangular area of space on the screen, and can be subdivided by creating more branches inside of a branch. As windows are created, they are assigned to the window or stack that is actively focused, which creates a new fork on a window, or attaches the window to the focused stack. As windows are destroyed, the opposite is performed to compress the tree and rearrange windows to their new dimensions.

Keyboard Shortcuts

Customizing the Floating Window List

There is file $XDG_CONFIG_HOME/pop-shell/config.json where you can add the following structure:

{
  class: "<WM_CLASS String from xprop>",
  title: "<Optional Window Title>"
}

For example, doing xprop on GNOME Settings (or GNOME Control Center), the WM_CLASS values are gnome-control-center and Gnome-control-center. Use the second value (Gnome-control-center), which pop-shell will read. The title field is optional.

After applying changes in config.json, you can reload the tiling if it doesn't work the first time.

Developers

Due to the risky nature of plain JavaScript, this GNOME Shell extension is written in TypeScript. In addition to supplying static type-checking and self-documenting classes and interfaces, it allows us to write modern JavaScript syntax whilst supporting the generation of code for older targets.

Please install the following as dependencies when developing:

  • Node.js LTS+ (v12+)
  • Latest npm (comes with NodeJS)
  • npm install typescript@latest

While working on the shell, you can recompile, reconfigure, reinstall, and restart GNOME Shell with logging with make debug. Note that this only works reliably in X11 sessions, since Wayland will exit to the login screen on restarting the shell.

Discussions welcome on Pop Chat

License

Licensed under the GNU General Public License, Version 3.0, (LICENSE or https://www.gnu.org/licenses/gpl-3.0.en.html)

Contribution

Any contribution intentionally submitted for inclusion in the work by you shall be licensed under the GNU GPLv3.

More Repositories

1

cosmic-epoch

Next generation Cosmic desktop environment
Just
2,766
star
2

pop

A project for managing all Pop!_OS sources
Rust
2,128
star
3

cosmic-text

Pure Rust multi-line text handling
Rust
1,571
star
4

cosmic

Computer Operating System Main Interface Components
JavaScript
1,066
star
5

gtk-theme

System76 Pop GTK+ Theme
SCSS
747
star
6

system76-scheduler

Auto-configure CFS and process priorities for improved desktop responsiveness
Rust
540
star
7

popsicle

Multiple USB File Flasher
Rust
520
star
8

system76-power

System76 Power Management
Rust
512
star
9

cosmic-comp

Compositor for the COSMIC desktop environment
Rust
466
star
10

iso

Pop!_OS ISO production
Makefile
439
star
11

libcosmic

WIP library for COSMIC applications
Rust
416
star
12

cosmic-term

WIP COSMIC terminal emulator
Rust
366
star
13

beta

Pop!_OS Beta
353
star
14

keyboard-configurator

Keyboard configuration UI
Rust
231
star
15

cosmic-edit

COSMIC Text Editor
Rust
225
star
16

distinst

Installer Backend
Rust
207
star
17

launcher

Modular IPC-based desktop launcher service
Rust
203
star
18

tensorman

Utility for easy management of Tensorflow containers
Rust
190
star
19

cosmic-applets

WIP applets for cosmic-panel
Rust
174
star
20

icon-theme

System76 Pop icon theme for Linux
Python
169
star
21

firmware-manager

Generic framework and GTK UI for firmware updates from system76-firmware and fwupd, written in Rust.
Rust
163
star
22

cosmic-settings

COSMIC Settings
Rust
151
star
23

wallpapers

Wallpapers for Pop!_OS
Makefile
149
star
24

cosmic-panel

WIP
Rust
110
star
25

nvidia-graphics-drivers

Pop!_OS NVIDIA Graphics Drivers
110
star
26

cosmic-launcher

WIP
Rust
102
star
27

system76-driver

System76 Driver for Pop!_OS
Python
101
star
28

cosmic-files

WIP COSMIC file manager
Rust
93
star
29

upgrade

Utility for upgrading Pop!_OS and its recovery partition to new releases.
Rust
90
star
30

cosmic-time

Animation Library for https://github.com/iced-rs/iced and https://github.com/pop-os/cosmic-epoch
Rust
86
star
31

gnome-shell-extension-system76-power

System76 Power Management Extension
TypeScript
74
star
32

cosmic-store

WIP COSMIC app store
Rust
72
star
33

system76-firmware

System76 Firmware Tool and Daemon
Rust
71
star
34

fonts

Fonts for the System76 Pop look, Fira and Roboto Slab
Makefile
68
star
35

cosmic-dock

Pop!_OS fork of https://github.com/micheleg/dash-to-dock/tree/ubuntu-dock
JavaScript
68
star
36

pop-arm64

Experimental scripts for building an Pop!_OS for ARM64 EFI platforms.
Shell
67
star
37

tiler

Generic tiling window manager library in Rust
Rust
65
star
38

cosmic-session

Session manager for the COSMIC desktop environment
Rust
65
star
39

core

WIP immutable base
Rust
56
star
40

cosmic-applibrary

WIP
Rust
55
star
41

shell-shortcuts

Application for displaying and demoing Pop Shell shortcuts
Rust
53
star
42

debrepbuild

A project for automatically generating and maintaining Debian repositories from a TOML spec.
Rust
53
star
43

cosmic-greeter

libcosmic greeter for greetd, which can be run inside cosmic-comp
Rust
50
star
44

theme

A metapackage including pop-fonts, pop-gtk-theme, and pop-icon-theme
42
star
45

desktop-widget

Pop Desktop Settings Widget
Fluent
41
star
46

touchegg

Pop!_OS fork of https://github.com/JoseExposito/touchegg
C++
36
star
47

async-fetcher

Rust crate for asynchronous file fetching, using optional fetching based on modified times and checksums
Rust
36
star
48

system76-dkms

System76 DKMS driver
C
36
star
49

sys-mount

High level FFI binding around the sys mount & umount2 calls, for Rust
Rust
36
star
50

url-scraper

Rust crate for scraping URLs from HTML pages
Rust
36
star
51

cosmic-wallpapers

Wallpapers for the COSMIC Desktop Environment
Makefile
36
star
52

gnome-shell-theme

The GNOME Shell theme for Pop!_OS
CSS
35
star
53

xdg-desktop-portal-cosmic

Rust
35
star
54

default-settings

Distribution Default Settings
Shell
35
star
55

cosmic-workspaces

Pop!_OS fork of https://github.com/RensAlthuis/vertical-overview
JavaScript
35
star
56

cosmic-app-template

Project template for creating applications for the COSMICβ„’ desktop
Rust
34
star
57

linux-firmware

Pop!_OS fork of https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-firmware
C
29
star
58

cosmic-reader

WIP COSMIC PDF reader
Rust
28
star
59

gnome-control-center

Pop!_OS fork of https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-control-center
C
27
star
60

bus-writer

Single-reader, multi-writer & single-reader, multi-verifier; broadcasts reads to multiple writeable destinations in parallel
Rust
27
star
61

website

The Pop!_OS website
Vue
27
star
62

system-updater

Systemd services for checking for and applying system updates.
Rust
27
star
63

pidfd

Rust crate providing Linux (>= 5.3) PID file descriptor support
Rust
27
star
64

cosmic-randr

Library and utility for displaying and configuring Wayland outputs
Rust
27
star
65

buildchain

Software for creating and managing a distributed and reproducible chain of builds
Rust
27
star
66

desktop

Desktop metapackage
25
star
67

cosmic-protocols

Addtional wayland-protocols used by the COSMIC desktop environment
Rust
25
star
68

cosmic-osd

Rust
25
star
69

cosmic-theme-editor

WIP
Rust
24
star
70

system76-oled

Control brightness on OLED displays
Rust
24
star
71

cosmic-player

WIP COSMIC media player
Rust
22
star
72

libparted

Rust wrappers for libparted
Rust
22
star
73

gnome-shell-extension-do-not-disturb

Enable or disable do not disturb mode.
JavaScript
21
star
74

gnome-shell

Pop!_OS fork of https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gnome-shell
C
21
star
75

cosmic-workspaces-epoch

Rust
21
star
76

cosmic-screenshot

Utility for capturing screenshots via XDG Desktop Portal
Rust
21
star
77

theme-switcher

Pop!_OS GTK widget library / app for switching themes
Rust
20
star
78

cosmic-settings-daemon

Rust
20
star
79

progress-streams

Rust crate to extend io::Read & io::Write types with progress callbacks
Rust
19
star
80

freedesktop-desktop-entry

Rust crate for navigating Freedesktop desktop entries
Rust
19
star
81

cosmic-notifications

Rust
19
star
82

sysfs-class

Rust library for viewing /sys/class in an object-oriented format
Rust
18
star
83

system76-wallpapers

System76 Wallpapers
17
star
84

plymouth-theme

Plymouth splash screen themes
Shell
17
star
85

systemd-boot-conf

Rust crate for managing the systemd-boot loader configuration.
Rust
17
star
86

cosmic-bg

Rust
17
star
87

repo-release

Produces Pop release package repositories
Shell
16
star
88

dbus-udisks2

Rust library for interacting with the UDisks2 DBus API
Rust
16
star
89

cosmic-theme

WIP
Rust
16
star
90

libcosmic-book

Guide for starting development with libcosmic: https://pop-os.github.io/libcosmic-book/
16
star
91

system76-acpi-dkms

System76 ACPI Driver (DKMS)
C
15
star
92

gtk-extras

Rust crate containing an assortment of extra, unofficial GTK patterns, widgets, and traits.
Rust
13
star
93

as-result

Rust crate which provides the `AsResult<T, E>` and `IntoResult<T, E>` traits.
Rust
13
star
94

debarchive

Rust crate which provides direct access to files within a Debian archive
Rust
13
star
95

mutter-rs

Rust wrappers for Mutter and related projects
Rust
13
star
96

proc-mounts

Rust crate for fetching active mounts and swaps on a Linux system
Rust
13
star
97

os-release

Rust crate for parsing the /etc/os-release file, common with Linux distributions
Rust
13
star
98

iced-sctk

WIP
Rust
12
star
99

grub-theme

Grub bootloader theme
12
star
100

cog-stable-diffusion

Packaging for convenience of installation and setup of stable diffusion on Pop
Python
12
star