nix-community.nixvim/plugins/by-name/aw-watcher/default.nix
osbm a41559f093
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
treewide: add plugin descriptions
2025-06-24 06:10:11 +00:00

54 lines
1.5 KiB
Nix

{ lib, ... }:
let
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.plugins.mkNeovimPlugin {
name = "aw-watcher";
moduleName = "aw_watcher";
packPathName = "aw-watcher.nvim";
package = "aw-watcher-nvim";
description = "A neovim watcher for ActivityWatch time tracker.";
maintainers = [ lib.maintainers.axka ];
settingsOptions = {
bucket = {
hostname = defaultNullOpts.mkStr { __raw = "vim.uv.os_gethostname()"; } ''
The hostname to be presented to the ActivityWatch server.
Defaults to the hostname of the computer.
'';
name = defaultNullOpts.mkStr { __raw = "'aw-watcher-neovim_' .. bucket.hostname'"; } ''
The name of the bucket in the ActivityWatch server.
'';
};
aw_server = {
host = defaultNullOpts.mkStr "127.0.0.1" ''
Host to connect to.
'';
port = defaultNullOpts.mkUnsignedInt 5600 ''
Port to connect to.
'';
ssl_enable = defaultNullOpts.mkBool false ''
Whether the ActivityWatch server should be connected to using HTTPS.
'';
pulsetime = defaultNullOpts.mkUnsignedInt 30 ''
The maximum amount of time (in seconds) between two consecutive events
(heartbeats) with the same data (e.g. same file path) that will cause
them to be merged into a single event. This is useful for saving on
storage space and disk I/O.
'';
};
};
settingsExample = {
aw_server = {
host = "127.0.0.1";
port = 5600;
pulsetime = 60;
};
};
}