major waybar refactor

fix notmuch issue

add which-key-nvim
This commit is contained in:
Gabriel Fontes
2022-01-11 02:00:37 -03:00
parent 0175bfa8b2
commit c580972273
5 changed files with 94 additions and 63 deletions
-1
View File
@@ -5,7 +5,6 @@
rgbdaemon = pkgs.callPackage ./rgbdaemon { };
sistemer-bot = pkgs.callPackage ./sistemer-bot { };
unread-mail = pkgs.callPackage ./unread-mail { };
preferredplayer = pkgs.callPackage ./preferredplayer { };
zenity-askpass = pkgs.callPackage ./zenity-askpass { };
-31
View File
@@ -1,31 +0,0 @@
{ lib, stdenv, writeShellScriptBin, jq, xmlstarlet }:
with lib;
stdenv.mkDerivation {
name = "unread-mail";
version = "1.0";
src = writeShellScriptBin "unread-mail" ''
count=$(find ~/Mail/*/INBOX/new -type f | wc -l)
if [ "$count" == "0" ]; then
subjects="No new mail"
icon="read"
else
subjects=$(grep -h "Subject: " -r ~/Mail/*/INBOX/new | cut -d ':' -f2- | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | ${xmlstarlet}/bin/xml esc | sed -e 's/^/\-/')
icon="unread"
fi
${jq}/bin/jq -cn --arg tooltip "$subjects" --arg text "$count" --arg alt "$icon" '{tooltip: $tooltip, text: $text, alt: $alt}'
'';
dontBuild = true;
dontConfigure = true;
installPhase =
"install -Dm 0755 $src/bin/unread-mail $out/bin/unread-mail";
meta = {
description = "A script for getting unread email";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ misterio77 ];
};
}