-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
executable file
·49 lines (45 loc) · 1.12 KB
/
install.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
#! /bin/bash
##################################################
# Author: Radoje
# Github: github.com/Jezda1337
# Version: v1.0.0
# Date: 16.09.2022
# Description: This script solves the problem of slow scroll on chromium based applications and caps lock delay.
# Usage: The script only support base distros like debian, arch and fedora
# example: ./install.sh -d debian
# Flags: -d stands for distribution, the three most used distros are debian, arch and fedora
##################################################
# Main func
main() {
local DISTRIBUTION=""
local FIX=""
while [ $# -gt 0 ]; do
if [[ $1 == *"-"* ]]; then
param="${1/-/}"
if [ "$param" == "f" ]; then
FIX=$2
elif [ "$param" == "d" ]; then
DISTRIBUTION="$2"
else
if [ "$param" == "u" ]; then
./lib/uninstall.sh
exit 1
fi
fi
fi
shift
done
if [ "$FIX" == "1" ]; then
./lib/mouse.sh "$DISTRIBUTION"
exit 1
elif [ "$FIX" == "2" ]; then
./lib/caps.sh
exit 1
else
./lib/mouse.sh "$DISTRIBUTION"
./lib/caps.sh
echo "Slow scroll and CApsLOck delay are fixed, please reboot your system."
fi
exit 0
}
main "$@"