If software doesn't exist, you can create multiple text config files (whichever are needed for the different settings), then swap those in using a script. While I don't do it for video settings, I do for /etc/hosts contents.
I have 2 (or more) files that get copied into the main file when needed, then the subsystem that needs that config file gets restarted or sent a -HUP signal (that tells most daemon processes to re-read config files).
An overly simple script:
Code:
#!/bin/bash
FILE1="/etc/hosts.lan"
FILE2="/etc/hosts.travel"
TARGET="/etc/hosts"
# The files are in /etc/, so normal userids cannot change/cp/mv/rm them
if [ $(id -u) -ne 0 ] ; then
echo ERROR: Must run with sudo/root.
exit 5
fi
# look for "lan" as the first parameter
if [ "$1" == "lan" ] ; then
echo cp $FILE1 $TARGET
else # anything except lan gets file2
echo cp $FILE2 $TARGET
fi
To use it,
Code:
$ sudo ~/bin/myscript lan
cp /etc/hosts.lan /etc/hosts
$ sudo ~/bin/myscript w
cp /etc/hosts.travel /etc/hosts
You can get fancy and use getopts (built-in bash) and support lots of options just like all the other command-line tools. You could have the script look at the current file, and toggle the other file without too much trouble. Just diff on one of them and if they match, it then copy the other file in. If the test file didn't match, copy it into the main file location. Then create a .desktop file and hook that into your menu. Not hard at all, in under 512 bytes. That's efficient compared to any fancy GUI tool.
Bash has a menu system built-in too, so if you don't want to force a command line option, but have a menu to choose options from, that's possible. Look up the select built-in function.
So, if you connect different xorg files and xrandr commands, there is very little that cannot be accomplished. Of course, this doesn't work for Wayland. I haven't any clue about Wayland, except that it isn't X11 and doesn't use the normal X config files.
Bookmarks