Compare commits

...

2 Commits

Author SHA1 Message Date
hedy d761456809
readme: Add Acme to list of editors 2023-11-15 20:49:34 +08:00
hedy a51b14d61c
Scripts: Add a few old scripts that I forgot to track
Acme is an amazing editor btw!
2023-11-15 20:47:00 +08:00
5 changed files with 45 additions and 2 deletions

View File

@ -91,10 +91,11 @@ Configs that involve open source tools/packages I maintain:
- Email: [aerc](https://aerc-mail.org) ([`.config/aerc`](.config/aerc))
- Terminal: [Kitty](https://sw.kovidgoyal.net/kitty/) ([`.config/kitty`](.config/kitty))
- Editor:
- Vim ([`.vimrc`](.vimrc))
- Vim ([`.vimrc`](.vimrc)) (not used)
- Neovim ([`.config/nvim`](.config/nvim))
- Emacs ([`.config/emacs`](.config/emacs)) (with chemacs: [.emacs-profiles.el](.emacs-profiles.el))
- Doom ([`.config/doom`](.config/doom))
- Doom ([`.config/doom`](.config/doom)) (not used)
- [Acme](http://acme.cat-v.org/): Does not have config files, but I do have some scripts (`bin/gotagacme`, `bin/gotagclean.py`)
- Web client (browser):
- [Elinks fork](https://github.com/rkd77/elinks) ([`.elinks/elinks.conf`](.elinks/elinks.conf))
- [Qutebrowser](https://qutebrowser.org) ([`.qutebrowser/config.py`](.qutebrowser/config.py))

5
bin/emacs-uri-handler.scpt Executable file
View File

@ -0,0 +1,5 @@
on open location this_URL
set thefile to (text 9 thru (count this_URL) of this_URL)
do shell script "/usr/local/bin/emacsclient -c " & thefile
return
end open location

4
bin/gotagacme Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
read -p "name (without .go)>> " name
gotags "$name".go > tags && ~/bin/gotagclean.py tags > "$name".tags && rm tags

22
bin/gotagclean.py Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env python3
import sys
file = sys.argv[1]
with open(file) as f:
for line in f.readlines():
if line.startswith("!"):
continue
first, file, li, *rest = line.split()
if rest[0] == "i":
continue
newrest = []
for i in range(1, len(rest)):
r = rest[i]
if r.startswith("line"):
continue
r = r.removeprefix("access:")
r = r.removeprefix("signature:")
newrest.append(r)
print(f"{first:<12}" + " " + f"{file}:"+li[:-2] + "\t" + "\t".join(newrest))

11
bin/stupidrmdir Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
dir="$1"
if [[ -z "$dir" ]]; then
echo "Usage: stupidrmdir [ dir ]"
echo "Ensure CWD is what you want!"
fi
echo mv "$dir"/** ./ '&&' rm -r "$dir"
mv "$dir"/** ./ && rm -r "$dir"