From 70a6016243f534b880923e9ad850494b46f99020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Wed, 13 Mar 2024 10:47:09 +0100 Subject: [PATCH] 195 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * --- modules/home-manager/sway.nix | 18 ++++++++++++++++-- modules/home-manager/waybar.css | 8 ++++++++ modules/nixos/sway.nix | 1 - 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix index bd7694f..25371c7 100644 --- a/modules/home-manager/sway.nix +++ b/modules/home-manager/sway.nix @@ -215,7 +215,7 @@ height = 26; modules-left = ["sway/workspaces" "sway/mode"]; modules-center = ["sway/window"]; - modules-right = ["mpd" "tray" "sway/language" "clock" "backlight" "battery" "network"]; + modules-right = ["mpd" "tray" "custom/squeekboard" "sway/language" "clock" "backlight" "battery" "network"]; "sway/workspaces" = { disable-scroll = true; @@ -233,7 +233,7 @@ }; "mpd" = { - format = "{stateIcon}{consumeIcon}{randomIcon}{repeatIcon}{singleIcon} {title} ({elapsedTime:%M:%S}/{totalTime:%M%S}) {volume}"; + format = "{stateIcon}{consumeIcon}{randomIcon}{repeatIcon}{singleIcon} {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) {volume}"; format-stopped = "{stateIcon}{randomIcon}{repeatIcon}{singleIcon} Stopped {volume}"; format-disconnected = ""; unkown-tag = "N/A"; @@ -265,6 +265,20 @@ spacing = 10; }; + "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 + ''; + }; + "sway/language" = { format = "{shortDescription}"; tooltip = false; diff --git a/modules/home-manager/waybar.css b/modules/home-manager/waybar.css index 94a9eaa..25fc565 100644 --- a/modules/home-manager/waybar.css +++ b/modules/home-manager/waybar.css @@ -40,6 +40,14 @@ window#waybar { padding-right: 3px; } +#custom-squeekboard { + border-width: 1px; + border-style: none none none solid; + border-color: #444444; + padding-left: 10px; + padding-right: 10px; +} + #language { border-width: 1px; border-style: none none none solid; diff --git a/modules/nixos/sway.nix b/modules/nixos/sway.nix index bdca43b..b7c30a8 100644 --- a/modules/nixos/sway.nix +++ b/modules/nixos/sway.nix @@ -29,7 +29,6 @@ in '' gnome_schema=org.gnome.desktop.interface gsettings set $gnome_schema gtk-theme 'Dracula' - gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true ''; }; in {