mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
Xrandr: support for multiple output monitors
This commit is contained in:
@@ -21,7 +21,7 @@ The following libraries are used if present:
|
||||
* [`libpci`](https://github.com/pciutils/pciutils): Needed for GPU output. _Should_ be available on every linux system.
|
||||
* [`libX11`](https://gitlab.freedesktop.org/xorg/lib/libx11): Needed for resolution output
|
||||
* [`libXrandr`](https://gitlab.freedesktop.org/xorg/lib/libxrandr): Needed for appending refresh rate to resolution output.
|
||||
* [`libwayland-client`](https://wayland.freedesktop.org/): Better resolution performance + support for monitors with different refresh rates in wayland sessions.
|
||||
* [`libwayland-client`](https://wayland.freedesktop.org/): Better resolution performance in wayland sessions.
|
||||
* [`libGIO`](https://developer.gnome.org/gio/unstable/): Needed for values that are only stored GSettings.
|
||||
* [`libDConf`](https://developer.gnome.org/dconf/unstable/): Needed for values that are only stored in DConf + Fallback for GSettings.
|
||||
* [`libXFConf`](https://gitlab.xfce.org/xfce/xfconf): Needed for XFWM theme and XFCE Terminal font.
|
||||
|
||||
@@ -258,7 +258,7 @@ static void xrandrHandleMonitorFallback(XrandrData* data, XRRMonitorInfo* monito
|
||||
|
||||
static void xrandrHandleMonitor(XrandrData* data, XRRMonitorInfo* monitorInfo)
|
||||
{
|
||||
bool res = false;
|
||||
bool foundMode = false;
|
||||
|
||||
for(int i = 0; i < monitorInfo->noutput; i++)
|
||||
{
|
||||
@@ -266,15 +266,13 @@ static void xrandrHandleMonitor(XrandrData* data, XRRMonitorInfo* monitorInfo)
|
||||
if(outputInfo == NULL)
|
||||
continue;
|
||||
|
||||
res = xrandrHandleOutputInfo(data, outputInfo);
|
||||
if(xrandrHandleOutputInfo(data, outputInfo))
|
||||
foundMode = true;
|
||||
|
||||
data->ffXRRFreeOutputInfo(outputInfo);
|
||||
|
||||
if(res)
|
||||
break;
|
||||
}
|
||||
|
||||
if(!res)
|
||||
if(!foundMode)
|
||||
xrandrHandleMonitorFallback(data, monitorInfo);
|
||||
}
|
||||
|
||||
@@ -523,7 +521,6 @@ static bool printResolutionWaylandBackend(FFinstance* instance)
|
||||
void ffPrintResolution(FFinstance* instance)
|
||||
{
|
||||
if(
|
||||
ffPrintFromCache(instance, FF_RESOLUTION_MODULE_NAME, &instance->config.resolutionKey, &instance->config.resolutionFormat, FF_RESOLUTION_NUM_FORMAT_ARGS) ||
|
||||
printResolutionWaylandBackend(instance) ||
|
||||
printResolutionXrandrBackend(instance) ||
|
||||
printResolutionX11Backend(instance)
|
||||
|
||||
Reference in New Issue
Block a user