scriptlib

This commit is contained in:
Jana Dönszelmann 2025-08-25 14:04:31 +02:00
parent ddb92ea0c5
commit 816c61985d
No known key found for this signature in database
5 changed files with 67 additions and 19 deletions

View file

@ -12,7 +12,7 @@ let
"cp-ser" = cp-media "ser" "shows";
"cp-ani" = cp-media "ani" "anime";
"dumpasm" = "${pkgs.custom.dumpasm}/bin/dumpasm";
"p" = calc;
"p" = builtins.trace calc calc;
"s" = "systemctl";
"j" = "journalctl";
"ju" = "journalctl -u";

View file

@ -1,22 +1,11 @@
{ pkgs, ... }:
{
calc = "${pkgs.python313}/bin/python -i ${pkgs.writeText "init.py" ''
from math import *;
# import numpy as np
kilo = 1000
mega = 1000 * kilo
giga = 1000 * mega
tera = 1000 * giga
peta = 1000 * tera
b = 1
kib = 1024
mib = 1024 * kib
gib = 1024 * mib
tib = 1024 * gib
pib = 1024 * tib
import sys
sys.path.append("${../../scriptlib}")
sys.path.append("${pkgs.python313Packages.numpy}/lib/python3.13/site-packages/")
from scriptlib import *
''} ";
cp-media =
name: media:

View file

@ -33,7 +33,6 @@
# diff-editor = "${pkgs.meld}/bin/meld";
};
# core.fsmonitor = "${pkgs.watchman}/bin/watchman";
core.fsmonitor = "watchman";
core.watchman.register-snapshot-trigger = true;
@ -60,7 +59,7 @@
"--from"
"closest_bookmark(@-)"
"--to"
"@-"
"@"
];
catchup = [
"rebase"
@ -70,6 +69,15 @@
"tronk()"
"--skip-emptied"
];
move = [
"rebase"
"-r"
];
mdiff = [
"diff"
"--from"
"tronk()"
];
};
templates = {
@ -119,7 +127,7 @@
git = {
push-bookmark-prefix = "jdonszelmann/";
private-commits = "description(glob:'wip:*')";
private-commits = "description(glob:'wip:*') | description(glob:'trial:*')";
write-change-id-header = true;
fetch = [