Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project intentionally has a very small scope. It only changes the appearance of GNOME window control buttons and nothing else.

Adwaita-MacButtons

Minimal GTK4/libadwaita override that gives GNOME window controls a macOS-inspired appearance while preserving the native Adwaita look and behavior.

What this project does

  • Changes only the window control buttons (close, minimize, maximize, restore)
  • Preserves the rest of the Adwaita theme
  • Works with GTK4/libadwaita applications
  • Installs cleanly and can be removed without affecting the rest of your configuration

Preview

Before
Default Adwaita

With Adwaita-MacButtons
Adwaita-MacButtons


Installation

Run:

./install.sh

After installation, restart any GTK4/libadwaita applications that are currently open.

To remove only the user CSS override:

./uninstall-user-css.sh

What is modified

The override only targets the following selectors:

  • windowcontrols
  • windowcontrols > button.close
  • windowcontrols > button.minimize
  • windowcontrols > button.maximize
  • windowcontrols > button.restore
  • windowcontrols > button > image

Nothing else is modified.

Specifically, this project does not change:

  • Header bars
  • .titlebar
  • windowhandle
  • Window titlebar height
  • Global colors
  • Fonts
  • Widgets
  • Adwaita theme variables

The goal is to remain as close as possible to the stock Adwaita experience while changing only the appearance of the window buttons.


Repository Structure

css/
    adwaita-macbuttons.css

theme/
    Adwaita-MacButtons/

tools/
    css-check.c

install.sh
uninstall-user-css.sh

The extracted/ directory contains reference resources extracted from the local GTK/libadwaita installation and is kept for documentation and development purposes.


Why User CSS is Required

libadwaita ships its stylesheet inside:

/org/gnome/Adwaita/styles/gtk.css

and loads it directly from the library resource.

Because of this, installing a traditional GTK theme under ~/.local/share/themes is not a reliable way to override styles in libadwaita applications.

Instead, the supported override point is:

~/.config/gtk-4.0/gtk.css

which is loaded as user CSS after the theme.

For convenience, install.sh installs:

  • the theme under ~/.local/share/themes/Adwaita-MacButtons
  • a clearly marked override block inside ~/.config/gtk-4.0/gtk.css

Local Environment

The project was developed and tested with:

  • GTK 4.22.4
  • libadwaita 1.9.1

Resources were extracted from:

/usr/lib/libadwaita-1.so.0
/usr/lib/libgtk-4.so.1

Reference files included in this repository:

extracted/libadwaita/gtk.css

extracted/gtk-icons/window-close-symbolic.svg
extracted/gtk-icons/window-minimize-symbolic.svg
extracted/gtk-icons/window-maximize-symbolic.svg
extracted/gtk-icons/window-restore-symbolic.svg

These files are included as implementation references only.


Technical Notes

Relevant libadwaita selectors include:

windowcontrols { border-spacing: 3px; }

windowcontrols > button {
    min-width: 24px;
    padding: 5px;
}

windowcontrols > button > image {
    background-color: color-mix(in srgb, currentColor 10%, transparent);
    border-radius: 100%;
    padding: 4px;
}

For default decorations:

headerbar.default-decoration windowcontrols > button {
    min-height: 22px;
    min-width: 22px;
    padding: 4px;
}

The visible circular button is drawn entirely through CSS on the image child.

The symbolic SVG icons only provide the foreground glyphs.


License

MIT License.

About

Minimal GTK4/libadwaita override for macOS-style window controls on GNOME.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages