maomaowm/README.md

294 lines
7.4 KiB
Markdown
Raw Normal View History

2025-03-24 12:34:17 +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
# Maomaowm
2025-03-04 16:16:34 +08:00
This project is developed based on [dwl](https://codeberg.org/dwl/dwl/),
it is basically compatible with all `dwm` features.
2025-03-03 08:33:19 +08:00
In addition, it is added many operation that supported in `hyprland`, such as `smooth and customizable animation``External configuration that can be hot overloaded`,`pin mode`,`maximize window` etc...
2025-02-17 12:13:32 +08:00
See below for more features.
# separate window layout for each workspace(tags), with separate workspace parameters
2025-03-24 12:34:17 +08:00
2025-02-17 12:13:32 +08:00
## support layout
2025-03-24 12:34:17 +08:00
2025-03-03 08:33:19 +08:00
- tile
2025-02-17 12:13:32 +08:00
- scroller
- monocle
- grid
- dwindle
2025-02-23 08:52:05 +08:00
- spiral
2025-02-17 12:13:32 +08:00
# window open rules
2025-03-24 12:34:17 +08:00
2025-02-17 12:13:32 +08:00
## options
2025-03-24 12:34:17 +08:00
- appid: type-string if match it or title, the rule match
- title: type-string if match it or appid, the rule match
2025-02-17 12:13:32 +08:00
- tags: type-num(1-9) which tags to open the window
2025-03-24 12:34:17 +08:00
- isfloating: type-num(0 or 1)
2025-02-17 12:13:32 +08:00
- isfullscreen: type-num(0 or 1)
- scroller_proportion: type-float(0.1-1.0)
- animation_type_open : type-string(zoom,slide)
- animation_type_close : type-string(zoom,slide)
2025-02-17 12:13:32 +08:00
- isnoborder : type-num(0 or 1)
2025-03-24 12:34:17 +08:00
- monitor : type-num(0-99999)
2025-02-17 12:13:32 +08:00
- width : type-num(0-9999)
- height : type-num(0-9999)
2025-03-24 12:34:17 +08:00
- isterm : type-num(0 or 1) it will be swallowed by the sub window
2025-03-05 11:49:22 +08:00
- noswallow: type-num(0 or 1) don't swallow the isterm window
2025-03-13 22:45:11 +08:00
- globalkeybinding: type-string(for example-- alt-l or alt+super-l)
2025-02-03 23:18:47 +08:00
# some special feature
2025-03-24 12:34:17 +08:00
2025-02-03 23:18:47 +08:00
- hycov like overview
2025-03-03 08:33:19 +08:00
- foreign-toplevel protocol(dunst,waybar wlr taskbar)
- minimize window to waybar(like hych)
2025-03-03 08:33:19 +08:00
- sway scratchpad (minimize window to scratchpad)
- window pin mode/ maximize mode
- text-input-v2/v3 protocol for fcitx5
- window move/open/close animaition
- workspaces(tags) switch animaition
- fade/fadeout animation
- alt-tab switch window like gnome
- niri like scroller layout
2025-02-03 23:18:47 +08:00
2025-03-15 10:26:11 +08:00
# install
2025-03-24 12:34:17 +08:00
2025-03-15 10:26:11 +08:00
## depend
```bash
2025-04-04 19:54:21 +08:00
yay -S glibc wayland libinput libdrm pixman libxkbcommon git meson ninja wayland-protocols libdisplay-info libliftoff hwdata seatd
2025-03-15 10:26:11 +08:00
```
2025-03-24 12:34:17 +08:00
2025-04-13 09:05:09 +08:00
## arch
```bash
yay -S maomaowm-git
2025-02-03 23:18:47 +08:00
```
2025-03-24 12:34:17 +08:00
2025-04-13 09:05:09 +08:00
## other
```bash
2025-03-03 08:33:19 +08:00
yay -S wlroots-git
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-03-11 09:44:00 +08:00
## suggest tools
2025-03-24 12:34:17 +08:00
2025-03-11 09:44:00 +08:00
```
2025-03-30 16:05:00 +08:00
yay -S rofi foot xdg-desktop-portal-wlr swaybg waybar wl-clip-persist cliphist wl-clipboard wlsunset polkit-gnome swaync
2025-03-11 09:44:00 +08:00
```
2025-02-10 20:25:39 +08:00
# config
2025-03-24 12:34:17 +08:00
2025-03-11 09:44:00 +08:00
```
cp /etc/maomao/config.conf ~/.config/maomao/config.conf
touch ~/.config/maomao/autostart.sh
chmod +x ~/.config/maomao/autostart.sh
```
2025-03-24 12:34:17 +08:00
you can use `MAOMAOCONFIG` env to set the config-folder-path and the autostart-folder-patch
like `MAOMAOCONFIG=/home/xxx/maomao`
- the only default keybinds is ctrl+alt+[F1-F12] to change tty
- the default config path is `~/.config/maomao/config.conf`
- the default autostart path is `~/.config/maomao/autostart.sh`
- the fallback config path is in `/etc/maomao/config.conf`, you can find the default config here
2025-02-28 17:19:25 +08:00
# custom animation
```
animation_curve_open=0.46,1.0,0.29,1.1
2025-03-24 12:34:17 +08:00
animation_curve_move=0.46,1.0,0.29,1
animation_curve_tag=0.46,1.0,0.29,1
2025-03-02 19:40:34 +08:00
animation_curve_close=0.46,1.0,0.29,1
2025-02-28 17:19:25 +08:00
```
2025-03-24 12:34:17 +08:00
2025-02-28 17:19:25 +08:00
You can design your animaition curve in:
[here, on cssportal.com](https://www.cssportal.com/css-cubic-bezier-generator/),
or you can just choice a curve in:
[easings.net](https://easings.net).
2025-02-10 20:25:39 +08:00
2025-03-03 08:33:19 +08:00
# overview mode
2025-03-24 12:34:17 +08:00
2025-03-03 08:33:19 +08:00
```
hotarea_size=10
enable_hotarea=1
ov_tab_mode=0
```
2025-03-24 12:34:17 +08:00
2025-03-03 08:33:19 +08:00
- enable_hotarea: when your cursor enter the bottom left corner of monitor, it will toggle overview.
- hotarea_size: the size of hotarea, 10x10 default.
2025-03-24 12:34:17 +08:00
- ov_tab_mode:
2025-03-03 08:33:19 +08:00
- it will circle switch focus when you toggle overview.
- and will leave ov mode when you release your mod key.
### notice
2025-03-24 12:34:17 +08:00
when you in ov mode, you can use right mouse button to close window, and left mouse button to jump to a window.
2025-03-03 08:33:19 +08:00
2025-03-10 15:19:27 +08:00
# About waybar
2025-03-03 08:33:19 +08:00
- you can also use the dwl moudle in waybar to show tags and window title
2025-03-24 12:34:17 +08:00
refer to waybar wiki: [dwl-module](https://github.com/Alexays/Waybar/wiki/Module:-Dwl)
2025-03-03 08:33:19 +08:00
```json
"modules-left": ["dwl/tags","dwl/window"],
"dwl/tags": {
"num-tags":9,
},
```
```css
2025-03-24 12:34:17 +08:00
#tags {
background-color: transparent;
2025-03-03 08:33:19 +08:00
}
2025-03-24 12:34:17 +08:00
#tags button {
background-color: #fff;
color: #a585cd;
2025-03-03 08:33:19 +08:00
}
2025-03-24 12:34:17 +08:00
#tags button.occupied {
background-color: #fff;
color: #cdc885;
2025-03-03 08:33:19 +08:00
}
2025-03-24 12:34:17 +08:00
#tags button.focused {
background-color: rgb(186, 142, 213);
color: #fff;
2025-03-03 08:33:19 +08:00
}
2025-03-24 12:34:17 +08:00
#tags button.urgent {
background: rgb(171, 101, 101);
color: #fff;
2025-03-03 08:33:19 +08:00
}
2025-03-24 12:34:17 +08:00
#window {
background-color: rgb(237, 196, 147);
color: rgb(63, 37, 5);
2025-03-03 08:33:19 +08:00
}
window#waybar.empty #window {
2025-03-24 12:34:17 +08:00
background-color: transparent;
color: transparent;
border-bottom: none;
box-shadow: none;
padding-right: 0px;
padding-left: 0px;
margin-left: 0px;
margin-right: 0px;
2025-03-03 08:33:19 +08:00
}
```
2025-03-07 20:57:34 +08:00
# ipc
refer to [ipc](https://github.com/DreamMaoMao/mmsg)
2025-02-25 22:05:29 +08: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.
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-02-20 08:47:56 +08:00
# my dotfile
2025-03-24 12:34:17 +08:00
2025-02-20 08:47:56 +08:00
[maomao-config](https://github.com/DreamMaoMao/dotfile/tree/main/maomao)
2025-03-24 12:34:17 +08:00
# thanks for some refer repo
2025-02-14 14:32:20 +08:00
2025-03-03 08:33:19 +08:00
- https://gitlab.freedesktop.org/wlroots/wlroots - implementation of wayland protocol
2025-02-14 14:32:20 +08:00
2025-03-03 08:33:19 +08:00
- https://github.com/dqrk0jeste/owl - basal window animaition
2025-03-01 21:34:05 +08:00
2025-03-04 16:16:34 +08:00
- https://codeberg.org/dwl/dwl - basal dwl feature
2025-03-01 21:34:05 +08:00
2025-04-28 10:23:35 +08:00
- https://github.com/labwc/labwc - sample of text-input protocol
2025-03-01 21:34:05 +08:00
2025-03-03 08:33:19 +08:00
- https://github.com/swaywm/sway - sample of wayland protocol