@@ -21,8 +21,8 @@ few more options.
2121 This will connect to an OpenRGB SDK server at :code: `192.168.1.111:8000 ` with
2222the name :code: `My client! `.
2323
24- Getting Devices
25- ---------------
24+ Selecting Devices
25+ -----------------
2626On initialization, the :any: `OpenRGBClient ` will create :any: `Device ` objects
2727for all of your OpenRGB Devices. You can list these out by :code: `print `-ing
2828:code: `cli.devices `. Devices can be accessed through their index in this list,
@@ -120,3 +120,35 @@ resize it at some point.
120120.. code-block :: python
121121
122122 mobo.zones[0 ].resize(35 )
123+
124+ Using Profiles
125+ --------------
126+ Once you have set your RGB exactly how you like it, you probably want to save
127+ the state into a profile. With OpenRGB-Python, this is pretty simple. This
128+ function will save the current state of you lights to a profile.
129+
130+ .. code-block :: python
131+
132+ cli.save_profile(' perfection' )
133+
134+ This will save a profile called perfection.orp in OpenRGB's config directory by
135+ default, so you can load the profile directly from OpenRGB's profile list.
136+
137+ Loading profiles in OpenRGB-Python is equally as simple as saving them. This
138+ function will set your lights to the same as they were when they were saved.
139+ It can load profiles saved from OpenRGB itself, or OpenRGB-Python.
140+
141+ .. code-block :: python
142+
143+ cli.load_profile(' perfection' )
144+
145+ .. warning ::
146+
147+ I only know where OpenRGB's config directory is on linux and I haven't
148+ tested saving profiles on windows. The default directory that
149+ OpenRGB-Python saves profiles is :code: `~/.config/OpenRGB `. If you know
150+ where OpenRGB's config directory is on windows and how to reliably find it
151+ from python, please submit a pr or come talk to me on OpenRGB's discord
152+ server. In the mean time, you will probably have to manually specify the
153+ directory where you want to save or load a profile from using the
154+ :code: `directory ` argument.
0 commit comments