Gravity(1x)

πŸ“¦
version 2.2.12 Β· 3 versions
, in ubuntu jammy

✨ Gravity πŸ’«

okay bestie, so this is Gravity β€” it's the AfterStep gravity thing, and it lives in the AfterStep X11 window manager manual, section 1x. sit with me, it's actually so good 🫢


🌸 CONFIGURATION OPTIONS 🌸

these are all the gravity values you can hand to AfterStep, and like, what each one does to your poor little window when decorations show up πŸ’…

  • Center β€” when the window decorations get added to the client window, the whole thing moves so that the center of the new framed window sits in the exact same spot as the center of the mapped client window <em>without</em> decorations. symmetric queen behavior πŸ‘‘
  • East β€” the decorated window gets moved so its right side lands in the same position as the right side of the undecorated client window.
  • North β€” the decorated window gets moved so its top side lands in the same position as the top side of the undecorated client window.
  • NorthEast β€” the decorated window gets moved so its right-top corner lands in the same position as the right-top corner of the undecorated client window.
  • NorthWest β€” the decorated window gets moved so its left-top corner lands in the same position as the left-top corner of the undecorated client window.
  • South β€” the decorated window gets moved so its bottom side lands in the same position as the bottom side of the undecorated client window.
  • SouthEast β€” the decorated window gets moved so its right-bottom corner lands in the same position as the right-bottom corner of the undecorated client window.
  • SouthWest β€” the decorated window gets moved so its left-bottom corner lands in the same position as the left-bottom corner of the undecorated client window.
  • Static β€” when the window decorations get added to the client window, the frame window moves instead, so that the client window stays in the exact position it was mapped at. not a single pixel of drift, no cap πŸ”₯
  • West β€” the decorated window gets moved so its left side lands in the same position as the left side of the undecorated client window.

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• when a client window gets mapped on screen, the Window Manager draws some frame decorations around it β€” think Titlebar, resize handles, etc. and like, those decorations take up extra space obviously. so it's necessary to say whether the resulting bigger window should be nudged around on screen in some particular direction, to compensate for the size discrepancy. that whole decision is made by the Gravity hint. πŸŽ€

usually the Gravity is set by the client itself, based on whatever geometry the user gave it. for example, geometry -10+100 will set gravity to NorthEast, while +10+100 will set gravity to NorthWest. cute, right? 🌈 but sometimes the gravity an application requests is just... wrong 😭 and that's because of a longstanding tradition of people misinterpreting what it means. when that happens, you might wanna override the gravity yourself. AfterStep girlies can do this with the database file, by defining a new Style for a specific application with the Gravity attribute set. fr fr. for example, it's recommended to set the gravity of the popular image viewer XV to Static, because it tends to move itself around assuming it knows everything πŸ’€

below is the list of possible gravity values with an explanation of what each one means ⭐

okay bestie real talk: if you're not sure, Static is your emotional support setting. it keeps the client window exactly where it was mapped, periodt. πŸ’–

and that's the whole page, bestie 🧚 slay. this one comes from the 3rd Berkeley Distribution, it's AfterStep v.2.2.12, and it's the Gravity(1x) page β€” go forth and position your windows with main character energy πŸ‘‘πŸ’…

πŸ“¦ where this page comes from