Coder Social home page Coder Social logo

bad-ptr / xsetprop Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 4.0 20 KB

Program for setting X window properties, like xprop, but for 'set' only(not 'get') and allow setting list of atoms ( or patch for xprop ).

License: GNU General Public License v2.0

Makefile 4.10% C 95.90%

xsetprop's Introduction

Copyright 2012 Constantin Kulikov

Author: Constantin Kulikov (Bad_ptr) [email protected]
Date: 2013/07/09 21:10:53
License: GPL either version 2 or any later version
Keywords: xprop, xlib
X-URL: https://github.com/Bad-ptr/xsetprop

Intro

xsetprop -- set window properties. I write it couse the xprop can't set a list of atoms.

For example:

xprop -f _NET_WM_STATE 32a -set _NET_WM_STATE _NET_WM_STATE_ABOVE

works fine

xprop -f _NET_WM_STATE 32a -set _NET_WM_STATE _NET_WM_STATE_ABOVE,_NET_WM_SKIP_TASKBAR

don't work

xsetprop --remap --mode='replace' --id=WIN_ID --format='32a' --propname='_NET_WM_STATE' --value='_NET_WM_STATE _NET_WM_STATE_ABOVE,_NET_WM_SKIP_TASKBAR'

OK. :)

Compilation

make

Usage

xsetprop xsetprop [--id=[window_id]] (--format=<32a> --propname=<WM_ICON_NAME>|--atom <ATOMNAME>|--string <PROP_NAME>) --value=<value> [--mode=[replace|append|prepend]] [--remap]

--id or -i (optional): window id, which you can get from xwininfo. If omitted -- you will be prompted to select a window with mouse.
--root : use the root window.
--format or -f : format of a property. 32a for atoms, 8s for strings, etc(See man xprop).
--propname or -p : name of a property you want to set.
--value or -v : A new value or a value to append/prepend of property(see --mode option).
--mode or -m (optional): 'replace' or no specify for discarding the old value, append/prepend to append/prepend to the old value.
--remap (optional): if this flag is specified the window will be unmapped and then mapped again after changing the propertyes(It helps WMs to see changes).

A shorter form:

xsetprop [--id=[window_id]] (--atom <ATOMNAME>|--string <PROP_NAME>) [--value <VALUE>]

(you don't need to specify --format and --propname).

Alternative

Or you can use xprop.patch to make xprop work as you want. :)

xsetprop's People

Contributors

bad-ptr avatar charlesbos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.