-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (54 loc) · 2.74 KB
/
Makefile
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
.PHONY: fish git helix less lftp nnn termux
bold := $(shell tput bold)
reset := $(shell tput sgr0)
linux_config := https://raw.githubusercontent.com/Yutsuten/linux-config/main
all: fish git helix less lftp nnn termux
fish:
@echo '${bold}>> Fish settings <<${reset}'
rm -f ~/.config/fish/config.fish
rm -f ~/.config/fish/functions/*.fish
ln -srf fish/config.fish ~/.config/fish/config.fish
ln -srf fish/functions/*.fish ~/.config/fish/functions/
curl -Lso ~/.config/fish/functions/idict.fish "${linux_config}/tools/fish/functions/idict.fish"
curl -Lso ~/.config/fish/functions/passgen.fish "${linux_config}/tools/fish/functions/passgen.fish"
curl -Ls "${linux_config}/tools/fish/functions/fish_prompt.fish" | sed 's/(prompt_login)/(set -q SSH_TTY \&\& prompt_login)/g' > ~/.config/fish/functions/fish_prompt.fish
curl -Ls "${linux_config}/tools/fish/functions/tts.fish" | sed 's/mpv --really-quiet --volume=100 \$$filename/termux-media-player play $$filename > \/dev\/null/g' > ~/.config/fish/functions/tts.fish
git:
echo '${bold}>> Git settings <<${reset}'
git config --global core.excludesfile ~/.config/gitignore
git config --global core.pager 'less -+XF -S'
git config --global pager.branch false
git config --global core.editor 'hx'
git config --global commit.gpgsign true
curl -Lso ~/.config/gitignore "${linux_config}/tools/git/gitignore"
helix:
echo '${bold}>> Helix settings <<${reset}'
mkdir -p ~/.config/helix
curl -Ls "${linux_config}/tools/helix/config.toml" | sed 's/onedark_modified/onedark/g' > ~/.config/helix/config.toml
less:
@echo '${bold}>> Less settings <<${reset}'
mkdir -p less
curl -Lso less/lessopen.fish "${linux_config}/tools/less/lessopen.fish"
curl -Lso less/lessclose.fish "${linux_config}/tools/less/lessclose.fish"
chmod u+x less/*.fish
lftp:
@echo '${bold}>> LFTP settings <<${reset}'
curl -Lso ~/.config/lftp/rc "${linux_config}/tools/lftp/lftp.rc"
nnn:
@echo '${bold}>> Nnn plugins <<${reset}'
mkdir -p ~/.config/nnn
rm -rf ~/.config/nnn/plugins
ln -srf nnn ~/.config/nnn/plugins
termux:
@echo '${bold}>> Termux settings <<${reset}'
mkdir -p ~/bin ~/.local/bin
ln -srf termux/colors.properties ~/.termux/colors.properties
ln -srf termux/termux.properties ~/.termux/termux.properties
ln -srf termux/share ~/bin/termux-file-editor
ln -srf termux/todo ~/bin/todo
curl -Ls "${linux_config}/desktop/bin/fpass" | sed '1c\#!/data/data/com.termux/files/usr/bin/env fish' > ~/.local/bin/fpass
curl -Ls "${linux_config}/desktop/bin/edit" | sed '1c\#!/data/data/com.termux/files/usr/bin/env fish' > ~/.local/bin/edit
chmod +x ~/.local/bin/fpass
chmod +x ~/.local/bin/edit
curl -Lso ~/.termux/font.ttf 'https://raw.githubusercontent.com/termux/termux-styling/master/app/src/main/assets/fonts/Source-Code-Pro.ttf'
termux-reload-settings