Coder Social home page Coder Social logo

kdecoration's Introduction

KDecoration2

Plugin based library to create window decorations.

Introduction

KDecoration2 is a library to create window decorations. These window decorations can be used by for example an X11 based window manager which re-parents a Client window to a window decoration frame.

The library consists of two parts:

  • Decoration API for implementing a Decoration theme
  • Private API to implement the backend part (e.g. from Window Manager side)

Providing a Decoration

To provide a custom decoration one needs to create a plugin and provide an own implementation of KDecoration2::Decoration. For a framework to load and find the plugin it needs to be compiled with the proper json metadata. An example for such metadata (deco.json):

{
    "KPlugin": {
        "Id": "org.kde.myAweseomeDecoration",
        "ServiceTypes": [
            "org.kde.kdecoration2"
        ]
    },
    "X-KDE-ConfigModule": "kcm_name", /* comes with a configuration module */
    "org.kde.kdecoration2": {
        "blur": false, /* blur behind not needed */
    }
}

To simplify one can use the KPluginFactory macro from the KCoreAddons framework:

K_PLUGIN_FACTORY_WITH_JSON(
    MyAwesomeDecorationFactory,
    "deco.json",
    registerPlugin<MyAwesomeDecoration::Decoration>();
)

The plugin needs to get installed to ${KDE_INSTALL_PLUGINDIR}/org.kde.kdecoration2.

Configuring the Decoration

It is possible to provide a configuration module to tweak some aspects of the decoration. This is done by creating a plugin that provides such a configuration module.

The kcmoduleName specifies the name of the configuration module. It needs to be installed under ${KDE_INSTALL_PLUGINDIR}/org.kde.kdecoration2.kcm so that it can be looked up.

kdecoration's People

Contributors

mgraesslin avatar jriddell avatar montel avatar kossebau avatar davidedmundson avatar nicolasfella avatar alex1701c avatar zzag avatar vkrause avatar aleixpol avatar bhush9 avatar zamundaaa avatar kbroulik avatar pointedstick avatar luebking avatar ratijas avatar winterz avatar antonio-rojas avatar awhiemstra avatar carlschwan avatar cfeck avatar krop avatar daandemeyer avatar sodivad avatar eikehein avatar hsitter avatar pontaoski avatar staniek avatar miabrahams avatar psifidotos 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.