🚀 add script to share expenses
parent
aba421973d
commit
8eebd53841
|
@ -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 New Issue