Update ranger
This commit is contained in:
parent
b38b5e3da1
commit
a480eb56b0
49
ranger.org
49
ranger.org
@ -11,6 +11,18 @@
|
|||||||
%p the full paths of selected files
|
%p the full paths of selected files
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
|
After install, run:
|
||||||
|
#+begin_src bash :tangle no
|
||||||
|
ranger --copy-config=scope
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
To add =scope.sh=.
|
||||||
|
|
||||||
|
To have image preview:
|
||||||
|
#+begin_src bash :tangle no
|
||||||
|
sudo pip3 install ueberzug
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Config
|
* Config
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.config/ranger/rc.conf
|
:header-args: :tangle ~/.config/ranger/rc.conf
|
||||||
@ -217,7 +229,7 @@ map ,o shell nohup pcmanfm %d &
|
|||||||
|
|
||||||
Print on Rnice:
|
Print on Rnice:
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
map ,p shell print-rnice %f &
|
map ,p shell print-esrf %f &
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Backup to NAS:
|
Backup to NAS:
|
||||||
@ -258,7 +270,6 @@ else
|
|||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
*** Copy File Content
|
*** Copy File Content
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.config/ranger/scripts/copy-content.sh
|
:header-args: :tangle ~/.config/ranger/scripts/copy-content.sh
|
||||||
@ -266,24 +277,7 @@ fi
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
xclip -sel c < "$1" && dunstify "Ranger" "Copied to clipboard"
|
xclip -sel c < "$1" && notify-send "Ranger" "Copied to clipboard"
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** TODO [#B] Backup to NAS
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :tangle ~/.config/ranger/scripts/backup-to-nas.sh
|
|
||||||
:header-args+: :comments both :mkdirp yes
|
|
||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
|
||||||
:END:
|
|
||||||
|
|
||||||
- Arguments are the files to be backup to the NAS
|
|
||||||
|
|
||||||
#+begin_src bash
|
|
||||||
if [ $TMUX ]; then
|
|
||||||
tmux split -v -l 2 rsync -a --inplace --info=progress2 --rsh='ssh ' "$@" homelab:/srv/storage/Backups/ && tmux select-pane -U
|
|
||||||
else
|
|
||||||
rsync -a --info=progress2 --inplace --rsh='ssh' "$@" homelab:/srv/storage/Backups/
|
|
||||||
fi
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Paste with Rsync
|
*** Paste with Rsync
|
||||||
@ -298,13 +292,12 @@ fi
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if [ $TMUX ]; then
|
if [ $TMUX ]; then
|
||||||
tmux split -v -l 1 rsync -a --info=progress2 "${@:2}" "$1" && tmux select-pane -U
|
tmux split -v -l 1 rsync -a --info=progress2 --no-inc-recursive "${@:2}" "$1" && tmux select-pane -U
|
||||||
else
|
else
|
||||||
rsync -a --info=progress2 "${@:2}" "$1"
|
rsync -a --info=progress2 --no-inc-recursive "${@:2}" "$1"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Define keys for the browser
|
** Define keys for the browser
|
||||||
*** Basic
|
*** Basic
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
@ -421,7 +414,7 @@ map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
|
|||||||
|
|
||||||
*** Drag and Drop
|
*** Drag and Drop
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
map D shell dragon-drag-and-drop -a -x %p
|
map D shell dragon -a -x %p
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Rename files
|
*** Rename files
|
||||||
@ -666,20 +659,20 @@ ext x?html?, has w3m, terminal = w3m "$@"
|
|||||||
|
|
||||||
** Word, Excel and Presentation files
|
** Word, Excel and Presentation files
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
ext docx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
ext docx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
||||||
ext docx?, has wps, X, flag f = wps "$@"
|
ext docx?, has wps, X, flag f = wps "$@"
|
||||||
ext docx?, has libreoffice, X, flag f = libreoffice "$@"
|
ext docx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
ext pptx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
ext pptx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
||||||
ext pptx?, has wps, X, flag f = wps "$@"
|
ext pptx?, has wps, X, flag f = wps "$@"
|
||||||
ext pptx?, has libreoffice, X, flag f = libreoffice "$@"
|
ext pptx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
ext csv|xlsx?, has sc-im = sc-im -- "$@"
|
ext csv|xlsx?, has sc-im = sc-im -- "$@"
|
||||||
ext csv|xlsx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
ext csv|xlsx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
||||||
ext csv|xlsx?, has wps, X, flag f = wps "$@"
|
ext csv|xlsx?, has wps, X, flag f = wps "$@"
|
||||||
ext csv|xlsx?, has libreoffice, X, flag f = libreoffice "$@"
|
ext csv|xlsx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -728,7 +721,7 @@ name ^[mM]akefile$ = make
|
|||||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
||||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
|
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
|
||||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||||
has dragon-drag-and-drop, X, flag f = dragon-drag-and-drop -a -x "$@"
|
has dragon, X, flag f = dragon -a -x "$@"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Ranger Commands
|
* Ranger Commands
|
||||||
|
Loading…
Reference in New Issue
Block a user