set relativenumber false
set mergeindicators true
set preload true
-
-
-# options
-set rulerfmt '%i/%t (%P)'
+set rulerfile ~/.config/lf/rulerfile
# previews via https://github.com/NikitaIvanovV/ctpv?tab=readme-ov-file
set sixel true
map <delete> trash
# map <delete> delete
-cmd add-dir ${{
- printf "Directory name:"
- read ans
- mkdir $ans
-}}
-
-cmd add-file ${{
- printf "File name:"
- read ans
- touch $ans
+cmd mkdir %{{
+ IFS=" "
+ file="$*"
+ mkdir -p -- "$file"
+ lf -remote "send $id cd \"$(printf '%s' "$file" | sed 's/\\/\\\\/g;s/"/\\"/g')\""
}}
-cmd add-file-and-edit %{{
+cmd touch %{{
IFS=" "
file="$*"
touch -- "$file"
- file="$(printf '%s' "$file" | sed 's/\\/\\\\/g;s/"/\\"/g')"
- lf -remote "send $id :select \"$file\"; \$\$EDITOR \"$file\""
+ lf -remote "send $id select \"$(printf '%s' "$file" | sed 's/\\/\\\\/g;s/"/\\"/g')\""
}}
# set terminal title to current working directory
a="$(cat $index | sed "${counter}q;d")"
b="$(cat $index_edit | sed "${counter}q;d")"
counter=$(($counter+1))
-
- [ "$a" = "$b" ] && continue
+ [ "$a" = "$b" ] && continue
[ -e "$b" ] && echo "File exists: $b" && continue
mv "$a" "$b"
done
rm $index $index_edit
}}
-cmd on-select &{{
- lf -remote "send $id set statfmt \"$(eza -ldo --color=always --smart-group --no-permissions "$f")\""
-}}
+# cmd on-select &{{
+# # lf -remote "send $id set rulerfile \"$(eza -ldo --color=always --smart-group --no-permissions "$f")\""
+# lf -remote "send $id set rulerfile rulerfile
+# }}
cmd goto-file &{{
if [ -n "$(find -mindepth 1 -maxdepth 1 -type d -print -quit)" ]; then
# a = add/apply
map ad add-dir
map ae add-file-and-edit
-map aD add-dir-and-move-selection
+map adm add-dir-and-move-selection
map af add-file
map awc :apply-wallpaper-content
map awe :apply-wallpaper-expressive
# g = goto
map Ga cd ~/Applications/
-map Gc cd /media/data/nextcloud/
+map Gc cd /etc/
map Gd cd ~/dotfiles/
map Gk cd /etc/portage/patches/sys-kernel/
map Gl cd ~/.local/
-map Gn cd /media/data/nextcloud/Notizen/
+map Gn cd /media/multimedia/nextcloud/Notizen/
map Gs cd ~/Bilder/Screenshots/
map gd cd ~/Downloads/
map gc cd ~/.config/
map gl follow-link
map gm cd /media/
map gM cd /run/media/
+map gn cd /media/multimedia/nextcloud/
map go :fzf_jump
map gt cd ~/.local/share/Trash/
map gw cd ~/Wallpapers
--- /dev/null
+{{with .Message -}}
+ {{. -}}
+{{else with .Stat -}}
+ {{.Permissions | printf "\033[36m%s\033[0m" -}}
+ {{with .LinkCount}} {{.}}{{end -}}
+ {{with .User}} {{.}}{{end -}}
+ {{with .Group}} {{.}}{{end -}}
+ {{.Size | humanize | printf " %5s" -}}
+ {{.ModTime | printf " %s" -}}
+ {{with .Target}} -> {{.}}{{end -}}
+{{end -}}
+{{.SPACER -}}
+{{with .Keys}} {{.}}{{end -}}
+{{with .Progress}} {{join . " "}}{{end -}}
+{{with .Copy}} {{len . | printf "%s %d \033[0m" $.Options.copyfmt}}{{end -}}
+{{with .Cut}} {{len . | printf "%s %d \033[0m" $.Options.cutfmt}}{{end -}}
+{{with .Select}} {{len . | printf "%s %d \033[0m" $.Options.selectfmt}}{{end -}}
+{{with .Visual}} {{len . | printf "%s %d \033[0m" $.Options.visualfmt}}{{end -}}
+{{with .Filter}} {{join . " " | printf "\033[7;34m %s \033[0m"}}{{end -}}
+{{printf " %d/%d" .Index .Total}}
+