Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-01-21 12:00:18

D.dave
Member
Registered: 2019-12-06
Posts: 92
LinuxFirefox 134.0

Gedit: remove the headerbar (?)

This is how Gedit looks when executed by my user:
gedit-user.png

This is how Gedit looks when executed as root user:
gedit-root.png

I'd like much more in this way, without the hederbar, but I can't figure out what I have to add to ~/.config/gtk-3.0/gtk.css


OS: Manjaro x86_64
DE: Xfce 4.20

Offline

#2 2025-01-21 12:31:11

eriefisher
Wanderer
From: ON, Canada
Registered: 2008-10-25
Posts: 962
LinuxFirefox 134.0

Re: Gedit: remove the headerbar (?)

This is not a css thing. This is a CSD(client side decoration) thing. Do you have gtk3-nocsd installed? Not sure why it's rendered differently between root and user?


But it's all right, when you're all in pain and you feel the rain come down
It's alright, when you find your way, then you see it disappear
It's alright....
Chris Cornell

Offline

#3 2025-01-21 12:33:42

D.dave
Member
Registered: 2019-12-06
Posts: 92
LinuxFirefox 134.0

Re: Gedit: remove the headerbar (?)

eriefisher wrote:

Do you have gtk3-nocsd installed

Yes.

However: in gtk.css I am able to change/hide/remove the text of the headerbar, by using:

headerbar {
    color: transparent


}

There is also a way to reduce the weight to 0px?

Last edited by D.dave (2025-01-21 12:41:32)


OS: Manjaro x86_64
DE: Xfce 4.20

Offline

#4 2025-01-21 13:35:36

eriefisher
Wanderer
From: ON, Canada
Registered: 2008-10-25
Posts: 962
LinuxFirefox 134.0

Re: Gedit: remove the headerbar (?)

Try adding GTK_CSD=1 to /etc/environment and restart. (I think that's the line. Going from memory)


But it's all right, when you're all in pain and you feel the rain come down
It's alright, when you find your way, then you see it disappear
It's alright....
Chris Cornell

Offline

#5 2025-01-21 13:37:53

D.dave
Member
Registered: 2019-12-06
Posts: 92
LinuxFirefox 134.0

Re: Gedit: remove the headerbar (?)

eriefisher wrote:

Try adding GTK_CSD=1 to /etc/environment

This broke the titlebar of my theme; in facts, I use gtk3-nocsd and GTK_CSD=0: in this way, gedit, use the title bar of my theme; but as you can see in the screenshots, gedit executed as root, doesn't have the headerbar.


OS: Manjaro x86_64
DE: Xfce 4.20

Offline

#6 2025-01-21 14:19:06

eriefisher
Wanderer
From: ON, Canada
Registered: 2008-10-25
Posts: 962
LinuxFirefox 134.0

Re: Gedit: remove the headerbar (?)

I would check in /root directory for either .profile or in .bashrc to see if something is set there making it different between root and user.


But it's all right, when you're all in pain and you feel the rain come down
It's alright, when you find your way, then you see it disappear
It's alright....
Chris Cornell

Offline

#7 2025-01-22 11:06:09

D.dave
Member
Registered: 2019-12-06
Posts: 92
LinuxFirefox 134.0

Re: Gedit: remove the headerbar (?)

eriefisher wrote:

check in /root directory for either .profile or in .bashrc

Nothing special: there are the same things that I have set for my user

The funny thing is: that, if as root I execute GTK_CSD=1 gedit, gedit still doesn't have the headerbar

EDIT: I've found a partial solution/workaround: I edited the Gedit launcher/.desktop file as following:

bash -c "LD_PRELOAD=/usr/lib/qt/plugins/platformthemes/libqgtk3.so GTK_CSD=0 GTK_THEME=Greybird-dark gedit"

In this way, is started like as root, without the headerbar:

gedit-without-headerbar-user.png

EDIT 2:
I also made a bash script: ~/.local/bin/gedit, with the following content:

export LD_PRELOAD=/usr/lib/qt/plugins/platformthemes/libqgtk3.so
export GTK_CSD=0
export GTK_THEME=Greybird-dark

LD_PRELOAD=/usr/lib/qt/plugins/platformthemes/libqgtk3.so GTK_CSD=0 GTK_THEME=Greybird-dark /usr/bin/gedit $1

And in mime-types, I choosed this script for opening text files; otherwise, Gedit is normally started without the workaround.

Last edited by D.dave (2025-01-22 12:32:31)


OS: Manjaro x86_64
DE: Xfce 4.20

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 537.95 KiB (Peak: 538.58 KiB) ]