mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-14 05:34:21 -04:00
feat: add docs and sync with wiki & website
This commit is contained in:
parent
1fc89d01eb
commit
5906d9621e
28 changed files with 2594 additions and 0 deletions
87
docs/configuration/basics.md
Normal file
87
docs/configuration/basics.md
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
---
|
||||
title: Basic Configuration
|
||||
description: Learn how to configure mangowm files, environment variables, and autostart scripts.
|
||||
---
|
||||
|
||||
## Configuration File
|
||||
|
||||
mangowm uses a simple configuration file format. By default, it looks for a configuration file in `~/.config/mango/`.
|
||||
|
||||
1. **Locate Default Config**
|
||||
|
||||
A fallback configuration is provided at `/etc/mango/config.conf`. You can use this as a reference.
|
||||
|
||||
2. **Create User Config**
|
||||
|
||||
Copy the default config to your local config directory to start customizing.
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/mango
|
||||
cp /etc/mango/config.conf ~/.config/mango/config.conf
|
||||
```
|
||||
|
||||
3. **Launch with Custom Config (Optional)**
|
||||
|
||||
If you prefer to keep your config elsewhere, you can launch mango with the `-c` flag.
|
||||
|
||||
```bash
|
||||
mango -c /path/to/your_config.conf
|
||||
```
|
||||
|
||||
### Sub-Configuration
|
||||
|
||||
To keep your configuration organized, you can split it into multiple files and include them using the `source` keyword.
|
||||
|
||||
```ini
|
||||
# Import keybindings from a separate file
|
||||
source=~/.config/mango/bind.conf
|
||||
|
||||
# Relative paths work too
|
||||
source=./theme.conf
|
||||
|
||||
# Optional: ignore if file doesn't exist (useful for shared configs)
|
||||
source-optional=~/.config/mango/optional.conf
|
||||
```
|
||||
|
||||
### Validate Configuration
|
||||
|
||||
You can check your configuration for errors without starting mangowm:
|
||||
|
||||
```bash
|
||||
mango -p /path/to/config.conf
|
||||
```
|
||||
|
||||
Use with `source-optional` for shared configs across different setups.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
You can define environment variables directly within your config file. These are set before the window manager fully initializes.
|
||||
|
||||
> **Warning:** Environment variables defined here will be **reset** every time you reload the configuration.
|
||||
|
||||
```ini
|
||||
env=GTK_THEME,Adwaita:dark
|
||||
env=XCURSOR_SIZE,24
|
||||
```
|
||||
|
||||
## Autostart
|
||||
|
||||
mangowm can automatically run commands or scripts upon startup. There are two modes for execution:
|
||||
|
||||
| Command | Behavior | Usage Case |
|
||||
| :--- | :--- | :--- |
|
||||
| `exec-once` | Runs **only once** when mangowm starts. | Status bars, Wallpapers, Notification daemons |
|
||||
| `exec` | Runs **every time** the config is reloaded. | Scripts that need to refresh settings |
|
||||
|
||||
### Example Setup
|
||||
|
||||
```ini
|
||||
# Start the status bar once
|
||||
exec-once=waybar
|
||||
|
||||
# Set wallpaper
|
||||
exec-once=swaybg -i ~/.config/mango/wallpaper/room.png
|
||||
|
||||
# Reload a custom script on config change
|
||||
exec=bash ~/.config/mango/reload-settings.sh
|
||||
```
|
||||
150
docs/configuration/input.md
Normal file
150
docs/configuration/input.md
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
---
|
||||
title: Input Devices
|
||||
description: Configure keyboard layouts, mouse sensitivity, and touchpad gestures.
|
||||
---
|
||||
|
||||
## Device Configuration
|
||||
|
||||
mangowm provides granular control over different input devices.
|
||||
|
||||
### Keyboard Settings
|
||||
|
||||
Control key repeat rates and layout rules.
|
||||
|
||||
| Setting | Type | Default | Description |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `repeat_rate` | `int` | `25` | How many times a key repeats per second. |
|
||||
| `repeat_delay` | `int` | `600` | Delay (ms) before a held key starts repeating. |
|
||||
| `numlockon` | `0` or `1` | `0` | Enable NumLock on startup. |
|
||||
| `xkb_rules_rules` | `string` | - | XKB rules file (e.g., `evdev`, `base`). Usually auto-detected. |
|
||||
| `xkb_rules_model` | `string` | - | Keyboard model (e.g., `pc104`, `macbook`). |
|
||||
| `xkb_rules_layout` | `string` | - | Keyboard layout code (e.g., `us`, `de`, `us,de`). |
|
||||
| `xkb_rules_variant` | `string` | - | Layout variant (e.g., `dvorak`, `colemak`, `intl`). |
|
||||
| `xkb_rules_options` | `string` | - | XKB options (e.g., `caps:escape`, `ctrl:nocaps`). |
|
||||
|
||||
**Example:**
|
||||
|
||||
```ini
|
||||
repeat_rate=40
|
||||
repeat_delay=300
|
||||
numlockon=1
|
||||
xkb_rules_layout=us,de
|
||||
xkb_rules_variant=dvorak
|
||||
xkb_rules_options=caps:escape,ctrl:nocaps
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Trackpad Settings
|
||||
|
||||
Specific settings for laptop touchpads. Some settings may require a relogin to take effect.
|
||||
|
||||
| Setting | Default | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| `disable_trackpad` | `0` | Set to `1` to disable the trackpad entirely. |
|
||||
| `tap_to_click` | `1` | Tap to trigger a left click. |
|
||||
| `tap_and_drag` | `1` | Tap and hold to drag items. |
|
||||
| `trackpad_natural_scrolling` | `0` | Invert scrolling direction (natural scrolling). |
|
||||
| `scroll_method` | `1` | `1` (Two-finger), `2` (Edge), `4` (Button). |
|
||||
| `click_method` | `1` | `1` (Button areas), `2` (Clickfinger). |
|
||||
| `drag_lock` | `1` | Lock dragging after tapping. |
|
||||
| `disable_while_typing` | `1` | Disable trackpad while typing. |
|
||||
| `left_handed` | `0` | Swap left/right buttons. |
|
||||
| `middle_button_emulation` | `0` | Emulate middle button. |
|
||||
| `swipe_min_threshold` | `1` | Minimum swipe threshold. |
|
||||
|
||||
---
|
||||
|
||||
**Detailed descriptions:**
|
||||
|
||||
- `scroll_method` values:
|
||||
- `0` — Never send scroll events (no scrolling).
|
||||
- `1` — Two-finger scrolling: send scroll events when two fingers are logically down on the device.
|
||||
- `2` — Edge scrolling: send scroll events when a finger moves along the bottom or right edge.
|
||||
- `4` — Button scrolling: send scroll events when a button is held and the device moves along a scroll axis.
|
||||
|
||||
- `click_method` values:
|
||||
- `0` — No software click emulation.
|
||||
- `1` — Button areas: use software-defined areas on the touchpad to generate button events.
|
||||
- `2` — Clickfinger: the number of fingers determines which button is pressed.
|
||||
|
||||
- `accel_profile` values:
|
||||
- `0` — No acceleration.
|
||||
- `1` — Flat: no dynamic acceleration. Pointer speed = original input speed × (1 + `accel_speed`).
|
||||
- `2` — Adaptive: slow movement results in less acceleration, fast movement results in more.
|
||||
|
||||
- `button_map` values:
|
||||
- `0` — 1/2/3 finger tap maps to left / right / middle.
|
||||
- `1` — 1/2/3 finger tap maps to left / middle / right.
|
||||
|
||||
- `send_events_mode` values:
|
||||
- `0` — Send events from this device normally.
|
||||
- `1` — Do not send events from this device.
|
||||
- `2` — Disable this device when an external pointer device is plugged in.
|
||||
|
||||
---
|
||||
|
||||
### Mouse Settings
|
||||
|
||||
Configuration for external mice.
|
||||
|
||||
| Setting | Default | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| `mouse_natural_scrolling` | `0` | Invert scrolling direction. |
|
||||
| `accel_profile` | `2` | `0` (None), `1` (Flat), `2` (Adaptive). |
|
||||
| `accel_speed` | `0.0` | Speed adjustment (-1.0 to 1.0). |
|
||||
| `left_handed` | `0` | Swap left and right buttons. |
|
||||
| `middle_button_emulation` | `0` | Emulate middle button. |
|
||||
| `swipe_min_threshold` | `1` | Minimum swipe threshold. |
|
||||
| `send_events_mode` | `0` | `0` (Enabled), `1` (Disabled), `2` (Disabled on external mouse). |
|
||||
| `button_map` | `0` | `0` (Left/right/middle), `1` (Left/middle/right). |
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
## Keyboard Layout Switching
|
||||
|
||||
To bind multiple layouts and toggle between them, define the layouts in `xkb_rules_layout` and use `xkb_rules_options` to set a toggle key combination. Then bind `switch_keyboard_layout` to trigger a switch.
|
||||
|
||||
```ini
|
||||
# Define two layouts: US QWERTY and US Dvorak
|
||||
xkb_rules_layout=us,us
|
||||
xkb_rules_variant=,dvorak
|
||||
xkb_rules_options=grp:lalt_lshift_toggle
|
||||
```
|
||||
|
||||
Or bind it manually to a key:
|
||||
|
||||
```ini
|
||||
# Bind Alt+Shift_L to cycle keyboard layout
|
||||
bind=alt,shift_l,switch_keyboard_layout
|
||||
```
|
||||
|
||||
Use `mmsg -g -k` to query the current keyboard layout at any time.
|
||||
|
||||
---
|
||||
|
||||
## Input Method Editor (IME)
|
||||
|
||||
To use Fcitx5 or IBus, set these environment variables in your config file.
|
||||
|
||||
> **Info:** These settings require a restart of the window manager to take effect.
|
||||
|
||||
**For Fcitx5:**
|
||||
|
||||
```ini
|
||||
env=GTK_IM_MODULE,fcitx
|
||||
env=QT_IM_MODULE,fcitx
|
||||
env=SDL_IM_MODULE,fcitx
|
||||
env=XMODIFIERS,@im=fcitx
|
||||
env=GLFW_IM_MODULE,ibus
|
||||
```
|
||||
|
||||
**For IBus:**
|
||||
|
||||
```ini
|
||||
env=GTK_IM_MODULE,ibus
|
||||
env=QT_IM_MODULE,ibus
|
||||
env=XMODIFIERS,@im=ibus
|
||||
```
|
||||
4
docs/configuration/meta.json
Normal file
4
docs/configuration/meta.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"title": "Configuration",
|
||||
"pages": ["basics", "monitors", "input", "xdg-portals", "miscellaneous"]
|
||||
}
|
||||
51
docs/configuration/miscellaneous.md
Normal file
51
docs/configuration/miscellaneous.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
title: Miscellaneous
|
||||
description: Advanced settings for XWayland, focus behavior, and system integration.
|
||||
---
|
||||
|
||||
## System & Hardware
|
||||
|
||||
| Setting | Default | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| `xwayland_persistence` | `1` | Keep XWayland running even when no X11 apps are open (reduces startup lag). |
|
||||
| `syncobj_enable` | `0` | Enable `drm_syncobj` timeline support (helps with gaming stutter/lag). **Requires restart.** |
|
||||
| `allow_lock_transparent` | `0` | Allow the lock screen to be transparent. |
|
||||
| `allow_shortcuts_inhibit` | `1` | Allow shortcuts to be inhibited by clients. |
|
||||
| `vrr` | - | Set via [monitor rule](/docs/configuration/monitors#monitor-rules). |
|
||||
|
||||
## Focus & Input
|
||||
|
||||
| Setting | Default | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| `focus_on_activate` | `1` | Automatically focus windows when they request activation. |
|
||||
| `sloppyfocus` | `1` | Focus follows the mouse cursor. |
|
||||
| `warpcursor` | `1` | Warp the cursor to the center of the window when focus changes via keyboard. |
|
||||
| `cursor_hide_timeout` | `0` | Hide the cursor after `N` seconds of inactivity (`0` to disable). |
|
||||
| `drag_tile_to_tile` | `0` | Allow dragging a tiled window onto another to swap their positions. |
|
||||
| `drag_corner` | `3` | Corner for drag-to-tile detection (0: none, 1–3: corners, 4: auto-detect). |
|
||||
| `drag_warp_cursor` | `1` | Warp cursor when dragging windows to tile. |
|
||||
| `axis_bind_apply_timeout` | `100` | Timeout (ms) for detecting consecutive scroll events for axis bindings. |
|
||||
| `axis_scroll_factor` | `1.0` | Scroll factor for axis scroll speed (0.1–10.0). |
|
||||
|
||||
## Multi-Monitor & Tags
|
||||
|
||||
| Setting | Default | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| `focus_cross_monitor` | `0` | Allow directional focus to cross monitor boundaries. |
|
||||
| `exchange_cross_monitor` | `0` | Allow exchanging clients across monitor boundaries. |
|
||||
| `focus_cross_tag` | `0` | Allow directional focus to cross into other tags. |
|
||||
| `view_current_to_back` | `0` | Toggling the current tag switches back to the previously viewed tag. |
|
||||
| `scratchpad_cross_monitor` | `0` | Share the scratchpad pool across all monitors. |
|
||||
| `single_scratchpad` | `1` | Only allow one scratchpad (named or standard) to be visible at a time. |
|
||||
| `circle_layout` | - | A comma-separated list of layouts `switch_layout` cycles through. |
|
||||
|
||||
## Window Behavior
|
||||
|
||||
| Setting | Default | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| `enable_floating_snap` | `0` | Snap floating windows to edges or other windows. |
|
||||
| `snap_distance` | `30` | Max distance (pixels) to trigger floating snap. |
|
||||
| `no_border_when_single` | `0` | Remove window borders when only one window is visible on the tag. |
|
||||
| `idleinhibit_ignore_visible` | `0` | Allow invisible clients (e.g., background audio players) to inhibit idle. |
|
||||
| `drag_tile_refresh_interval` | `8.0` | Interval (1.0–16.0) to refresh tiled window resize during drag. Too small may cause application lag. |
|
||||
| `drag_floating_refresh_interval` | `8.0` | Interval (1.0–16.0) to refresh floating window resize during drag. Too small may cause application lag. |
|
||||
274
docs/configuration/monitors.md
Normal file
274
docs/configuration/monitors.md
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
---
|
||||
title: Monitors
|
||||
description: Manage display outputs, resolution, scaling, and tearing.
|
||||
---
|
||||
|
||||
## Monitor Rules
|
||||
|
||||
You can configure each display output individually using the `monitorrule` keyword.
|
||||
|
||||
**Syntax:**
|
||||
|
||||
```ini
|
||||
monitorrule=name:Values,Parameter:Values,Parameter:Values
|
||||
```
|
||||
|
||||
> **Info:** If any of the matching fields (`name`, `make`, `model`, `serial`) are set, **all** of the set ones must match to be considered a match. Use `wlr-randr` to get your monitor's name, make, model, and serial.
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Values | Description |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `name` | string | Any | Match by monitor name (supports regex) |
|
||||
| `make` | string | Any | Match by monitor manufacturer |
|
||||
| `model` | string | Any | Match by monitor model |
|
||||
| `serial` | string | Any | Match by monitor serial number |
|
||||
| `width` | integer | 0-9999 | Monitor width |
|
||||
| `height` | integer | 0-9999 | Monitor height |
|
||||
| `refresh` | float | 0.001-9999.0 | Monitor refresh rate |
|
||||
| `x` | integer | 0-99999 | X position |
|
||||
| `y` | integer | 0-99999 | Y position |
|
||||
| `scale` | float | 0.01-100.0 | Monitor scale |
|
||||
| `vrr` | integer | 0, 1 | Enable variable refresh rate |
|
||||
| `rr` | integer | 0-7 | Monitor transform |
|
||||
| `custom` | integer | 0, 1 | Enable custom mode (not supported on all displays — may cause black screen) |
|
||||
|
||||
### Transform Values
|
||||
|
||||
| Value | Rotation |
|
||||
| :--- | :--- |
|
||||
| `0` | No transform |
|
||||
| `1` | 90° counter-clockwise |
|
||||
| `2` | 180° counter-clockwise |
|
||||
| `3` | 270° counter-clockwise |
|
||||
| `4` | 180° vertical flip |
|
||||
| `5` | Flip + 90° counter-clockwise |
|
||||
| `6` | Flip + 180° counter-clockwise |
|
||||
| `7` | Flip + 270° counter-clockwise |
|
||||
|
||||
> **Critical:** If you use XWayland applications, **never use negative coordinates** for your monitor positions. This is a known XWayland bug that causes click events to malfunction. Always arrange your monitors starting from `0,0` and extend into positive coordinates.
|
||||
|
||||
### Examples
|
||||
|
||||
```ini
|
||||
# Laptop display: 1080p, 60Hz, positioned at origin
|
||||
monitorrule=name:eDP-1,width:1920,height:1080,refresh:60,x:0,y:10
|
||||
|
||||
# Match by make and model instead of name
|
||||
monitorrule=make:Chimei Innolux Corporation,model:0x15F5,width:1920,height:1080,refresh:60,x:0,y:0
|
||||
|
||||
# Virtual monitor with pattern matching
|
||||
monitorrule=name:HEADLESS-.*,width:1920,height:1080,refresh:60,x:1926,y:0,scale:1,rr:0,vrr:0
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Monitor Spec Format
|
||||
|
||||
Several commands (`focusmon`, `tagmon`, `disable_monitor`, `enable_monitor`, `toggle_monitor`, `viewcrossmon`, `tagcrossmon`) accept a **monitor_spec** string to identify a monitor.
|
||||
|
||||
**Format:**
|
||||
|
||||
```text
|
||||
name:xxx&&make:xxx&&model:xxx&&serial:xxx
|
||||
```
|
||||
|
||||
- Any field can be omitted and there is no order requirement.
|
||||
- If all fields are omitted, the string is treated as the monitor name directly (e.g., `eDP-1`).
|
||||
- Use `wlr-randr` to find your monitor's name, make, model, and serial.
|
||||
|
||||
**Examples:**
|
||||
|
||||
```bash
|
||||
# By name (shorthand)
|
||||
mmsg -d toggle_monitor,eDP-1
|
||||
|
||||
# By make and model
|
||||
mmsg -d toggle_monitor,make:Chimei Innolux Corporation&&model:0x15F5
|
||||
|
||||
# By serial
|
||||
mmsg -d toggle_monitor,serial:12345678
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Tearing (Game Mode)
|
||||
|
||||
Tearing allows games to bypass the compositor's VSync for lower latency.
|
||||
|
||||
| Setting | Default | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| `allow_tearing` | `0` | Global tearing control: `0` (Disable), `1` (Enable), `2` (Fullscreen only). |
|
||||
|
||||
### Configuration
|
||||
|
||||
**Enable Globally:**
|
||||
|
||||
```ini
|
||||
allow_tearing=1
|
||||
```
|
||||
|
||||
**Enable per Window:**
|
||||
|
||||
Use a window rule to force tearing for specific games.
|
||||
|
||||
```ini
|
||||
windowrule=force_tearing:1,title:vkcube
|
||||
```
|
||||
|
||||
### Tearing Behavior Matrix
|
||||
|
||||
| `force_tearing` \ `allow_tearing` | DISABLED (0) | ENABLED (1) | FULLSCREEN_ONLY (2) |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **UNSPECIFIED** (0) | Not Allowed | Follows tearing_hint | Only fullscreen follows tearing_hint |
|
||||
| **ENABLED** (1) | Not Allowed | Allowed | Only fullscreen allowed |
|
||||
| **DISABLED** (2) | Not Allowed | Not Allowed | Not Allowed |
|
||||
|
||||
### Graphics Card Compatibility
|
||||
|
||||
> **Warning:** Some graphics cards require setting the `WLR_DRM_NO_ATOMIC` environment variable before mango starts to successfully enable tearing.
|
||||
|
||||
Add this to `/etc/environment` and reboot:
|
||||
|
||||
```bash
|
||||
WLR_DRM_NO_ATOMIC=1
|
||||
```
|
||||
|
||||
Or run mango with the environment variable:
|
||||
|
||||
```bash
|
||||
WLR_DRM_NO_ATOMIC=1 mango
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## GPU Compatibility
|
||||
|
||||
If mango cannot display correctly or shows a black screen, try selecting a specific GPU:
|
||||
|
||||
```bash
|
||||
# Use a single GPU
|
||||
WLR_DRM_DEVICES=/dev/dri/card1 mango
|
||||
|
||||
# Use multiple GPUs
|
||||
WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 mango
|
||||
```
|
||||
|
||||
Some GPUs have compatibility issues with `syncobj_enable=1` — it may crash apps like `kitty` that use syncobj. Set `WLR_DRM_NO_ATOMIC=1` in `/etc/environment` and reboot to resolve this.
|
||||
|
||||
---
|
||||
|
||||
## Power Management
|
||||
|
||||
You can control monitor power using the `mmsg` IPC tool.
|
||||
|
||||
```bash
|
||||
# Turn off
|
||||
mmsg -d disable_monitor,eDP-1
|
||||
|
||||
# Turn on
|
||||
mmsg -d enable_monitor,eDP-1
|
||||
|
||||
# Toggle
|
||||
mmsg -d toggle_monitor,eDP-1
|
||||
```
|
||||
|
||||
You can also use `wlr-randr` for monitor management:
|
||||
|
||||
```bash
|
||||
# Turn off monitor
|
||||
wlr-randr --output eDP-1 --off
|
||||
|
||||
# Turn on monitor
|
||||
wlr-randr --output eDP-1 --on
|
||||
|
||||
# Show all monitors
|
||||
wlr-randr
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Screen Scale
|
||||
|
||||
### Without Global Scale (Recommended)
|
||||
|
||||
- If you do not use XWayland apps, you can use monitor rules or `wlr-randr` to set a global monitor scale.
|
||||
- If you are using XWayland apps, it is not recommended to set a global monitor scale.
|
||||
|
||||
You can set scale like this, for example with a 1.4 factor.
|
||||
|
||||
**Dependencies:**
|
||||
|
||||
```bash
|
||||
yay -S xorg-xrdb
|
||||
yay -S xwayland-satellite
|
||||
```
|
||||
|
||||
**In config file:**
|
||||
|
||||
```ini
|
||||
env=QT_AUTO_SCREEN_SCALE_FACTOR,1
|
||||
env=QT_WAYLAND_FORCE_DPI,140
|
||||
```
|
||||
|
||||
**In autostart:**
|
||||
|
||||
```bash
|
||||
echo "Xft.dpi: 140" | xrdb -merge
|
||||
gsettings set org.gnome.desktop.interface text-scaling-factor 1.4
|
||||
```
|
||||
|
||||
**Edit autostart for XWayland:**
|
||||
|
||||
```bash
|
||||
# Start xwayland
|
||||
/usr/sbin/xwayland-satellite :11 &
|
||||
# Apply scale 1.4 for xwayland
|
||||
sleep 0.5s && echo "Xft.dpi: 140" | xrdb -merge
|
||||
```
|
||||
|
||||
### Using xwayland-satellite to Prevent Blurry XWayland Apps
|
||||
|
||||
If you use fractional scaling, you can use `xwayland-satellite` to automatically scale XWayland apps to prevent blurriness, for example with a scale of 1.4.
|
||||
|
||||
**Dependencies:**
|
||||
|
||||
```bash
|
||||
yay -S xwayland-satellite
|
||||
```
|
||||
|
||||
**In config file:**
|
||||
|
||||
```ini
|
||||
env=DISPLAY,:2
|
||||
exec=xwayland-satellite :2
|
||||
monitorrule=name:eDP-1,width:1920,height:1080,refresh:60,x:0,y:0,scale:1.4,vrr:0,rr:0
|
||||
```
|
||||
|
||||
> **Warning:** Use a `DISPLAY` value other than `:1` to avoid conflicting with mangowm.
|
||||
|
||||
---
|
||||
|
||||
## Virtual Monitors
|
||||
|
||||
You can create and manage virtual displays through IPC commands:
|
||||
|
||||
```bash
|
||||
# Create virtual output
|
||||
mmsg -d create_virtual_output
|
||||
|
||||
# Destroy all virtual outputs
|
||||
mmsg -d destroy_all_virtual_output
|
||||
```
|
||||
|
||||
You can configure virtual monitors using `wlr-randr`:
|
||||
|
||||
```bash
|
||||
# Show all monitors
|
||||
wlr-randr
|
||||
|
||||
# Configure virtual monitor
|
||||
wlr-randr --output HEADLESS-1 --pos 1921,0 --scale 1 --custom-mode 1920x1080@60Hz
|
||||
```
|
||||
|
||||
Virtual monitors can be used for screen sharing with tools like [Sunshine](https://github.com/LizardByte/Sunshine) and [Moonlight](https://github.com/moonlight-stream/moonlight-android), allowing other devices to act as extended monitors.
|
||||
76
docs/configuration/xdg-portals.md
Normal file
76
docs/configuration/xdg-portals.md
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
---
|
||||
title: XDG Portals
|
||||
description: Set up screen sharing, clipboard, keyring, and file pickers using XDG portals.
|
||||
---
|
||||
|
||||
## Portal Configuration
|
||||
|
||||
You can customize portal settings via the following paths:
|
||||
|
||||
- **User Configuration (Priority):** `~/.config/xdg-desktop-portal/mango-portals.conf`
|
||||
- **System Fallback:** `/usr/share/xdg-desktop-portal/mango-portals.conf`
|
||||
|
||||
> **Warning:** If you previously added `dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=wlroots` to your config, remove it. Mango now handles this automatically.
|
||||
|
||||
## Screen Sharing
|
||||
|
||||
To enable screen sharing (OBS, Discord, WebRTC), you need `xdg-desktop-portal-wlr`.
|
||||
|
||||
1. **Install Dependencies**
|
||||
|
||||
`pipewire`, `pipewire-pulse`, `xdg-desktop-portal-wlr`
|
||||
|
||||
2. **Optional: Add to autostart**
|
||||
|
||||
In some situations the portal may not start automatically. You can add this to your autostart script to ensure it launches:
|
||||
|
||||
```bash
|
||||
/usr/lib/xdg-desktop-portal-wlr &
|
||||
```
|
||||
|
||||
3. **Restart your computer** to apply changes.
|
||||
|
||||
### Known Issues
|
||||
|
||||
- **Window screen sharing:** Some applications may have issues sharing individual windows. See [#184](https://github.com/mangowm/mango/pull/184) for workarounds.
|
||||
|
||||
- **Screen recording lag:** If you experience stuttering during screen recording, see [xdg-desktop-portal-wlr#351](https://github.com/emersion/xdg-desktop-portal-wlr/issues/351).
|
||||
|
||||
## Clipboard Manager
|
||||
|
||||
Use `cliphist` to manage clipboard history.
|
||||
|
||||
**Dependencies:** `wl-clipboard`, `cliphist`, `wl-clip-persist`
|
||||
|
||||
**Autostart Config:**
|
||||
|
||||
```bash
|
||||
# Keep clipboard content after app closes
|
||||
wl-clip-persist --clipboard regular --reconnect-tries 0 &
|
||||
|
||||
# Watch clipboard and store history
|
||||
wl-paste --type text --watch cliphist store &
|
||||
```
|
||||
|
||||
## GNOME Keyring
|
||||
|
||||
If you need to store passwords or secrets (e.g., for VS Code or Minecraft launchers), install `gnome-keyring`.
|
||||
|
||||
**Configuration:**
|
||||
|
||||
Add the following to `~/.config/xdg-desktop-portal/mango-portals.conf`:
|
||||
|
||||
```ini
|
||||
[preferred]
|
||||
default=gtk
|
||||
org.freedesktop.impl.portal.ScreenCast=wlr
|
||||
org.freedesktop.impl.portal.Screenshot=wlr
|
||||
org.freedesktop.impl.portal.Secret=gnome-keyring
|
||||
org.freedesktop.impl.portal.Inhibit=none
|
||||
```
|
||||
|
||||
## File Picker (File Selector)
|
||||
|
||||
**Dependencies:** `xdg-desktop-portal`, `xdg-desktop-portal-gtk`
|
||||
|
||||
Reboot your computer once to apply.
|
||||
Loading…
Add table
Add a link
Reference in a new issue