wayland compositor base wlroots and scenefx(dwl but no suckless)
Find a file
2025-09-27 12:45:09 +08:00
.github update github workflow 2025-08-14 13:28:03 +08:00
assets add icon 2025-07-30 21:00:03 +08:00
nix opt: nix not need wlroots custom patch any more 2025-09-26 12:12:23 +08:00
protocols feat:add ext-workspace protocol file for temp 2025-08-26 16:16:05 +08:00
src opt: optimize center_tile layout slave client position 2025-09-27 12:45:09 +08:00
.clang-format format code index to tab no space 2025-06-07 14:40:13 +08:00
.gitignore change: change project name to mango 2025-07-30 15:03:10 +08:00
config.conf feat: add layout center_tile 2025-09-26 22:34:49 +08:00
flake.lock nix: update mmsg for flake 2025-08-15 12:14:46 +08:00
flake.nix nix: expose mmsg in packages 2025-08-12 19:42:16 +08:00
LICENSE change: change project name to mango 2025-07-30 15:03:10 +08:00
LICENSE.dwl add dwl license 2025-02-28 21:54:18 +08:00
LICENSE.dwm init 2025-02-03 23:18:47 +08:00
LICENSE.sway init 2025-02-03 23:18:47 +08:00
LICENSE.tinywl init 2025-02-03 23:18:47 +08:00
LICENSE.wlroots comment: Add a reference declaration 2025-08-26 16:24:26 +08:00
mango.desktop change: change project name to mango 2025-07-30 15:03:10 +08:00
meson.build bump version to 0.8.9 2025-09-24 16:27:01 +08:00
meson_options.txt feat: make asan as the debug type feature 2025-08-14 12:58:55 +08:00
README.md feat: add layout center_tile 2025-09-26 22:34:49 +08:00

MangoWC

mango-transparency-256

This project's development is based on dwl.

  1. Lightweight & Fast Build

    • Mango is as lightweight as dwl, and can be built completely within a few seconds. Despite this, Mango does not compromise on functionality.
  2. Feature Highlights

    • In addition to basic WM functionality, Mango provides:
      • Excellent xwayland support.
      • Base tags not workspaces (supports separate window layouts for each tag)
      • Smooth and customizable complete animations (window open/move/close, tag enter/leave,layer open/close/move)
      • Excellent input method support (text input v2/v3)
      • Flexible window layouts with easy switching (scroller, master, monocle, spiral, etc.)
      • Rich window states (swallow, minimize, maximize, unglobal, global, fakefullscreen, overlay, etc.)
      • Simple yet powerful external configuration(support shortcuts hot-reload)
      • Sway-like scratchpad and named scratchpad
      • Ipc support(get/send message from/to compositor by external program)
      • Hycov-like overview
      • Window effects from scenefx (blur, shadow, corner radius, opacity)
  3. Some disadvantages

    • Since it uses the fully automatic layout like dwm style, it does not allow you to manually adjust the window size when the window is in tiled state. It only allows you to use dispatch like setmfact or increase_proportion bind to adjust the tiled window ratio.

Master-Stack Layout

https://github.com/user-attachments/assets/a9d4776e-b50b-48fb-94ce-651d8a749b8a

Scroller Layout

https://github.com/user-attachments/assets/c9bf9415-fad1-4400-bcdc-3ad2d76de85a

Layer animaiton

https://github.com/user-attachments/assets/014c893f-115c-4ae9-8342-f9ae3e9a0df0

Supported layouts

Horizontal Layouts

  • tile
  • scroller
  • monocle
  • grid
  • dwindle
  • spiral
  • deck
  • center_tile

Vertical Layouts

  • vertical_tile
  • vertical_scroller
  • vertical_monocle
  • vertical_grid
  • vertical_dwindle
  • vertical_spiral

Installation

Dependencies

  • glibc
  • wayland
  • wayland-protocols
  • libinput
  • libdrm
  • libxkbcommon
  • pixman
  • git
  • meson
  • ninja
  • libdisplay-info
  • libliftoff
  • hwdata
  • seatd
  • pcre2

Arch Linux

yay -S mangowc-git

Gentoo Linux

The package is in the community-maintained repository called GURU. First, add GURU repository:

emerge --ask --verbose eselect-repository
eselect repository enable guru
emerge --sync guru

Then, add gui-libs/scenefx and gui-wm/mangowc to the package.accept_keywords.

Finally, install the package:

emerge --ask --verbose gui-wm/mangowc

Other

git clone -b 0.19.1 https://gitlab.freedesktop.org/wlroots/wlroots.git
cd wlroots
meson build -Dprefix=/usr
sudo ninja -C build install

git clone https://github.com/wlrfx/scenefx.git
cd scenefx
meson build -Dprefix=/usr
sudo ninja -C build install

git clone https://github.com/DreamMaoMao/mangowc.git
cd mangowc
meson build -Dprefix=/usr
sudo ninja -C build install

Suggested Tools

  • Application launcher (rofi, bemenu, wmenu, fuzzel)
  • Terminal emulator (foot, wezterm, alacritty, kitty, ghostty)
  • Status bar (waybar, eww, quickshell, ags), waybar is preferred
  • Wallpaper setup (swww, swaybg)
  • Notification daemon (swaync, dunst,mako)
  • Desktop portal (xdg-desktop-portal, xdg-desktop-portal-wlr, xdg-desktop-portal-gtk)
  • Clipboard (wl-clipboard, wl-clip-persist, cliphist)
  • Gamma control/night light (wlsunset, gammastep)
  • Miscellaneous (xfce-polkit, wlogout)

Some Common Default Keybindings

  • alt+return: open foot terminal
  • alt+space: open rofi launcher
  • alt+q: kill client
  • alt+left/right/up/down: focus direction
  • super+m: quit mango

My Dotfiles

  • Dependencies
yay -S rofi foot xdg-desktop-portal-wlr swaybg waybar wl-clip-persist cliphist wl-clipboard wlsunset xfce-polkit swaync pamixer wlr-dpms sway-audio-idle-inhibit-git swayidle dimland-git brightnessctl swayosd wlr-randr grim slurp satty swaylock-effects-git wlogout sox
  • use my config
git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango

Config Documentation

Refer to the wiki

NixOS + Home-manager

The repo contains a flake that provides a NixOS module and a home-manager module for mango. Use the NixOS module to install mango with other necessary components of a working Wayland environment. Use the home-manager module to declare configuration and autostart for mango.

Here's an example of using the modules in a flake:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    flake-parts.url = "github:hercules-ci/flake-parts";
    mango.url = "github:DreamMaoMao/mango";
  };
  outputs =
    inputs@{ self, flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      debug = true;
      systems = [ "x86_64-linux" ];
      flake = {
        nixosConfigurations = {
          hostname = inputs.nixpkgs.lib.nixosSystem {
            system = "x86_64-linux";
            modules = [
              inputs.home-manager.nixosModules.home-manager

              # Add mango nixos module
              inputs.mango.nixosModules.mango
              {
                programs.mango.enable = true;
              }
              {
                home-manager = {
                  useGlobalPkgs = true;
                  useUserPackages = true;
                  backupFileExtension = "backup";
                  users."username".imports =
                    [
                      (
                        { ... }:
                        {
                          wayland.windowManager.mango = {
                            enable = true;
                            settings = ''
                              # see config.conf
                            '';
                            autostart_sh = ''
                              # see autostart.sh
                              # Note: here no need to add shebang
                            '';
                          };
                        }
                      )
                    ]
                    ++ [
                      # Add mango hm module
                      inputs.mango.hmModules.mango
                    ];
                };
              }
            ];
          };
        };
      };
    };
}

Packaging mango

To package mango for other distributions, you can check the reference setup for:

You might need to package scenefx for your distribution, check availability here.

If you encounter build errors when packaging mango, feel free to create an issue and ask a question, but Read The Friendly Manual on packaging software in your distribution first.

Thanks to These Reference Repositories