Coder Social home page Coder Social logo

extended-gtk3-nocsd's Introduction

Extended-GTK3-nocsd

extgtk3-nocsd is a wrappper for gtk3-nocsd module used to disable the client side decoration of Gtk+ 3 per application

Introduction:

Since Gtk+ 3.10, its developers added a so-called header bar or custom title bar. With this and the client-side decoration, the original title bar and window border provided by the window manager are disabled by Gtk+. The worst part, is that it breaks down some window managers or composers. See a example:

Unfortunately, the Gtk+ developers decided to be against the existing standards and provide "no option" to turn it off. Thanks to PCMan's gtk3-nocsd, we still have a way to (partially) turn it off. Window manager (title bar and window border) can be re-enabled. But isn't seamless as you can see:

Note the duplication of application title and window icon

The extgtk3-nocsd fix it by overriding GTK 3 config dir, so the result looks more naturally:

How to use:

  • Install gtk3-nocsd (usually by installing libgtk3-nocsdpackage)
  • Download the wrapper: wget https://git.io/fjGRR -O extgtk3-nocsd
  • Turn executable: chmod +x extgtk3-nocsd
  • Move to /usr/bin: sudo mv extgtk3-nocsd /usr/bin/
  • Use the command extgtk3-nocsd applicationfor example extgtk3-nocsd evince

To have all Gtk+ 3 apps (of current user) use this:

Note: If you installed gtk3-nocsd from your package manager you don't need do these steps, only run:

extgtk3-nocsd


  • Install gtk3-nocsd (usually by installing libgtk3-nocsdpackage)
  • Run script without parameter:extgtk3-nocsd

You will see some errors, ignore them

  • Do these steps:

Export some environment variables in your ~/.bashrc:

GTK3_NOCSD=$(ldconfig -p | grep libgtk3-nocsd.so | awk '{print $4}')
export GTK_CSD=0
export LD_PRELOAD="${GTK3_NOCSD}${LD_PRELOAD:+:$LD_PRELOAD}"

On Arch Linux, you should use ~/.xsession instead of ~/.bashrc for the CSDs to be disabled properly.

On Debian-based systems with graphical login, instead modify (or create) ~/.xsessionrc and add the code:

  if [ -n "$STARTUP" ]; then
    BASESTARTUP=${STARTUP%% *}
    BASESTARTUP=${BASESTARTUP##*/}
    if [ "$BASESTARTUP" = x-session-manager ]; then
      BASESTARTUP=$(basename $(readlink /etc/alternatives/x-session-manager))
    fi
    if [ x"$BASESTARTUP" = x"${BASESTARTUP#gnome-session}" ] ; then
      GTK3_NOCSD=$(ldconfig -p | grep libgtk3-nocsd.so | awk '{print $4}')
      export GTK_CSD=0
      STARTUP="env LD_PRELOAD=${GTK3_NOCSD}${LD_PRELOAD:+:$LD_PRELOAD} $STARTUP"
    fi
  fi

Re-login to make the environment variables take effect.

extended-gtk3-nocsd's People

Contributors

sudo-give-me-coffee avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.