Giter Site home page Giter Site logo

Comments (3)

sagb avatar sagb commented on June 10, 2024

Are you sure xprop accepts atoms separated by coma? Can you try instead:

wmctrl -i -r <win_id> -b add,skip_taskbar
wmctrl -i -r <win_id> -b add,maximized_vert

from alttab.

orestisfl avatar orestisfl commented on June 10, 2024

Well, to begin with, i3 does not support setting these atoms (not to mention that it doesn't support setting multiple atoms at once: i3/i3#5910)

bryan-cranston-replace-the-bulb

from alttab.

orestisfl avatar orestisfl commented on June 10, 2024

Seems to work with this:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xcb/xcb.h>

xcb_connection_t *conn;

static void xcb_add_property_atom(xcb_window_t window, xcb_atom_t property, xcb_atom_t atom) {
    xcb_change_property(conn, XCB_PROP_MODE_APPEND, window, property, XCB_ATOM_ATOM, 32, 1, (uint32_t[]){atom});
}

static xcb_atom_t add_atom(char *name) {
    xcb_intern_atom_cookie_t cookie = xcb_intern_atom(conn, 0, strlen(name), name);
    xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, cookie, NULL);
    if (!reply) {
        return 0;
    }
    printf("The %s atom has ID %u\n", name, reply->atom);
    xcb_atom_t result = reply->atom;
    free(reply);
    return result;
}

int main(int argc, char **argv) {
    if (argc < 2) {
        return 1;
    }
    xcb_window_t window = atoi(argv[1]);

    conn = xcb_connect(NULL, NULL);
    xcb_atom_t state_atom = add_atom("_NET_WM_STATE");
    xcb_atom_t taskbar_atom = add_atom("_NET_WM_STATE_SKIP_TASKBAR");

    xcb_add_property_atom(window, state_atom, taskbar_atom);
    xcb_flush(conn);

    return 0;
}

from alttab.

Related Issues (20)

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.