-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfigure
executable file
·70 lines (62 loc) · 2.24 KB
/
configure
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
#!/bin/bash
dir="$(dirname "$0")"
source $dir/functions/configure-data/animations
source $dir/functions/configure-data/button-layout
source $dir/functions/configure-data/nautilus-extensions
source $dir/functions/configure-data/preferences
# Show start-up applications
function startup {
show_info 'Changing display of startup applications...'
show_warning 'Requires root privileges'
sudo sed -i "s/NoDisplay=true/NoDisplay=false/g" /etc/xdg/autostart/*.desktop
# Done
show_success 'Done.'
whiptail --title "Finished" --msgbox "Settings changed successfully." 8 78
configure
}
# Disable Apport
function apport {
show_info 'Disabling apport crash dialogs...'
show_warning 'Requires root privileges'
sudo sed -i "s/enabled=1/enabled=0/g" /etc/default/apport
# Done
show_success 'Done.'
whiptail --title "Finished" --msgbox "Settings changed successfully." 8 78
configure
}
# Fix indicator keyboard
function keyboard {
show_info 'Fix indicator keyboard...'
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'ru')]"
gsettings set org.gnome.desktop.input-sources xkb-options "['grp_led:scroll', 'grp:alt_shift_toggle']"
gsettings set org.gnome.desktop.input-sources xkb-options ['grp:alt_shift_toggle', 'grp_led:scroll']
# Done
show_success 'Done.'
whiptail --title "Finished" --msgbox "Settings changed successfully." 8 78
configure
}
# Configure System
function configure {
eval `resize`
CONF=$(whiptail \
--notags \
--title "Configure System" \
--menu "\nWhat would you like to do?" \
--ok-button "Apply" \
--cancel-button "Go Back" \
$LINES $COLUMNS $(( $LINES - 12 )) \
preferences 'Set preferred application-specific settings' \
startup 'Show all startup applications' \
apport 'Disable system crash dialogs' \
keyboard 'Fix indicator keyboard' \
button-layout 'Selection button layout' \
animations 'Enable/disable animations' \
nautilus-extensions 'Nautilus extensions' \
3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
clear && $CONF
else
clear && main
fi
}