FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

plugins/plugins/display-resolution at main · xfetch-cli/plugins · GitHub

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

 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)

Build

cargo build --release --manifest-path plugins/display-resolution/Cargo.toml

Install

xfetch plugin install display-resolution

Configuration

{
  "info_plugins": [
    {
      "plugin": "display-resolution"
    }
  ],
  "modules": [
    "os",
    "kernel",
    "plugin:display-resolution",
    "shell",
    "cpu",
    "memory"
  ]
}

The display-resolution plugin does not require any arguments.

Output

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

How It Works

  1. xfetch sends a JSON request with kind: "info_provider".
  2. On Linux, the plugin tries detection in this order: xrandr → wlr-randr → xdpyinfo.
  3. On macOS, the plugin uses system_profiler SPDisplaysDataType.
  4. On Windows, the plugin uses a PowerShell script with GetDeviceCaps.
  5. The plugin returns a JSON response with the formatted lines.
  6. xfetch displays them under the plugin:display-resolution module key.

Notes

  • 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.

Back | FazBrowse Home | New Git URL