For Arch Linux, installation is straightforward using the AUR:
yay -S mangowc-gitThen install the required dependencies:
sudo pacman -Sy foot wl-clipboard wmenu grim slurp swaybg firefox ttf-iosevka-nerd waybar wmenu
yay -S networkmanager network-manager-applet libappinidcator-gtk3 pavucontrol-qt
sudo systemctl enable --now NetworkManagergit clone:
git clone https://github.com/radiaku/mangowc ~/.config/mango
cd ~/.config/mangoadd this to `~/.bash_profile`:
if [[ -z $WAYLAND_DISPLAY ]] && [[ $(tty) == /dev/tty1 ]]; then
exec mango
fiFor NixOS, you’ll need to add MangoWC as a flake input to your configuration.
First, add the flake input to your flake.nix:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
mangowc = {
url = "github:DreamMaoMao/mangowc";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, mangowc, ... }: {
nixosConfigurations.yourHostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
mangowc.nixosModules.default
];
};
};
}Then enable MangoWC in your configuration.nix:
{ config, pkgs, ... }:
{
programs.mangowc.enable = true;
environment.systemPackages = with pkgs; [
foot
wmenu
wl-clipboard
grim
slurp
swaybg
firefox
];
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
];
}Rebuild your system:
sudo nixos-rebuild switch --flake .#your_hostnameFor Gentoo users, you’ll need to add MangoWC via an overlay or manually compile it. First, install the dependencies:
sudo emerge --ask \
dev-libs/wayland \
dev-libs/wayland-protocols \
gui-libs/wlroots \
dev-libs/libinput \
x11-libs/libdrm \
x11-libs/libxkbcommon \
x11-libs/pixman \
dev-util/meson \
dev-util/ninja \
sys-apps/hwdata \
sys-auth/seatd \
dev-libs/libpcre2 \
gui-apps/foot \
gui-apps/wmenu \
gui-apps/wl-clipboard \
gui-apps/grim \
gui-apps/slurp \
gui-apps/swaybg \
www-client/firefox \
media-fonts/jetbrains-monoThen clone and build MangoWC from source:
git clone https://github.com/DreamMaoMao/mangowc
cd mangowc
meson setup build
ninja -C build
sudo ninja -C build installHere’s a breakdown of all the essential keybinds for MangoWC. These are configured in your ~/.config/mango/config.conf file:
| Keybind | Action | Description |
|---|---|---|
Super + Enter | Launch Terminal | Opens foot terminal emulator |
Super + d | Application Launcher | Opens wmenu for launching applications |
Super + q | Kill Window | Closes the currently focused window |
Super + Shift + r | Reload Config | Reloads the MangoWC configuration file |
Super + R | Reload Waybar | Runs the rebar script to restart waybar |
Super + s | Screenshot | Takes a screenshot of selected area (using snip.sh) |
| Keybind | Action | Description |
|---|---|---|
Super + 1-9 | Switch Tag | Switches to workspace/tag 1 through 9 |
Super + i | Increase Master | Adds one more window to master area |
Super + p | Decrease Master | Removes one window from master area |
Super + 0 | Toggle Overview | Shows overview of all windows/workspaces |
| Keybind | Action | Description |
|---|---|---|
Super + j | Focus Next | Focuses the next window in the stack |
Super + k | Focus Previous | Focuses the previous window in the stack |
Super + h | Focus Left | Focuses the window to the left |
Super + l | Focus Right | Focuses the window to the right |
Super + Shift + j | Swap Down | Swaps current window with the one below |
Super + Shift + k | Swap Up | Swaps current window with the one above |
Super + Shift + h | Swap Left | Swaps current window with the one on the left |
Super + Shift + l | Swap Right | Swaps current window with the one on the right |
Ctrl + Shift + j/k/h/l | Smart Move | Moves window in specified direction |
| Keybind | Action | Description |
|---|---|---|
Super + t | Tile Layout | Sets layout to tiled mode |
Super + v | Vertical Grid | Sets layout to vertical grid |
Super + c | Spiral Layout | Sets layout to spiral mode |
Super + x | Scroller Layout | Sets layout to scroller mode |
Super + n | Switch Layout | Cycles through available layouts |
Super + a | Toggle Gaps | Toggles window gaps on/off |
Super + f | Toggle Float | Toggles floating mode for current window |
Super + Shift + f | Toggle Fullscreen | Toggles fullscreen for current window |
| Keybind | Action | Description |
|---|---|---|
Super + Left Click | Move Window | Click and drag to move floating windows |
Super + Right Click | Resize Window | Click and drag to resize windows |
| Gesture | Action | Description |
|---|---|---|
| 3-finger swipe left/right/up/down | Focus Direction | Focuses window in the swipe direction |
| 4-finger swipe left | Previous Tag | Switches to previous tag with clients |
| 4-finger swipe right | Next Tag | Switches to next tag with clients |
| 4-finger swipe up/down | Toggle Overview | Shows/hides workspace overview |
We’re in mangowc now by and as you can see, it’s literally just a blank screen with a mouse cursor. Super minimal.
Let’s jump into mango’s config.conf and get started with some keybinds. So lets hit Alt + Enter to open foot, by defualt.
Open up .config/mango/config.conf, and lets change a few keybinds, and add a wmenu script.
bind=SUPER,Return,spawn,foot
bind=SUPER,q,killclient,
bind=SUPER,d,spawn,wmenu-run -l 10We can reload the config file with Super R. Now we can spawn terminals with Super Enter as we are used to. Alright this is nice, but we can do better. I personally could get by just like this, with no bar, but lets add one.
Let’s add some custom binds for movements, and whatnot later, but for now lets move on to the bar. I encourage you to play around with this file and add/change your binds as needed, and a great place to start especially if you are coming over from dwm is to checkout ArgosNothing’s DWM config conversion, and add stuff to it. He made this mango config and this article about it on my website here: https://tonybtw.com/community/mango
So the file structure for the config directory is gonna be pretty simple today, we’re just going to use an autostart.sh, a config.conf, and we’ll put waybar’s config.jsonc and style.css in here. This will allow you to use waybar with other configs as needed, and not disrupt your other wayland compositor’s waybar configs.
/home/tony/.config/mango
├── autostart.sh
├── config.conf
├── config.jsonc
├── menu.sh
├── rebar.sh
└── style.cssI already made a video about waybar, so I’m just going to clone my waybar config and start it up with autostart.sh. If you want guidance on customizing waybar, I encourage you to check out the waybar video.
git clone https://github.com/tonybanters/waybar cp waybar/* ~/.config/mango/.
And let’s add waybar to our autostart.sh
vim ~/.config/mango/autostart.sh waybar -c ~/.config/mango/config.jsonc -s ~/.config/mango/style.css >/dev/null 2>&1 &
This will tell mango to start up with a wallpaper, and waybar. So we’re ready to launch Mango at this point. Let’s go ahead and do so, by typing `mango`
We need a wallpaper. With swaybg, we can set one, but we need to download one first. so lets open firefox, and head over to wallhaven.cc and pick one from there.
Let’s grab this one, and put it in ~/walls/wall1.png
Now we can set that with
swaybg -i ~/walls/wall1.png & disownLet’s add disown here so when we close this terminal, our wallpaper persists.
But we see the issue here, we want this wallpaper to be enabled whenever we launch mangoWC. We can accomplish this simply by adding it to autostart.sh
vim ~/.config/mango/autostart.sh
waybar -c ~/.config/mango/config.jsonc -s ~/.config/mango/style.css >/dev/null 2>&1 &
swaybg -i ~/walls/wall1.png >/dev/null 2>&1 &Now if we relaunch mangoWC, we see our wallpaper persists.
We can add a screenshot script here with `grim`, `slurp`, and `wl-copy`
#!/bin/sh
grim -l 0 -g "$(slurp)" - | wl-copyAnd bind this screenshot in our config.conf here:
bind=SUPER,s,spawn,snip