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

listvin commented Feb 11, 2023

There is a problem with this solution -- it removes bars from all ff windows you have open, including other profiles which may not have this extension and thus deleting is unwanted

Copy link

erm3nda commented Mar 7, 2023

I don't remember the last time I used to need this. Modern Firefox can apply that from "Personalize taskbar" option, which is called "hide taskbar". It works as expected.

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