l: hledger -> bank

This commit is contained in:
lassulus 2017-12-18 18:53:15 +01:00
parent 2500fb454b
commit 676c76dd8e
2 changed files with 12 additions and 1 deletions

View File

@ -66,12 +66,12 @@ in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
acpi acpi
bank
dic dic
dmenu dmenu
gi gi
git-preview git-preview
gitAndTools.qgit gitAndTools.qgit
haskellPackages.hledger
lm_sensors lm_sensors
mpv-poll mpv-poll
much much

View File

@ -21,6 +21,17 @@
xmonad-lass = import ./xmonad-lass.nix { inherit config pkgs; }; xmonad-lass = import ./xmonad-lass.nix { inherit config pkgs; };
yt-next = pkgs.callPackage ./yt-next/default.nix {}; yt-next = pkgs.callPackage ./yt-next/default.nix {};
bank = pkgs.writeDashBin "bank" ''
tmp=$(mktemp)
${pkgs.pass}/bin/pass show hledger > $tmp
${pkgs.hledger}/bin/hledger --file=$tmp "$@"
${pkgs.pass}/bin/pass show hledger | if ${pkgs.diffutils}/bin/diff $tmp -; then
exit 0
else
${pkgs.coreutils}/bin/cat $tmp | ${pkgs.pass}/bin/pass insert -m hledger
fi
${pkgs.coreutils}/bin/rm $tmp
'';
screengrab = pkgs.writeDashBin "screengrab" '' screengrab = pkgs.writeDashBin "screengrab" ''
resolution="$(${pkgs.xorg.xrandr}/bin/xrandr | ${pkgs.gnugrep}/bin/grep '*' | ${pkgs.gawk}/bin/awk '{print $1}')" resolution="$(${pkgs.xorg.xrandr}/bin/xrandr | ${pkgs.gnugrep}/bin/grep '*' | ${pkgs.gawk}/bin/awk '{print $1}')"
${pkgs.ffmpeg}/bin/ffmpeg -f x11grab -r 25 -i :${toString config.services.xserver.display} -s $resolution -c:v huffyuv $1 ${pkgs.ffmpeg}/bin/ffmpeg -f x11grab -r 25 -i :${toString config.services.xserver.display} -s $resolution -c:v huffyuv $1