Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

How to call system environment variables in the `waybar` configuration file?

Open pengshp opened this issue 1 year ago • 0 comments

My MPD is started using the socket method, it is listenning ${XDG_RUNTIME_DIR}/mpd/socket In the server field of the mpd module, I want to use the system environment variable$XDG_RUNTIME_DIR, how to write the configuration item?

systemctl --user status mpd.socket
● mpd.socket
     Loaded: loaded (/usr/lib/systemd/user/mpd.socket; enabled; preset: enabled)
     Active: active (listening) since Sat 2024-10-19 05:36:00 CST; 17s ago
 Invocation: 1bda14c942b7457c9d9948fc25830b1a
   Triggers: ● mpd.service
     Listen: /run/user/1003/mpd/socket (Stream)

$XDG_RUNTIME_DIR = /run/user/1003

"mpd": {
        "server": "??????",
}

pengshp avatar Oct 18 '24 22:10 pengshp