From 9c8dad29ae5bc5a999b4d1eadd307f68186677f8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:14:34 +0000 Subject: [PATCH 1/4] Initial plan From 91f2cfdd083c037f00c4fe60984021cd8f8a4434 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:17:34 +0000 Subject: [PATCH 2/4] Fix COMMANDS.md and bug_report.md linting errors Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.md | 6 +- COMMANDS.md | 185 ++++++++++++++++++++++++++- README.md | 57 +++++++-- USAGE.md | 77 +++++++++++ 4 files changed, 307 insertions(+), 18 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5576f632..4f7ef4fe 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -18,11 +18,15 @@ mango version: wlroots version: ## Crash track + 1.you need to build mango by enable asan flag. + ```bash meson build -Dprefix=/usr -Dasan=true -`` +``` + 2.run mango in tty. + ```bash export ASAN_OPTIONS="detect_leaks=1:halt_on_error=0:log_path=/home/xxx/asan.log" mango diff --git a/COMMANDS.md b/COMMANDS.md index ad9c256c..2979b8a2 100644 --- a/COMMANDS.md +++ b/COMMANDS.md @@ -1,6 +1,7 @@ # MangoWC Command Reference -This document lists all available commands that can be used in keybindings, mousebindings, or via IPC (mmsg). +This document lists all available commands that can be used in keybindings, +mousebindings, or via IPC (mmsg). ## How to Use Commands @@ -27,32 +28,38 @@ mmsg -d reload_config ## Window Management Commands ### killclient + Close the focused window. **Syntax:** `killclient,` **Example:** + ```conf bind=Alt,q,killclient, ``` ### focusstack + Focus next/previous window in the stack. **Arguments:** `next` or `prev` **Example:** + ```conf bind=Super,Tab,focusstack,next bind=Super+Shift,Tab,focusstack,prev ``` ### focusdir + Focus window in a specific direction. **Arguments:** `left`, `right`, `up`, or `down` **Example:** + ```conf bind=Alt,Left,focusdir,left bind=Alt,Right,focusdir,right @@ -61,42 +68,50 @@ bind=Alt,Down,focusdir,down ``` ### focuslast + Focus the previously focused window. **Syntax:** `focuslast,` **Example:** + ```conf bind=Super,grave,focuslast, ``` ### exchange_client + Swap the focused window with another window in a direction. **Arguments:** `left`, `right`, `up`, or `down` **Example:** + ```conf bind=Super+Shift,Left,exchange_client,left bind=Super+Shift,Right,exchange_client,right ``` ### exchange_stack_client + Swap window position in the stack. **Arguments:** Stack position parameters **Example:** + ```conf bind=Super,s,exchange_stack_client,1 ``` ### zoom + Move focused window to master position. **Syntax:** `zoom,` **Example:** + ```conf bind=Super,Return,zoom, ``` @@ -106,81 +121,97 @@ bind=Super,Return,zoom, ## Window State Commands ### togglefloating + Toggle between floating and tiled mode. **Syntax:** `togglefloating,` **Example:** + ```conf bind=Alt,backslash,togglefloating, ``` ### togglefullscreen + Toggle fullscreen mode. **Syntax:** `togglefullscreen,` **Example:** + ```conf bind=Alt,f,togglefullscreen, ``` ### togglefakefullscreen + Toggle fake fullscreen (fullscreen within layout). **Syntax:** `togglefakefullscreen,` **Example:** + ```conf bind=Alt+Shift,f,togglefakefullscreen, ``` ### togglemaximizescreen + Toggle maximized state. **Syntax:** `togglemaximizescreen,` **Example:** + ```conf bind=Alt,a,togglemaximizescreen, ``` ### toggleglobal + Toggle global state (visible on all tags). **Syntax:** `toggleglobal,` **Example:** + ```conf bind=Super,g,toggleglobal, ``` ### toggleoverlay + Toggle overlay state (always on top). **Syntax:** `toggleoverlay,` **Example:** + ```conf bind=Super,o,toggleoverlay, ``` ### minimized + Minimize the focused window. **Syntax:** `minimized,` **Example:** + ```conf bind=Super,i,minimized, ``` ### restore_minimized + Restore the last minimized window. **Syntax:** `restore_minimized` **Example:** + ```conf bind=Super+Shift,I,restore_minimized ``` @@ -190,147 +221,177 @@ bind=Super+Shift,I,restore_minimized ## Tag (Workspace) Commands ### view + Switch to a specific tag. -**Arguments:** +**Arguments:** + - `tag_number` (1-9) - `follow` (0 or 1, whether to follow window movements) **Example:** + ```conf bind=Ctrl,1,view,1,0 bind=Ctrl,2,view,2,0 ``` **IPC Example:** + ```bash mmsg -d view 3 ``` ### tag + Move focused window to a tag and switch to it. **Arguments:** + - `tag_number` (1-9) - `follow` (0 or 1) **Example:** + ```conf bind=Alt,1,tag,1,0 bind=Alt,2,tag,2,0 ``` **IPC Example:** + ```bash mmsg -d tag 5 ``` ### tagsilent + Move focused window to a tag without switching to it. **Arguments:** `tag_number` (1-9) **Example:** + ```conf bind=Alt+Shift,1,tagsilent,1 ``` ### toggletag + Toggle tag visibility (view multiple tags). **Arguments:** `tag_number` (1-9) **Example:** + ```conf bind=Super,1,toggletag,1 ``` ### toggleview + Toggle viewing of a tag (add/remove from view). **Arguments:** `tag_number` (1-9) **Example:** + ```conf bind=Super+Ctrl,1,toggleview,1 ``` ### comboview + View multiple tags simultaneously. **Arguments:** Comma-separated tag numbers **Example:** + ```conf bind=Super,c,comboview,1,2,3 ``` ### viewtoleft + Switch to the previous tag. **Arguments:** `wrap` (0 or 1, whether to wrap around) **Example:** + ```conf bind=Super,Left,viewtoleft,0 ``` ### viewtoright + Switch to the next tag. **Arguments:** `wrap` (0 or 1, whether to wrap around) **Example:** + ```conf bind=Super,Right,viewtoright,0 ``` ### viewtoleft_have_client + Switch to previous tag that has windows. **Arguments:** `wrap` (0 or 1) **Example:** + ```conf bind=Ctrl,Left,viewtoleft_have_client,0 ``` ### viewtoright_have_client + Switch to next tag that has windows. **Arguments:** `wrap` (0 or 1) **Example:** + ```conf bind=Ctrl,Right,viewtoright_have_client,0 ``` ### tagtoleft + Move focused window to previous tag. **Arguments:** `wrap` (0 or 1) **Example:** + ```conf bind=Ctrl+Super,Left,tagtoleft,0 ``` ### tagtoright + Move focused window to next tag. **Arguments:** `wrap` (0 or 1) **Example:** + ```conf bind=Ctrl+Super,Right,tagtoright,0 ``` ### bind_to_view + Bind window to always appear on a specific tag. **Arguments:** `tag_number` **Example:** + ```conf bind=Super,b,bind_to_view,1 ``` @@ -340,11 +401,13 @@ bind=Super,b,bind_to_view,1 ## Layout Commands ### setlayout + Set a specific layout for the current tag. **Arguments:** Layout name **Available layouts:** + - `tile` - Master-stack tiling - `scroller` - Horizontal scrolling columns - `monocle` - One window at a time @@ -356,6 +419,7 @@ Set a specific layout for the current tag. - `vertical_grid` - Vertical grid **Example:** + ```conf bind=Super,t,setlayout,tile bind=Super,s,setlayout,scroller @@ -363,37 +427,44 @@ bind=Super,m,setlayout,monocle ``` **IPC Example:** + ```bash mmsg -d setlayout monocle ``` ### switch_layout + Cycle through available layouts. **Syntax:** `switch_layout` **Example:** + ```conf bind=Super,n,switch_layout ``` ### setmfact + Set master area size ratio. **Arguments:** Ratio change (e.g., `+0.05`, `-0.05`) **Example:** + ```conf bind=Super,h,setmfact,-0.05 bind=Super,l,setmfact,+0.05 ``` ### incnmaster + Change number of windows in master area. **Arguments:** Change amount (e.g., `+1`, `-1`) **Example:** + ```conf bind=Super,equal,incnmaster,+1 bind=Super,minus,incnmaster,-1 @@ -404,37 +475,44 @@ bind=Super,minus,incnmaster,-1 ## Scroller Layout Commands ### set_proportion + Set window width proportion in scroller layout. **Arguments:** Width ratio (0.0-1.0) **Example:** + ```conf bind=Alt,e,set_proportion,1.0 # Full width bind=Alt,w,set_proportion,0.5 # Half width ``` ### switch_proportion_preset + Cycle through predefined width presets. **Syntax:** `switch_proportion_preset,` **Example:** + ```conf bind=Alt,x,switch_proportion_preset, ``` **Note:** Presets are defined in config as: + ```conf scroller_proportion_preset=0.5,0.8,1.0 ``` ### scroller_stack + Special scroller stacking behavior. **Arguments:** Stacking parameters **Example:** + ```conf bind=Super,s,scroller_stack,1 ``` @@ -444,93 +522,111 @@ bind=Super,s,scroller_stack,1 ## Gap Commands ### incgaps + Increase or decrease all gaps. **Arguments:** Pixel change (positive or negative) **Example:** + ```conf bind=Alt+Shift,X,incgaps,1 # Increase by 1px bind=Alt+Shift,Z,incgaps,-1 # Decrease by 1px ``` ### togglegaps + Toggle gaps on/off. **Syntax:** `togglegaps` **Example:** + ```conf bind=Alt+Shift,R,togglegaps ``` ### defaultgaps + Reset gaps to default values. **Syntax:** `defaultgaps` **Example:** + ```conf bind=Alt+Shift,D,defaultgaps ``` ### incigaps + Increase/decrease inner gaps. **Arguments:** Pixel change **Example:** + ```conf bind=Super,equal,incigaps,1 bind=Super,minus,incigaps,-1 ``` ### incihgaps + Increase/decrease inner horizontal gaps. **Arguments:** Pixel change **Example:** + ```conf bind=Super+Shift,equal,incihgaps,1 ``` ### incivgaps + Increase/decrease inner vertical gaps. **Arguments:** Pixel change **Example:** + ```conf bind=Super+Ctrl,equal,incivgaps,1 ``` ### incogaps + Increase/decrease outer gaps. **Arguments:** Pixel change **Example:** + ```conf bind=Super+Alt,equal,incogaps,1 ``` ### incohgaps + Increase/decrease outer horizontal gaps. **Arguments:** Pixel change **Example:** + ```conf bind=Super+Alt+Shift,equal,incohgaps,1 ``` ### incovgaps + Increase/decrease outer vertical gaps. **Arguments:** Pixel change **Example:** + ```conf bind=Super+Alt+Ctrl,equal,incovgaps,1 ``` @@ -540,11 +636,13 @@ bind=Super+Alt+Ctrl,equal,incovgaps,1 ## Floating Window Commands ### movewin + Move floating window by pixels. **Arguments:** `x_offset,y_offset` **Example:** + ```conf bind=Ctrl+Shift,Left,movewin,-50,+0 bind=Ctrl+Shift,Right,movewin,+50,+0 @@ -553,11 +651,13 @@ bind=Ctrl+Shift,Down,movewin,+0,+50 ``` ### resizewin + Resize floating window by pixels. **Arguments:** `width_change,height_change` **Example:** + ```conf bind=Ctrl+Alt,Left,resizewin,-50,+0 bind=Ctrl+Alt,Right,resizewin,+50,+0 @@ -566,43 +666,52 @@ bind=Ctrl+Alt,Down,resizewin,+0,+50 ``` ### centerwin + Center the focused floating window. **Syntax:** `centerwin,` **Example:** + ```conf bind=Super,c,centerwin, ``` ### smartmovewin + Smart move window (combines with layout logic). **Arguments:** Direction and parameters **Example:** + ```conf bind=Super,w,smartmovewin,up ``` ### smartresizewin + Smart resize window (aware of layout). **Arguments:** Direction and parameters **Example:** + ```conf bind=Super,r,smartresizewin,right ``` ### moveresize + Mouse-based move/resize. -**Arguments:** +**Arguments:** + - `curmove` - Move with mouse - `curresize` - Resize with mouse **Example:** + ```conf mousebind=SUPER,btn_left,moveresize,curmove mousebind=SUPER,btn_right,moveresize,curresize @@ -613,49 +722,59 @@ mousebind=SUPER,btn_right,moveresize,curresize ## Special Feature Commands ### toggleoverview + Toggle overview mode (show all windows). **Syntax:** `toggleoverview,` **Example:** + ```conf bind=Alt,Tab,toggleoverview, ``` ### toggle_scratchpad + Toggle scratchpad visibility. **Syntax:** `toggle_scratchpad` **Example:** + ```conf bind=Alt,z,toggle_scratchpad ``` ### toggle_named_scratchpad + Toggle a named scratchpad. **Arguments:** Scratchpad name **Example:** + ```conf bind=Super,p,toggle_named_scratchpad,music bind=Super,n,toggle_named_scratchpad,notes ``` **Setup named scratchpads:** + 1. Open an application 2. Assign it to named scratchpad with IPC: + ```bash mmsg -d toggle_named_scratchpad music ``` ### toggle_render_border + Toggle border rendering. **Syntax:** `toggle_render_border,` **Example:** + ```conf bind=Super,b,toggle_render_border, ``` @@ -665,73 +784,87 @@ bind=Super,b,toggle_render_border, ## Monitor Commands ### focusmon + Focus adjacent monitor. **Arguments:** `left` or `right` **Example:** + ```conf bind=Alt+Shift,Left,focusmon,left bind=Alt+Shift,Right,focusmon,right ``` ### tagmon + Move window to adjacent monitor. **Arguments:** `left` or `right` **Example:** + ```conf bind=Super+Alt,Left,tagmon,left bind=Super+Alt,Right,tagmon,right ``` ### viewcrossmon + View tag on different monitor. **Arguments:** Monitor and tag parameters **Example:** + ```conf bind=Super+Ctrl,m,viewcrossmon,1,2 ``` ### tagcrossmon + Move window to tag on different monitor. **Arguments:** Monitor and tag parameters **Example:** + ```conf bind=Super+Shift,m,tagcrossmon,1,2 ``` ### disable_monitor + Disable a monitor output. **Arguments:** Output name or identifier **Example:** + ```bash mmsg -d disable_monitor HDMI-A-1 ``` ### enable_monitor + Enable a monitor output. **Arguments:** Output name or identifier **Example:** + ```bash mmsg -d enable_monitor HDMI-A-1 ``` ### toggle_monitor + Toggle monitor on/off. **Arguments:** Output name or identifier **Example:** + ```conf bind=Super,F7,toggle_monitor,HDMI-A-1 ``` @@ -741,21 +874,25 @@ bind=Super,F7,toggle_monitor,HDMI-A-1 ## Virtual Output Commands ### create_virtual_output + Create a virtual monitor output. **Arguments:** Configuration parameters **Example:** + ```bash mmsg -d create_virtual_output 1920 1080 ``` ### destroy_all_virtual_output + Remove all virtual outputs. **Syntax:** `destroy_all_virtual_output` **Example:** + ```bash mmsg -d destroy_all_virtual_output ``` @@ -765,11 +902,13 @@ mmsg -d destroy_all_virtual_output ## Application Commands ### spawn + Launch an application. **Arguments:** Command to execute **Example:** + ```conf bind=Alt,Return,spawn,foot bind=Alt,space,spawn,rofi -show drun @@ -778,27 +917,32 @@ bind=Super,c,spawn,chromium ``` **IPC Example:** + ```bash mmsg -d spawn firefox mmsg -d spawn "foot -e htop" ``` ### spawn_shell + Launch command through shell. **Arguments:** Shell command **Example:** + ```conf bind=Super,s,spawn_shell,~/.config/mango/scripts/screenshot.sh ``` ### spawn_on_empty + Spawn application on empty tag. **Arguments:** Tag number and command **Example:** + ```conf bind=Super,w,spawn_on_empty,2,firefox ``` @@ -808,36 +952,43 @@ bind=Super,w,spawn_on_empty,2,firefox ## Input Commands ### setkeymode + Set keyboard mode (for modal keybindings). **Arguments:** Mode name **Example:** + ```conf bind=Super,k,setkeymode,resize ``` ### switch_keyboard_layout + Switch between keyboard layouts. **Syntax:** `switch_keyboard_layout` **Example:** + ```conf bind=Super,Space,switch_keyboard_layout ``` **Note:** Define layouts in config: + ```conf xkb_rules_layout=us,ru ``` ### toggle_trackpad_enable + Enable/disable trackpad. **Syntax:** `toggle_trackpad_enable` **Example:** + ```conf bind=Super,F9,toggle_trackpad_enable ``` @@ -847,52 +998,62 @@ bind=Super,F9,toggle_trackpad_enable ## System Commands ### quit + Exit MangoWC. **Syntax:** `quit` **Example:** + ```conf bind=Super,m,quit ``` **IPC Example:** + ```bash mmsg -d quit ``` ### reload_config + Reload configuration file. **Syntax:** `reload_config` **Example:** + ```conf bind=Super,r,reload_config ``` **IPC Example:** + ```bash mmsg -d reload_config ``` ### chvt + Change virtual terminal. **Arguments:** VT number **Example:** + ```conf bind=Ctrl+Alt,F1,chvt,1 bind=Ctrl+Alt,F2,chvt,2 ``` ### setoption + Set a configuration option at runtime. **Arguments:** Option name and value **Example:** + ```bash mmsg -d setoption animations 0 mmsg -d setoption blur 1 @@ -960,6 +1121,7 @@ bind=Super,m,quit All commands can be executed via the `mmsg` IPC tool: ### Basic Syntax + ```bash mmsg -d COMMAND ARGUMENTS ``` @@ -967,6 +1129,7 @@ mmsg -d COMMAND ARGUMENTS ### Examples **Window management:** + ```bash mmsg -d killclient mmsg -d togglefloating @@ -974,6 +1137,7 @@ mmsg -d togglefullscreen ``` **Tag switching:** + ```bash mmsg -d view 3 mmsg -d tag 5 @@ -981,18 +1145,21 @@ mmsg -d viewtoright ``` **Layout control:** + ```bash mmsg -d setlayout monocle mmsg -d switch_layout ``` **Application launching:** + ```bash mmsg -d spawn firefox mmsg -d spawn "foot -e htop" ``` **System control:** + ```bash mmsg -d reload_config mmsg -d setoption animations 1 @@ -1000,7 +1167,8 @@ mmsg -d setoption animations 1 ### Scripting with mmsg -**Example 1: Toggle between two layouts** +#### Example 1: Toggle between two layouts + ```bash #!/bin/bash LAYOUT=$(mmsg -L | head -1 | grep -o "tile\|monocle") @@ -1011,7 +1179,8 @@ else fi ``` -**Example 2: Move all windows to tag 1** +#### Example 2: Move all windows to tag 1 + ```bash #!/bin/bash for i in {2..9}; do @@ -1023,7 +1192,8 @@ done mmsg -d view 1 ``` -**Example 3: Cycle through tags with windows** +#### Example 3: Cycle through tags with windows + ```bash #!/bin/bash mmsg -d viewtoright_have_client @@ -1035,4 +1205,5 @@ mmsg -d viewtoright_have_client - [config.conf](config.conf) - Configuration file with all keybindings - [README.md](README.md) - General documentation and quick start guide -- [MangoWC Wiki](https://github.com/DreamMaoMao/mango/wiki/) - Comprehensive online documentation +- [MangoWC Wiki](https://github.com/DreamMaoMao/mango/wiki/) - + Comprehensive online documentation diff --git a/README.md b/README.md index d0445505..4a91378e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Mango Wayland Compositor +
MangoWC Logo
This project's development is based on [dwl](https://codeberg.org/dwl/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. @@ -25,7 +25,7 @@ This project's development is based on [dwl](https://codeberg.org/dwl/dwl/). - Window effects from scenefx (blur, shadow, corner radius, opacity) - Zero flickering - every frame is perfect. -https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f + # Quick Start Guide @@ -36,6 +36,7 @@ MangoWC is a **Wayland compositor** - a program that manages windows and display ## First Steps After Installation 1. **Copy the default configuration:** + ```bash mkdir -p ~/.config/mango cp /usr/share/mango/config.conf ~/.config/mango/config.conf @@ -53,6 +54,7 @@ MangoWC is a **Wayland compositor** - a program that manages windows and display - `Super + R` - Reload configuration (after making changes) 4. **Create an autostart script** (optional): + ```bash # Create ~/.config/mango/autostart.sh #!/bin/bash @@ -66,6 +68,7 @@ MangoWC is a **Wayland compositor** - a program that manages windows and display # Start notification daemon swaync & ``` + Make it executable: `chmod +x ~/.config/mango/autostart.sh` ## Key Concepts @@ -80,6 +83,7 @@ Unlike traditional workspaces, **tags** are more flexible: Think of tags as labels you can attach to windows. You can view windows with tag 1, or tag 2, or both tags 1 and 2 simultaneously. **Default behavior:** + - `Ctrl + 1-9` - View tag 1-9 - `Alt + 1-9` - Move current window to tag 1-9 - Each tag can have its own layout (tile, scroller, grid, etc.) @@ -101,6 +105,7 @@ MangoWC supports 9 different layouts: | **vertical_grid** | Vertical grid arrangement | Vertical content | **Switch layouts:** + - `Super + N` - Cycle through layouts for current tag - Each tag can have its own default layout (set in `config.conf`) @@ -114,6 +119,7 @@ The **scratchpad** is a hidden workspace for temporary windows: - Scratchpad windows float centered on screen **Usage example:** + 1. Open a terminal (`Alt + Return`) 2. Move it to scratchpad (`Alt + Z`) 3. It disappears @@ -161,18 +167,21 @@ Windows can have multiple states: ### Typical Workflow 1. **Open applications:** + ``` Alt + Space → Application launcher Alt + Return → Terminal ``` 2. **Navigate windows:** + ``` Alt + Arrow Keys → Focus window in direction Super + Tab → Focus next window in stack ``` 3. **Organize windows:** + ``` Super + Shift + Arrows → Swap window positions Alt + \ → Toggle floating @@ -180,12 +189,14 @@ Windows can have multiple states: ``` 4. **Adjust layout:** + ``` Super + N → Change layout Alt + Shift + X/Z → Increase/decrease gaps ``` 5. **Multi-monitor:** + ``` Alt + Shift + Left/Right → Focus other monitor Super + Alt + Left/Right → Move window to other monitor @@ -194,16 +205,19 @@ Windows can have multiple states: ### Common Use Cases **Web browsing + Terminal:** + - Open browser on tag 1, terminal on tag 2 - Use `Ctrl + 1` and `Ctrl + 2` to switch between them **Development workflow:** + - Tag 1: Code editor (center_tile layout) - Tag 2: Browser (monocle layout) - Tag 3: Terminals (tile or scroller layout) - Scratchpad: Calculator, notes **Keeping a window visible everywhere:** + - Open music player or chat app - Press `Super + G` to make it global - It now appears on all tags @@ -250,6 +264,7 @@ mmsg -d spawn firefox ### Scripting Examples **Auto-save workspace state:** + ```bash #!/bin/bash # Save current tags to file @@ -257,6 +272,7 @@ mmsg -t > ~/mango-state.txt ``` **Tag-specific wallpapers:** + ```bash #!/bin/bash # In a loop, change wallpaper based on active tag @@ -268,6 +284,7 @@ done ``` **Quick window layout toggle:** + ```bash #!/bin/bash # Toggle between tile and monocle layouts @@ -284,18 +301,21 @@ fi ### MangoWC won't start 1. **Check dependencies:** + ```bash # Verify wlroots and scenefx are installed pkg-config --modversion wlroots scenefx ``` 2. **Check logs:** + ```bash # Run from terminal to see error messages mango ``` 3. **XWayland issues:** + ```bash # If X11 apps won't start, rebuild with XWayland meson configure build -Dxwayland=enabled @@ -311,6 +331,7 @@ fi ### Keybindings not working 1. **Find correct key name:** + ```bash # Install wev to see key names wev @@ -324,12 +345,14 @@ fi ### Applications not starting 1. **Missing required tools:** + ```bash # Install suggested applications sudo pacman -S rofi foot waybar swaybg ``` 2. **Check autostart script:** + ```bash # Test autostart manually bash ~/.config/mango/autostart.sh @@ -338,6 +361,7 @@ fi ### Performance issues 1. **Disable effects:** + ```conf # In config.conf animations=0 @@ -346,6 +370,7 @@ fi ``` 2. **Check GPU drivers:** + ```bash # Ensure proper graphics drivers are installed glxinfo | grep "OpenGL" @@ -354,6 +379,7 @@ fi ### Screen sharing not working Install portal packages: + ```bash sudo pacman -S xdg-desktop-portal xdg-desktop-portal-wlr ``` @@ -366,6 +392,7 @@ sudo pacman -S xdg-desktop-portal xdg-desktop-portal-wlr - **Issues**: [GitHub Issues](https://github.com/DreamMaoMao/mangowc/issues) # Our discord + [mangowc](https://discord.gg/CPjbDxesh5) --- @@ -393,13 +420,16 @@ sudo pacman -S xdg-desktop-portal xdg-desktop-portal-wlr - libxcb ## Arch Linux + The package is in the Arch User Repository and is available for manual download [here](https://aur.archlinux.org/packages/mangowc-git) or through a AUR helper like yay: + ```bash yay -S mangowc-git ``` ## Gentoo Linux + The package is in the community-maintained repository called GURU. First, add GURU repository: @@ -418,6 +448,7 @@ emerge --ask --verbose gui-wm/mangowc ``` ## Fedora Linux + The package is in the third-party Terra repository. First, add the [Terra Repository](https://terra.fyralabs.com/). @@ -428,6 +459,7 @@ dnf install mangowc ``` ## GuixSD + The package definition is described in the source repository. First, add `mangowc` channel to `channels.scm` file: @@ -477,9 +509,11 @@ sudo ninja -C build install ## Suggested Tools ### Hybrid component + - [dms-shell](https://github.com/AvengeMedia/DankMaterialShell) ### Independent component + - Application launcher (rofi, bemenu, wmenu, fuzzel) - Terminal emulator (foot, wezterm, alacritty, kitty, ghostty) - Status bar (waybar, eww, quickshell, ags), waybar is preferred @@ -570,6 +604,7 @@ sudo ninja -C build install ## My Dotfiles ### Daily + - Dependencies ```bash @@ -577,23 +612,26 @@ yay -S rofi foot xdg-desktop-portal-wlr swaybg waybar wl-clip-persist cliphist w ``` ### Dms + - Dependencies + ```bash yay -S foot xdg-desktop-portal-wlr swaybg wl-clip-persist cliphist wl-clipboard sway-audio-idle-inhibit-git brightnessctl grim slurp satty matugen-bin dms-shell-git ``` + - use my dms config ```bash git clone -b dms https://github.com/DreamMaoMao/mango-config.git ~/.config/mango ``` + - use my daily config ```bash git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango ``` - ## Documentation MangoWC comes with comprehensive documentation to help you get started and master the compositor: @@ -727,24 +765,23 @@ Read The Friendly Manual on packaging software in your distribution first. # Thanks to These Reference Repositories -- https://gitlab.freedesktop.org/wlroots/wlroots - Implementation of Wayland protocol +- - Implementation of Wayland protocol -- https://github.com/dqrk0jeste/owl - Basal window animation +- - Basal window animation -- https://codeberg.org/dwl/dwl - Basal dwl feature +- - Basal dwl feature -- https://github.com/swaywm/sway - Sample of Wayland protocol - -- https://github.com/wlrfx/scenefx - Make it simple to add window effect. +- - Sample of Wayland protocol +- - Make it simple to add window effect. # Sponsor + At present, I can only accept sponsorship through an encrypted connection. If you find this project helpful to you, you can offer sponsorship in the following ways. image - Thanks to the following friends for their sponsorship of this project [@tonybanters](https://github.com/tonybanters) diff --git a/USAGE.md b/USAGE.md index b6399873..f976a90a 100644 --- a/USAGE.md +++ b/USAGE.md @@ -50,6 +50,7 @@ Super + M → Exit MangoWC Tags are like workspaces, but more flexible. Think of them as labels you can apply to windows. **Key differences from workspaces:** + - A window can have multiple tags - You can view multiple tags at once - Each tag can have its own layout @@ -57,6 +58,7 @@ Tags are like workspaces, but more flexible. Think of them as labels you can app ### Basic Tag Usage **Switch to a tag:** + ``` Ctrl + 1 → View tag 1 Ctrl + 2 → View tag 2 @@ -64,12 +66,14 @@ Ctrl + 2 → View tag 2 ``` **Move window to a tag:** + ``` Alt + 1 → Move current window to tag 1 (and switch to it) Alt + 2 → Move current window to tag 2 (and switch to it) ``` **Navigate through tags:** + ``` Super + Left/Right → Previous/next tag Ctrl + Left/Right → Previous/next tag that has windows @@ -78,11 +82,13 @@ Ctrl + Left/Right → Previous/next tag that has windows ### Advanced Tag Techniques **View multiple tags simultaneously:** + 1. Switch to tag 1: `Ctrl + 1` 2. Toggle tag 2 visibility: `Super + 2` (if configured) 3. Now you see windows from both tags **Silent tag movement** (move window without following): + ```conf # In config.conf bind=Alt+Shift,1,tagsilent,1 @@ -91,6 +97,7 @@ bind=Alt+Shift,1,tagsilent,1 ### Organizing Your Workflow with Tags **Example organization:** + ``` Tag 1: Browsers (monocle layout) Tag 2: Code editors (tile or center_tile layout) @@ -101,6 +108,7 @@ Tag 6-9: Project-specific ``` **Setting layouts per tag in config.conf:** + ```conf tagrule=id:1,layout_name:monocle tagrule=id:2,layout_name:center_tile @@ -118,6 +126,7 @@ tagrule=id:5,layout_name:monocle MangoWC includes 9 built-in layouts: #### 1. Tile (Master-Stack) + ``` ┌────────┬────┐ │ │ 1 │ @@ -125,23 +134,28 @@ MangoWC includes 9 built-in layouts: │ │ 2 │ └────────┴────┘ ``` + **Best for:** General multitasking, coding with docs **Switch to:** Cycle with `Super + N` (or add `bind=Super,t,setlayout,tile` to config) #### 2. Scroller (Horizontal) + ``` ┌───┬────┬───┬───┐ │ 1 │ 2 │ 3 │ 4 │... └───┴────┴───┴───┘ ``` + **Best for:** Terminals, wide content, many windows **Switch to:** Cycle with `Super + N` (or add `bind=Super,s,setlayout,scroller` to config) **Scroller-specific controls:** + - `Alt + E` - Set current window to full width - `Alt + X` - Cycle through width presets (0.5, 0.8, 1.0) #### 3. Monocle (Fullscreen Stack) + ``` ┌──────────────┐ │ │ @@ -149,11 +163,13 @@ MangoWC includes 9 built-in layouts: │ (fullscrn) │ └──────────────┘ ``` + **Best for:** Focus work, browsing, media **Switch to:** Cycle with `Super + N` **Navigate:** Use `Super + Tab` to cycle through windows #### 4. Grid + ``` ┌─────┬─────┐ │ 1 │ 2 │ @@ -161,20 +177,24 @@ MangoWC includes 9 built-in layouts: │ 3 │ 4 │ └─────┴─────┘ ``` + **Best for:** Viewing many windows simultaneously **Switch to:** Cycle with `Super + N` #### 5. Deck (Card Stack) + ``` ┌──────────────┐ │ Window 1 │ ← Visible │ (2, 3 hidden)│ └──────────────┘ ``` + **Best for:** Cycling through options **Switch to:** Cycle with `Super + N` #### 6. Center Tile + ``` ┌──┬──────┬──┐ │1 │ │2 │ @@ -182,10 +202,12 @@ MangoWC includes 9 built-in layouts: │3 │ │4 │ └──┴──────┴──┘ ``` + **Best for:** Symmetrical workflow, coding **Switch to:** Cycle with `Super + N` #### 7. Vertical Tile + ``` ┌──────────────┐ │ Master │ @@ -193,12 +215,14 @@ MangoWC includes 9 built-in layouts: │1 │ 2 │ 3 │ 4 │ └──┴───┴───┴───┘ ``` + **Best for:** Ultra-wide monitors **Switch to:** Cycle with `Super + N` ### Layout Controls **Cycle through all layouts:** + ``` Super + N → Next layout ``` @@ -206,6 +230,7 @@ Super + N → Next layout **Adjust layout parameters:** For **tile/center_tile** layouts: + ``` Super + H → Decrease master size (add to config) Super + L → Increase master size (add to config) @@ -214,6 +239,7 @@ Super + Minus → Fewer windows in master (add to config) ``` Add to config.conf: + ```conf bind=Super,h,setmfact,-0.05 bind=Super,l,setmfact,+0.05 @@ -222,6 +248,7 @@ bind=Super,minus,incnmaster,-1 ``` For **scroller** layout: + ``` Alt + E → Set window to full width Alt + X → Cycle width presets @@ -234,17 +261,20 @@ Alt + X → Cycle width presets ### Focus Management **Directional focus:** + ``` Alt + ←→↑↓ → Focus window in direction ``` **Stack focus:** + ``` Super + Tab → Next window in stack Super + Shift + Tab → Previous window in stack ``` **Focus last window:** + ``` Super + ` → Focus previously focused window (add to config) ``` @@ -252,21 +282,25 @@ Super + ` → Focus previously focused window (add to config) ### Moving Windows **Swap with neighbors:** + ``` Super + Shift + ←→↑↓ → Swap positions ``` **Move to master:** + ``` Super + Return → Move focused window to master position (add to config) ``` Add to config: + ```conf bind=Super,Return,zoom, ``` **Move between tags:** + ``` Alt + 1-9 → Move to tag (and follow) Ctrl + Super + ←→ → Move to prev/next tag @@ -275,28 +309,33 @@ Ctrl + Super + ←→ → Move to prev/next tag ### Floating Windows **Toggle floating:** + ``` Alt + \ → Toggle floating/tiling ``` **Move floating windows:** + ``` Ctrl + Shift + ←→↑↓ → Move by pixels Super + Left-drag → Move with mouse ``` **Resize floating windows:** + ``` Ctrl + Alt + ←→↑↓ → Resize by pixels Super + Right-drag → Resize with mouse ``` **Center floating window:** + ``` Super + C → Center window (add to config) ``` Add to config: + ```conf bind=Super,c,centerwin, ``` @@ -304,6 +343,7 @@ bind=Super,c,centerwin, ### Window States **Common states:** + ``` Alt + \ → Floating Alt + F → Fullscreen @@ -314,6 +354,7 @@ Super + O → Overlay (always on top) ``` **Minimize/Restore:** + ``` Super + I → Minimize window Super + Shift + I → Restore minimized @@ -326,6 +367,7 @@ Super + Shift + I → Restore minimized ### What is the Scratchpad? The scratchpad is a hidden workspace for temporary windows. It's perfect for: + - Calculator - Music player - Notes/Todo list @@ -335,12 +377,14 @@ The scratchpad is a hidden workspace for temporary windows. It's perfect for: ### Basic Scratchpad Usage 1. **Open an application** (e.g., terminal with calculator) + ```bash Alt + Return # Then run: qalc (or any calculator) ``` 2. **Move to scratchpad** + ``` Alt + Z ``` @@ -348,6 +392,7 @@ The scratchpad is a hidden workspace for temporary windows. It's perfect for: 3. **Window disappears** - it's now in the scratchpad 4. **Toggle scratchpad** to show/hide + ``` Alt + Z → Shows scratchpad over current work Alt + Z → Hides it again @@ -358,6 +403,7 @@ The scratchpad is a hidden workspace for temporary windows. It's perfect for: You can have multiple named scratchpads: **Setup in config.conf:** + ```conf bind=Super,p,toggle_named_scratchpad,music bind=Super,n,toggle_named_scratchpad,notes @@ -365,6 +411,7 @@ bind=Super,c,toggle_named_scratchpad,calc ``` **Usage:** + 1. Open application (e.g., spotify) 2. Press `Super + P` - assigns it to "music" scratchpad 3. Press `Super + P` again - shows/hides music scratchpad @@ -387,6 +434,7 @@ mmsg -d toggle_scratchpad ``` Bind it: + ```conf bind=Super,equal,spawn_shell,~/.config/mango/scripts/scratchpad-calc.sh ``` @@ -394,6 +442,7 @@ bind=Super,equal,spawn_shell,~/.config/mango/scripts/scratchpad-calc.sh **Customize scratchpad appearance:** In config.conf: + ```conf scratchpad_width_ratio=0.8 # 80% of screen width scratchpad_height_ratio=0.9 # 90% of screen height @@ -411,11 +460,13 @@ Overview mode shows all windows at once, similar to GNOME's Activities or macOS ### Using Overview **Toggle overview:** + ``` Alt + Tab → Toggle overview mode ``` **In overview mode:** + - Click any window to focus it - Drag windows to rearrange - Windows are organized visually @@ -425,6 +476,7 @@ Alt + Tab → Toggle overview mode Move your mouse cursor to the top edge of the screen to automatically trigger overview. **Configure hotarea:** + ```conf # In config.conf hotarea_size=10 # Pixels from edge to trigger @@ -447,11 +499,13 @@ overviewgappo=30 # Gap from screen edges ### Basic Multi-Monitor Commands **Focus different monitor:** + ``` Alt + Shift + ←→ → Focus adjacent monitor ``` **Move window to other monitor:** + ``` Super + Alt + ←→ → Move window to adjacent monitor ``` @@ -459,16 +513,19 @@ Super + Alt + ←→ → Move window to adjacent monitor ### Multi-Monitor Strategies **Strategy 1: Dedicated monitors per task** + - Monitor 1: Development (Tag 1-3) - Monitor 2: Communication (Tag 4-6) - Monitor 3: Media/Reference (Tag 7-9) **Strategy 2: Mirror similar tags** + - Both monitors show same tags - Each monitor has different layouts - Use global windows to span both **Strategy 3: Independent workspaces** + - Each monitor is independent - Use monitor focus shortcuts frequently - Keep related work on same monitor @@ -478,16 +535,19 @@ Super + Alt + ←→ → Move window to adjacent monitor MangoWC auto-detects monitors. For custom setup: **Disable a monitor:** + ```bash mmsg -d disable_monitor HDMI-A-1 ``` **Enable a monitor:** + ```bash mmsg -d enable_monitor HDMI-A-1 ``` **Find monitor names:** + ```bash mmsg -o ``` @@ -566,6 +626,7 @@ unfocused_opacity=0.95 # Unfocused window opacity Create `~/.config/mango/scripts/` directory: **Example: Screenshot script** + ```bash #!/bin/bash # ~/.config/mango/scripts/screenshot.sh @@ -574,11 +635,13 @@ grim -g "$(slurp)" - | satty --filename - --fullscreen ``` **Bind it:** + ```conf bind=Print,none,spawn_shell,~/.config/mango/scripts/screenshot.sh ``` **Example: Volume control** + ```bash #!/bin/bash # ~/.config/mango/scripts/volume.sh @@ -591,6 +654,7 @@ esac ``` **Bind it:** + ```conf bind=NONE,XF86AudioRaiseVolume,spawn_shell,~/.config/mango/scripts/volume.sh up bind=NONE,XF86AudioLowerVolume,spawn_shell,~/.config/mango/scripts/volume.sh down @@ -604,6 +668,7 @@ bind=NONE,XF86AudioMute,spawn_shell,~/.config/mango/scripts/volume.sh mute ### Workflow 1: Web Development **Setup:** + ``` Tag 1: Browser (monocle) → Testing Tag 2: Code editor (center_tile) → Development @@ -612,6 +677,7 @@ Scratchpad: Documentation, notes ``` **Workflow:** + 1. Start on Tag 2, write code 2. `Ctrl + 1` → View in browser 3. `Ctrl + 3` → Run build/dev server @@ -621,6 +687,7 @@ Scratchpad: Documentation, notes ### Workflow 2: Writing and Research **Setup:** + ``` Tag 1: Writing app (monocle) Tag 2: Research browser (tile) @@ -629,6 +696,7 @@ Scratchpad: Notes, citations ``` **Workflow:** + 1. Research on Tags 2-3 2. `Ctrl + 1` → Switch to writing 3. `Super + G` on notes window → Make it global @@ -637,6 +705,7 @@ Scratchpad: Notes, citations ### Workflow 3: Communication and Work **Setup:** + ``` Tag 1: Email (monocle) Tag 2: Slack/Discord (tile) @@ -646,6 +715,7 @@ Global: Music player ``` **Workflow:** + 1. Open music player → `Super + G` (make global) 2. Start each app on its tag 3. Use `Ctrl + Left/Right` to jump between active tags @@ -654,6 +724,7 @@ Global: Music player ### Workflow 4: System Administration **Setup:** + ``` Tag 1: Terminals (scroller) → Multiple SSH sessions Tag 2: Monitoring (grid) → htop, iotop, etc. @@ -662,6 +733,7 @@ Scratchpad: Calculator, quick commands ``` **Workflow:** + 1. Open terminals in scroller layout 2. `Alt + X` to adjust column widths 3. `Ctrl + 2` for monitoring overview @@ -670,6 +742,7 @@ Scratchpad: Calculator, quick commands ### Workflow 5: Video/Audio Editing **Setup:** + ``` Tag 1: Editor (monocle) → Full-screen editing Tag 2: File browser (tile) → Asset management @@ -677,6 +750,7 @@ Tag 3: Preview (monocle) → Testing output ``` **Workflow:** + 1. Edit on Tag 1 in monocle (maximum space) 2. `Ctrl + 2` → Grab assets 3. `Ctrl + 3` → Preview output @@ -687,6 +761,7 @@ Tag 3: Preview (monocle) → Testing output ## Quick Reference Card ### Essential Shortcuts + ``` Alt + Return Terminal Alt + Space Launcher @@ -710,6 +785,7 @@ Super + G Global window ``` ### When Things Go Wrong + ``` Super + R Reload config (fixes most issues) Super + M Exit MangoWC @@ -729,6 +805,7 @@ Now that you understand the basics: 5. **Join the community** - [Discord](https://discord.gg/CPjbDxesh5) **Additional Resources:** + - [COMMANDS.md](COMMANDS.md) - Complete command reference - [config.conf](config.conf) - Commented configuration file - [MangoWC Wiki](https://github.com/DreamMaoMao/mango/wiki/) - Comprehensive documentation From 05874720ece899f441154c20adab5afe74f9dad1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:20:55 +0000 Subject: [PATCH 3/4] Fix USAGE.md linting errors - add code block languages and fix formatting Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- USAGE.md | 99 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 51 insertions(+), 48 deletions(-) diff --git a/USAGE.md b/USAGE.md index f976a90a..ba639d6a 100644 --- a/USAGE.md +++ b/USAGE.md @@ -30,7 +30,7 @@ A practical guide to using MangoWC in your daily workflow. These are the absolute minimum you need to be productive: -``` +```text Alt + Return → Terminal Alt + Space → App launcher Alt + Q → Close window @@ -47,7 +47,8 @@ Super + M → Exit MangoWC ### What Are Tags? -Tags are like workspaces, but more flexible. Think of them as labels you can apply to windows. +Tags are like workspaces, but more flexible. Think of them as labels you can +apply to windows. **Key differences from workspaces:** @@ -59,7 +60,7 @@ Tags are like workspaces, but more flexible. Think of them as labels you can app **Switch to a tag:** -``` +```text Ctrl + 1 → View tag 1 Ctrl + 2 → View tag 2 ... and so on @@ -67,14 +68,14 @@ Ctrl + 2 → View tag 2 **Move window to a tag:** -``` +```text Alt + 1 → Move current window to tag 1 (and switch to it) Alt + 2 → Move current window to tag 2 (and switch to it) ``` **Navigate through tags:** -``` +```text Super + Left/Right → Previous/next tag Ctrl + Left/Right → Previous/next tag that has windows ``` @@ -98,7 +99,7 @@ bind=Alt+Shift,1,tagsilent,1 **Example organization:** -``` +```text Tag 1: Browsers (monocle layout) Tag 2: Code editors (tile or center_tile layout) Tag 3: Terminals (scroller layout) @@ -127,7 +128,7 @@ MangoWC includes 9 built-in layouts: #### 1. Tile (Master-Stack) -``` +```text ┌────────┬────┐ │ │ 1 │ │ Master ├────┤ @@ -140,14 +141,15 @@ MangoWC includes 9 built-in layouts: #### 2. Scroller (Horizontal) -``` +```text ┌───┬────┬───┬───┐ │ 1 │ 2 │ 3 │ 4 │... └───┴────┴───┴───┘ ``` **Best for:** Terminals, wide content, many windows -**Switch to:** Cycle with `Super + N` (or add `bind=Super,s,setlayout,scroller` to config) +**Switch to:** Cycle with `Super + N` (or add +`bind=Super,s,setlayout,scroller` to config) **Scroller-specific controls:** @@ -156,7 +158,7 @@ MangoWC includes 9 built-in layouts: #### 3. Monocle (Fullscreen Stack) -``` +```text ┌──────────────┐ │ │ │ Window 1 │ @@ -170,7 +172,7 @@ MangoWC includes 9 built-in layouts: #### 4. Grid -``` +```text ┌─────┬─────┐ │ 1 │ 2 │ ├─────┼─────┤ @@ -183,7 +185,7 @@ MangoWC includes 9 built-in layouts: #### 5. Deck (Card Stack) -``` +```text ┌──────────────┐ │ Window 1 │ ← Visible │ (2, 3 hidden)│ @@ -195,7 +197,7 @@ MangoWC includes 9 built-in layouts: #### 6. Center Tile -``` +```text ┌──┬──────┬──┐ │1 │ │2 │ │ │Master│ │ @@ -208,7 +210,7 @@ MangoWC includes 9 built-in layouts: #### 7. Vertical Tile -``` +```text ┌──────────────┐ │ Master │ ├──┬───┬───┬───┤ @@ -223,7 +225,7 @@ MangoWC includes 9 built-in layouts: **Cycle through all layouts:** -``` +```text Super + N → Next layout ``` @@ -231,7 +233,7 @@ Super + N → Next layout For **tile/center_tile** layouts: -``` +```text Super + H → Decrease master size (add to config) Super + L → Increase master size (add to config) Super + Equal → More windows in master (add to config) @@ -249,7 +251,7 @@ bind=Super,minus,incnmaster,-1 For **scroller** layout: -``` +```text Alt + E → Set window to full width Alt + X → Cycle width presets ``` @@ -262,20 +264,20 @@ Alt + X → Cycle width presets **Directional focus:** -``` +```text Alt + ←→↑↓ → Focus window in direction ``` **Stack focus:** -``` +```text Super + Tab → Next window in stack Super + Shift + Tab → Previous window in stack ``` **Focus last window:** -``` +```text Super + ` → Focus previously focused window (add to config) ``` @@ -283,13 +285,13 @@ Super + ` → Focus previously focused window (add to config) **Swap with neighbors:** -``` +```text Super + Shift + ←→↑↓ → Swap positions ``` **Move to master:** -``` +```text Super + Return → Move focused window to master position (add to config) ``` @@ -301,7 +303,7 @@ bind=Super,Return,zoom, **Move between tags:** -``` +```text Alt + 1-9 → Move to tag (and follow) Ctrl + Super + ←→ → Move to prev/next tag ``` @@ -310,27 +312,27 @@ Ctrl + Super + ←→ → Move to prev/next tag **Toggle floating:** -``` +```text Alt + \ → Toggle floating/tiling ``` **Move floating windows:** -``` +```text Ctrl + Shift + ←→↑↓ → Move by pixels Super + Left-drag → Move with mouse ``` **Resize floating windows:** -``` +```text Ctrl + Alt + ←→↑↓ → Resize by pixels Super + Right-drag → Resize with mouse ``` **Center floating window:** -``` +```text Super + C → Center window (add to config) ``` @@ -344,7 +346,7 @@ bind=Super,c,centerwin, **Common states:** -``` +```text Alt + \ → Floating Alt + F → Fullscreen Alt + Shift + F → Fake fullscreen @@ -355,7 +357,7 @@ Super + O → Overlay (always on top) **Minimize/Restore:** -``` +```text Super + I → Minimize window Super + Shift + I → Restore minimized ``` @@ -385,7 +387,7 @@ The scratchpad is a hidden workspace for temporary windows. It's perfect for: 2. **Move to scratchpad** - ``` + ```text Alt + Z ``` @@ -393,7 +395,7 @@ The scratchpad is a hidden workspace for temporary windows. It's perfect for: 4. **Toggle scratchpad** to show/hide - ``` + ```text Alt + Z → Shows scratchpad over current work Alt + Z → Hides it again ``` @@ -455,13 +457,14 @@ scratchpadcolor=0x516c93ff # Border color for scratchpad windows ### What is Overview? -Overview mode shows all windows at once, similar to GNOME's Activities or macOS Mission Control. +Overview mode shows all windows at once, similar to GNOME's Activities or +macOS Mission Control. ### Using Overview **Toggle overview:** -``` +```text Alt + Tab → Toggle overview mode ``` @@ -500,31 +503,31 @@ overviewgappo=30 # Gap from screen edges **Focus different monitor:** -``` +```text Alt + Shift + ←→ → Focus adjacent monitor ``` **Move window to other monitor:** -``` +```text Super + Alt + ←→ → Move window to adjacent monitor ``` ### Multi-Monitor Strategies -**Strategy 1: Dedicated monitors per task** +#### Strategy 1: Dedicated monitors per task - Monitor 1: Development (Tag 1-3) - Monitor 2: Communication (Tag 4-6) - Monitor 3: Media/Reference (Tag 7-9) -**Strategy 2: Mirror similar tags** +#### Strategy 2: Mirror similar tags - Both monitors show same tags - Each monitor has different layouts - Use global windows to span both -**Strategy 3: Independent workspaces** +#### Strategy 3: Independent workspaces - Each monitor is independent - Use monitor focus shortcuts frequently @@ -625,7 +628,7 @@ unfocused_opacity=0.95 # Unfocused window opacity Create `~/.config/mango/scripts/` directory: -**Example: Screenshot script** +#### Example: Screenshot script ```bash #!/bin/bash @@ -640,7 +643,7 @@ grim -g "$(slurp)" - | satty --filename - --fullscreen bind=Print,none,spawn_shell,~/.config/mango/scripts/screenshot.sh ``` -**Example: Volume control** +#### Example: Volume control ```bash #!/bin/bash @@ -669,7 +672,7 @@ bind=NONE,XF86AudioMute,spawn_shell,~/.config/mango/scripts/volume.sh mute **Setup:** -``` +```text Tag 1: Browser (monocle) → Testing Tag 2: Code editor (center_tile) → Development Tag 3: Terminals (scroller) → Commands @@ -688,7 +691,7 @@ Scratchpad: Documentation, notes **Setup:** -``` +```text Tag 1: Writing app (monocle) Tag 2: Research browser (tile) Tag 3: Reference PDFs (grid) @@ -706,7 +709,7 @@ Scratchpad: Notes, citations **Setup:** -``` +```text Tag 1: Email (monocle) Tag 2: Slack/Discord (tile) Tag 3: Work documents (tile) @@ -725,7 +728,7 @@ Global: Music player **Setup:** -``` +```text Tag 1: Terminals (scroller) → Multiple SSH sessions Tag 2: Monitoring (grid) → htop, iotop, etc. Tag 3: Browser (monocle) → Documentation @@ -743,7 +746,7 @@ Scratchpad: Calculator, quick commands **Setup:** -``` +```text Tag 1: Editor (monocle) → Full-screen editing Tag 2: File browser (tile) → Asset management Tag 3: Preview (monocle) → Testing output @@ -762,7 +765,7 @@ Tag 3: Preview (monocle) → Testing output ### Essential Shortcuts -``` +```text Alt + Return Terminal Alt + Space Launcher Alt + Q Close window @@ -786,7 +789,7 @@ Super + G Global window ### When Things Go Wrong -``` +```text Super + R Reload config (fixes most issues) Super + M Exit MangoWC Ctrl + Alt + F2 Switch to TTY (if GUI breaks) @@ -813,4 +816,4 @@ Now that you understand the basics: --- -**Happy tiling! 🥭** +Happy tiling! 🥭 From d063da92b0c939039e06870fc07a5fce9f40958f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:27:10 +0000 Subject: [PATCH 4/4] Fix README.md linting errors - structural and formatting improvements Co-authored-by: squassina <8495707+squassina@users.noreply.github.com> --- README.md | 217 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 124 insertions(+), 93 deletions(-) diff --git a/README.md b/README.md index 4a91378e..eadd0a05 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,22 @@ This project's development is based on [dwl](https://codeberg.org/dwl/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. + - _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) + - 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-stack, monocle,center-master, etc.) - - Rich window states (swallow, minimize, maximize, unglobal, global, fakefullscreen, overlay, etc.) + - Flexible window layouts with easy switching (scroller, + master-stack, monocle,center-master, 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) @@ -27,11 +33,15 @@ This project's development is based on [dwl](https://codeberg.org/dwl/dwl/). -# Quick Start Guide +## Quick Start Guide ## What is MangoWC? -MangoWC is a **Wayland compositor** - a program that manages windows and displays on modern Linux systems using the Wayland protocol. If you're familiar with window managers like i3, dwm, or awesome, MangoWC provides similar tiling window management functionality but for Wayland instead of X11. +MangoWC is a **Wayland compositor** - a program that manages windows and +displays on modern Linux systems using the Wayland protocol. If you're +familiar with window managers like i3, dwm, or awesome, MangoWC provides +similar tiling window management functionality but for Wayland instead of +X11. ## First Steps After Installation @@ -77,10 +87,13 @@ MangoWC is a **Wayland compositor** - a program that manages windows and display Unlike traditional workspaces, **tags** are more flexible: -- **Workspaces**: A window belongs to one workspace. Switching workspaces shows a different set of windows. -- **Tags**: A window can have multiple tags. You can view multiple tags at once or filter to specific tags. +- **Workspaces**: A window belongs to one workspace. Switching workspaces + shows a different set of windows. +- **Tags**: A window can have multiple tags. You can view multiple tags at + once or filter to specific tags. -Think of tags as labels you can attach to windows. You can view windows with tag 1, or tag 2, or both tags 1 and 2 simultaneously. +Think of tags as labels you can attach to windows. You can view windows with +tag 1, or tag 2, or both tags 1 and 2 simultaneously. **Default behavior:** @@ -92,17 +105,20 @@ Think of tags as labels you can attach to windows. You can view windows with tag MangoWC supports 9 different layouts: -| Layout | Description | Best For | -|--------|-------------|----------| -| **tile** | Master-stack tiling (left master, right stack) | General multitasking | -| **scroller** | Horizontal scrolling columns | Wide content, terminals | -| **monocle** | One window fullscreen at a time | Focus, presentations | -| **grid** | Windows arranged in grid | Many small windows | -| **deck** | Stack of windows, one visible | Cycling through tasks | -| **center_tile** | Master centered, stack on sides | Symmetrical layout | -| **vertical_tile** | Master top, stack bottom | Wide monitors | -| **vertical_scroller** | Vertical scrolling rows | Document review | -| **vertical_grid** | Vertical grid arrangement | Vertical content | +| Layout | Description | Best For | +|-----------------------|---------------------------------|-----------------------| +| **tile** | Master-stack tiling | General multitasking | +| | (left master, right stack) | | +| **scroller** | Horizontal scrolling columns | Wide content, | +| | | terminals | +| **monocle** | One window fullscreen at a time | Focus, | +| | | presentations | +| **grid** | Windows arranged in grid | Many small windows | +| **deck** | Stack of windows, one visible | Cycling through tasks | +| **center_tile** | Master centered, stack on sides | Symmetrical layout | +| **vertical_tile** | Master top, stack bottom | Wide monitors | +| **vertical_scroller** | Vertical scrolling rows | Document review | +| **vertical_grid** | Vertical grid arrangement | Vertical content | **Switch layouts:** @@ -168,21 +184,21 @@ Windows can have multiple states: 1. **Open applications:** - ``` + ```text Alt + Space → Application launcher Alt + Return → Terminal ``` 2. **Navigate windows:** - ``` + ```text Alt + Arrow Keys → Focus window in direction Super + Tab → Focus next window in stack ``` 3. **Organize windows:** - ``` + ```text Super + Shift + Arrows → Swap window positions Alt + \ → Toggle floating Alt + 1-9 → Move to specific tag @@ -190,14 +206,14 @@ Windows can have multiple states: 4. **Adjust layout:** - ``` + ```text Super + N → Change layout Alt + Shift + X/Z → Increase/decrease gaps ``` 5. **Multi-monitor:** - ``` + ```text Alt + Shift + Left/Right → Focus other monitor Super + Alt + Left/Right → Move window to other monitor ``` @@ -391,13 +407,13 @@ sudo pacman -S xdg-desktop-portal xdg-desktop-portal-wlr - **Website**: [mangowc.vercel.app/docs](https://mangowc.vercel.app/docs) - **Issues**: [GitHub Issues](https://github.com/DreamMaoMao/mangowc/issues) -# Our discord +## Our discord [mangowc](https://discord.gg/CPjbDxesh5) --- -# Installation +## Installation ## Dependencies @@ -421,7 +437,10 @@ sudo pacman -S xdg-desktop-portal xdg-desktop-portal-wlr ## Arch Linux -The package is in the Arch User Repository and is available for manual download [here](https://aur.archlinux.org/packages/mangowc-git) or through a AUR helper like yay: +The package is in the Arch User Repository and is available for manual +download from the +[AUR package page](https://aur.archlinux.org/packages/mangowc-git) or +through a AUR helper like yay: ```bash yay -S mangowc-git @@ -530,74 +549,77 @@ sudo ninja -C build install ### Essential Shortcuts -| Keybinding | Action | Description | -|------------|--------|-------------| -| `Alt + Return` | Open terminal | Launches foot terminal emulator | -| `Alt + Space` | Open launcher | Launches rofi application launcher | -| `Alt + Q` | Close window | Kill focused window | -| `Super + M` | Exit | Quit MangoWC | -| `Super + R` | Reload config | Apply config changes without restart | +| Keybinding | Action | Description | +|----------------|---------------|----------------------------------| +| `Alt + Return` | Open terminal | Launches foot terminal emulator | +| `Alt + Space` | Open launcher | Launches rofi application | +| | | launcher | +| `Alt + Q` | Close window | Kill focused window | +| `Super + M` | Exit | Quit MangoWC | +| `Super + R` | Reload config | Apply config changes without | +| | | restart | ### Window Management -| Keybinding | Action | -|------------|--------| -| `Alt + ←/→/↑/↓` | Focus window in direction | -| `Super + Tab` | Focus next window | -| `Super + Shift + ←/→/↑/↓` | Swap window with neighbor | -| `Alt + \` | Toggle floating/tiling | -| `Alt + F` | Toggle fullscreen | -| `Alt + Shift + F` | Toggle fake fullscreen | -| `Alt + A` | Toggle maximize | -| `Super + I` | Minimize window | -| `Super + Shift + I` | Restore minimized window | -| `Super + G` | Toggle global (visible all tags) | -| `Super + O` | Toggle overlay (always on top) | +| Keybinding | Action | +|---------------------------|-------------------------------------| +| `Alt + ←/→/↑/↓` | Focus window in direction | +| `Super + Tab` | Focus next window | +| `Super + Shift + ←/→/↑/↓` | Swap window with neighbor | +| `Alt + \` | Toggle floating/tiling | +| `Alt + F` | Toggle fullscreen | +| `Alt + Shift + F` | Toggle fake fullscreen | +| `Alt + A` | Toggle maximize | +| `Super + I` | Minimize window | +| `Super + Shift + I` | Restore minimized window | +| `Super + G` | Toggle global (visible all tags) | +| `Super + O` | Toggle overlay (always on top) | ### Tag (Workspace) Management -| Keybinding | Action | -|------------|--------| -| `Ctrl + 1-9` | Switch to tag 1-9 | -| `Alt + 1-9` | Move window to tag 1-9 (and follow) | -| `Super + ←/→` | Previous/next tag | -| `Ctrl + ←/→` | Previous/next tag with windows | -| `Ctrl + Super + ←/→` | Move window to previous/next tag | +| Keybinding | Action | +|---------------------|--------------------------------------| +| `Ctrl + 1-9` | Switch to tag 1-9 | +| `Alt + 1-9` | Move window to tag 1-9 (and follow) | +| `Super + ←/→` | Previous/next tag | +| `Ctrl + ←/→` | Previous/next tag with windows | +| `Ctrl + Super + ←/→`| Move window to previous/next tag | ### Layout Control -| Keybinding | Action | -|------------|--------| -| `Super + N` | Cycle through layouts | -| `Alt + E` | Set window to full width (scroller) | -| `Alt + X` | Cycle width presets (scroller) | -| `Alt + Shift + X/Z` | Increase/decrease gaps | -| `Alt + Shift + R` | Toggle gaps on/off | +| Keybinding | Action | +|---------------------|--------------------------------------| +| `Super + N` | Cycle through layouts | +| `Alt + E` | Set window to full width (scroller) | +| `Alt + X` | Cycle width presets (scroller) | +| `Alt + Shift + X/Z` | Increase/decrease gaps | +| `Alt + Shift + R` | Toggle gaps on/off | ### Special Features -| Keybinding | Action | -|------------|--------| -| `Alt + Tab` | Toggle overview mode | -| `Alt + Z` | Toggle scratchpad | -| `Super + Scroll Up/Down` | Switch tags with scroll wheel | +| Keybinding | Action | +|-------------------------|--------------------------| +| `Alt + Tab` | Toggle overview mode | +| `Alt + Z` | Toggle scratchpad | +| `Super + Scroll Up/Down`| Switch tags with scroll | +| | wheel | ### Multi-Monitor -| Keybinding | Action | -|------------|--------| -| `Alt + Shift + ←/→` | Focus adjacent monitor | -| `Super + Alt + ←/→` | Move window to adjacent monitor | +| Keybinding | Action | +|---------------------|----------------------------------| +| `Alt + Shift + ←/→` | Focus adjacent monitor | +| `Super + Alt + ←/→` | Move window to adjacent monitor | ### Floating Window Adjustment -| Keybinding | Action | -|------------|--------| -| `Ctrl + Shift + ←/→/↑/↓` | Move floating window by pixels | -| `Ctrl + Alt + ←/→/↑/↓` | Resize floating window by pixels | -| `Super + Left-drag` | Move floating window with mouse | -| `Super + Right-drag` | Resize floating window with mouse | -| `Middle-click` | Maximize window | +| Keybinding | Action | +|---------------------------|------------------------------------| +| `Ctrl + Shift + ←/→/↑/↓` | Move floating window by pixels | +| `Ctrl + Alt + ←/→/↑/↓` | Resize floating window by pixels | +| `Super + Left-drag` | Move floating window with mouse | +| `Super + Right-drag` | Resize floating window with mouse | +| `Middle-click` | Maximize window | > **Tip**: Press `Super + R` after editing your config to reload without restarting! @@ -634,7 +656,8 @@ git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango ## Documentation -MangoWC comes with comprehensive documentation to help you get started and master the compositor: +MangoWC comes with comprehensive documentation to help you get started and +master the compositor: ### 📚 Documentation Files @@ -658,7 +681,8 @@ MangoWC comes with comprehensive documentation to help you get started and maste ### 🌐 Online Resources -- **[Wiki](https://github.com/DreamMaoMao/mango/wiki/)** - Comprehensive online documentation +- **[Wiki](https://github.com/DreamMaoMao/mango/wiki/)** - Comprehensive + online documentation - **[Website](https://mangowc.vercel.app/docs)** - Web-based documentation - **[Discord](https://discord.gg/CPjbDxesh5)** - Community support and discussions @@ -674,11 +698,14 @@ MangoWC comes with comprehensive documentation to help you get started and maste --- -# NixOS + Home-manager +## 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. +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: @@ -750,20 +777,23 @@ Here's an example of using the modules in a flake: } ``` -# Packaging mango +## Packaging mango -To package mango for other distributions, you can check the reference setup for: +To package mango for other distributions, you can check the reference setup +for: - [nix](https://github.com/DreamMaoMao/mangowc/blob/main/nix/default.nix) - [arch](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mangowc-git). - [gentoo](https://data.gpo.zugaina.org/guru/gui-wm/mangowc) -You might need to package `scenefx` for your distribution, check availability [here](https://github.com/wlrfx/scenefx.git). +You might need to package `scenefx` for your distribution, check availability +at the [scenefx repository](https://github.com/wlrfx/scenefx.git). -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. +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 +## Thanks to These Reference Repositories - - Implementation of Wayland protocol @@ -775,10 +805,11 @@ Read The Friendly Manual on packaging software in your distribution first. - - Make it simple to add window effect. -# Sponsor +## Sponsor At present, I can only accept sponsorship through an encrypted connection. -If you find this project helpful to you, you can offer sponsorship in the following ways. +If you find this project helpful to you, you can offer sponsorship in the +following ways. image