maomaowm/README.md

186 lines
5.8 KiB
Markdown
Raw Normal View History

2025-05-07 11:12:20 +08:00
# Maomaowm
2025-06-22 03:53:43 -07:00
This project's development is based on [dwl](https://codeberg.org/dwl/dwl/).
2025-05-07 11:12:20 +08:00
2025-06-13 12:04:45 +08:00
"Since many people have asked about the meaning of this compositor's name, 'Maomao' is an online alias I've been using for years - it comes from the first two characters of the Chinese word for 'caterpillar' (毛毛虫). You can basically think of it as meaning 'caterpillar'.
2025-05-08 19:25:23 +08:00
2025-05-07 11:12:20 +08:00
1. **Lightweight & Fast Build**
2025-05-07 17:38:56 +08:00
- *Maomao* is as lightweight as *dwl*, and its build can be completed within few seconds. Despite this, *maomao* does not compromise on functionality.
2025-05-07 11:12:20 +08:00
2025-06-13 12:04:45 +08:00
2. **Feature Highlights**
2025-06-22 03:53:43 -07:00
- In addition to basic WM functionality, Maomao provides:
- Base tag not workspace (supports separate window layouts for each tag)
- Smooth and customizable complete animations (window open/move/close, tag enter/leave)
- 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.)
2025-06-13 12:04:45 +08:00
- Simple yet powerful external configuration
2025-06-22 03:53:43 -07:00
- Sway-like scratchpad and named scratchpad
2025-06-20 10:52:41 +08:00
- Minimize window to scratchpad
2025-06-22 03:53:43 -07:00
- Hycov-like overview
2025-06-24 14:55:18 +08:00
- Window effects from scenefx(blur, shadow, corner radius, opacity)
2025-05-07 11:12:20 +08:00
Master-Stack Layout
2025-02-19 16:33:38 +08:00
https://github.com/user-attachments/assets/a9d4776e-b50b-48fb-94ce-651d8a749b8a
Scroller Layout
2025-02-19 16:33:38 +08:00
https://github.com/user-attachments/assets/c9bf9415-fad1-4400-bcdc-3ad2d76de85a
2025-06-20 10:52:41 +08:00
# Supported layouts
2025-06-13 12:04:45 +08:00
- Tile
- Scroller
- Monocle
- Grid
- Dwindle
- Spiral
- Deck
2025-06-22 03:53:43 -07:00
# Installation
2025-03-24 12:34:17 +08:00
2025-06-22 03:53:43 -07:00
## Dependencies
2025-03-15 10:26:11 +08:00
```bash
2025-05-18 18:26:06 +08:00
yay -S glibc wayland libinput libdrm pixman libxkbcommon git meson ninja wayland-protocols libdisplay-info libliftoff hwdata seatd pcre2
2025-03-15 10:26:11 +08:00
```
2025-03-24 12:34:17 +08:00
2025-06-22 03:53:43 -07:00
## Arch Linux
2025-04-13 09:05:09 +08:00
```bash
yay -S maomaowm-git
2025-02-03 23:18:47 +08:00
```
2025-03-24 12:34:17 +08:00
2025-06-22 03:53:43 -07:00
## Other
2025-04-13 09:05:09 +08:00
```bash
2025-06-08 10:38:51 +08:00
# wlroots 0.19.0 release with a fix-patch to avoid crash
git clone -b 0.19.0-fix https://github.com/DreamMaoMao/wlroots.git
cd wlroots
meson build -Dprefix=/usr
sudo ninja -C build install
2025-06-24 14:55:18 +08:00
git clone https://github.com/wlrfx/scenefx.git
cd scenefx
meson build -Dprefix=/usr
sudo ninja -C build install
2025-04-13 09:05:09 +08:00
git clone https://github.com/DreamMaoMao/maomaowm.git
2025-03-03 08:33:19 +08:00
cd maomaowm
meson build -Dprefix=/usr
sudo ninja -C build install
```
2025-02-20 08:47:56 +08:00
2025-06-22 03:53:43 -07:00
## Suggested Tools
2025-03-24 12:34:17 +08:00
2025-03-11 09:44:00 +08:00
```
2025-06-01 18:09:05 +08:00
yay -S rofi foot xdg-desktop-portal-wlr swaybg waybar wl-clip-persist cliphist wl-clipboard wlsunset xfce-polkit swaync
2025-03-11 09:44:00 +08:00
```
2025-06-22 03:53:43 -07:00
## Some Common Default Keybindings
2025-04-28 22:58:00 +08:00
- alt+return: open foot terminal
- alt+q: kill client
- alt+left/right/up/down: focus direction
- super+m: quit maomao
2025-03-24 12:34:17 +08:00
2025-06-22 03:53:43 -07:00
## My Dotfiles
- Dependencies
2025-04-29 21:20:37 +08:00
```
2025-06-01 18:09:05 +08:00
yay -S pamixer lavalauncher-mao-git wlr-dpms sway-audio-idle-inhibit-git swayidle dimland-git brightnessctl swayosd wlr-randr grim slurp satty swaylock-effects-git wlogout
2025-04-29 21:20:37 +08:00
```
2025-06-22 03:53:43 -07:00
### Maomao Config
2025-04-28 22:58:00 +08:00
[maomao-config](https://github.com/DreamMaoMao/dotfile/tree/main/maomao)
2025-06-22 03:53:43 -07:00
#### Other Tools
2025-04-29 21:20:37 +08:00
[foot](https://github.com/DreamMaoMao/dotfile/tree/main/foot)
[swaylock](https://github.com/DreamMaoMao/dotfile/tree/main/swaylock)
[wlogout](https://github.com/DreamMaoMao/dotfile/tree/main/wlogout)
[swaync](https://github.com/DreamMaoMao/dotfile/tree/main/swaync)
2025-03-03 08:33:19 +08:00
2025-06-22 03:53:43 -07:00
## Config Document
Refer to the [wiki](https://github.com/DreamMaoMao/maomaowm/wiki/)
2025-03-03 08:33:19 +08:00
2025-03-07 20:57:34 +08:00
2025-06-22 03:53:43 -07:00
# NixOS + Home-manager
2025-03-24 12:34:17 +08:00
The repo contains a flake that provides a NixOS module and a home-manager module for maomaowm.
2025-06-22 03:53:43 -07:00
Use the NixOS module to install maomaowm with other necessary components of a working Wayland environment.
Use the home-manager module to declare configuration and autostart for maomaowm.
Here's an example of using the modules in a flake:
2025-02-25 22:05:29 +08:00
```nix
{
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";
maomaowm.url = "github:DreamMaoMao/maomaowm";
};
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 maomaowm nixos module
inputs.maomaowm.nixosModules.maomaowm
{
programs.maomaowm.enable = true;
}
2025-02-25 22:05:29 +08:00
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users."username".imports =
[
(
{ ... }:
{
wayland.windowManager.maomaowm = {
enable = true;
settings = ''
# see config.conf
'';
autostart_sh = ''
# see autostart.sh
2025-02-25 22:37:34 +08:00
# Note: here no need to add shebang
2025-02-25 22:05:29 +08:00
'';
};
}
)
]
++ [
# Add maomaowm hm module
inputs.maomaowm.hmModules.maomaowm
];
};
}
];
};
};
};
};
}
```
2025-06-22 03:53:43 -07:00
# Thanks to These Reference Repositories
2025-02-14 14:32:20 +08:00
2025-06-22 03:53:43 -07:00
- https://gitlab.freedesktop.org/wlroots/wlroots - Implementation of Wayland protocol
2025-02-14 14:32:20 +08:00
2025-06-22 03:53:43 -07:00
- https://github.com/dqrk0jeste/owl - Basal window animation
2025-03-01 21:34:05 +08:00
2025-06-22 03:53:43 -07:00
- https://codeberg.org/dwl/dwl - Basal dwl feature
2025-03-01 21:34:05 +08:00
2025-06-22 03:53:43 -07:00
- https://github.com/swaywm/sway - Sample of Wayland protocol
2025-06-24 14:55:18 +08:00
- https://github.com/wlrfx/scenefx - Make it simple to add window effect.