Display Resolution Plugin
Displays monitor resolution and refresh rate in xfetch.
| Kind |
info_provider |
| Binary |
xfetch-plugin-display-resolution |
| Dependencies |
xrandr (X11), wlr-randr (Wayland), xdpyinfo (X11 fallback) |
cargo build --release --manifest-path plugins/display-resolution/Cargo.toml
xfetch plugin install display-resolution
{
"info_plugins": [
{
"plugin": "display-resolution"
}
],
"modules": [
"os",
"kernel",
"plugin:display-resolution",
"shell",
"cpu",
"memory"
]
}
The display-resolution plugin does not require any arguments.
| Platform |
Example Output |
| Single monitor (X11) |
DP-1: 1920x1080 @ 144.00* (primary) |
| Multiple monitors |
eDP-1: 1920x1080 @ 60.00* (primary) HDMI-1: 3840x2160 @ 30.00 |
| macOS |
Display: 2560 x 1600 |
| Not detected |
Display: unknown |
- xfetch sends a JSON request with kind: "info_provider".
- On Linux, the plugin tries detection in this order: xrandr → wlr-randr → xdpyinfo.
- On macOS, the plugin uses system_profiler SPDisplaysDataType.
- On Windows, the plugin uses a PowerShell script with GetDeviceCaps.
- The plugin returns a JSON response with the formatted lines.
- xfetch displays them under the plugin:display-resolution module key.
- On Linux, requires at least one display utility (xrandr, wlr-randr, or xdpyinfo).
- On Windows, requires PowerShell.
- On macOS, requires system_profiler (included by default).
- Multiple monitors are listed with indentation.