updated some settings, removed ghost text from extra nixvim plugins

This commit is contained in:
pagedmov
2024-10-29 22:24:26 -04:00
parent c9855b6f6e
commit e9f7f3b2e9
2 changed files with 29 additions and 1 deletions

View File

@@ -95,7 +95,26 @@ in
"custom/disk-icon" = { "custom/disk-icon" = {
exec = '' exec = ''
df /dev/disk/by-partlabel/disk-main-home | awk '$6 == "/home" {printf "{\"class\": \"disk-icon\", \"tooltip\": \"/home: %.1fGB / %.1fTB\", \"percentage\": \"%.0f\"}\n", $3 / 1024 / 1024, $2 / 1024 / 1024 / 1024, $5}' | jq --unbuffered --compact-output df /dev/disk/by-partlabel/disk-main-home /dev/disk/by-partlabel/disk-main-nix | awk '
function format(size) {
if (size >= 1024) return sprintf("%.1fTB", size / 1024)
else return sprintf("%.1fGB", size)
}
$6 == "/home" {
home_usage = $3 / 1024 / 1024
home_total = $2 / 1024 / 1024
home_percent = $5
sub(/%/,"",home_percent)
}
$6 == "/nix" {
nix_usage = $3 / 1024 / 1024
nix_total = $2 / 1024 / 1024
nix_percent = $5
}
END {
printf "{\"class\": \"disk-icon\", \"tooltip\": \"/home: %s / %s, /nix: %s / %s\", \"percentage\": \"%s\"}\n",
format(home_usage), format(home_total), format(nix_usage), format(nix_total), home_percent
}' | jq --unbuffered --compact-output
''; '';
interval = 60; interval = 60;
return-type = "json"; return-type = "json";

View File

@@ -38,6 +38,15 @@
hash = "sha256-lKSCZ80b/+OV56858FDK7x/zhcuU/AWuCDe+8NdhziU="; hash = "sha256-lKSCZ80b/+OV56858FDK7x/zhcuU/AWuCDe+8NdhziU=";
}; };
}) })
#(pkgs.vimUtils.buildVimPlugin {
#name = "nvim-ghost.nvim";
#src = pkgs.fetchFromGitHub {
#owner = "subnut";
#repo = "nvim-ghost.nvim";
#rev = "67cc8f38c69d271af1c2430ff5099766f3550eb8";
#hash = "sha256-XldDgPqVeIfUjaRLVUMp88eHBHLzoVgOmT3gupPs+ao=";
#};
#})
]; ];
}; };
} }