-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix.sh
More file actions
executable file
·32 lines (28 loc) · 1.05 KB
/
fix.sh
File metadata and controls
executable file
·32 lines (28 loc) · 1.05 KB
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
#!/bin/bash
if [[ $(pgrep xautolock) ]] ; then
echo "[OK] xautolock is running"
else
echo -e "[Error] xautolock is not running.\nStarting..."
sleep 1
xautolock-init.sh
[[ $(pgrep xautolock) ]] && echo "[FIXED] xautolock started" || "[FAIL] xautolock failed to start"
fi
if [[ $(setxkbmap -query | grep dvorak) ]] ; then
echo "[OK] Keyboard is set to: dvorak"
else
echo -e "\n[Error] The keyboard layout is not dvorak"
keyboard-init.sh
[[ $(setxkbmap -query | grep dvorak) ]] && echo "[FIXED] Set keyboard layout to: dvorak" || "[FAIL] Could not set keyboard to: dvorak"
fi
if [[ $(xmodmap -pke | grep " 66" | grep 8) ]] ; then
echo "[OK] Eight key enabled"
else
echo -e "\n[Error] Eight key not enabled. Enabling eight key..."
keyboard-init.sh
[[ $(xmodmap -pke | grep " 66" | grep 8) ]] && echo "[FIXED] Enabled eight key" || echo "[FAIL] Could not enable eight key"
fi
if [[ $SOLARIZED > 0 ]] ; then
echo "[OK] SOLARIZED is set to: $SOLARIZED"
else
echo -e "\n[Error] SOLARIZED variable is not set.\nSet SOLARIZED manually or by sourcing '.env'..."
fi