summaryrefslogtreecommitdiff
path: root/ar/.config/lf
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-01-11 11:26:02 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-01-11 11:26:02 +0900
commit2e28ee3dd9fbfb9d9c415ebb954d5a4ce3ef63b0 (patch)
tree4e6844c4d59fd73032a6b28670f436e32fdbe999 /ar/.config/lf
parentaeb1ca1667a2abe1a4052d914295458b2691dd92 (diff)
modified lf/lfrc
Diffstat (limited to 'ar/.config/lf')
-rw-r--r--ar/.config/lf/lfrc37
1 files changed, 25 insertions, 12 deletions
diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc
index 64416d3..ead0c1d 100644
--- a/ar/.config/lf/lfrc
+++ b/ar/.config/lf/lfrc
@@ -101,16 +101,29 @@ cmd yank-basename $basename -a -- $fx | head -c-1 | xclip -i -selection clipboar
cmd yank-basename-without-extension &basename -a -- $fx | cut -d. -f1 | head -c-1 | xclip -i -selection clipboard
# Create
-cmd mkdir ${{ clear; tput cup $(($(tput lines)/3)); tput bold
- printf "Directory Name: "
- read ans
- mkdir -p $ans
-}}
-cmd mkfile ${{
- clear; tput cup $(($(tput lines)/3)); tput bold
- printf "File Name: "
- read ans
- $EDITOR $ans
+#cmd mkdir ${{ clear; tput cup $(($(tput lines)/3)); tput bold
+# printf "Directory Name: "
+# read ans
+# mkdir -p $ans
+#}}
+cmd mkdir %{{
+ IFS=" "
+ file="$*"
+ mkdir -p -- "$file"
+ lf -remote "send $id cd \"$(printf '%s' "$file" | sed 's/\\/\\\\/g;s/"/\\"/g')\""
+}}
+#cmd touch ${{
+# clear; tput cup $(($(tput lines)/3)); tput bold
+# printf "File Name: "
+# read ans
+# $EDITOR $ans
+#}}
+cmd touch %{{
+ IFS=" "
+ file="$*"
+ touch -- "$file"
+ file="$(printf '%s' "$file" | sed 's/\\/\\\\/g;s/"/\\"/g')"
+ lf -remote "send $id :select \"$file\"; \$\$EDITOR \"$file\""
}}
cmd link %{{
set -- $(cat ~/.local/share/lf/files)
@@ -500,8 +513,8 @@ map yt $printf "%s" "$fx" | sed -E 's/^.+\[/https:\/\/www.youtube.com\/watch?v=/
map yy copy
# Create
-map Md mkdir
-map Mf mkfile
+map Md push :mkdir<space>
+map Mf push :touch<space>
map Ml link
# Cut