100% slopcoded --- A KDE Plasma 6 applet (panel icon) to toggle [voxtype](https://voxtype.io) voice typing on and off. ## Prerequisites [voxtype](https://voxtype.io) must be installed and its daemon running. The applet reads state from `/run/user/1000/voxtype/state` and checks for the daemon via `/run/user/1000/voxtype/pid` — the same locations used by the voxtype GNOME extension. ## Installing voxtype on non-NixOS systems *(Untested!)* 1. Install voxtype on your system (e.g. via npm, pip, or your distro's package manager). 2. Start the voxtype daemon so it writes its state and PID to `/run/user/1000/voxtype/`. ## Using this flake ### Import into your flake Add this repo as a flake input in your `flake.nix`: ```nix { inputs = { # ... your other inputs ... voxtype-toggle = { url = "https://git.eversole.co/James/voxtype-toggle-plasmashell.git"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, voxtype-toggle, ... }@inputs: let system = "x86_64-linux"; # ... in { # ... homeConfigurations.myuser = home-manager.lib.homeManagerConfiguration { inherit pkgs; extraSpecialArgs = { inherit voxtype-toggle system; }; modules = [ ./nix/user/home.nix ]; }; }; } ``` ### Using with Home Manager In your home.nix, receive `voxtype-toggle` as an argument and install the applet via `xdg.dataFile`: ```nix { config, pkgs, voxtype-toggle, system, ... }: let voxtypeToggle = voxtype-toggle.packages.${system}.default; plasmoidId = "org.eversole.voxtype-toggle"; in { xdg.dataFile."plasma/plasmoids/${plasmoidId}" = { source = voxtypeToggle; }; } ``` The `xdg.dataFile` entry symlinks the entire package output (which contains `contents/` and `metadata.json`) into the Plasma plasmoids directory under its `KPlugin.Id`. After applying your config, add the widget to your panel by right-clicking → "Add Widgets…" → search for "Voxtype Toggle" and pin it. ## What this does - Shows a panel icon reflecting the current voxtype state. - Click to toggle recording on/off (sends `voxtype record toggle` when the daemon is running). - Polls the state file periodically to update the icon and tooltip. - Icons change by state: idle, recording, transcribing, or not-running.