Skip to content

Instantly share code, notes, and snippets.

@maxwelleite
Last active October 6, 2018 13:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxwelleite/9768293 to your computer and use it in GitHub Desktop.
Save maxwelleite/9768293 to your computer and use it in GitHub Desktop.
Simple Bash script for enable all extensions in Gnome Shell on startup
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
#
# INSTALL:
# To activate/enable all extensions every time at startup:
# 1. Create a folder for your own scripts:
# mkdir ~/bin
# 2. Download a script file gnome-shell-enable-all-extensions.sh to "~/bin":
# 3. Setting up permissions for the script file:
# chmod +x ~/bin/gnome-shell-enable-all-extensions.sh
# 4. At last, puts the command in startup gnome-session-properties:
# /home/YOUR-USERNAME/bin/gnome-shell-enable-all-extensions.sh
sleep 2s # just in case
cd ~/.local/share/gnome-shell/extensions
array=($(ls -l --time-style=long-iso | egrep '^d' | awk '{print $8}')) # get only the folder names from current path
ext_list=$(printf "'%s'," "${array[@]}") # rebuild the string
ext_list=${ext_list%,} # Remove the final character of the variable
gsettings set org.gnome.shell enabled-extensions "[${ext_list}]"
@7tg
Copy link

7tg commented Jul 2, 2018

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment