# set terminal title to current working directory
cmd on-cd &{{
- printf "\033]0; $PWD\007" > /dev/tty
+ printf "\033]0; | $PWD\007" > /dev/tty
}}
# extract the current file with the right command
mv -- $fx "$newd"
}}
+# clipboard interaction
+cmd yank-file $printf '%s' "$f" | wl-copy
+cmd yank-paths $printf '%s' "$fx" | wl-copy
+cmd yank-dirname &printf '%s' "$PWD" | wl-copy
+cmd yank-basename &basename -a -- $fx | head -c-1 | wl-copy
+cmd yank-basename-without-extension &basename -a -- $fx | sed -E 's/\.[^.]+$//' | head -c-1 | wl-copy
+
# ------------------------------------ commands:
# helpers
cmd open-with-gui &$@ $fx # opens asynchronously, intended for GUI applications
# c = change
map cd push :cd<space>
map cw : rename
-map cy yank-file $printf '%s' "$f" | wl-copy -p -n
map cm chmod
# d = delete
map xs $$f
map xa !$f
+# Y = Yank into clipboard
+map Yf : yank-file
+map Yp : yank-paths
+map Yd : yank-dirname
+map Yb : yank-basename
+map YB : yank-basename-without-extension
+
# z = ???
zp = set info perm:user:group
# various commands
map <enter> open
+map , clear
map <esc> unselect
map ~ toggle_preview
map C edit-config