-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.sh
executable file
·137 lines (106 loc) · 3.48 KB
/
main.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
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
#!/bin/bash
# (C) 2021 Sohaib Mohamed.
# OS = get distro name
OS=`awk -F= '/^NAME/{print $2}' /etc/os-release`
# CapLK is a useless key in a great location
# Now: I use gnome-tweak-tool for maping keys..
# later I will make my own systemd unit: https://unix.stackexchange.com/a/626970
# KeyTweak windows app for maping CapLK key: https://vim.fandom.com/wiki/Map_caps_lock_to_escape_in_Windows
# Later: try to make j & k keybindings faster : https://youtu.be/d8XtNXutVto?t=492
# {{{ Setup Neovim
mkdir ~/.config/nvim/
touch ~/.config/nvim/init.vim
# }}}
# {{{ Ubuntu apt dependencies
if [ "$OS" = "\"Ubuntu\"" ];
then
sudo sh ~/dotfiles/scripts/apt.sh
fi
# {{{ fedora yum dependencies
if [ "$OS" = "\"Fedora Linux\"" ];
then
sudo sh ~/dotfiles/scripts/yum.sh
fi
# }}}
# {{{ .git config
sh ~/dotfiles/scripts/git.sh
# }}}
# {{{ Mute Gnome alerts
gsettings set org.gnome.desktop.sound event-sounds false
# }}}
# {{{ soft links
~/dotfiles/scripts/smlinks.sh
# }}}
# {{{ download all my important repos
python3 ~/dotfiles/scripts/repos.py
# }}}
# {{{ Setup .gitconfig
rm -r ~/.gitconfig
ln -sf ~/dotfiles/.gitconfig ~/.gitconfig
# }}}
# {{{ install vundleVim plugin manager
mkdir -p ~/.vim/bundle/Vundle.vim/
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
# }}}
# {{{ Installing all vim plugins and quit.
vim +PluginInstall +qall
# }}}
# {{{ install Tabular
cd ~
mkdir -p ~/.vim/bundle
cd ~/.vim/bundle
git clone git://github.com/godlygeek/tabular.git
# }}}
# {{{ cache GitHub passwd
# Reference: https://stackoverflow.com/a/5343146/5688267
# {{{ make undo dir for vim
mkdir ~/.vim/undodir
# }}}
# if Ubuntu
if [ "$OS" = "\"Ubuntu\"" ];
then
cd /usr/share/doc/git/contrib/credential/libsecret
sudo make
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
fi
# if Fedora
if [ "$OS" = "\"Fedora Linux\"" ];
then
sudo dnf install git-credential-libsecret
git config --global credential.helper /usr/libexec/git-core/git-credential-libsecret
fi
# }}}
# {{{ Disable GNOME's Scrollbars
echo "Disable GNOME's Scrollbars:"
echo "___________________________"
echo "Open GNOME terminal preferences > Profiles > scrolling > Scrollbar is: (Disable)"
# }}}
## {{{ Remove user passwd to speed ur work
## https://www.google.com/search?q=fedora+change+passwd+user+to+empty
#echo "========== IF you want to speed you work >> remove usr passwd =========="
#echo "sudo passwd -r root"
#echo "sudo passwd -r -f -u smalinux"
## }}}
## {{{ Fuck off mouse! I will never to back again! I'm vimmer who use GUI
## with keyboard ONLY!..........
#echo "Please if you are moving between pysical an virtul vmware, to this:"
#echo " VMware > edit > preferences > input"
#echo " <check> grap keyboard and mouse on key click"
#echo "========================================================================"
## }}}
#
## {{{ VMware related stuff
#sh ~/dotfiles/scripts/VMware.sh
## }}}
#echo "ToDO:"
#echo "Google: vim youcompleteme linux kernel" # how to use ycm plugin with kernel
# {{{ change this maximum screencast length to a different value
gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 60000
# }}}
# take keybindings of "less" and but them into "most"
# reference: https://unix.stackexchange.com/a/271252
cp /usr/share/doc/most/lesskeys.rc ~/.mostrc
# rm passwd of login.keyring https://askubuntu.com/a/65294
rm ~/.local/share/keyrings/login.keyring
echo "that's it! have fun! - smalinux"