summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
authorAlex Leferry 2 <alexherbo2@gmail.com>2020-08-14 02:03:17 +0200
committerAlex Leferry 2 <alexherbo2@gmail.com>2020-08-14 02:05:03 +0200
commit00f8413c8baa4791ef1acb86ec7640e832d17fae (patch)
treee6b430717844afc491fca3cdc51abcd5b58ec088 /rc
parentf8c041315fa80f31c1d7265a3e4195a8fb55bdb3 (diff)
Add a prefix key for sending commands
: echo Tchou!
Diffstat (limited to 'rc')
l---------rc/paths/aliases/:1
-rwxr-xr-xrc/paths/commands/:buffer4
-rwxr-xr-xrc/paths/commands/:cd2
-rwxr-xr-xrc/paths/commands/:edit4
-rwxr-xr-xrc/paths/commands/:get2
5 files changed, 7 insertions, 6 deletions
diff --git a/rc/paths/aliases/: b/rc/paths/aliases/:
new file mode 120000
index 0000000..c34810e
--- /dev/null
+++ b/rc/paths/aliases/:
@@ -0,0 +1 @@
+../commands/:send \ No newline at end of file
diff --git a/rc/paths/commands/:buffer b/rc/paths/commands/:buffer
index 0d63f2a..a6715f6 100755
--- a/rc/paths/commands/:buffer
+++ b/rc/paths/commands/:buffer
@@ -1,7 +1,7 @@
#!/bin/sh
# Open buffer
-:send buffer "$@"
+: buffer "$@"
# Focus back the client
-:send focus
+: focus
diff --git a/rc/paths/commands/:cd b/rc/paths/commands/:cd
index a936e3c..56b5973 100755
--- a/rc/paths/commands/:cd
+++ b/rc/paths/commands/:cd
@@ -1,4 +1,4 @@
#!/bin/sh
# Sync to your current working directory
-:send cd "$PWD"
+: cd "$PWD"
diff --git a/rc/paths/commands/:edit b/rc/paths/commands/:edit
index 65c26d9..5569a3d 100755
--- a/rc/paths/commands/:edit
+++ b/rc/paths/commands/:edit
@@ -29,7 +29,7 @@ commands=$(
done
)
-:send "$commands"
+: "$commands"
# Focus back the client
-:send focus
+: focus
diff --git a/rc/paths/commands/:get b/rc/paths/commands/:get
index 13bf2fc..8c5686e 100755
--- a/rc/paths/commands/:get
+++ b/rc/paths/commands/:get
@@ -3,5 +3,5 @@
# Get a value from a client
mkfifo connect.fifo
trap 'rm connect.fifo' EXIT
-:send echo -to-file "$PWD/connect.fifo" "$@"
+: echo -to-file "$PWD/connect.fifo" "$@"
cat connect.fifo