2020-11-02 04:08:18 +00:00
|
|
|
#!/bin/sh
|
2020-09-17 10:24:35 +00:00
|
|
|
|
2020-11-06 17:41:00 +00:00
|
|
|
set -e
|
2020-11-08 16:26:14 +00:00
|
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
2020-11-02 04:08:18 +00:00
|
|
|
. "$DIR/../env.sh"
|
2020-09-17 10:24:35 +00:00
|
|
|
|
2020-11-06 17:41:00 +00:00
|
|
|
# install ranger
|
2020-09-17 10:24:35 +00:00
|
|
|
case "$PM" in
|
|
|
|
apt)
|
2020-09-22 10:40:26 +00:00
|
|
|
# atool/p7zip-full for archive previewing/extracting etc
|
2020-09-30 08:24:29 +00:00
|
|
|
sudo apt install -y atool p7zip-full unrar highlight
|
2020-11-04 06:05:09 +00:00
|
|
|
! command -v pip3 && "$PDIR/python/install.sh"
|
2020-09-17 16:02:24 +00:00
|
|
|
sudo pip3 install ranger-fm ueberzug
|
2020-09-17 10:24:35 +00:00
|
|
|
;;
|
|
|
|
pacman)
|
2020-11-06 17:41:00 +00:00
|
|
|
sudo pacman -S --needed atool p7zip unrar highlight
|
|
|
|
sudo pip install ranger-fm ueberzug
|
2020-09-17 10:24:35 +00:00
|
|
|
;;
|
|
|
|
esac
|
2020-09-17 10:42:43 +00:00
|
|
|
|
2020-09-20 09:59:26 +00:00
|
|
|
# linking configuration files
|
2020-11-02 04:08:18 +00:00
|
|
|
lnsf "$DIR/config/commands.py" "$XDG_CONFIG_HOME/ranger/commands.py"
|
|
|
|
lnsf "$DIR/config/rc.conf" "$XDG_CONFIG_HOME/ranger/rc.conf"
|
|
|
|
lnsf "$DIR/config/scope.sh" "$XDG_CONFIG_HOME/ranger/scope.sh"
|
2020-11-04 02:48:02 +00:00
|
|
|
lnsf "$DIR/config/colorschemes/solarizedmod.py" "$XDG_CONFIG_HOME/ranger/colorschemes/solarizedmod.py"
|
2020-09-20 09:59:26 +00:00
|
|
|
|
|
|
|
# install devicons
|
2020-11-06 17:41:00 +00:00
|
|
|
[ ! -d ~/.config/ranger/plugins/ranger_devicons ] && \
|
|
|
|
git clone --depth 1 https://github.com/alexanderjeurissen/ranger_devicons ~/.config/ranger/plugins/ranger_devicons
|