diff --git a/ratbagd/ratbagd-device.c b/ratbagd/ratbagd-device.c index c33109b5..bf7fb411 100644 --- a/ratbagd/ratbagd-device.c +++ b/ratbagd/ratbagd-device.c @@ -251,7 +251,6 @@ ratbagd_device_get_capabilities(sd_bus *bus, RATBAG_DEVICE_CAP_PROFILE, RATBAG_DEVICE_CAP_PROFILE_SWITCHABLE, RATBAG_DEVICE_CAP_PROFILE_DISABLE, - RATBAG_DEVICE_CAP_PROFILE_DEFAULT, RATBAG_DEVICE_CAP_BUTTON, RATBAG_DEVICE_CAP_BUTTON_KEY, RATBAG_DEVICE_CAP_BUTTON_MACROS, diff --git a/ratbagd/ratbagd-profile.c b/ratbagd/ratbagd-profile.c index 3aa92c81..b3644738 100644 --- a/ratbagd/ratbagd-profile.c +++ b/ratbagd/ratbagd-profile.c @@ -409,6 +409,7 @@ ratbagd_profile_get_capabilities(sd_bus *bus, enum ratbag_profile_capability cap; enum ratbag_profile_capability caps[] = { RATBAG_PROFILE_CAP_WRITABLE_NAME, + RATBAG_PROFILE_CAP_SET_DEFAULT, }; size_t i; diff --git a/src/libratbag-enums.h b/src/libratbag-enums.h index 5c6aed9e..33757980 100644 --- a/src/libratbag-enums.h +++ b/src/libratbag-enums.h @@ -138,13 +138,6 @@ enum ratbag_device_capability { */ RATBAG_DEVICE_CAP_PROFILE_DISABLE, - /** - * The device can have one profile assigned as a default profile. - * A default profile is the profile that is selected when the device - * is plugged in. Devices without this capability may select the - * last-used profile or a specific profile (usually the first). - */ - RATBAG_DEVICE_CAP_PROFILE_DEFAULT, /** * The device provides read and/or write access to one or more @@ -183,6 +176,15 @@ enum ratbag_profile_capability { * and will be committed to it after a commit only. */ RATBAG_PROFILE_CAP_WRITABLE_NAME = 100, + + /** + * This profile can be assigned as the default profile. A default + * profile is the profile that is selected when the device + * is plugged in. Where no profile is assigned as the default + * profile, the device either picks last-used profile or a specific + * profile (usually the first). + */ + RATBAG_PROFILE_CAP_SET_DEFAULT, }; /** diff --git a/tools/ratbagctl.in b/tools/ratbagctl.in index 85981e29..739535c8 100755 --- a/tools/ratbagctl.in +++ b/tools/ratbagctl.in @@ -262,7 +262,6 @@ def print_device(d, level): RatbagdDevice.CAP_PROFILE_SWITCHABLE: "switchable-profile", RatbagdDevice.CAP_BUTTON_KEY: "button-keys", RatbagdDevice.CAP_BUTTON_MACROS: "button-macros", - RatbagdDevice.CAP_PROFILE_DEFAULT: "default-profile", RatbagdDevice.CAP_QUERY_CONFIGURATION: "query-configuration", RatbagdDevice.CAP_PROFILE_DISABLE: "disable-profile", RatbagdDevice.CAP_LED: "led"} diff --git a/tools/ratbagd.py b/tools/ratbagd.py index 67047d41..acea5e28 100644 --- a/tools/ratbagd.py +++ b/tools/ratbagd.py @@ -324,7 +324,6 @@ class RatbagdDevice(_RatbagdDBus): CAP_PROFILE = 200 CAP_PROFILE_SWITCHABLE = 201 CAP_PROFILE_DISABLE = 202 - CAP_PROFILE_DEFAULT = 203 CAP_BUTTON = 300 CAP_BUTTON_KEY = 301 CAP_BUTTON_MACROS = 302 @@ -424,6 +423,7 @@ class RatbagdProfile(_RatbagdDBus): """Represents a ratbagd profile.""" CAP_WRITABLE_NAME = 100 + CAP_SET_DEFAULT = 101 def __init__(self, object_path): _RatbagdDBus.__init__(self, "Profile", object_path)