Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# date: 2017-11-17
# license: GPLv3
# author: nanpuyue <>
echo 'install: ~/.mozilla/native-messaging-hosts/hide_titlebar.json'
[[ -d ~/.mozilla/native-messaging-hosts ]] || mkdir -p ~/.mozilla/native-messaging-hosts
cat > ~/.mozilla/native-messaging-hosts/hide_titlebar.json << EOF
"name": "hide_titlebar",
"description": "Hide the Firefox titlebar.",
"path": "$HOME/.local/bin/",
"type": "stdio",
"allowed_extensions": [""]
echo 'install: ~/.local/bin/'
[[ -d ~/.local/bin ]] || mkdir -p ~/.local/bin
cat > ~/.local/bin/ << "EOF"
# date: 2017-11-17
# license: GPLv3
# author: nanpuyue <>
python3 -c "import gi; gi.require_version('Gdk', '3.0'); from gi.repository import Gdk, GdkX11;
$(for i in $(xdotool search --onlyvisible --class "Firefox|Nightly"); do
echo "GdkX11.X11Window.foreign_new_for_display(default_display, $i).set_decorations(Gdk.WMDecoration.BORDER);"
chmod +x ~/.local/bin/
echo 'done'
Copy link

erm3nda commented Jan 23, 2020

Right click Menu Button > Customize > Uncheck "Title Bar"

Thanks!! I didin't knew they added this option!

Yes, don't forget to uncheck that option after everything is installed.
In my case (manjaro deepin, ffox 72) I still preserve window control buttons (minimize, etc)

I needed to remove title bar because my habit to open links just dragging them "to the top" without have to aim anywhere and to search dragged text from url bar

Copy link

undeadway commented Mar 3, 2020

版本号:Firefox Developer Edition 74.0b6 (64-bit)

Copy link

sjonathansilva commented Mar 20, 2020

PSA: Anyone looking for this feature, before trying this script check if you have the option to disable the title bar down in the lower left corner of the firefox customization screen.

Right click Menu Button > Customize > Uncheck "Title Bar"

Thanks, man! you`r a firefox's god

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