diff options
Diffstat (limited to 'src-qt5/core-utils')
-rw-r--r-- | src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp | 10 | ||||
-rw-r--r-- | src-qt5/core-utils/lumina-xconfig/ScreenSettings.h | 4 | ||||
-rw-r--r-- | src-qt5/core-utils/lumina-xconfig/lumina-xconfig.1 | 11 | ||||
-rw-r--r-- | src-qt5/core-utils/lumina-xconfig/main.cpp | 4 |
4 files changed, 25 insertions, 4 deletions
diff --git a/src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp b/src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp index a9d40554..a8f94680 100644 --- a/src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp +++ b/src-qt5/core-utils/lumina-xconfig/ScreenSettings.cpp @@ -21,6 +21,16 @@ void RRSettings::ApplyPrevious(){ RRSettings::Apply(screens); } +void RRSettings::MirrorAll(){ + QList<ScreenInfo> screens; + //Now find the highest resolution supported by all connected monitors + + //Setup one monitor with that resolution, and mirror the rest of them + + //Now reset the display with xrandr + RRSettings::Apply(screens); +} + //Read the current screen config from xrandr QList<ScreenInfo> RRSettings::CurrentScreens(){ QList<ScreenInfo> SCREENS; diff --git a/src-qt5/core-utils/lumina-xconfig/ScreenSettings.h b/src-qt5/core-utils/lumina-xconfig/ScreenSettings.h index ab480a97..4f042cb8 100644 --- a/src-qt5/core-utils/lumina-xconfig/ScreenSettings.h +++ b/src-qt5/core-utils/lumina-xconfig/ScreenSettings.h @@ -38,7 +38,9 @@ class ScreenInfo{ class RRSettings{ public: //Reset current screen config to match previously-saved settings - static void ApplyPrevious(); //generally performed on startup of the desktop + static void ApplyPrevious(); + //Setup all the connected monitors as a single mirror + static void MirrorAll(); //Read the current screen config from xrandr static QList<ScreenInfo> CurrentScreens(); //reads xrandr information diff --git a/src-qt5/core-utils/lumina-xconfig/lumina-xconfig.1 b/src-qt5/core-utils/lumina-xconfig/lumina-xconfig.1 index 980211b1..a37d0395 100644 --- a/src-qt5/core-utils/lumina-xconfig/lumina-xconfig.1 +++ b/src-qt5/core-utils/lumina-xconfig/lumina-xconfig.1 @@ -1,6 +1,6 @@ .Dd November 6, 2017 .Dt LUMINA-XCONFIG 1 -.Os 1.3.3 +.Os 1.4.2 .Sh NAME .Nm lumina-xconfig @@ -10,6 +10,7 @@ configurations. .Sh SYNOPSIS .Nm .Op Fl -reset-monitors +.Op Fl -mirror-monitors .Sh DESCRIPTION .Nm @@ -21,11 +22,14 @@ It is also easy to select the resolution and rotation from a drop down box for each screen. The Add Screen tab provides an option to enable a connected monitor that is not in use. + .Nm -has one option: +Options: .Bl -tag -width indent .It Ic --reset-monitors -Resets the configuration to default. +Reset the monitor configuration to defaults in config file +.It Ic --mirror-monitors +Setup all connected monitors as a single display output .El .Sh DEPENDENCIES @@ -37,6 +41,7 @@ A single extra runtime dependency is required: .Sh FILES .Bl -tag -width indent .It Pa /usr/local/bin/lumina-xconfig +.It Pa {XDG_CONFIG_HOME}/lumina-desktop/lumina-xconfig.conf .El .Sh SEE ALSO diff --git a/src-qt5/core-utils/lumina-xconfig/main.cpp b/src-qt5/core-utils/lumina-xconfig/main.cpp index a39a9f5d..64c70cfc 100644 --- a/src-qt5/core-utils/lumina-xconfig/main.cpp +++ b/src-qt5/core-utils/lumina-xconfig/main.cpp @@ -18,6 +18,10 @@ int main(int argc, char ** argv) RRSettings::ApplyPrevious(); CLIdone = true; break; + }else if(QString(argv[i]) == "--mirror-monitors"){ + RRSettings::MirrorAll(); + CLIdone = true; + break; } } if(CLIdone){ return 0; } |