Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation Guide per Distro:

Arch Linux

For Arch Linux, installation is straightforward using the AUR:

yay -S mangowc-git

Then 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 NetworkManager

git clone:

git clone https://github.com/radiaku/mangowc ~/.config/mango
cd ~/.config/mango

add this to `~/.bash_profile`:

if [[ -z $WAYLAND_DISPLAY ]] && [[ $(tty) == /dev/tty1 ]]; then
  exec mango
fi

NixOS

For 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_hostname

Gentoo

For 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-mono

Then 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 install

My Keybinds:

Here’s a breakdown of all the essential keybinds for MangoWC. These are configured in your ~/.config/mango/config.conf file:

Basic Controls

KeybindActionDescription
Super + EnterLaunch TerminalOpens foot terminal emulator
Super + dApplication LauncherOpens wmenu for launching applications
Super + qKill WindowCloses the currently focused window
Super + Shift + rReload ConfigReloads the MangoWC configuration file
Super + RReload WaybarRuns the rebar script to restart waybar
Super + sScreenshotTakes a screenshot of selected area (using snip.sh)

Workspace Management

KeybindActionDescription
Super + 1-9Switch TagSwitches to workspace/tag 1 through 9
Super + iIncrease MasterAdds one more window to master area
Super + pDecrease MasterRemoves one window from master area
Super + 0Toggle OverviewShows overview of all windows/workspaces

Window Management

KeybindActionDescription
Super + jFocus NextFocuses the next window in the stack
Super + kFocus PreviousFocuses the previous window in the stack
Super + hFocus LeftFocuses the window to the left
Super + lFocus RightFocuses the window to the right
Super + Shift + jSwap DownSwaps current window with the one below
Super + Shift + kSwap UpSwaps current window with the one above
Super + Shift + hSwap LeftSwaps current window with the one on the left
Super + Shift + lSwap RightSwaps current window with the one on the right
Ctrl + Shift + j/k/h/lSmart MoveMoves window in specified direction

Layout Controls

KeybindActionDescription
Super + tTile LayoutSets layout to tiled mode
Super + vVertical GridSets layout to vertical grid
Super + cSpiral LayoutSets layout to spiral mode
Super + xScroller LayoutSets layout to scroller mode
Super + nSwitch LayoutCycles through available layouts
Super + aToggle GapsToggles window gaps on/off
Super + fToggle FloatToggles floating mode for current window
Super + Shift + fToggle FullscreenToggles fullscreen for current window

Mouse Bindings

KeybindActionDescription
Super + Left ClickMove WindowClick and drag to move floating windows
Super + Right ClickResize WindowClick and drag to resize windows

Touchpad Gestures

GestureActionDescription
3-finger swipe left/right/up/downFocus DirectionFocuses window in the swipe direction
4-finger swipe leftPrevious TagSwitches to previous tag with clients
4-finger swipe rightNext TagSwitches to next tag with clients
4-finger swipe up/downToggle OverviewShows/hides workspace overview

Load MangoWC

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 10

We 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

Waybar + Autostart

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.css

I 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`

Wallpaper

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 & disown

Let’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.

Screenshot Script

We can add a screenshot script here with `grim`, `slurp`, and `wl-copy`

#!/bin/sh
grim -l 0 -g "$(slurp)" - | wl-copy

And bind this screenshot in our config.conf here:

bind=SUPER,s,spawn,snip

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages