mirror of
https://github.com/hydroxycarbamide/dotfiles.git
synced 2025-05-07 21:39:07 -04:00
Add nnn
This commit is contained in:
parent
0ef5de12ac
commit
c0889285ff
58 changed files with 5175 additions and 0 deletions
26
dot_config/nnn/plugins/executable_rsynccp
Normal file
26
dot_config/nnn/plugins/executable_rsynccp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Description: Simple script to give copy-paste a progress percentage
|
||||
# by utilizing rsync.
|
||||
#
|
||||
# LIMITATION: this won't work when pasting to MTP device.
|
||||
#
|
||||
# Dependencies: rsync
|
||||
#
|
||||
# Shell: POSIX compliant
|
||||
# Author: Benawi Adha
|
||||
|
||||
sel=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
|
||||
|
||||
# Choose one of these two schemes by commenting
|
||||
|
||||
# more verbose
|
||||
xargs -0 -I % rsync -ah --progress % "$PWD" < "$sel"
|
||||
|
||||
# less verbose
|
||||
# xargs -0 -I % rsync -ah --info=progress2 % "$PWD" < "$sel"
|
||||
|
||||
# Clear selection
|
||||
if [ -p "$NNN_PIPE" ]; then
|
||||
printf "-" > "$NNN_PIPE"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue