#!/bin/bash | |
# date: 2017-11-17 | |
# license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
# author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
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/hide-firefox-titlebar.sh", | |
"type": "stdio", | |
"allowed_extensions": ["hide-titlebar@nanpuyue.com"] | |
} | |
EOF | |
echo 'install: ~/.local/bin/hide-firefox-titlebar.sh' | |
[[ -d ~/.local/bin ]] || mkdir -p ~/.local/bin | |
cat > ~/.local/bin/hide-firefox-titlebar.sh << "EOF" | |
#!/bin/bash | |
# date: 2017-11-17 | |
# license: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt | |
# author: nanpuyue <nanpuyue@gmail.com> https://blog.nanpuyue.com | |
python3 -c "import gi; gi.require_version('Gdk', '3.0'); from gi.repository import Gdk, GdkX11; | |
default_display=GdkX11.X11Display.get_default(); | |
$(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);" | |
done) | |
Gdk.Window.process_all_updates();" | |
EOF | |
chmod +x ~/.local/bin/hide-firefox-titlebar.sh | |
echo 'done' |
Works, but am now completely unable to minimize or drag the window. ArchLinux with Deepin.
@SylveonBottle How about draging it with Alt
key pressed - this takes care of the minimizing and dragging part.
Thanks. Works on Deepin 15.5.
@SylveonBottle If you wish, install 3 additional extensions in order to recover the min/max/close buttons.
https://addons.mozilla.org/firefox/addon/minimize-the-window/ https://addons.mozilla.org/firefox/addon/maximize-the-window/ https://addons.mozilla.org/firefox/addon/close-the-window/
Not doing all that much.
bash -x ~/.local/bin/hide-firefox-titlebar.sh
+++ xdotool search --onlyvisible --class 'Firefox|Nightly'
++ for i in $(xdotool search --onlyvisible --class "Firefox|Nightly")
++ echo 'GdkX11.X11Window.foreign_new_for_display(default_display, 127926289).set_decorations(Gdk.WMDecoration.BORDER);'
+ python3 -c 'import gi; gi.require_version('\''Gdk'\'', '\''3.0'\''); from gi.repository import Gdk, GdkX11;
default_display=GdkX11.X11Display.get_default();
GdkX11.X11Window.foreign_new_for_display(default_display, 127926289).set_decorations(Gdk.WMDecoration.BORDER);
Gdk.Window.process_all_updates();'
Is this project still active?
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"
Right click Menu Button > Customize > Uncheck "Title Bar"
Thanks!! I didin't knew they added this option!
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
.
Thanks!!
照着安装以后,titlebar没有隐藏,会不会和虚拟机有关?
版本号:Firefox Developer Edition 74.0b6 (64-bit)
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
It doesn't work on Manjaro Cinnamon
