AutoYADM commit: 2025-05-10 14:59:04
This commit is contained in:
parent
affb9e052a
commit
d7409496ef
3 changed files with 19 additions and 2 deletions
14
.config/helix/scripts/paste.py
Executable file
14
.config/helix/scripts/paste.py
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# tiny script to force inline vs. linewise paste in Helix
|
||||
|
||||
cmd = sys.argv[1]
|
||||
contents = subprocess.check_output(["wl-paste", "-n"], text=True)
|
||||
if cmd == "inline":
|
||||
print(contents.rstrip("\n"), end="")
|
||||
elif cmd == "linewise":
|
||||
if contents[-1] != "\n":
|
||||
contents += "\n"
|
||||
print(contents, end="")
|
Loading…
Add table
Add a link
Reference in a new issue