-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-sw
executable file
·209 lines (152 loc) · 6.41 KB
/
install-sw
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#!/bin/bash
###### PREPARE NEW PC FOR WORK ################################################
### 1. install basic tools manually
#sudo apt-get install -y vim git xclip
### 2. Then setup git to use ssh keys
## https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
## 2a. Create an ssh key (use a passphrase)
#ssh-keygen -t rsa -b 4096 -C "[email protected]"
## 2b. Add key to ssh agent
#eval "$(ssh-agent -s)"
## 2c. Add the ssh key to the ssh-agent
#ssh-add ~/.ssh/id_rsa
### 3. Add the ssh-key to my github account
# https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
## 3a. Copy the public key
#xclip -sel clip < ~/.ssh/id_rsa.pub
## 3b. Create a new ssh-key on github
# https://github.com/settings/keys
###############################################################################
# TODO
# FIX Clashing shortcuts between default ubuntu and PyCharm (intellij IDE's)
# https://askubuntu.com/questions/412046/unable-to-use-intellij-idea-keyboard-shortcuts-on-ubuntu
# https://superuser.com/questions/358749/how-to-disable-ctrlshiftu-in-ubuntu-linux
#
# TODO
# Move CONFIGURATIONS to a seperate script than the INSTALLATION
# TODO MANAGE DOT FILES SMART
# https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/
# Make Caps lock Control_L (EG for for tmux)
# https://era86.github.io/2017/01/14/remapping-capslock-to-escape-in-ubuntu-1604.html
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:ctrl_modifier']"
### Synaptics trackpad setings
# Interesting Articles
# http://lukeluo.blogspot.dk/2014/04/mac-book-pro-113-linux-customization-5.html
# https://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html
# Add "syndaemon -k -K -d -i 0.2 -R" command to autostart at login
cp syndaemon.desktop ~/.config/autostart/
if [[ $(sudo lshw 2>&1 | grep "version: ThinkPad L450" | wc -l) = '1' ]]; then
echo "Configuring synaptics on ThinkPad L450"
synclient VertScrollDelta=-200 # default -114
synclient HorizScrollDelta=-200 # default -114
# Palm detection
synclient PalmDetect=1 # default 0 (need long time testing to tune the other palm* values)
synclient PalmMinWidth=10 # default 10
synclient PalmMinZ=200 # default 200
synclient FingerHigh=55 # default 30
synclient FingerLow=35 # default 25
# Mouse movement
synclient AccelFactor=0.03 # default 0.0348918
synclient MinSpeed=1 # default 1
synclient MaxSpeed=1.75 # default 1.75
# Scroll after release
synclient CoastingSpeed=20 # default 20
synclient CoastingFriction=50 # default 50
fi
### MAKE SYNAPTIC CHANGES PERSIST ACROSS REBOOT
# TODO: make script that does this
# https://askubuntu.com/questions/290009/how-do-i-make-my-synclient-settings-stick
# The best method that have worked for me is to add your changes into Xsession.d, so it will load automatically for all users when you log into X:
# (the file doesn't exists, so you can name it whatever you want. The numbers on the left means the order in which it will be executed in comparison with the other files.)
# /etc/X11/Xsession.d/80synaptics
# (owned by root, with permissions 644)
# For example, you can use this as base:
##https://wiki.archlinux.org/index.php/Touchpad_Synaptics
##Palm dimension
##synclient PalmDetect=1
##synclient PalmMinWidth=4
##...
##########################
### How to debug trackpad
# source http://lukeluo.blogspot.com/2014/04/mac-book-pro-113-linux-customization-5.html
# Identify device ID:
# cat /proc/bus/input/devices
# Make sure "synclient GrabEventDevice=0", so X won't monopolize the event source and evtest can capture the event at the same time with X.
# then monitor the events, eg filtering for presssure
# sudo evtest /dev/input/event5 | grep -i abs_pressure
# Tip for identying which conf files are used by a package
# https://askubuntu.com/questions/818732/how-do-i-disable-the-default-syndaemon
### BUG: palm detect not working (ABS_TOOL_WIDHT lways reporting 0)
# Must test this solution (upgrade to latest libinput & libwacom)
# https://unix.stackexchange.com/questions/463447/libinput-palm-detection-not-working
# PREPARE
sudo apt-get update
### INSTALL PROGRAMS #########################################################
# System tools
sudo apt-get -y install \
dconf-editor \
unity-tweak-tool\
gparted \
smartmontools \
numlockx \
openssh-server \
tree \
iotop \
htop \
compizconfig-settings-manager \
tmux \
curl \
exfat-fuse \
exfat-utils \
evtest \
# General apps
sudo apt-get -y install \
wireshark \
virtualbox \
meld \
# Python development
sudo apt-get -y install \
python-pip \
pip install virtualenv
pip install --upgrade pip
# Krusader and it's dependencies
sudo apt-get -y install \
krusader \
khelpcenter \
kde-baseapps-bin\
kdiff3 \
krename \
unrar \
rar \
# vim version 8
sudo add-apt-repository -y ppa:jonathonf/vim
sudo apt update
sudo apt install -y vim
### CONFIGURE UI #############################################################
# Move menu's to the app itself
dconf write /com/canonical/unity/integrated-menus true
# Always show the menu
dconf write /com/canonical/unity/always-show-menus true
# Enable 2x2 workspace layout
dconf write /org/compiz/profiles/unity/plugins/core/hsize 2
dconf write /org/compiz/profiles/unity/plugins/core/vsize 2
# Trackpad scroll like my Mac :-)
dconf write /org/gnome/desktop/peripherals/touchpad/natural-scroll true
# Format date/time in menubar
dconf write /com/canonical/indicator/datetime/time-format "'custom'"
dconf write /com/canonical/indicator/datetime/show-week-numbers true
dconf write /com/canonical/indicator/datetime/custom-time-format "'%A %d/%m-%Y %H:%M:%S'"
# Battery
dconf write /com/canonical/indicator/power/show-time true
### TODO freeplane 1.6.6 (apt-get only provides 1.3.15-3)
# Make curl/wget dl + install
# Source: https://www.freeplane.org/wiki/index.php/Ubuntu
# download https://sourceforge.net/projects/freeplane/files/freeplane%20stable/freeplane_1.6.6%7Eupstream-1_all.deb/download
# Install: sudo dpkg -i freeplane_1.6.6~upstream-1_all.deb
# Unpacks over existing old version
# TODO: post script or guide to add current user to a wireshark group
# for git
# git config --global user.email "[email protected]"
# git config --global user.name "Thomas von Eyben"
# git 2.0 change - restore old behavior:
# git config --global push.default matching