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,
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; [
waybar # status bar
swaylock # screen locking
@ -266,17 +297,11 @@
};
"custom/squeekboard" = let
schema = "org.gnome.desktop.a11y.applications";
key = "screen-keyboard-enabled";
in {
format = "󰌌";
on-click = ''
if ["$(gsettings get ${schema} ${key})" == "'true'"]; then
gsettings set ${schema} ${key} false
else
gsettings set ${schema} ${key} true
fi
'';
format = "{}";
exec = "${squeekboard_format}/bin/squeekboard_format";
exec-on-event = true;
on-click = "${squeekboard_toggle}/bin/toggle_squeekboard";
};
"sway/language" = {