sane-input-handler: remove keyboard launch fallback

it'll never work, because of sandboxing
This commit is contained in:
Colin 2024-03-08 01:18:39 +00:00
parent 3cf651b212
commit 24a211bd3d
3 changed files with 5 additions and 5 deletions

View File

@ -88,7 +88,7 @@ in
pname = "sane-input-handler";
srcRoot = ./.;
pkgs = {
inherit (pkgs) coreutils killall playerctl procps sane-open-desktop util-linux wireplumber wvkbd;
inherit (pkgs) coreutils killall playerctl procps sane-open-desktop util-linux wireplumber;
sway = config.sane.programs.sway.package.sway-unwrapped;
};
};

View File

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils -p killall -p playerctl -p procps -p sane-open-desktop -p sway -p util-linux -p wireplumber -p wvkbd
#!nix-shell -i bash -p coreutils -p killall -p playerctl -p procps -p sane-open-desktop -p sway -p util-linux -p wireplumber
# input map considerations
# - using compound actions causes delays.
@ -85,9 +85,7 @@ allOff() {
toggleKeyboard() {
local kbpid=$(pidof "$KEYBOARD")
if [ -z "$kbpid" ] || ! ( env kill -s RTMIN+0 "$kbpid" ); then
echo "sane-input-handler: failed to toggle keyboard; launching manually: $KEYBOARD"
# manually launch the keyboard, as a fallback
"$KEYBOARD" &
echo "sane-input-handler: failed to toggle keyboard: $KEYBOARD"
fi
}

View File

@ -14,6 +14,8 @@ in
sandbox.method = "bwrap";
sandbox.whitelistWayland = true;
env.KEYBOARD = "wvkbd-mobintl";
services.wvkbd = {
description = "wvkbd: wayland virtual keyboard";
after = [ "graphical-session.target" ];