🚀 add script to share expenses
This commit is contained in:
parent
aba421973d
commit
8eebd53841
1 changed files with 14 additions and 1 deletions
|
@ -27,7 +27,20 @@ in
|
|||
reg = "ledger reg -R -V --tail 15";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ ledger ];
|
||||
home.packages = with pkgs; let
|
||||
reg-copy = writeShellApplication {
|
||||
name = "reg-copy";
|
||||
|
||||
runtimeInputs = [ ledger xclip ];
|
||||
|
||||
text = ''
|
||||
table="$(printf '%-10s %-30s %8s %8s\n' Datum Beschreibung Einzeln Gesamt && ledger reg -V --format '%10D %.30P %8t %8T\n' "$@")"
|
||||
echo "$table"
|
||||
echo "$table" | xclip -selection clipboard
|
||||
'';
|
||||
};
|
||||
in
|
||||
[ ledger reg-copy ];
|
||||
xdg.configFile = {
|
||||
"fish/completions/ledger.fish" = {
|
||||
text = builtins.readFile ./ledger.fish;
|
||||
|
|
Loading…
Reference in a new issue