gamemode: "Pause" fcitx while gaming
This commit is contained in:
parent
111b999b0a
commit
d5262b0a7f
@ -29,17 +29,14 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
custom = let
|
custom = let
|
||||||
razerBrightnessStartScript = pkgs.writeShellScriptBin "razer-brightness-start.sh" ''
|
switchScript = groupName: pkgs.writeShellScript "switch-input-group.sh" ''
|
||||||
${pkgs.razer-cli}/bin/razer-cli -d "Razer BlackWidow Ultimate 2013" -b 1
|
${pkgs.dbus}/bin/dbus-send --print-reply --dest=org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.SwitchInputMethodGroup string:'${groupName}'
|
||||||
${pkgs.razer-cli}/bin/razer-cli -d "Razer Tartarus V2" -b 50
|
|
||||||
'';
|
|
||||||
razerBrightnessStopScript = pkgs.writeShellScriptBin "razer-brightness-stop.sh" ''
|
|
||||||
${pkgs.razer-cli}/bin/razer-cli -d "Razer BlackWidow Ultimate 2013" -b 0
|
|
||||||
${pkgs.razer-cli}/bin/razer-cli -d "Razer Tartarus V2" -b 0
|
|
||||||
'';
|
'';
|
||||||
|
pauseFcitx = switchScript "Group 2";
|
||||||
|
resumeFcitx = switchScript "Group 1";
|
||||||
in {
|
in {
|
||||||
start = ''${razerBrightnessStartScript}/bin/razer-brightness-start.sh'';
|
start = ''${pauseFcitx}'';
|
||||||
end = ''${razerBrightnessStopScript}/bin/razer-brightness-stop.sh'';
|
end = ''${resumeFcitx}'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user