### Install Mango on Arch Linux Source: https://github.com/mangowm/mango/blob/main/README.md Installs the git version of Mango using yay. ```bash yay -S mangowm-git ``` -------------------------------- ### Install Dependencies for Screen Scaling Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Install necessary packages like 'xorg-xrdb' and 'xwayland-satellite' using AUR helpers such as 'yay' before configuring screen scaling. ```bash yay -S xorg-xrdb yay -S xwayland-satellite ``` -------------------------------- ### Keyboard Settings Example Source: https://github.com/mangowm/mango/blob/main/docs/configuration/input.md Configure keyboard repeat rate, delay, NumLock, and XKB rules for layout and options. ```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 ``` -------------------------------- ### Install mangowm on AerynOS Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Use the 'moss' package manager to install mangowm on AerynOS. The default configuration files will be placed in `/usr/share/defaults/mango`. ```bash sudo moss install mangowm ``` -------------------------------- ### Keyboard Layout Switching Example Source: https://github.com/mangowm/mango/blob/main/docs/configuration/input.md Bind multiple keyboard layouts and set a toggle key combination using XKB options. ```ini xkb_rules_layout=us,de xkb_rules_options=grp:alt_shift_toggle ``` -------------------------------- ### Install Mango WM on PikaOS Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Install Mango WM using the `pikman` package manager on PikaOS. ```bash pikman install mangowm ``` -------------------------------- ### Switching Layouts Keybindings Source: https://github.com/mangowm/mango/blob/main/docs/window-management/layouts.md Example keybindings for cycling through defined layouts or setting a specific layout. ```ini # Cycle through layouts circle_layout=grid,scroller,tile bind=SUPER,n,switch_layout # Set specific layout bind=SUPER,t,setlayout,tile bind=SUPER,s,setlayout,scroller ``` -------------------------------- ### Install Dependencies for Mango Config Source: https://github.com/mangowm/mango/blob/main/README.md Installs necessary dependencies for a custom Mango configuration using yay. ```bash yay -S rofi foot xdg-desktop-portal-wlr swaybg waybar wl-clip-persist cliphist wl-clipboard wlsunset xfce-polkit swaync pamixer wlr-dpms sway-audio-idle-inhibit-git swayidle dimland-git brightnessctl swayosd wlr-randr grim slurp satty swaylock-effects-git wlogout sox ``` -------------------------------- ### Build Mango WM from Source Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Clone, configure, and compile the Mango WM compositor itself after its dependencies (wlroots and scenefx) have been built and installed. ```bash git clone https://github.com/mangowm/mango.git cd mango meson build -Dprefix=/usr sudo ninja -C build install ``` -------------------------------- ### Install mangowm on Guix System Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Install mangowm on Guix System after adding the mango channel and running 'guix pull'. Alternatively, mangowm can be added to the system configuration using the mangowm module. ```bash guix install mangowm ``` -------------------------------- ### Install mangowm on Fedora Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Install the mangowm package from the Terra repository on Fedora. This command requires root privileges. ```bash dnf install mangowm ``` -------------------------------- ### Install mangowm on Gentoo Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Install mangowm on Gentoo after adding and syncing the GURU repository and unmasking the necessary packages. This command requires root privileges. ```bash emerge --ask --verbose gui-wm/mangowm ``` -------------------------------- ### Fullscreen Screenshot Bind Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Captures the entire display and saves it to a timestamped PNG file. No special setup is required beyond having `grim` installed. ```ini bind=NONE,Print,spawn_shell,grim $HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png ``` -------------------------------- ### Master-Stack Layout Configuration Source: https://github.com/mangowm/mango/blob/main/docs/window-management/layouts.md Example configuration for master-stack layouts like 'tile' and 'center_tile'. Control new window behavior, master/stack split, and gaps. ```ini new_is_master=1 smartgaps=0 default_mfact=0.55 default_nmaster=1 ``` -------------------------------- ### Build wlroots from Source Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Clone, configure, and install the wlroots library, a dependency for building Mango WM from source. Ensure you use the version specified in the README. ```bash git clone -b 0.19.3 https://gitlab.freedesktop.org/wlroots/wlroots.git cd wlroots meson build -Dprefix=/usr sudo ninja -C build install ``` -------------------------------- ### Build scenefx from Source Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Clone, configure, and install the scenefx library, which handles visual effects for Mango WM. Ensure you use the version specified in the README. ```bash git clone -b 0.4.1 https://github.com/wlrfx/scenefx.git cd scenefx meson build -Dprefix=/usr sudo ninja -C build install ``` -------------------------------- ### Get Monitor Details Source: https://github.com/mangowm/mango/blob/main/docs/ipc.md Retrieve detailed JSON information for a specific monitor. Ensure the MANGO_INSTANCE_SIGNATURE environment variable is set. ```bash mmsg get monitor eDP-1 ``` -------------------------------- ### Get All Monitors Source: https://github.com/mangowm/mango/blob/main/docs/ipc.md Retrieve a JSON array of all connected monitors. Ensure the MANGO_INSTANCE_SIGNATURE environment variable is set. ```bash mmsg get all-monitors ``` -------------------------------- ### Add GURU repository and sync for Gentoo Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Enable and synchronize the community-maintained GURU repository on Gentoo. This is the first step to installing packages from GURU, including mangowm. ```bash emerge --ask --verbose eselect-repository eselect repository enable guru emerge --sync guru ``` -------------------------------- ### Dwindle Layout Configuration Source: https://github.com/mangowm/mango/blob/main/docs/window-management/layouts.md Example configuration for the Dwindle layout. Customize split ratios, split axis selection, and resize behavior. ```ini dwindle_split_ratio=0.5 dwindle_smart_split=0 dwindle_hsplit=0 dwindle_vsplit=0 dwindle_preserve_split=0 dwindle_smart_resize=0 dwindle_drop_simple_split=1 ``` -------------------------------- ### Get All Clients Source: https://github.com/mangowm/mango/blob/main/docs/ipc.md Retrieve a JSON array containing details of all active clients. Ensure the MANGO_INSTANCE_SIGNATURE environment variable is set. ```bash mmsg get all-clients ``` -------------------------------- ### Pointer Screenshot Bind Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Captures the full screen, including the cursor, and saves it to a timestamped PNG file. Requires `grim` to be installed. ```ini bind=ALT,Print,spawn_shell,grim -c $HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png ``` -------------------------------- ### Annotate Screenshot Bind Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Captures the screen, saves it to a file, and then opens `satty` for annotation. The annotated image overwrites the original file. Ensure `grim` and `satty` are installed. ```ini bind=SUPER,Print,spawn_shell,f=$HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png && grim "$f" && satty --filename "$f" --output-filename "$f" --actions-on-enter save-to-file --early-exit ``` -------------------------------- ### Scroller Layout Configuration Source: https://github.com/mangowm/mango/blob/main/docs/window-management/layouts.md Example configuration for the Scroller layout. Adjust parameters like struct width, default proportion, and focus behavior. ```ini scroller_structs=20 scroller_default_proportion=0.9 scroller_focus_center=0 scroller_prefer_center=0 scroller_prefer_overspread=1 edge_scroller_pointer_focus=1 edge_scroller_focus_allow_speed=0.0 scroller_default_proportion_single=1.0 scroller_proportion_preset=0.5,0.8,1.0 ``` -------------------------------- ### Add mango channel for Guix System Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Configure Guix System to use the mango channel by adding the channel definition to `$HOME/.config/guix/channels.scm`. This allows Guix to find and install mangowm. ```scheme (cons (channel (name 'mangowm) (url "https://github.com/mangowm/mango.git") (branch "main")) %default-channels) ``` -------------------------------- ### Top Prefixes for Configuration Attributes Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Specifies a list of prefixes for attributes that should appear at the top of the configuration file. Attributes starting with these prefixes will be sorted to the beginning of the file. ```nix [ ] ``` ```nix [ "source" ] ``` -------------------------------- ### Clipboard Screenshot Bind Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Captures the screen, copies it to the clipboard using `wl-copy`, and does not save a file. A temporary file is used and then removed. Ensure `grim` and `wl-copy` are installed. ```ini bind=CTRL,Print,spawn_shell,f=$(mktemp -t screenshot-XXXXXX.png) && grim "$f" && wl-copy < "$f" && rm -f "$f" ``` -------------------------------- ### Add Terra Repository for Fedora Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Add the third-party Terra repository to your Fedora system. This command requires root privileges and is a prerequisite for installing mangowm from this repository. ```bash dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release ``` -------------------------------- ### Window Capture Script Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Captures the currently focused window using `mmsg` and `grim`. This script requires `jq` for parsing `mmsg` output. Ensure `mmsg`, `jq`, and `grim` are installed. ```bash #!/usr/bin/env bash geometry=$(mmsg get focusing-client | jq -r '"\(.x),\(.y) \(.width)x\(.height)"') ``` ```bash [ -z "$geometry" ] && exit 1 ``` ```bash grim -g "$geometry" "$HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png" ``` -------------------------------- ### Style Waybar Tags Module Source: https://github.com/mangowm/mango/blob/main/docs/visuals/status-bar.md CSS for styling the `#tags` module in Waybar. This example styles occupied and focused tags differently, and hides unoccupied tags. ```css #tags { background-color: transparent; } #tags button { background-color: #fff; color: #a585cd; } #tags button:not(.occupied):not(.focused) { font-size: 0; min-width: 0; min-height: 0; margin: -17px; padding: 0; color: transparent; background-color: transparent; } #tags button.occupied { background-color: #fff; color: #cdc885; } #tags button.focused { background-color: rgb(186, 142, 213); color: #fff; } #tags button.urgent { background: rgb(171, 101, 101); color: #fff; } ``` -------------------------------- ### All-in-One Screenshot Script Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md This script handles multiple screenshot modes: fullscreen, region selection, window capture, freezing the screen for a delayed capture, and interactive annotation. It uses tools like `slurp`, `grim`, `mmsg`, and `wayfreeze`. Ensure these dependencies are installed. ```bash #!/usr/bin/env bash set -euo pipefail mkdir -p "$HOME/Pictures/Screenshots" filepath="$HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png" case "${1:-fullscreen}" in region) g=$(slurp -d); [ -z "$g" ] && exit 1 grim -g "$g" "$filepath" ;; window) g=$(mmsg get focusing-client | jq -r '"\(.x),\(.y) \(.width)x\(.height)"') [ -z "$g" ] && exit 1 grim -g "$g" "$filepath" ;; freeze) p=$(mktemp -u).fifo; mkfifo "$p" wayfreeze --after-freeze-timeout 100 --after-freeze-cmd "echo > $p" & wp=$! read -r < "$p"; grim "$filepath" kill "$wp" 2>/dev/null; rm -f "$p" ;; freeze-region) p=$(mktemp -u).fifo; mkfifo "$p" wayfreeze --after-freeze-timeout 100 --after-freeze-cmd "echo > $p" & wp=$! read -r < "$p"; g=$(slurp -d) if [ -z "$g" ]; then kill "$wp" 2>/dev/null; rm -f "$p"; exit 1; fi grim -g "$g" "$filepath" kill "$wp" 2>/dev/null; rm -f "$p" ;; annotate) grim "$filepath"; satty --filename "$filepath" --output-filename "$filepath" --actions-on-enter save-to-file --early-exit ;; *) grim "$filepath" ;; esac ``` -------------------------------- ### Extra Systemd Commands for D-Bus Activation Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Specifies additional commands to be executed after D-Bus activation. This is useful for tasks like resetting failed services or starting the MangoWM session target. ```nix [ "systemctl --user reset-failed" "systemctl --user start mango-session.target" ] ``` -------------------------------- ### Configure greetd for Mango WM Autologin Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Set up greetd to automatically log in a user into the Mango WM session on system startup. ```nix services.greetd = { enable = true; settings = { initial_session = { command = "mango"; user = "your-username"; # auto-login on first start, no password required }; default_session = { command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd mango"; user = "greeter"; }; }; }; ``` -------------------------------- ### Home Manager Mango Autostart Script Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md A shell script to run on mango startup. This script will be saved to `~/.config/mango/autostart.sh` and executed automatically. ```nix '' waybar & dunst & '' ``` -------------------------------- ### Configure getty for Mango WM Autologin (Bash/Zsh) Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Set up getty to automatically log in a user directly into the Mango WM on TTY1 without a login screen. ```nix services.getty.autologinUser = "your-username"; environment.loginShellInit = '' [ "$(tty)" = /dev/tty1 ] && exec mango ''; ``` -------------------------------- ### Apply Screen Scale via Autostart Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Configure autostart scripts to set the Xft DPI and GNOME text scaling factor for the current session. This affects application rendering and text size. ```bash echo "Xft.dpi: 140" | xrdb -merge gsettings set org.gnome.desktop.interface text-scaling-factor 1.4 ``` -------------------------------- ### Enable Home Manager Mango Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Set to `true` to enable mangowm via Home Manager. ```nix false ``` -------------------------------- ### Configure getty for Mango WM Autologin (Fish Shell) Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Set up getty for the Fish shell to automatically log in a user directly into the Mango WM on TTY1 without a login screen. ```nix services.getty.autologinUser = "your-username"; programs.fish.loginShellInit = '' if test (tty) = /dev/tty1 exec mango end ''; ``` -------------------------------- ### Enable MangoWM Session on Startup Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Controls whether the `mango-session.target` is enabled on MangoWM startup. This option links to `graphical-session.target` and imports specific environment variables. ```nix true ``` ```nix false ``` -------------------------------- ### Autostart Clipboard Manager Source: https://github.com/mangowm/mango/blob/main/docs/configuration/xdg-portals.md Configure clipboard persistence and history storage. `wl-clip-persist` keeps clipboard content after applications close, while `cliphist store` watches and saves history. ```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 & ``` -------------------------------- ### Home Manager Mango Extra Configuration Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Add custom configuration lines directly to `~/.config/mango/config.conf`. Useful for unsupported options or advanced settings. ```nix '' # Advanced config that doesn't fit structured format special_option = 1 '' ``` -------------------------------- ### Enable NixOS Mango Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Set to `true` to enable mango on NixOS. ```nix true ``` -------------------------------- ### Import Mango WM NixOS Module Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Include the Mango WM NixOS module in your system configuration. This can be done either in configuration.nix or directly within a flake's outputs. ```nix # configuration.nix (or any other file that you import) { imports = [ inputs.mangowm.nixosModules.mango # .. other imports ... ]; # ... } ``` ```nix # flake.nix { # ... outputs = { self, nixpkgs, mangowm, ...}@inputs: let inherit (nixpkgs) lib; # ... in { nixosConfigurations.YourHostName = lib.nixosSystem { modules = [ mangowm.nixosModules.mango # or inputs.mangowm.nixosModules.mango # other imports ... ]; }; } } ``` -------------------------------- ### Configure Screenshot Keybinds Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Add these lines to your `config.conf` file to bind different screenshot actions to specific key combinations. Ensure the script path is correct. ```ini bind=NONE,Print,spawn,$HOME/.config/mango/scripts/screenshot/screenshot.sh fullscreen bind=SHIFT,Print,spawn,$HOME/.config/mango/scripts/screenshot/screenshot.sh region bind=CTRL+SHIFT,Print,spawn,$HOME/.config/mango/scripts/screenshot/screenshot.sh window bind=CTRL+SUPER,Print,spawn,$HOME/.config/mango/scripts/screenshot/screenshot.sh freeze bind=SHIFT+SUPER,Print,spawn,$HOME/.config/mango/scripts/screenshot/screenshot.sh freeze-region bind=SUPER,Print,spawn,$HOME/.config/mango/scripts/screenshot/screenshot.sh annotate ``` -------------------------------- ### Region Screenshot Bind Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Allows interactive selection of a region using `slurp` before capturing. The screenshot is saved to a timestamped PNG file. Ensure `slurp` and `grim` are installed. ```ini bind=SHIFT,Print,spawn_shell,g=$(slurp -d) && [ -n "$g" ] && grim -g "$g" $HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png ``` -------------------------------- ### Standard Scratchpad Keybindings Source: https://github.com/mangowm/mango/blob/main/docs/window-management/scratchpad.md Configure keybindings to send the current window to the scratchpad, toggle its visibility, or restore it. ```ini bind=SUPER,i,minimized ``` ```ini bind=ALT,z,toggle_scratchpad ``` ```ini bind=SUPER+SHIFT,i,restore_minimized ``` -------------------------------- ### Configure XWayland Scaling with xwayland-satellite Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Use 'xwayland-satellite' in your autostart configuration to manage scaling for XWayland applications, preventing blurriness. Ensure a unique DISPLAY value is used. ```bash # Start xwayland /usr/sbin/xwayland-satellite :11 & # Apply scale 1.4 for xwayland sleep 0.5s && echo "Xft.dpi: 140" | xrdb -merge ``` -------------------------------- ### Freeze Screen Capture Script Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Freezes the screen for a short duration using `wayfreeze` before capturing. It uses a named pipe for synchronization and cleans up resources afterward. Ensure `wayfreeze` and `grim` are installed. ```bash #!/usr/bin/env bash pipe=$(mktemp -u).fifo mkfifo "$pipe" wayfreeze --after-freeze-timeout 100 --after-freeze-cmd "echo > $pipe" & wayfreeze_pid=$! read -r < "$pipe" grim "$HOME/Pictures/Screenshots/$(date +%Y%m%d%H%M%S).png" kill "$wayfreeze_pid" 2>/dev/null rm -f "$pipe" ``` -------------------------------- ### Select Multiple GPUs for Mango Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Launches Mango using multiple GPUs, specified by their DRM device paths. This allows for configurations involving multiple graphics cards. ```bash WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 mango ``` -------------------------------- ### Enable XDG Autostart with Systemd Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Determines whether applications using `systemd-xdg-autostart-generator(8)` are enabled for autostart. This option controls the integration with systemd's autostart mechanism. ```nix false ``` ```nix true ``` -------------------------------- ### Configure Mango Settings with Nix Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Configure mangowm's behavior using a structured Nix format. Nested attributes are flattened with underscores. Keymodes are supported via the `keymode` attribute. ```nix { # Window effects blur = 1; blur_optimized = 1; blur_params = { radius = 5; num_passes = 2; }; border_radius = 6; focused_opacity = 1.0; # Animations - use underscores for multi-part keys animations = 1; animation_type_open = "slide"; animation_type_close = "slide"; animation_duration_open = 400; animation_duration_close = 800; # Or use nested attrs (will be flattened with underscores) animation_curve = { open = "0.46,1.0,0.29,1"; close = "0.08,0.92,0,1"; }; # Use lists for duplicate keys like bind and tagrule bind = [ "SUPER,r,reload_config" "Alt,space,spawn,rofi -show drun" "Alt,Return,spawn,foot" "ALT,R,setkeymode,resize" # Enter resize mode ]; tagrule = [ "id:1,layout_name:tile" "id:2,layout_name:scroller" ]; # Keymodes (submaps) for modal keybindings keymode = { resize = { bind = [ "NONE,Left,resizewin,-10,0" "NONE,Escape,setkeymode,default" ]; }; }; } ``` -------------------------------- ### Watch All Monitors Source: https://github.com/mangowm/mango/blob/main/docs/ipc.md Subscribe to real-time updates for all connected monitors. New JSON objects will be pushed when monitor states change. Ensure the MANGO_INSTANCE_SIGNATURE environment variable is set. ```bash mmsg watch all-monitors ``` -------------------------------- ### Configure Display Manager for Mango WM Autologin Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Configure a display manager (like SDDM or GDM) to automatically log in a user into the Mango WM session. ```nix services.displayManager = { defaultSession = "mango"; # derived from mango.desktop filename autoLogin = { enable = true; user = "your-username"; }; }; ``` -------------------------------- ### Run Mango with WLR_DRM_NO_ATOMIC Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Launches the Mango compositor with the WLR_DRM_NO_ATOMIC environment variable set. This is an alternative to system-wide configuration for enabling tearing on compatible hardware. ```bash WLR_DRM_NO_ATOMIC=1 mango ``` -------------------------------- ### Configure Fcitx5 IME Source: https://github.com/mangowm/mango/blob/main/docs/configuration/input.md Set environment variables to integrate Fcitx5 as the Input Method Editor. These settings require a window manager restart to apply. ```ini env=GTK_IM_MODULE,fcitx env=QT_IM_MODULE,fcitx env=QT_IM_MODULES,wayland;fcitx env=SDL_IM_MODULE,fcitx env=XMODIFIERS,@im=fcitx env=GLFW_IM_MODULE,ibus ``` -------------------------------- ### Set Window Size and Position Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Applies specific width, height, and matches the rule to windows by application ID and title. ```ini windowrule=width:1000,height:900,appid:yesplaymusic,title:Demons ``` -------------------------------- ### Define Keyboard Layouts Source: https://github.com/mangowm/mango/blob/main/docs/configuration/input.md Configure US QWERTY and US Dvorak layouts with a toggle option. This sets the base layouts and a toggle for switching between them. ```shell xkb_rules_layout=us,us xkb_rules_variant=,dvorak xkb_rules_options=grp:lalt_lshift_toggle ``` -------------------------------- ### Global Keybindings for OBS Studio Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Assigns global keybindings to OBS Studio windows and sets them to open silently. ```ini windowrule=globalkeybinding:ctrl+alt-o,appid:com.obsproject.Studio ``` ```ini windowrule=globalkeybinding:ctrl+alt-n,appid:com.obsproject.Studio ``` ```ini windowrule=isopensilent:1,appid:com.obsproject.Studio ``` -------------------------------- ### Clone Mango Configuration Source: https://github.com/mangowm/mango/blob/main/README.md Clones a custom Mango configuration into the user's config directory. ```bash git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango ``` -------------------------------- ### Configure Monitor Rules with xwayland-satellite Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Define monitor rules within the MangoWM configuration file to apply specific scaling factors and other properties to individual monitors, especially when using fractional scaling with XWayland. ```ini env=DISPLAY,:2 exec-once=xwayland-satellite :2 monitorrule=name:eDP-1,width:1920,height:1080,refresh:60,x:0,y:0,scale:1.4,vrr:0,rr:0 ``` -------------------------------- ### Select Specific GPU for Mango Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Launches Mango using a specific GPU, identified by its DRM device path. This is useful for systems with multiple GPUs to control which one is used. ```bash WLR_DRM_DEVICES=/dev/dri/card1 mango ``` -------------------------------- ### Create Screenshot Directory Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Ensures the directory for saving screenshots exists. Use this before capturing if the directory might not be present. ```bash mkdir -p ~/Pictures/Screenshots ``` -------------------------------- ### Create Virtual Monitors with mmsg Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Utilize the 'mmsg dispatch' command to create new virtual display outputs or to remove all existing virtual outputs. ```bash mmsg dispatch create_virtual_output ``` ```bash mmsg dispatch destroy_all_virtual_output ``` -------------------------------- ### Basic Tag Rule Configuration Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Sets the layout name and master client count for a specific tag ID. ```ini tagrule=id:5,layout_name:tile,nmaster:2,mfact:0.6 ``` -------------------------------- ### Unmanaged Global Window Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Opens a window as an unmanaged global window, suitable for desktop pets or camera feeds. ```ini windowrule=isunglobal:1,appid:cheese ``` -------------------------------- ### Home Manager Mango Bottom Prefixes Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md A list of attribute prefixes that should be sorted to the end of the configuration file. Useful for organizing attributes. ```nix [ "source" ] ``` -------------------------------- ### Watch All Tags Source: https://github.com/mangowm/mango/blob/main/docs/ipc.md Subscribe to real-time updates for all tags across monitors. New JSON objects will be pushed when tag states change. Ensure the MANGO_INSTANCE_SIGNATURE environment variable is set. ```bash mmsg watch all-tags ``` -------------------------------- ### Basic Key Binding Source: https://github.com/mangowm/mango/blob/main/docs/bindings/keys.md Binds the 'Q' key with the Super modifier to the 'killclient' command. ```ini bind=SUPER,Q,killclient ``` -------------------------------- ### Add mangowm to Guix System configuration Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Include mangowm in your Guix System configuration by using the mangowm module and adding 'mangowm-git' to your packages list. This snippet shows how to integrate it with other packages and the base system configuration. ```scheme (use-modules (mangowm)) (packages (cons* mangowm-git ... ;; Other packages %base-packages)) ``` -------------------------------- ### Basic Window Rule Format Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Defines the general format for setting window rules. Rules can combine multiple parameters and match based on appid and title. ```ini windowrule=Parameter:Values,title:Values windowrule=Parameter:Values,Parameter:Values,appid:Values,title:Values ``` -------------------------------- ### Create Scripts Directory Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Creates the directory structure for storing custom screenshot scripts. This is a prerequisite for using script-based binds. ```bash mkdir -p ~/.config/mango/scripts/screenshot ``` -------------------------------- ### Virtual Monitor Rule with Pattern Matching Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Configures a virtual or headless monitor using pattern matching on its name. Useful for remote displays or virtual environments. ```ini monitorrule=name:HEADLESS-.*,width:1920,height:1080,refresh:60,x:1926,y:0,scale:1,rr:0,vrr:0 ``` -------------------------------- ### Dispatch Command to Current Client Source: https://github.com/mangowm/mango/blob/main/docs/ipc.md Send a command to alter the compositor's state, targeting the currently focused client. Ensure the MANGO_INSTANCE_SIGNATURE environment variable is set. ```bash mmsg dispatch exchange_client,left ``` -------------------------------- ### Configure Global Screen Scale in MangoWM Config Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Set environment variables in your MangoWM configuration file to influence application scaling behavior, particularly for Qt applications. ```ini env=QT_AUTO_SCREEN_SCALE_FACTOR,1 env=QT_WAYLAND_FORCE_DPI,140 ``` -------------------------------- ### Configure IBus IME Source: https://github.com/mangowm/mango/blob/main/docs/configuration/input.md Set environment variables to integrate IBus as the Input Method Editor. These settings require a window manager restart to apply. ```ini env=GTK_IM_MODULE,ibus env=QT_IM_MODULE,ibus env=XMODIFIERS,@im=ibus ``` -------------------------------- ### 4-Finger Gesture Bindings for Workspace Navigation Source: https://github.com/mangowm/mango/blob/main/docs/bindings/mouse-gestures.md Configure 4-finger touchpad gestures for navigating between workspaces or toggling the overview mode. Gestures require proper touchpad configuration. ```ini gesturebind=none,left,4,viewtoleft_have_client gesturebind=none,right,4,viewtoright_have_client gesturebind=none,up,4,toggleoverview gesturebind=none,down,4,toggleoverview ``` -------------------------------- ### 3-Finger Gesture Bindings for Window Focus Source: https://github.com/mangowm/mango/blob/main/docs/bindings/mouse-gestures.md Configure 3-finger touchpad gestures for directional window focus. Gestures require proper touchpad configuration. ```ini gesturebind=none,left,3,focusdir,left gesturebind=none,right,3,focusdir,right gesturebind=none,up,3,focusdir,up gesturebind=none,down,3,focusdir,down ``` -------------------------------- ### Make Scripts Executable Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Sets execute permissions for all custom screenshot scripts in the specified directory. This is a necessary step before they can be invoked by mangowm. ```bash chmod +x ~/.config/mango/scripts/screenshot/*.sh ``` -------------------------------- ### Monitor Rule by Make and Model Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Matches a monitor based on its manufacturer and model, useful when monitor names are inconsistent. Ensures correct configuration for specific hardware. ```ini monitorrule=make:Chimei Innolux Corporation,model:0x15F5,width:1920,height:1080,refresh:60,x:0,y:0 ``` -------------------------------- ### Layer Rule: Multiple Animations and Effects for Launcher Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Applies a slide open animation and fade close animation, while disabling blur for the 'wofi' launcher layer. ```ini layerrule=animation_type_open:slide,animation_type_close:fade,noblur:1,layer_name:wofi ``` -------------------------------- ### Enable Mango WM Module Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Enable the Mango WM module within your NixOS configuration to activate its features. ```nix # configuration.nix (or any other file that you import) { programs.mango.enable = true; } ``` -------------------------------- ### Default Mode Binding Source: https://github.com/mangowm/mango/blob/main/docs/bindings/keys.md Defines a binding in the 'default' key mode to spawn the 'foot' terminal emulator with the 'Alt' and 'Return' keys. ```ini keymode=default bind=ALT,Return,spawn,foot ``` -------------------------------- ### Add Nix Flake Input for Mango WM Source: https://github.com/mangowm/mango/blob/main/docs/installation.md Integrate the Mango WM flake into your NixOS configuration by adding it as an input. ```nix # flake.nix { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; mangowm = { url = "github:mangowm/mango"; inputs.nixpkgs.follows = "nixpkgs"; }; # other inputs ... }; } ``` -------------------------------- ### Custom Opacity for Applications Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Sets different opacity levels for focused and unfocused application windows. ```ini windowrule=focused_opacity:0.8,appid:firefox ``` ```ini windowrule=unfocused_opacity:0.6,appid:foot ``` -------------------------------- ### Bind Brightness Control Source: https://github.com/mangowm/mango/blob/main/docs/bindings/keys.md Binds keys to control screen brightness using the brightnessctl utility. Includes incremental and full-brightness adjustments. ```ini bind=NONE,XF86MonBrightnessUp,spawn,brightnessctl s +2% bind=SHIFT,XF86MonBrightnessUp,spawn,brightnessctl s 100% bind=NONE,XF86MonBrightnessDown,spawn,brightnessctl s 2%- bind=SHIFT,XF86MonBrightnessDown,spawn,brightnessctl s 1% ``` -------------------------------- ### Bind Media Playback Controls Source: https://github.com/mangowm/mango/blob/main/docs/bindings/keys.md Binds keys to control media playback (next, previous, play/pause) using the playerctl utility. ```ini bind=NONE,XF86AudioNext,spawn,playerctl next bind=NONE,XF86AudioPrev,spawn,playerctl previous bind=NONE,XF86AudioPlay,spawn,playerctl play-pause ``` -------------------------------- ### Configure Virtual Monitors with wlr-randr Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Use 'wlr-randr' to configure the properties of virtual monitors, such as their position, scale, and resolution. This is useful for screen sharing applications. ```bash wlr-randr --output HEADLESS-1 --pos 1921,0 --scale 1 --custom-mode 1920x1080@60Hz ``` -------------------------------- ### Dispatch Command to Specific Client Source: https://github.com/mangowm/mango/blob/main/docs/ipc.md Send a command to alter the compositor's state, targeting a specific client by its ID. Ensure the MANGO_INSTANCE_SIGNATURE environment variable is set. ```bash mmsg dispatch exchange_client,left client,375 ``` -------------------------------- ### Named Scratchpad Toggle Keybindings Source: https://github.com/mangowm/mango/blob/main/docs/window-management/scratchpad.md Bind keys to toggle named scratchpads, specifying the match criteria (appid or title) and the command to launch the application. ```ini bind=alt,h,toggle_named_scratchpad,st-yazi,none,st -c st-yazi -e yazi ``` ```ini bind=alt,k,toggle_named_scratchpad,none,kitty-scratch,kitty -T kitty-scratch ``` -------------------------------- ### Control Monitor Power with wlr-randr Source: https://github.com/mangowm/mango/blob/main/docs/configuration/monitors.md Manage monitor power states using 'wlr-randr'. This tool allows for turning monitors on, off, or displaying all connected monitors. ```bash wlr-randr --output eDP-1 --off ``` ```bash wlr-randr --output eDP-1 --on ``` ```bash wlr-randr ``` -------------------------------- ### Single Modifier Key Release Binding Source: https://github.com/mangowm/mango/blob/main/docs/bindings/keys.md Binds the 'Super_L' key to spawn 'rofi -show run' when the Super key is released. ```ini bindr=Super,Super_L,spawn,rofi -show run ``` -------------------------------- ### Style Waybar Workspaces Module Source: https://github.com/mangowm/mango/blob/main/docs/visuals/status-bar.md CSS for styling the `#workspaces` module in Waybar. This includes borders, margins, padding, and background for the workspace buttons. ```css #workspaces { border-radius: 4px; border-width: 2px; border-style: solid; border-color: #c9b890; margin-left: 4px; padding-left: 10px; padding-right: 6px; background: rgba(40, 40, 40, 0.76); } #workspaces button { border: none; background: none; box-shadow: inherit; text-shadow: inherit; color: #ddca9e; padding: 1px; padding-left: 1px; padding-right: 1px; margin-right: 2px; margin-left: 2px; } #workspaces button.hidden { color: #9e906f; background-color: transparent; } #workspaces button.visible { color: #ddca9e; } #workspaces button:hover { color: #d79921; } #workspaces button.active { background-color: #ddca9e; color: #282828; margin-top: 5px; margin-bottom: 5px; padding-top: 1px; padding-bottom: 0px; border-radius: 3px; } #workspaces button.urgent { background-color: #ef5e5e; color: #282828; margin-top: 5px; margin-bottom: 5px; padding-top: 1px; padding-bottom: 0px; border-radius: 3px; } ``` -------------------------------- ### Single Modifier Key Press Binding Source: https://github.com/mangowm/mango/blob/main/docs/bindings/keys.md Binds the 'Super_L' key to spawn 'rofi -show run' when the Super key is pressed. ```ini bind=none,Super_L,spawn,rofi -show run ``` -------------------------------- ### Cursor Theme and Size Configuration Source: https://github.com/mangowm/mango/blob/main/docs/visuals/theming.md Set the size of the cursor in pixels and specify the cursor theme to be used. This affects the appearance of the mouse pointer. ```INI cursor_size=24 cursor_theme=Adwaita ``` -------------------------------- ### Named Scratchpad Window Rules Source: https://github.com/mangowm/mango/blob/main/docs/window-management/scratchpad.md Define window rules to identify applications for named scratchpads, matching by appid or title. Ensure the application supports setting these attributes. ```ini windowrule=isnamedscratchpad:1,width:1280,height:800,appid:st-yazi ``` ```ini windowrule=isnamedscratchpad:1,width:1000,height:700,title:kitty-scratch ``` -------------------------------- ### Window Capture Bind Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md Binds a key to execute the window capture script. This allows capturing the focused window without needing to manually select it. ```ini bind=CTRL+SHIFT,Print,spawn,$HOME/.config/mango/scripts/screenshot/window.sh ``` -------------------------------- ### Named Scratchpad for File Manager Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Configures a file manager to open as a named scratchpad with specified dimensions. ```ini windowrule=isnamedscratchpad:1,width:1280,height:800,appid:st-yazi ``` -------------------------------- ### Send Window to Specific Tag and Monitor Source: https://github.com/mangowm/mango/blob/main/docs/window-management/rules.md Assigns a window to a specific tag number and monitor by name. ```ini windowrule=tags:9,monitor:HDMI-A-1,appid:discord ``` -------------------------------- ### Style Waybar Window Module Source: https://github.com/mangowm/mango/blob/main/docs/visuals/status-bar.md CSS for styling the `#window` module in Waybar, which displays the current window title and layout. ```css #window { background-color: rgb(237, 196, 147); color: rgb(63, 37, 5); } ``` -------------------------------- ### Make Screenshot Script Executable Source: https://github.com/mangowm/mango/blob/main/docs/screenshot.md This command grants execute permissions to the screenshot script, allowing it to be run from the terminal or via keybinds. ```bash chmod +x ~/.config/mango/scripts/screenshot/screenshot.sh ``` -------------------------------- ### Specify NixOS Mango Package Source: https://github.com/mangowm/mango/blob/main/docs/nix-options.md Define the specific mango package to be used on NixOS. Defaults to `mango-nightly`. ```nix ``` -------------------------------- ### Bind Volume Control Source: https://github.com/mangowm/mango/blob/main/docs/bindings/keys.md Binds keys to control audio volume and mute status using wpctl for the default sink and source. ```ini bind=NONE,XF86AudioRaiseVolume,spawn,wpctl set-volume @DEFAULT_SINK@ 5%+ bind=NONE,XF86AudioLowerVolume,spawn,wpctl set-volume @DEFAULT_SINK@ 5%- bind=NONE,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_SINK@ toggle bind=SHIFT,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_SOURCE@ toggle ```