Skip to content

Luxed/aw-watcher-nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

aw-watcher-nvim

Dependencies

  • curl
  • git (Optional, only if aw_branch is true)

Configuration

Even though this is a Neovim only version, its configuration is still fully backwards compatible with the vim version.

Variable Name Description Default Value
g:aw_autostart Autostart the watcher true
g:aw_autocommands Create the watcher's required autocommands true
g:aw_user_commands Create user commands true
g:aw_apiurl_host Sets the host of the Api Url 127.0.0.1
g:aw_apiurl_port Sets the port of the Api Url 5600
g:aw_api_timeout Sets the timeout seconds of the Api request 2
g:aw_hostname Overrides the hostname hostname()
g:aw_branch Send the current git branch in the payload false

Statusline example

aw statusline enabled aw statusline disabled

local aw_section = {
  function()
    return require('aw_watcher').is_connected() and '' or ''
  end,
  cond = function()
    local has_aw, _ = pcall(require, 'aw_watcher')
    return has_aw
  end
}

To make this "section" work, see the lualine documentation here.
To have the same configuration as in the pictures, do the following:

require('lualine').setup({
  sections = {
    lualine_x = {
      'encoding',
      'fileformat',
      'filetype',
      aw_section,
    }
  },
})

You will also need a nerd-font patched font.

About

Neovim watcher for ActivityWatch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages