-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·122 lines (90 loc) · 2.32 KB
/
setup.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
#!/bin/bash
#
# The main script
#
# Assumes child scripts would kill program if something went wrong
#
# Check if root
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# functions
function ask() {
read -p "$1 (Y/n): " resp
if [ -z "$resp" ]; then
response_lc="y" # empty is Yes
else
response_lc=$(echo "$resp" | tr '[:upper:]' '[:lower:]') # case insensitive
fi
[ "$response_lc" = "y" ]
}
function echo_success() {
echo "[ OK ]"
}
# Installation starts here
echo "Actions will be logged in setup_log"
exec 1>>setup_log 2>>setup_log
echo "Updating and Upgrading"
apt-get update && apt-get upgrade -y
# Prepare tmp folder
echo "Preparing tmp folder"
mkdir -p tmp
# Ask which files should be sourced
echo "Do you want to install: "
for file in install/*; do
if [ -f "$file" ]; then
filename=$(basename "$file")
if ask "${filename}?"; then
source "$file"
echo_success
fi
fi
done
# Finish
function cleanup() {
echo "Cleaning up..."
rm -fr tmp
echo "Script finished."
}
cleanup
#
# TODOs
#
# todo keyboard shortcuts for suspend, hotspot
# What else to do? https://www.youtube.com/watch?v=GrI5c9PXS5k
# allow partner repositories
# set DNS to 1.1.1.1 and 1.0.0.1
# czech layout in settings > region
# sudo setxkbmap -layout cz
# todo tool https://github.com/slimm609/checksec.sh/zipball/main
# todo alt+tab scroll fix: imwheel
# start automatically after startup
# look into ~/.imwheelrc (https://github.com/freeplane/freeplane/issues/134)
# todo krusader theme and first launch
# todo hotspot macro
# todo https://github.com/madler/pigz
# todo custom alias for hexdump, ...
# todo git credential helper
# sudo apt install libsecret-1-dev
# git config --global credential.helper libsecret
# check if configured correctly with: git credential-libsecret
# todo zoxide https://github.com/ajeetdsouza/zoxide
# cargo install zoxide --locked
# or
# apt install zoxide
# eval "$(zoxide init bash)"
# todo fzf fuzzyfinder, used by zoxide
# sudo apt-get install fzf
# todo navi
# cargo install --locked navi
# todo some custom cheatsheets
# cheat to remove node_modules and build folders
# todo id3tool
# todo guake
# todo add i3lock-fancy to install script
# todo gnome-session-properties
# start guake
# todo zerotier
# curl -s https://install.zerotier.com | sudo bash
# todo xsel