mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 16:49:49 +01:00
feat: discord rpc
This commit is contained in:
parent
025bc6eb6e
commit
fbccfa48e4
3 changed files with 51 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
||||||
./dashboard
|
./dashboard
|
||||||
./notifications
|
./notifications
|
||||||
./utility
|
./utility
|
||||||
|
./presence
|
||||||
];
|
];
|
||||||
|
|
||||||
pkgsModule = {config, ...}: {
|
pkgsModule = {config, ...}: {
|
||||||
|
|
5
modules/presence/default.nix
Normal file
5
modules/presence/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
imports = [
|
||||||
|
./discord-nvim.nix
|
||||||
|
];
|
||||||
|
}
|
45
modules/presence/discord-nvim.nix
Normal file
45
modules/presence/discord-nvim.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with builtins; let
|
||||||
|
cfg = config.vim.presence.presence-nvim;
|
||||||
|
in {
|
||||||
|
options.vim.presence.presence-nvim = {
|
||||||
|
enable = mkEnableOption "Enable presence.nvim plugin";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim.startPlugins = ["presence-nvim"];
|
||||||
|
|
||||||
|
vim.luaConfigRC.presence-nvim = nvim.dag.entryAnywhere ''
|
||||||
|
-- Description of each option can be found in https://github.com/andweeb/presence.nvim444
|
||||||
|
require("presence").setup({
|
||||||
|
-- General options
|
||||||
|
auto_update = true,
|
||||||
|
neovim_image_text = "The One True Text Editor",
|
||||||
|
main_image = "neovim",
|
||||||
|
client_id = "793271441293967371",
|
||||||
|
log_level = nil,
|
||||||
|
debounce_timeout = 10,
|
||||||
|
enable_line_number = false,
|
||||||
|
blacklist = {},
|
||||||
|
buttons = true,
|
||||||
|
file_assets = {},
|
||||||
|
show_time = true,
|
||||||
|
|
||||||
|
-- Rich Presence text options
|
||||||
|
editing_text = "Editing %s",
|
||||||
|
file_explorer_text = "Browsing %s",
|
||||||
|
git_commit_text = "Committing changes",
|
||||||
|
plugin_manager_text = "Managing plugins",
|
||||||
|
reading_text = "Reading %s",
|
||||||
|
workspace_text = "Working on %s",
|
||||||
|
line_number_text = "Line %s out of %s",
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue