mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
feat: alternate proxy switch mode "add" (#702)
* feat: alternate proxy switch mode "add" * docs: add proxy switch add to docs * chore: change default alias to proxy switch new from proxy switch on
This commit is contained in:
parent
e44d813b73
commit
6043d31b08
11 changed files with 76 additions and 19 deletions
|
|
@ -24,7 +24,7 @@ public class SystemConfig
|
|||
public bool HidDisplaySplit { get; }
|
||||
public bool HidDisplayCaps { get; }
|
||||
public HidPadFormat HidListPadding { get; }
|
||||
public bool ProxySwitch { get; }
|
||||
public ProxySwitchAction ProxySwitch { get; }
|
||||
public string NameFormat { get; }
|
||||
|
||||
public enum HidPadFormat
|
||||
|
|
@ -33,6 +33,12 @@ public class SystemConfig
|
|||
Left = 1,
|
||||
Right = 2,
|
||||
}
|
||||
public enum ProxySwitchAction
|
||||
{
|
||||
Off = 0,
|
||||
New = 1,
|
||||
Add = 2,
|
||||
}
|
||||
}
|
||||
|
||||
public static class SystemConfigExt
|
||||
|
|
@ -54,7 +60,7 @@ public static class SystemConfigExt
|
|||
o.Add("hid_display_split", cfg.HidDisplaySplit);
|
||||
o.Add("hid_display_caps", cfg.HidDisplayCaps);
|
||||
o.Add("hid_list_padding", cfg.HidListPadding.ToUserString());
|
||||
o.Add("proxy_switch", cfg.ProxySwitch);
|
||||
o.Add("proxy_switch", cfg.ProxySwitch.ToUserString());
|
||||
o.Add("name_format", cfg.NameFormat);
|
||||
|
||||
o.Add("description_templates", JArray.FromObject(cfg.DescriptionTemplates));
|
||||
|
|
@ -67,4 +73,7 @@ public static class SystemConfigExt
|
|||
if (val == SystemConfig.HidPadFormat.None) return "off";
|
||||
return val.ToString().ToLower();
|
||||
}
|
||||
|
||||
public static string ToUserString(this SystemConfig.ProxySwitchAction val) => val.ToString().ToLower();
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue