Porting a Tiling Window Manager Extenstion to C++ (Bismuth): Part-2 (getting closest relative window)

Hi everyone! In this blog, I will be discussing the algorithm used in Bismuth to find the closest relative window to be focused for focusWindowByDirection event. If you haven’t read the previous blog, make sure to give it a read here. Recap from the previous blog Let’s start with a quick recap though, in the previous blog, we discussed: focusWindowByDirection requires the following information: direction (from the user) - can be one of: right, left, top/up, bottom/down. activeWindow (from the current session) - this is needed since focusWindowByDirection event is a relative event to your current focused window. Neighbor window candidates (neighborCandidates) to your current window (activeWindow) and the given direction (direction). // declaration std::vector<Window> Engine::getNeighborCandidates(const FocusDirection &direction, const Window &basisWindow); // use std::vector<Window> neighborCandidates = getNeighborCandidates(direction, basisWindow); From these neighbor candidates (neighborCandidates), we will now find the closest relative window corner. To me, it was tricky to understand at first, so we’ll be discussing this in detail over in the later sections. Once we know the closest relative window corner, we’ll try to find the window which satisfies the corner condition. If there were multiple found, we’ll return the first one based on the time-stamp (last used) Understanding the scenario I want to start off with a visual, took me some time to draw it, but in case it doesn’t look good, I’m sorry! My drawing teacher in the high school tried his best, but… ...

July 31, 2022 · 6 min · Kushashwa Ravi Shrimali

Porting a Tiling Window Manager Extenstion to C++ (Bismuth): Part-1

Hi everyone! I understand it’s been a long time, and I’m so excited to be writing this blog today. In today’s blog, I wanted to talk about my journey (so far) on contributing to Bismuth (a KDE’s Tiling Window Manager Extension), mainly how and why I started, and where I am right now. The Story: Why KDE Plasma and Why Bismuth? For the last few months (close to a year), I’ve been using Pop OS (a linux distribution by System 76) which had this amazing automatic tiling window extension called pop-shell, and it was close to what I always needed: ...

July 23, 2022 · 8 min · Kushashwa Ravi Shrimali