196 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 *

This commit is contained in:
Max Känner 2024-03-13 10:59:13 +01:00
parent 70a6016243
commit c2e17a4481

View File

@ -3,7 +3,38 @@
pkgs, pkgs,
lib, lib,
... ...
}: { }: let
schema = "org.gnome.desktop.a11y.applications";
key = "screen-keyboard-enabled";
squeekboard_toggle = pkgs.writeTextFile {
name = "squeekboard_toggle";
destination = "/bin/toggle_squeekboard";
executable = true;
text = ''
#!${pkgs.dash}/bin/dash
if ["$(gsettings get ${schema} ${key})" == "'true'"]; then
gsettings set ${schema} ${key} false
else
gsettings set ${schema} ${key} true
fi
'';
};
squeekboard_format = pkgs.writeTextFile {
name = "squeekboard_format";
destination = "/bin/queekboard_format";
executable = true;
text = ''
#!${pkgs.dash}/bin/dash
if ["$(gsettings get ${schema} ${key})" == "'true'"]; then
echo 󰌌
echo enabled
else
echo 󰌐
echo disabled
fi
'';
};
in {
home.packages = with pkgs; [ home.packages = with pkgs; [
waybar # status bar waybar # status bar
swaylock # screen locking swaylock # screen locking
@ -266,17 +297,11 @@
}; };
"custom/squeekboard" = let "custom/squeekboard" = let
schema = "org.gnome.desktop.a11y.applications";
key = "screen-keyboard-enabled";
in { in {
format = "󰌌"; format = "{}";
on-click = '' exec = "${squeekboard_format}/bin/squeekboard_format";
if ["$(gsettings get ${schema} ${key})" == "'true'"]; then exec-on-event = true;
gsettings set ${schema} ${key} false on-click = "${squeekboard_toggle}/bin/toggle_squeekboard";
else
gsettings set ${schema} ${key} true
fi
'';
}; };
"sway/language" = { "sway/language" = {