From 8f378429801162d690dc68c0f15b483c1d291838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Wed, 19 Jun 2024 22:57:55 +0900 Subject: =?UTF-8?q?=E3=81=A1=E3=82=93=E3=81=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resolution.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/resolution.c b/src/resolution.c index 17a6ac3..1d9fde3 100644 --- a/src/resolution.c +++ b/src/resolution.c @@ -1,4 +1,4 @@ -#include "gpu.h" +#include "resolution.h" #include #include @@ -44,5 +44,6 @@ const char *display_resolution() { return run_res_command("xrandr --nograb --current | " "awk -F 'connected |\\\\+|\\\\(' '/ " "connected.*[0-9]+x[0-9]+\\+/ && $2 {printf $2 " - "\", \"}' | sed 's/primary //' | sed 's/,//'"); + "\", \"}' | sed 's/primary //' | " + "sed 's/,\\([^,]*\\)$/\\1/'"); } -- cgit v1.2.3