AutoYADM commit: 2025-05-10 15:14:08
This commit is contained in:
parent
d7409496ef
commit
a4d0f3aa9b
2 changed files with 25 additions and 13 deletions
|
@ -105,6 +105,29 @@ n = "scroll_down"
|
|||
j = "search_next"
|
||||
J = "search_prev"
|
||||
|
||||
[keys.normal.space.p]
|
||||
# force inline paste
|
||||
p = ':append-output ~/.config/helix/scripts/paste.py'
|
||||
P = ':insert-output ~/.config/helix/scripts/paste.py'
|
||||
# force linewise paste
|
||||
"]" = [
|
||||
"ensure_selections_forward",
|
||||
"add_newline_below",
|
||||
"move_line_down",
|
||||
":insert-output ~/.config/helix/scripts/paste.py",
|
||||
]
|
||||
"[" = [
|
||||
"ensure_selections_forward",
|
||||
"flip_selections",
|
||||
"add_newline_above",
|
||||
"move_line_up",
|
||||
":insert-output ~/.config/helix/scripts/paste.py",
|
||||
]
|
||||
c = '''
|
||||
:append-output sh -c clipcat-menu --finder custom --custom-finder-program-path fuzzel --custom-finder-arguments=--dmenu,--placeholder=Clipboard --config <(printf "[log]\nemit_stdout = true\n") | grep -q 'Nothing is selected' && exit 1 || wl-paste'''
|
||||
C = '''
|
||||
:insert-output sh -c clipcat-menu --finder custom --custom-finder-program-path fuzzel --custom-finder-arguments=--dmenu,--placeholder=Clipboard --config <(printf "[log]\nemit_stdout = true\n") | grep -q 'Nothing is selected' && exit 1 || wl-paste'''
|
||||
|
||||
[keys.normal]
|
||||
tab = "trim_selections"
|
||||
# swap select_mode and regex keys
|
||||
|
@ -242,10 +265,6 @@ space = [
|
|||
|
||||
# insert markdown toc :)
|
||||
|
||||
p = '''
|
||||
:append-output clipcat-menu --finder custom --custom-finder-program-path fuzzel --custom-finder-arguments=--dmenu,--placeholder=Clipboard --config <(printf "[log]\nemit_stdout = true\n") | grep -q 'Nothing is selected' && exit 1 || wl-paste'''
|
||||
P = '''
|
||||
:insert-output clipcat-menu --finder custom --custom-finder-program-path fuzzel --custom-finder-arguments=--dmenu,--placeholder=Clipboard --config <(printf "[log]\nemit_stdout = true\n") | grep -q 'Nothing is selected' && exit 1 || wl-paste'''
|
||||
x = ":bc"
|
||||
X = ':sh %{buffer_name}'
|
||||
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# tiny script to force inline vs. linewise paste in Helix
|
||||
# tiny script to strip only trailing newlines from clipboard
|
||||
|
||||
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="")
|
||||
print(contents.rstrip("\n"), end="")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue