# Konsole
Profile controllable via DBus's session bus!
Service: org.kde.konsole-${process id}
Method: /Sessions/:id/org.kde.konsole.Session/setProfile
Args: [profileName (QString)]
```
method call time=1602561138.387779 sender=:1.173 -> destination=org.kde.konsole-13511 serial=182 path=/Sessions/1; interface=org.kde.konsole.Session; member=setProfile
   string "zipper"
method return time=1602561138.418847 sender=:1.114 -> destination=:1.173 serial=827 reply_serial=182
```
in bash:
```bash
# list all konsole destinations
$ dbus-send --print-reply --session --dest=org.freedesktop.DBus --type=method_call /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep '^org.kde.konsole-'
# find active sessions
$ dbus-send --print-reply --session --dest=org.kde.konsole-13511 --type=method_call /Sessions org.freedesktop.DBus.Introspectable.Introspect
# switch profile in a session
$ dbus-send --session --dest=org.kde.konsole-13511 --type=method_call /Sessions/1 org.kde.konsole.Session.setProfile string:'Profile 1'
```
default profile stored in ~/.config/konsolerc
```toml
[Desktop Entry]
DefaultProfile=Profile 1.profile
[Favorite Profiles]
Favorites=
[KonsoleWindow]
ShowWindowTitleOnTitleBar=true
[MainWindow]
Height 1080=982
State=AAAA/wAAAAD9AAAAAAAAA8AAAAPRAAAABAAAAAQAAAAIAAAACPwAAAAA
ToolBarsMovable=Disabled
Width 1920=960
```
Unfortunately we can't link against KConfig (which is what Konsole and everything else in KDE Frameworks uses to manage those ${app}rc files), so we'll have to either:
* Parse that rc file like it's INI
* Parse that rc file like it's TOML
* Shell out to kwriteconfig5 <--- probably the best
# Gnome Terminal
* on-click handler for profile switching in context menu: https://gitlab.gnome.org/GNOME/gnome-terminal/-/blob/36dafa7b2eca439158863614cadb9e1e7df233a9/src/terminal-window.c#L1434-1452
* `g_simple_action_set_state` defined by gio project: https://developer.gnome.org/gio/stable/GSimpleAction.html#g-simple-action-set-state
* use gio crate? https://crates.io/crates/gio
    * gio::SimpleAction maps pretty nicely, but how do I get a window handle to call the equivalent of `lookup_action`?
args in d-feet at least: {"profile", GLib.Variant('s', "b1dcc9dd-5262-4d8d-a863-c897e6d979b9"), {}}
in bash:
```
list windows:
$ dbus-send --print-reply --session --dest=org.gnome.Terminal --type=method_call /org/gnome/Terminal/window org.freedesktop.DBus.Introspectable.Introspect
$ dbus-send --print-reply --session --dest=org.gnome.Terminal --type=method_call /org/gnome/Terminal/window/:id org.gtk.Actions.SetState {"profile", GLib.Variant('s', ":id"), {}}
```
# KDE Plasma
Doesn't look like there's any option beyond shelling out to `lookandfeeltool --apply` with a theme from `lookandfeeltool --list`, but that's fine
# VSCode
rewrite ~/.config/Code/User/settings.json
# Atom (via flatpak)
rewrite ~/.var/app/io.atom.Atom/data/config.cson
# GENERAL
Do I need to make the settings file configurable per-platform?  Probably.