Skip to main content
MangoWCMangoWC
Configuration

Basic Configuration

Learn how to configure MangoWC files, environment variables, and autostart scripts.

Configuration File

MangoWC uses a simple configuration file format. By default, it looks for a configuration file in ~/.config/mango/.

Locate Default Config

A fallback configuration is provided at /etc/mango/config.conf. You can use this as a reference.

Create User Config

Copy the default config to your local config directory to start customizing.

mkdir -p ~/.config/mango
cp /etc/mango/config.conf ~/.config/mango/config.conf

Launch with Custom Config (Optional)

If you prefer to keep your config elsewhere, you can launch MangoWC with the -c flag.

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.

config.conf
# Import keybindings from a separate file
source=~/.config/mango/bind.conf

# Relative paths work too
source=./theme.conf

Environment Variables

You can define environment variables directly within your config file. These are set before the window manager fully initializes.

Environment variables defined here will be reset every time you reload the configuration.

env=GTK_THEME,Adwaita:dark
env=XCURSOR_SIZE,24

Autostart

MangoWC can automatically run commands or scripts upon startup. There are two modes for execution:

CommandBehaviorUsage Case
exec-onceRuns only once when MangoWC starts.Status bars, Wallpapers, Notification daemons
execRuns every time the config is reloaded.Scripts that need to refresh settings

Example Setup

config.conf
# 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

On this page