diff options
| author | Zach DeCook <zachdecook@librem.one> | 2023-06-28 19:48:03 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2023-06-28 19:48:03 -0400 |
| commit | 30f7f9ed42822fb11f0d641d3eae294b177f3af3 (patch) | |
| tree | fe6cd4d76439e84b208883492eb5157b16601e70 /.local | |
| parent | 992a1b9fdcb78d8da9be1aaad15c3dc966ce94c8 (diff) | |
| download | dotfiles-30f7f9ed42822fb11f0d641d3eae294b177f3af3.tar.gz | |
add TT and mfi.py
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/TT | 3 | ||||
| -rwxr-xr-x | .local/bin/mfi.py | 25 |
2 files changed, 28 insertions, 0 deletions
diff --git a/.local/bin/TT b/.local/bin/TT new file mode 100755 index 0000000..51e834b --- /dev/null +++ b/.local/bin/TT @@ -0,0 +1,3 @@ +#!/bin/sh +printf "\e]2;%s\a" "$*" +"$@" diff --git a/.local/bin/mfi.py b/.local/bin/mfi.py new file mode 100755 index 0000000..30fc3ce --- /dev/null +++ b/.local/bin/mfi.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 +import sys +import subprocess + +args = sys.argv[1:] +subs = [] +nums = [] +for arg in args: + file = arg.split(':')[0] + r = subprocess.run(['find', '.', '-name', file],stdout=subprocess.PIPE) + subs.append(r) + if ':' in arg: + nums.append(arg.split(':')[1]) + else: + nums.append(0) + +nums.reverse() +args = ['micro'] +for sub in subs: + n = nums.pop() + files = r.stdout.decode().strip().split('\n') + for file in files: + args.append(file+":"+str(n)) + +subprocess.run(args) |
