-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
149 lines (124 loc) · 3.59 KB
/
INSTALL
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# download this file from the repository
# READ IT and modify it to install optional packages
# source it
# fzf version must be > 0.30
# check your package manager, you may need to be installed manually
# see https://github.com/junegunn/fzf
# for optional packages, you'll need to write your own ftlrc, or
# modify the default, see man page for an example
# set ftl location
FTL_CFG="$HOME/.config/ftl"
mkdir -p $FTL_CFG
mkdir -p $FTL_CFG/etc/bin/third_party
cd $FTL_CFG
sudo apt install -y ack \
python3-pip \
libimage-exiftool-perl \
libdata-treedumper-perl \
cpanminus \
curl \
diffutils \
exa \
exiftool \
expect \
fd-find \
ffmpegthumbnailer \
sxiv \
fzf \
git \
imagemagick \
jpegoptim \
jq
libvips-tools \
librsvg2-bin \
libx11-dev \
libxext-dev \
mcomix \
moreutils \
mplayer \
mupdf-tools \
perl \
pandoc \
qutebrowser \
ripgrep \
rlwrap \
rmlint \
tmux \
tree \
unrar \
vim \
vlc \
w3m \
w3m-img \
whiptail \
wmctrl \
xdotool \
xh \
zathura \
zathura-cb \
pip3 install vmd \
ueberzug \
edir
# install cargo (and rust!) see https://www.rust-lang.org/tools/install
# yes I highly dislike "curl ... | sh"
curl https://sh.rustup.rs -sSf | sh
source ~/.bashrc
cargo install lscolors
sudo cpanm File::MimeInfo \
Term::ANSIColor \
File::Spec \
Term::ANSIColor \
Getopt::Long \
FileHandle \
IPC::Open2 \
App::ansifold \
sudo ln -s /usr/bin/fdfind /usr/bin/fd # old fdfind name is used
cp /usr/lib/w3m/w3mimgdisplay $FTL_CFG/etc/bin/third_party
# you'll need a compiler toolchain for some of the dependencies
# sudo apt install -y automake pkg-config libarchive-dev libarchive-tools make gcc g++
# optional install fuse-archive; set mount_archive in rc file
# sudo apt install -y libfuse-dev
#(git clone https://github.com/google/fuse-archive.git && cd fuse-archive && make ; cp out/fuse-archive $FTL_CFG/etc/bin/third_party)
# optional "a better rm" (https://github.com/nivekuil/rip)
#cargo install rm-improved
# optional Command Line Interface to FreeDesktop.org Trash; https://github.com/andreafrancia/trash-cli
#pip3 install trash-cli
# optional pager, you need brew installed and change MD_PAGER in rc file
# see https://docs.brew.sh/Homebrew-on-Linux
brew install moar
# json viewers
brew install fx
brew install jless
# ultimate plumber pipeline TUI
brew install up
# optional markdown previewer
#https://kristaps.bsd.lv/lowdown/
# optional TMSU for tagging
#https://github.com/oniony/TMSU
# shallow clone ftl
git clone --depth=1 https://github.com/nkh/ftl.git ftl_repo
cp -r $FTL_CFG/ftl_repo/config/ftl/* .
cp $FTL_CFG/ftl_repo/config/ftl/etc/bin/third_party/.vimkatrc ~
# directories to add own "plugins"
ln -s ftl_repo/config/ftl/etc/commands/ commands
ln -s ftl_repo/confi/ftl/etc/etags/ etags
ln -s ftl_repo/confi/ftl/etc/filters/ filters
ln -s ftl_repo/confi/ftl/etc/generators/ generators
ln -s ftl_repo/confi/ftl/etc/viewers/ viewers
# generate man pages
( cd $FTL_CFG/man ; ./gen_man_pages )
# ftl needs an image of your terminal background color to draw around
# image preview. You also need to hint ftl about your terminal character
# size see FTLI_W and FTLI_H in ftlrc for default
HEX_RED=00
HEX_GREEN=00
HEX_BLUE=00
convert -size 2000x2000 xc:#$HEX_RED$HEX_GREEN$HEX_BLUE "$FTL_CFG/image_bg.png"
# set environment variables
echo export FTL_CFG="'$FTL_CFG'" >>~/.bashrc
echo PATH="$PATH:$FTL_CFG/etc/bin:$FTL_CFG/etc/bin/third_party" >>~/.bashrc
# run ftl
cd $HOME
source .bashrc
ftl
# vim: set filetype=bash :