2021-12-28 16:46:57 +01:00
# Nautilus
2021-11-14 00:44:24 +01:00
# Fetching customs keyboard shortcuts
2021-11-12 15:40:43 +01:00
CUSTOM_KEYBINDINGS_LIST = $( gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
2021-12-28 17:05:59 +01:00
if [ [ $CUSTOM_KEYBINDINGS_LIST = = "@as []" ] ] # creating new list if not exists
2021-11-12 15:40:43 +01:00
then
CUSTOM_KEYBINDINGS_LIST = "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']"
2021-12-28 17:05:59 +01:00
else # if already existing, adding our new element
2021-11-12 15:40:43 +01:00
CUSTOM_KEYBINDINGS_LIST = " ${ CUSTOM_KEYBINDINGS_LIST : :- 1 } , '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/'] "
fi
2021-12-28 17:05:59 +01:00
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings " $CUSTOM_KEYBINDINGS_LIST " # updating the list
2021-11-14 00:44:24 +01:00
# Naming it
2021-12-28 17:05:59 +01:00
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ name 'Nautilus' # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ command 'nautilus -w' # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ binding '<Super>E' # set shortcut
2021-12-28 16:48:40 +01:00
echo -e "\nNautilus shortcut added (Super+E)!"
# Desktop modifications
# Remove the Trash icon from the bar
gsettings set org.gnome.shell.extensions.dash-to-dock show-trash false
echo "Trash icon removed from the dock!"
# Move the Menu Button to the top of the bar
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true
echo "Menu button moved from left to right in the dock!"
# Move the taskbar to the bottom
gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM
echo "Dock moved from the left to the bottom!"
# Add minimized window on dock click
gsettings set org.gnome.shell.extensions.dash-to-dock click-action minimize
echo "Window are now minimized when clicked in te dock!"
# Show battery pourcentage
gsettings set org.gnome.desktop.interface show-battery-percentage true
echo "Battery pourcentage now displayed!"
2021-12-28 17:34:05 +01:00
# Change size of icon in the Dock
sizedock = 40
settings set org.gnome.shell.extensions.dash-to-dock dash-max-icon-size $sizedock
2021-12-28 17:37:10 +01:00
echo " Icon in the dock changed from 48 to $sizedock ! "
2021-12-28 17:34:05 +01:00
2021-12-28 16:52:19 +01:00
# Icons
# Path where icons are saved
pathicons = '/usr/share/applications'
2021-12-28 16:54:58 +01:00
apps = ( "debian-xterm" "debian-uxterm" "software-properties-drivers" "software-properties-livepatch" )
2021-12-28 16:52:19 +01:00
# We remove the Ubuntu desktop shortcut only if it already exists
for app in ${ apps [@] }
do
if [ -f $pathicons /$app .desktop ]
then
sudo mv $pathicons /$app .desktop $pathicons /$app .desktop.bak
echo " $app 's icon removed! "
fi
done
2021-12-28 16:48:40 +01:00
echo -e "\nGlobal Ubuntu modifications applied! 🎉"