Created
May 31, 2017 10:59
-
-
Save metainfa/7c6d578a6a38f06d91dc060d057f6762 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment