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 {