/
setup
executable file
·105 lines (86 loc) · 2.57 KB
/
setup
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
#!/bin/zsh
DOTFILES_PATH=$(pwd)
function get_powerline {
local COMMAND_OUTPUT POWERLINE_PATH ORANGE_POWERLINE_PATH
ORANGE_POWERLINE_PATH="$HOME/.config/orange-powerline"
COMMAND_OUTPUT=$(python --version)
POWERLINE_PATH="/usr/lib/python$COMMAND_OUTPUT[8,10]/site-packages/powerline/config_files"
git clone https://github.com/none23/orange-powerline "$ORANGE_POWERLINE_PATH"
sudo chown -R "$(whoami)" "$POWERLINE_PATH"
cp -rv "$ORANGE_POWERLINE_PATH/colorschemes" "$POWERLINE_PATH"
}
function get_powerline {
local COMMAND_OUTPUT POWERLINE_PATH
COMMAND_OUTPUT=$(python --version)
POWERLINE_PATH="/usr/lib/python$COMMAND_OUTPUT[8,10]/site-packages/powerline/config_files"
git clone https://github.com/none23/orange-powerline "$ORANGE_POWERLINE_PATH"
sudo chown -R "$(whoami)" "$POWERLINE_PATH"
cp -rv "$ORANGE_POWERLINE_PATH/colorschemes" "$POWERLINE_PATH"
}
function backuo_file {
local BACKUP_PATH
BACKUP_PATH="$HOME/.old_dotfiles"
[[ -a "$BACKUP_PATH" ]] || mkdir "$BACKUP_PATH"
mv "$1" "$BACKUP_PATH/$1"
}
function _link_to_home {
local FILE
FILE="$HOME/$1"
[[ -a "$FILE" ]] && backuo_file "$FILE"
ln -s "$DOTFILES_PATH/$1" "$FILE"
}
function _link_to_config {
local FILE
FILE="$HOME/.config/$1"
[[ -a "$FILE" ]] && backuo_file ".config/$1"
ln -s "$DOTFILES_PATH/.config/$1" "$FILE"
}
function link_dotfiles {
# git
link_to_home .gitignore-glogal
link_to_home .gitconfig
link_to_home .czrc
# vim
link_to_config nvim
link_to_home .vim
link_to_home .vimrc
# shell
link_to_home .aliases
link_to_home .profile
link_to_home .bashrc
link_to_home .bash_profile
link_to_home .zshrc
# desktop environment
link_to_config awesome
link_to_config .picom.conf
link_to_home .dmrc
link_to_home .xinitrc
link_to_home .Xmodmap
link_to_home .Xresources
link_to_home .xscreensaver
link_to_home .gtkrc-2.0
link_to_config gtk-3.0
link_to_home .inputrc
link_to_home .i3
link_to_config fontconfig
link_to_config konsolerc
link_to_home .cvimrc
link_to_config cvim
link_to_config htop
link_to_config qt5ct
link_to_config ranger
link_to_config mimeapps.list
link_to_config libfm
link_to_config Thunar
link_to_config user-dirs.dirs
link_to_config user-dirs.locale
link_to_config vlc
link_to_home .tmux.conf
link_to_home .ipython
ln -s "$DOTFILES_PATH/.local/share/konsole/nwsome.keytab" "$HOME/.local/share/konsole/nwsome.keytab"
ln -s "$DOTFILES_PATH/.local/share/konsole/nwsome.profile" "$HOME/.local/share/konsole/nwsome.profile"
}
link_dotfiles
get_powerline
# TODO: get_fonts
# TODO: get_nwsome_gtk