Nathanaelrc/rounded-windows

GNOME Shell extension that adds rounded corners to all windows (Firefox, VS Code, etc.). Supports GNOME 45-50.

JavaScript

15

9 commits

updated Apr 29, 2026

See the code

See what people are saying

SourceMessageScoreDate

https://github.com/Nathanaelrc/rounded-windows It is possible in current GNOME

on Is it possible to add shaders to windows in Mutter compositor pipelines?

0

Oct 2, 2026

README

GNOME 45–50 GPL-3.0 JavaScript

Rounded Window Corners

A GNOME Shell extension that adds rounded corners to top-level windows —
including apps that don't use libadwaita or libhandy (Firefox, VS Code, Chromium, Electron apps, JetBrains IDEs, etc.).
GPU-accelerated GLSL shader. No build step, no bundler — pure JavaScript.


Table of contents


Screenshots

_


Features

  • Rounded corners — GLSL fragment shader applied per-window at draw time
  • Squircle / superellipse — adjustable smoothing (0 = circle, 1 = squircle)
  • Custom shadow — rounded CSS box-shadow replaces GNOME's default rectangular shadow, clipped with the same squircle curve
  • Border — optional inner or outer coloured border with configurable width
  • Smart skip — automatically skips libadwaita / libhandy apps to avoid double-rounding
  • Blacklist / Whitelist — exclude or exclusively include apps by WM_CLASS, Wayland app ID, or desktop file ID
  • GNOME 50 / Wayland aware — matches native Wayland windows without depending on WM_CLASS
  • Live settings — all changes apply instantly without restarting the shell

Requirements

RequirementVersion
GNOME Shell45 – 50
GLib (glib-compile-schemas)any modern version

Supported distributions (all others with GNOME 45–50 also work):

DistributionGNOME Shell
Ubuntu 24.04 – 26.0446 – 50
Fedora 40 – 4446 – 50
Arch Linux (rolling)45 – 50
Debian Testing / Sid45 – 50
openSUSE Tumbleweed45 – 50

Installation — step by step

1. Install dependencies

You need glib-compile-schemas to compile the GSettings schema. Install it for your distro:

# Ubuntu / Debian
sudo apt install libglib2.0-bin

# Fedora / RHEL / CentOS
sudo dnf install glib2

# Arch Linux / Manjaro
sudo pacman -S glib2

# openSUSE
sudo zypper install glib2-tools

2. Clone the repository

git clone https://github.com/Nathanaelrc/rounded-windows.git
cd rounded-windows

3. Run the installer

chmod +x install.sh
./install.sh

The script will:

  • Detect your GNOME Shell version and confirm it is supported
  • Compile the GSettings schema
  • Copy all extension files to ~/.local/share/gnome-shell/extensions/rounded-windows@marcosgt.github.io/

4. Restart GNOME Shell

The extension is installed but not loaded yet. You need to restart the shell:

Wayland session (GNOME 50)

Log out and log back in. There is no in-session restart on Wayland.

X11 session (GNOME 45–49)

Press Alt+F2, type r, press Enter.

5. Enable the extension

After restarting, enable it with one of these methods:

Option A — terminal:

gnome-extensions enable rounded-windows@marcosgt.github.io

Option B — GUI: Open the Extensions app (or GNOME Tweaks → Extensions) and toggle Rounded Window Corners on.

6. Open settings (optional)

gnome-extensions prefs rounded-windows@marcosgt.github.io

Or click the ⚙️ icon next to the extension in the Extensions app.


Uninstall

./install.sh --uninstall

Then restart GNOME Shell (step 4 above).


Configuration

Corners tab

SettingDescriptionDefault
RadiusCorner radius in logical pixels12
Smoothing0 = circle · 1 = squircle (superellipse)0.6
Clip paddingExtra gap between the window edge and the clip boundary1
Border widthPositive = inner border · Negative = outer · 0 = none0
Border colourRGBA colour pickerwhite
Keep rounded when maximisedApply corners even when a window fills the screenoff
Keep rounded when full-screenApply corners in full-screen modeoff

Shadow tab

SettingDescriptionDefault
Custom shadowReplace GNOME's rectangular shadow with a rounded oneon
Shadow when maximisedKeep the custom shadow for maximised windowsoff
Focused / UnfocusedOpacity, blur radius, spread, horizontal and vertical offsetsee below

Default shadow values:

FocusedUnfocused
Opacity45 / 25528 / 255
Blur18 px12 px
Spread−2 px−2 px
Y offset4 px3 px

Applications tab

SettingDescriptionDefault
Skip libadwaita appsDon't round apps that already have built-in rounded cornerson
Skip libhandy appsSame, for legacy Handy appsoff
Whitelist modeTreat the exception list as a whitelist instead of a blacklistoff
Exception listOne application identifier per line (WM_CLASS, Wayland app ID, or desktop ID)—

Finding a window identifier: Use the X11/XWayland WM_CLASS when available. For Wayland-native apps, use the app ID or desktop file ID shown by GNOME Shell / your launcher entry.


Troubleshooting

No rounded corners appear

  1. Make sure the extension is enabled (gnome-extensions list --enabled | grep rounded).
  2. Check the journal for errors:
    journalctl -b /usr/bin/gnome-shell | grep -E "rounded-windows|JS ERROR"
    
  3. The app may be libadwaita — disable Skip libadwaita apps in settings.

Corners still square on one specific app

Some apps use a custom identifier. Add its WM_CLASS, Wayland app ID, or desktop file ID to the exception list (in whitelist mode) or disable the libadwaita/libhandy skip option.

Wayland limits

GNOME Shell can round top-level windows managed by Mutter. Popup menus, tooltips, override-redirect X11 surfaces, and some client subsurfaces are compositor-limited and may remain square even on GNOME 50 Wayland.

Settings window crashes

Make sure you are running GNOME 45 or later. If you see TypeError: Gdk.RGBA is not a constructor, reinstall the latest version.

Extension causes GNOME Shell to crash

journalctl -b /usr/bin/gnome-shell | tail -100

Then open a bug report with the full log.


Reporting bugs

Before opening an issue, please:

  1. Check the existing issues to avoid duplicates.
  2. Make sure you are on a supported GNOME version (45–50).
  3. Try disabling other extensions to rule out conflicts.

When opening an issue, include:

**GNOME Shell version:**  (run: gnome-shell --version)
**Distribution & version:**
**Display server:**  Wayland / X11
**Monitor scale:**  100% / 125% / 150% / other
**Extension version:**  (from metadata.json or the Extensions app)

**Steps to reproduce:**
1.
2.
3.

**What you expected:**

**What actually happened:**

**Journal log:**
(run: journalctl -b /usr/bin/gnome-shell | grep -E "rounded-windows|JS ERROR" | tail -50)

👉 Open a new issue


How it works

Window Actor (MetaWindowActor)
  └─ RoundedCornersEffect  ← Shell.GLSLEffect (offscreen FBO)
        Fragment shader:
          • converts tex coord → pixel position
          • evaluates squircle formula at each corner
          • multiplies fragment alpha by the squircle opacity
          • result: corners are transparent, edges are anti-aliased

Shadow Actor (St.Bin, inserted below the window in global.windowGroup)
  └─ ClipShadowEffect  ← Shell.GLSLEffect
        Fragment shader:
          • same squircle formula as above
          • makes the shadow transparent where the window sits
          • prevents shadow from bleeding through rounded corners
  └─ Inner St.Bin  → CSS  border-radius + box-shadow

The shader uses a squircle (superellipse) formula:

$$\text{dist}(p, c) = \left( |p_x - c_x|^e + |p_y - c_y|^e \right)^{1/e}$$

where e = smoothing × 10 + 2 (2 = circle, 12 = squircle).


Credits

This extension was built by studying and adapting code from several open-source projects:

ProjectAuthorWhat we used
rounded-window-cornersyiloztOriginal squircle GLSL shader, shadow actor architecture, ClipShadowEffect concept, per-window signal management
Rounded Window Corners RebornflexagoonUpdated GJS bindings for GNOME 45–47, shadow style system, actor binding pattern
MutterGNOMEUnderstanding of MetaWindowActorX11 paint cycle, shadow architecture (focused/unfocused), FBO pipeline
GNOME ShellGNOMEShell.GLSLEffect usage patterns, ExtensionPreferences API

The squircle shader, shadow clipping with squircle masking, GNOME 50 / Mutter 18 compatibility fixes, GSettings schema, preferences UI, and installation script were completely rewritten and heavily modified to bring this project to life and ensure compatibility with modern GNOME environments. While it stands on the shoulders of giants, this specific implementation and its novel improvements are my own work.


License

This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute it under the same license.

Nathanaelrc/rounded-windows

GNOME Shell extension that adds rounded corners to all windows (Firefox, VS Code, etc.). Supports GNOME 45-50.

JavaScript

15

9 commits

updated Apr 29, 2026

See the code

See what people are saying

SourceMessageScoreDate

https://github.com/Nathanaelrc/rounded-windows It is possible in current GNOME

on Is it possible to add shaders to windows in Mutter compositor pipelines?

0

Oct 2, 2026

README

GNOME 45–50 GPL-3.0 JavaScript

Rounded Window Corners

A GNOME Shell extension that adds rounded corners to top-level windows —
including apps that don't use libadwaita or libhandy (Firefox, VS Code, Chromium, Electron apps, JetBrains IDEs, etc.).
GPU-accelerated GLSL shader. No build step, no bundler — pure JavaScript.


Table of contents


Screenshots

_


Features

  • Rounded corners — GLSL fragment shader applied per-window at draw time
  • Squircle / superellipse — adjustable smoothing (0 = circle, 1 = squircle)
  • Custom shadow — rounded CSS box-shadow replaces GNOME's default rectangular shadow, clipped with the same squircle curve
  • Border — optional inner or outer coloured border with configurable width
  • Smart skip — automatically skips libadwaita / libhandy apps to avoid double-rounding
  • Blacklist / Whitelist — exclude or exclusively include apps by WM_CLASS, Wayland app ID, or desktop file ID
  • GNOME 50 / Wayland aware — matches native Wayland windows without depending on WM_CLASS
  • Live settings — all changes apply instantly without restarting the shell

Requirements

RequirementVersion
GNOME Shell45 – 50
GLib (glib-compile-schemas)any modern version

Supported distributions (all others with GNOME 45–50 also work):

DistributionGNOME Shell
Ubuntu 24.04 – 26.0446 – 50
Fedora 40 – 4446 – 50
Arch Linux (rolling)45 – 50
Debian Testing / Sid45 – 50
openSUSE Tumbleweed45 – 50

Installation — step by step

1. Install dependencies

You need glib-compile-schemas to compile the GSettings schema. Install it for your distro:

# Ubuntu / Debian
sudo apt install libglib2.0-bin

# Fedora / RHEL / CentOS
sudo dnf install glib2

# Arch Linux / Manjaro
sudo pacman -S glib2

# openSUSE
sudo zypper install glib2-tools

2. Clone the repository

git clone https://github.com/Nathanaelrc/rounded-windows.git
cd rounded-windows

3. Run the installer

chmod +x install.sh
./install.sh

The script will:

  • Detect your GNOME Shell version and confirm it is supported
  • Compile the GSettings schema
  • Copy all extension files to ~/.local/share/gnome-shell/extensions/rounded-windows@marcosgt.github.io/

4. Restart GNOME Shell

The extension is installed but not loaded yet. You need to restart the shell:

Wayland session (GNOME 50)

Log out and log back in. There is no in-session restart on Wayland.

X11 session (GNOME 45–49)

Press Alt+F2, type r, press Enter.

5. Enable the extension

After restarting, enable it with one of these methods:

Option A — terminal:

gnome-extensions enable rounded-windows@marcosgt.github.io

Option B — GUI: Open the Extensions app (or GNOME Tweaks → Extensions) and toggle Rounded Window Corners on.

6. Open settings (optional)

gnome-extensions prefs rounded-windows@marcosgt.github.io

Or click the ⚙️ icon next to the extension in the Extensions app.


Uninstall

./install.sh --uninstall

Then restart GNOME Shell (step 4 above).


Configuration

Corners tab

SettingDescriptionDefault
RadiusCorner radius in logical pixels12
Smoothing0 = circle · 1 = squircle (superellipse)0.6
Clip paddingExtra gap between the window edge and the clip boundary1
Border widthPositive = inner border · Negative = outer · 0 = none0
Border colourRGBA colour pickerwhite
Keep rounded when maximisedApply corners even when a window fills the screenoff
Keep rounded when full-screenApply corners in full-screen modeoff

Shadow tab

SettingDescriptionDefault
Custom shadowReplace GNOME's rectangular shadow with a rounded oneon
Shadow when maximisedKeep the custom shadow for maximised windowsoff
Focused / UnfocusedOpacity, blur radius, spread, horizontal and vertical offsetsee below

Default shadow values:

FocusedUnfocused
Opacity45 / 25528 / 255
Blur18 px12 px
Spread−2 px−2 px
Y offset4 px3 px

Applications tab

SettingDescriptionDefault
Skip libadwaita appsDon't round apps that already have built-in rounded cornerson
Skip libhandy appsSame, for legacy Handy appsoff
Whitelist modeTreat the exception list as a whitelist instead of a blacklistoff
Exception listOne application identifier per line (WM_CLASS, Wayland app ID, or desktop ID)—

Finding a window identifier: Use the X11/XWayland WM_CLASS when available. For Wayland-native apps, use the app ID or desktop file ID shown by GNOME Shell / your launcher entry.


Troubleshooting

No rounded corners appear

  1. Make sure the extension is enabled (gnome-extensions list --enabled | grep rounded).
  2. Check the journal for errors:
    journalctl -b /usr/bin/gnome-shell | grep -E "rounded-windows|JS ERROR"
    
  3. The app may be libadwaita — disable Skip libadwaita apps in settings.

Corners still square on one specific app

Some apps use a custom identifier. Add its WM_CLASS, Wayland app ID, or desktop file ID to the exception list (in whitelist mode) or disable the libadwaita/libhandy skip option.

Wayland limits

GNOME Shell can round top-level windows managed by Mutter. Popup menus, tooltips, override-redirect X11 surfaces, and some client subsurfaces are compositor-limited and may remain square even on GNOME 50 Wayland.

Settings window crashes

Make sure you are running GNOME 45 or later. If you see TypeError: Gdk.RGBA is not a constructor, reinstall the latest version.

Extension causes GNOME Shell to crash

journalctl -b /usr/bin/gnome-shell | tail -100

Then open a bug report with the full log.


Reporting bugs

Before opening an issue, please:

  1. Check the existing issues to avoid duplicates.
  2. Make sure you are on a supported GNOME version (45–50).
  3. Try disabling other extensions to rule out conflicts.

When opening an issue, include:

**GNOME Shell version:**  (run: gnome-shell --version)
**Distribution & version:**
**Display server:**  Wayland / X11
**Monitor scale:**  100% / 125% / 150% / other
**Extension version:**  (from metadata.json or the Extensions app)

**Steps to reproduce:**
1.
2.
3.

**What you expected:**

**What actually happened:**

**Journal log:**
(run: journalctl -b /usr/bin/gnome-shell | grep -E "rounded-windows|JS ERROR" | tail -50)

👉 Open a new issue


How it works

Window Actor (MetaWindowActor)
  └─ RoundedCornersEffect  ← Shell.GLSLEffect (offscreen FBO)
        Fragment shader:
          • converts tex coord → pixel position
          • evaluates squircle formula at each corner
          • multiplies fragment alpha by the squircle opacity
          • result: corners are transparent, edges are anti-aliased

Shadow Actor (St.Bin, inserted below the window in global.windowGroup)
  └─ ClipShadowEffect  ← Shell.GLSLEffect
        Fragment shader:
          • same squircle formula as above
          • makes the shadow transparent where the window sits
          • prevents shadow from bleeding through rounded corners
  └─ Inner St.Bin  → CSS  border-radius + box-shadow

The shader uses a squircle (superellipse) formula:

$$\text{dist}(p, c) = \left( |p_x - c_x|^e + |p_y - c_y|^e \right)^{1/e}$$

where e = smoothing × 10 + 2 (2 = circle, 12 = squircle).


Credits

This extension was built by studying and adapting code from several open-source projects:

ProjectAuthorWhat we used
rounded-window-cornersyiloztOriginal squircle GLSL shader, shadow actor architecture, ClipShadowEffect concept, per-window signal management
Rounded Window Corners RebornflexagoonUpdated GJS bindings for GNOME 45–47, shadow style system, actor binding pattern
MutterGNOMEUnderstanding of MetaWindowActorX11 paint cycle, shadow architecture (focused/unfocused), FBO pipeline
GNOME ShellGNOMEShell.GLSLEffect usage patterns, ExtensionPreferences API

The squircle shader, shadow clipping with squircle masking, GNOME 50 / Mutter 18 compatibility fixes, GSettings schema, preferences UI, and installation script were completely rewritten and heavily modified to bring this project to life and ensure compatibility with modern GNOME environments. While it stands on the shoulders of giants, this specific implementation and its novel improvements are my own work.


License

This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute it under the same license.

Languages

JavaScript

92.9%

Shell

6.6%