-
Notifications
You must be signed in to change notification settings - Fork 0
/
modern-space-cadet.sh
43 lines (34 loc) · 1.14 KB
/
modern-space-cadet.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
#!/bin/bash
set -eu -o pipefail # fail on error , debug all lines
set -x
if ! sudo -v; then
error "Superuser not granted, aborting..."
exit 1
fi
echo "Preparing modern-space-cadet..."
mkdir -p "$HOME/.modern-space-cadet"
_first=$PWD
cd "$HOME" # go home
mkdir -p "$HOME/.modern-space-cadet/src" # create a folder to keep everything
cd .modern-space-cadet/src # a folder to keep source files and repos
rm -rf tools
git clone https://gitlab.com/interception/linux/tools
rm -rf dual-function-keys
git clone https://gitlab.com/interception/linux/plugins/dual-function-keys
cd tools
rm -rf build
mkdir build
cd build
cmake ..
make
sudo make install
cd ../../
cd dual-function-keys
make && sudo make install
cd "$_first" # go back to dotfiles folder
ln -fs "$PWD/modern-space-cadet/dual-function-keys.yaml" "$HOME/.modern-space-cadet/dual-function-keys.yaml"
sudo ln -fs "$PWD/modern-space-cadet/udevmon.yaml" /etc/udevmon.yaml
sudo ln -fs "$PWD/modern-space-cadet/udevmon.service" /etc/systemd/system/udevmon.service
sudo systemctl daemon-reexec
sudo systemctl enable --now udevmon
sudo systemctl start udevmon