-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript_ranger_arch.sh
44 lines (21 loc) · 1.43 KB
/
script_ranger_arch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
[[ ! -f ~/.config/ranger/rc.conf ]] || rm ~/.config/ranger/rc.conf
[[ ! -f ~/.config/ranger/scope.sh ]] || rm ~/.config/ranger/scope.sh
[[ ! -f ~/.config/ranger/rifle.conf ]] || rm ~/.config/ranger/rifle.conf
ranger --copy-config=rc
ranger --copy-config=scope
ranger --copy-config=rifle
sleep 2
sed -i 's/set preview_images false/set preview_images true/g' ~/.config/ranger/rc.conf
sleep 1
sed -i 's/set draw_borders none/set draw_borders both/g' ~/.config/ranger/rc.conf
sed -i 's/set preview_images_method w3m/set preview_images_method ueberzug/g' ~/.config/ranger/rc.conf
# sed -i 's/set sort natural/set sort ctime/g' ~/.config/ranger/rc.conf
sed -i 's/mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"/mime ^audio|ogg$, terminal, has moc = ncmpcpp -- "$@"/g' ~/.config/ranger/rifle.conf
sleep 1
sed -i '/label wallpaper, number 15, mime ^image, has feh, X = wal -i "$1"/d' ~/.config/ranger/rifle.conf
sed -i 's/label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"/label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"\nlabel wallpaper, number 15, mime ^image, has feh, X = wal -i "$1"/g' ~/.config/ranger/rifle.conf
sed -i '113,116s/#//' ~/.config/ranger/scope.sh
sed -i '157,160s/#//' ~/.config/ranger/scope.sh
sed -i 's/#set preview_script ~\/.config\/ranger\/scope.sh/set preview_script ~\/.config\/ranger\/scope.sh/g' ~/.config/ranger/rc.conf
ranger --version