Git Product home page Git Product logo

Comments (6)

sineemore avatar sineemore commented on June 8, 2024
stw -x0 -y0 pstree -U

The description is really misleading.

-x and -y params position one of the window corners determined by signs in values. Positive sign (or a plain 0) stands for top and left sides, negative for bottom and right. For example -x -0 -y -0 will position bottom right window corner in the bottom right screen corner, -x 0 -y -0 will do the same for bottom left.

Percentage values in -x and -y params refer to screen width and height. For example -x 50% -y 50% will position top left window corner in center of the screen.

-X and -Y (capitals) is a second pair of params to position window. Values from this params are added directly to values in -x and -y. Also percentage values refer the window size itself.

So, to sum up, if we want a centered stw window will go with:

  • -x 50% -y 50% to move the top left corner in the center of the screen
  • and -X -50% -Y -50% to move the window up and to the left by height * 50% and width * 50% units
stw -x 50% -y 50% -X -50% -Y -50% /bin/echo "I am centered"

from stw.

sineemore avatar sineemore commented on June 8, 2024

Also note, with stw -x 0 -y 0 the window will be literally in the top left corner of the screen, probably behind a bar if you have some. Adjust the values in -y, for example -x 0 -y 32.

from stw.

planet36 avatar planet36 commented on June 8, 2024

screenshot

from stw.

planet36 avatar planet36 commented on June 8, 2024

I got the desired result by changing config.h

screenshot

from stw.

sineemore avatar sineemore commented on June 8, 2024

Oh, I got it. I've added bad default values to config.h. Will revert tx, ty variables back to {0}.

from stw.

planet36 avatar planet36 commented on June 8, 2024

It works now.
Thanks.

from stw.

Related Issues (9)

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.