Skip to content

Instantly share code, notes, and snippets.

@mooninite
Last active May 2, 2019 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mooninite/09d2f51240f6f03cf072fe106a5b32d9 to your computer and use it in GitHub Desktop.
Save mooninite/09d2f51240f6f03cf072fe106a5b32d9 to your computer and use it in GitHub Desktop.
#!/bin/bash
# to get gresource:
# dnf install glib2-devel
JS_EXTRACT_FOLDER=$HOME/gnome-shell-js
#DETECT 32/64 BIT SYSTEM
if [ ! -d "/usr/lib64/" ]; then
GNOME_SHELL_LIB=/usr/lib/gnome-shell/libgnome-shell.so
else
GNOME_SHELL_LIB=/usr/lib64/gnome-shell/libgnome-shell.so
fi
PANEL_JS_FILE=$JS_EXTRACT_FOLDER/ui/panel.js
if [ ! -d "$JS_EXTRACT_FOLDER" ]; then
mkdir -p $JS_EXTRACT_FOLDER
cd $JS_EXTRACT_FOLDER
mkdir -p ui/components ui/status misc perf extensionPrefs gdm
for r in `gresource list $GNOME_SHELL_LIB`; do
gresource extract $GNOME_SHELL_LIB $r > ${r/#\/org\/gnome\/shell/.}
done
#APPLY THE FIX
sed -i 's/super.vfunc_allocate/this.set_allocation/g' $PANEL_JS_FILE
#ADD ENV VARIABLE FOR GNOME TO LOAD JS FILES FROM THE FOLDER
echo "export GNOME_SHELL_JS=$HOME/gnome-shell-js" >> ~/.bash_profile
echo "Log out and back in for change to take effect"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment