mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 04:04:16 +02:00
Options regrouped: session.*, keyboard.*, launcherMenu.hiddenApps
- runtimeDir, userBus, outerBusEnv, userServices.*, portalFix.enable
-> session.{runtimeDir, bus, busEnv, services.*, portalFix.enable}
- keyboardLayout/keyboardVariant -> keyboard.layout/variant;
steamKeyboardPatch.enable -> keyboard.vr.extraKeys.enable
- hiddenApps -> launcherMenu.hiddenApps
- launcherMenu.launchDebounce -> launchDebounceSeconds (also the patch's
option key; launcher-menu-launch VERSION 3)
- "Steam UI patch" in option descriptions
Old names keep working with a rename warning (outerBusEnv is read-only:
reading it warns).
This commit is contained in:
1 parent
36fcb207bd
commit
a0c3e0846f
8 files changed
+124
-63
No files matched your search
@@ -4,10 +4,15 @@
|
||||
# (next session start).
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.steamFrame;
|
||||
cfg = config.steamFrame.keyboard;
|
||||
in {
|
||||
options.steamFrame = {
|
||||
keyboardLayout = lib.mkOption {
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule [ "steamFrame" "keyboardLayout" ] [ "steamFrame" "keyboard" "layout" ])
|
||||
(lib.mkRenamedOptionModule [ "steamFrame" "keyboardVariant" ] [ "steamFrame" "keyboard" "variant" ])
|
||||
];
|
||||
|
||||
options.steamFrame.keyboard = {
|
||||
layout = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "de";
|
||||
@@ -15,7 +20,7 @@ in {
|
||||
XKB layout for the Steam session (XKB_DEFAULT_LAYOUT); null = US.
|
||||
'';
|
||||
};
|
||||
keyboardVariant = lib.mkOption {
|
||||
variant = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "nodeadkeys";
|
||||
@@ -23,12 +28,12 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.keyboardLayout != null || cfg.keyboardVariant != null) {
|
||||
config = lib.mkIf (cfg.layout != null || cfg.variant != null) {
|
||||
xdg.configFile."systemd/user/gamescope-session.service.d/keyboard.conf".text =
|
||||
"[Service]\n"
|
||||
+ lib.optionalString (cfg.keyboardLayout != null)
|
||||
"Environment=XKB_DEFAULT_LAYOUT=${cfg.keyboardLayout}\n"
|
||||
+ lib.optionalString (cfg.keyboardVariant != null)
|
||||
"Environment=XKB_DEFAULT_VARIANT=${cfg.keyboardVariant}\n";
|
||||
+ lib.optionalString (cfg.layout != null)
|
||||
"Environment=XKB_DEFAULT_LAYOUT=${cfg.layout}\n"
|
||||
+ lib.optionalString (cfg.variant != null)
|
||||
"Environment=XKB_DEFAULT_VARIANT=${cfg.variant}\n";
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user