Git Product home page Git Product logo

Comments (3)

z3bra avatar z3bra commented on July 17, 2024

A window ID (xcb_window_t in libxcb) is only a typedef'd unsigned long IIRC. So you can "use wid as an unsigned long" (assuming this sentence could mean anything with proper context).
As of strtoul(), it is used to convert a char * to an xcb_window_t, for proper use with lixcb functions.

Your request lacks context and clarity.

from core.

neeasade avatar neeasade commented on July 17, 2024

Apologies, I'll attempt to clarify via example with chwb. If I have a window, and I use xdotool getactivewindow I would get something like 29360131. This does not work with wmutils tools (tested with chwb -c ffffff 29360131). However I can convert 29360131 to hex 0x01C00003, and chwb -c ffffff 0x01C00003. However the latter requires a conversion before I call chwb, which I have been using bc for ie: chwb -c ffffff $(echo "obase=16; $(xdotool getactivewindow)|bc). I would prefer if such a call could simply be: chwb -c ffffff $(xdotool getactivewindow)

edit:
The context I would need this in is if I were to have a command that would spit out a list of window ID's as decimals, would like to use them right away with wmutils tools, without converting them first. I am using wmutils in bspwm, and some information that I'm querying returns window ID's in that form.

from core.

neeasade avatar neeasade commented on July 17, 2024

closing, and for posterity:

    dcat ▌ reading your feature request on github                                                                                 
neeasade ▌ yes -- sorry if worded noobily I don't go that low with X                                                              
    dcat ▌ ah                                                                                                                    
    dcat ▌ it has nothing to do with types                                                                                        
    dcat ▌ it's just the base it's in                                                                                               
neeasade ▌ gotcha -- so I guess my feature request would be 'allow base 10 values for window IDs?'                                 
    dcat ▌ wmutils uses base64 (hex), and it seems xdotool or whatever you're using uses base10 (decimal)                           
neeasade ▌ gotcha                                                                                                                 
    dcat ▌ yes, but                                                                                                                
    dcat ▌ we're not gonna add it                                                                                                
    dcat ▌ there's a ton of ways to convert it                                                                                  
neeasade ▌ yeah -- I can get around it with the way I listed just would prefer not too, that's fine                           
neeasade ▌ I don't have alot invested in the feat request just a nicety                                                       
    dcat ▌ that's fine

from core.

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.