diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-08-27 16:33:00 +0200 |
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-08-27 16:33:03 +0200 |
| commit | 836ffd451db92c47d3200f0a4f4e7ab0234d67f7 (patch) | |
| tree | 613be2fe3a329fcc0f26f5fc7784ae7897256286 /.local | |
| parent | 904a9d5c1aa5755bc6c6812b3df39aeb3f473715 (diff) | |
update from work dotfiles
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/share/bin/screenrecord | 6 | ||||
| -rwxr-xr-x | .local/share/bin/sdk10_compiledb | 38 |
2 files changed, 41 insertions, 3 deletions
diff --git a/.local/share/bin/screenrecord b/.local/share/bin/screenrecord index d595cc8..1045a6e 100755 --- a/.local/share/bin/screenrecord +++ b/.local/share/bin/screenrecord @@ -1,8 +1,8 @@ #!/bin/sh exec giph "$@" \ - --framerate=60 \ + --framerate 60 \ --select \ - --bordersize=4 \ - --color=255,255,255 \ + --bordersize 4 \ + --color 255,255,255 \ "$(date +'%Y-%m-%d_%H-%M-%S.mp4')" diff --git a/.local/share/bin/sdk10_compiledb b/.local/share/bin/sdk10_compiledb new file mode 100755 index 0000000..6e62d47 --- /dev/null +++ b/.local/share/bin/sdk10_compiledb @@ -0,0 +1,38 @@ +#!/bin/python3 + +from shlex import split, join +from sys import argv +from os import getcwd +import subprocess + +process = subprocess.run(argv[1:], stdout=subprocess.PIPE, stderr=None, env={"LANG": "C"}) + +dir_stack = [getcwd()] +expanded_output = [] + +for line in process.stdout.decode('utf-8').split('\n'): + expanded_args = [] + args = split(line) + + if line.startswith('make: Entering directory'): + dir_stack.append(args[-1]) + expanded_output.append(line) + continue + if line.startswith('make: Leaving directory'): + dir_stack.pop() + expanded_output.append(line) + continue + + for arg in args: + if not arg.startswith('@'): + expanded_args.append(arg) + continue + with open(dir_stack[-1] + '/' + arg[1:], 'r') as file: + expanded_args += split(file.read()) + expanded_output.append(subprocess.list2cmdline(expanded_args)) + +process = subprocess.Popen(["compiledb"], stdin=subprocess.PIPE, stdout=None, stderr=None, text=True) +process.stdin.write("\n".join(expanded_output)) +process.stdin.close() +process.wait() + |