zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.54k stars 2.64k forks source link

System Window Decorations #14326

Closed tripplehelix closed 2 weeks ago

tripplehelix commented 1 month ago

Check for existing issues

Describe the feature

Would be really nice if we could use the systems window decorations instead of the apps.

The close/maximise/minimise buttons are in the wrong place and order for my setup, also doesn't fit in with my custom system theme.

If applicable, add mockups / screenshots to help present your vision of the feature

image

vs

Screenshot_2024-07-12_13-53-37

someone13574 commented 1 month ago

Run with the ZED_WINDOW_DECORATIONS=server environment variable.

tripplehelix commented 1 month ago

Run with the ZED_WINDOW_DECORATIONS=server environment variable.

Amazing! Thank you! This also fixes a weird issue where moving the mouse over the title bar attaches the window to the mouse. (x11 xfce)

someone13574 commented 1 month ago

@tripplehelix Can this issue be closed then?

tripplehelix commented 1 month ago

Should still have a setting to make this easier and more obvious.

LSeelig commented 1 month ago

Unfortunately, GNOME Wayland does not support SSD. A "System" titlebar option should really use something like libdecor if it will look decent. The rounded corners also seem to be causing issues. They're a bit glitchy (under wayland), and I don't know of any distro with a similar radius.

tripplehelix commented 1 month ago

Just disable the option if the user is running Gnome? One WM shouldn't bring down the vast number of other desktops.

LSeelig commented 1 month ago

Just disable the option if the user is running Gnome? One WM shouldn't bring down the vast number of other desktops.

It's ultimately up to the developers and the community if they want to support the DE a plurality of Linux desktop users use. It's not "bringing down" anyone but GNOME's users.

AndydeCleyre commented 1 month ago

For KDE Plasma, the following is probably the most straightforward way.

$ mkdir -p ~/.config/plasma-workspace/env
$ echo 'export ZED_WINDOW_DECORATIONS=server' >>~/.config/plasma-workspace/env/zed.sh

Maybe other DE users would like to post suitable approaches for those here as well.

tripplehelix commented 1 month ago

You just add it to your .bashrc, .bash_profile, .profile, /etc/environment or /etc/profile no?

As I use FISH I added it to .config/fish/config.fish

Still would be easier if zed's settings had this as an option so this wasn't needed.

RustoMCSpit commented 1 month ago

ZED_WINDOW_DECORATIONS=server

you mean in the terminal? i tried ./zed --ZED_WINDOW_DECORATIONS=server and got

error: unexpected argument '--ZED_WINDOW_DECORATIONS' found

  tip: to pass '--ZED_WINDOW_DECORATIONS' as a value, use '-- --ZED_WINDOW_DECORATIONS'

Usage: zed [OPTIONS] [PATHS_WITH_POSITION]...

For more information, try '--help'.
someone13574 commented 1 month ago

Its an environment variable. ZED_WINDOW_DECORATIONS=server ./zed

Moshyfawn commented 2 weeks ago

There's a slightly older issue on the same topic that's getting more traction, so I'm going to close it in its favour to keep the conversation in one place. Be sure to +👍 the other thread and continue the conversation there.

Duplicate of: