 One of my favorite Tiling Window Managers of all time is Qtile. Qtile is a Tiling Window Manager written and configured entirely in Python, and it's just a really comfortable Window Manager to live in. I love it because it has the same kind of function and feel as X-Mone Ad, so it's really easy to switch between X-Mone Ad and Qtile. The only real difference, again, is the configuration. In Qtile, everything's configured in Python. Of course, in X-Mone Ad, everything is configured in Haskell. But one of the things, even though I say Qtile is one of my favorite Tiling Window Managers of all time, I also like X-Mone Ad, DWM, the awesome Window Manager. You know, I'm always hopping between all these Tiling Window Managers. Sometimes I even go into floating Window Managers like OpenBox and live in them for, you know, a few days or even a few weeks. And sometimes it's several weeks, several months sometimes before I come back to some of these Window Managers that I've lived in before. And when I come back to them, my configuration is not right. It's broken. There's been major updates to these particular Tiling Window Managers and my config files no longer work as I left them. And that's really been the case with Qtile. I've been getting people opening issues on my GitLab for a while now, telling me, hey, this little thing in your Qtile config doesn't work. This little thing here doesn't work. And I've never really taken them that seriously as far as I need to drop everything and go fix my Qtile config because I was living in other Window Managers. But I've gotten enough of these reports and it's not all the same thing. You know, there's various parts of my configuration that are broken that here in the last two or three days, I've lived in Qtile and I've been working on my configuration, cleaning it up and trying to correct all the errors. And this is not an unusual thing with Tiling Window Managers. You do have to deal with this is that, you know, every few months to every few years, sometimes there are major updates to these Window Managers and things change, right? Some of the syntax changes as far as the programming language that the thing is written in or whatever it is. And for whatever reason, you have to go in and make usually just very minor edits to your configuration. It's not like you have to rewrite the whole thing from scratch. So it's really, it's not really a hassle or anything. It's just something to be expected. I've had to do this many times over the years. I've had to rewrite my awesome Window Manager config before because, you know, syntax has changed with just the awesome libraries and the Lua language and things like that. I've also rewritten my Qtile config at least one other time because an update basically made my old config no longer work. I have rewritten my Xmonad config several times. So let me switch over to my desktop here and show you the updated, the corrected Qtile configuration. For those of you that use my old config, there are some minor aesthetic changes. I did change some of the colors in the bar, these purples and blues here for the power line effect. I made them a little darker. They were a little too light because it was tough to read the white text. So I darkened them a little bit so that white text kind of pops out a little more. Also, I have this Python icon that I had in the bar. Now I used to use just the traditional Python icon, which is what blue and yellow in color. I made it an all white icon. I just thought that again for aesthetics, it just fit the bar better. But again, these are aesthetic changes. They really weren't functional in any way as far as they didn't solve any errors. Now the errors I'm talking about, one of the first errors I started receiving reports of is the update widget. So Qtile has this update widget where it will tell me how many updates are available on my system because on Arch systems, it runs the check updates command or whatever it was that it was running to figure out how many updates are available on your system and it'll print it out. Well, that widget, it was called, I think it was just called Pacman. It was widget.pacman. That Pacman widget, they removed it in like one of the latest versions. So it stopped working and anybody that was using my configuration, it stopped working for them. Well, the Qtile, the guys, the reason they removed the Pacman widget is because they made another widget. It was just a general check updates widget and you could use it for various Linux distributions because not everybody's running Arch, right? Some people are running Debian or Ubuntu or whatever it happens to be. So now they made a widget that works on multiple distributions. And that's the one I needed to switch this to. Let me actually open up my configuration file so I can actually show you the code here or something. Let me go to my Qtile config.py. Of course, my config, it's not my Qtile.py, it's actually a readme.org, but it writes out to my config.py. But you guys, if you're not using a literate config in org mode in Emacs, all you guys need to do is have your Qtile config in your home directory slash .config slash qtile slash config.py. Let me zoom in here so you guys can see a little more of what is going on in my config. So let me page down and let me get down here to where the widgets start for the bar here. Here's defining the init widgets list. And let me get to this widget right here, widget dot check updates is the new one that I had to change. So all I needed to do that used to be widget dot Pacman. I changed it to widget dot check updates. And then I needed to give it a couple of different values here. First, you need to specify your distro. And for arch, arch has a couple of different, I think it's three different options. For example, I'm using arch underscore check updates. That's meaning I use a arch based distro and the command I want you to run to find my updates is the check updates command because I know that command is on my system. Also, I can change the format as far as what it displays here. So I have it display this squirrely brackets with the word updates. That is the actual number of updates followed by the actual word updates. So that's why I have currently 237 updates. Now one of the other things that was also broken in this widget and in other widgets is the mouse callback function. So in Qtile, every widget has the ability to have a mouse callback assigned to it or multiple mouse callback so you can, you know, have the left mouse, the right mouse and the middle mouse, you know, actually do things when you click on widgets. And I had this one where if I clicked on the update widget, it would run the command, my terminal, which is alacrity, with these flags dash e and then run the command sudo pacman SYU is basically going to open a terminal and run pacman SYU so I can run an update. So that's what this should be doing. It was broken in my old config because the way my old config was written, we had this here, you had lambda space qtile colon and then qtile dot command underscore spawn and then the command you wanted to spawn. Well, it turns out they rewrote all of these widget libraries and you can no longer do lambda and then qtile. It just needs to be lambda without qtile. And the other fix you need to do to make these callback functions work properly is in your imports, you actually need to import qtile before you didn't need to import it, you could just call it in the lambda now import qtile. And then of course, in the actual functions themselves down here, for the mouse callback, just make sure you get rid of that extra qtile that was in my config. And now when I click this widget, you see, it opens a terminal that's asking for a sudo password because it's trying to run sudo pacman syu. So if I gave it a password here, you see, it's syncing the repositories and it's going to run an update. I'm going to decline this update since it's 237 packages. Now most of that is just very small Haskell programs. But still, I don't want to take the time to run that update here on camera. Now I had three or four different widgets that had mouse callbacks the memory one here, I think I had it open a terminal and then run htop. And that one still works. And then I think I had another one that did something. Let me scroll down here, the memory one. I know what it is. It's the very first widget here. This icon, which is just this white Python icon. I set that to actually run. I can't remember what I said it to run. Actually, it just opens a terminal. So let me click on it. And it just launches a terminal. I think in my old config, I had it launch some kind of menu, maybe D menu or Rofi or something. Now living in Qtel for the last couple of days, I did notice it wasn't really an error. But for those of you that are running multi monitors like I am, I've run a triple monitor system. And the sys tray here, this is a sys tray sitting in the panel, you can only ever have one sys tray running at a time. So if you have three monitors and there's a panel on all monitors, the sys tray can only be on one. And the problem is it whichever one it loaded on and it would load on different ones, depending on when I logged in to Qtel, I guess it's whichever one loads it the fastest gets it. And I always wanted this sys tray to be on the middle monitor. So what I did I have this widgets list, this very long widgets list, this is every widget in as far as they can be in my panel. And what I did is I created these definitions here. So I'm defining these functions, where I have this group here, these are the widgets that will appear on monitors one and three. And this group here are the widgets that appear on monitor two, which is the one we're currently looking at. You see monitor two, I really don't do anything special with it, I just say hey load the entire widgets list. But this one, you notice I added an extra line I added delete, and then the function widgets underscore screen one, and then I'm slicing seven through 18. What is a slice? Slice means I'm cutting it out. So all the widgets in this list from seven to 18 cut out. That way it cuts out the spacing around the sys tray, the sys tray itself. And I think I cut off a few more of the functions that I didn't need like I really don't need the price of Bitcoin on every screen or something like that. So that is slicing using Python. And because I've sliced out especially the system tray widget, you know, it cannot appear on monitors one or three anymore, it's forced now to be on my second monitor. Some of the other changes I did I spent some time on my key bindings because I did need to add a lot of key bindings and I modified some key bindings because one of the cool things with Qtile, really in the last couple of versions is they now support key cords. And they when they first introduced them, it was kind of a hacky way to get them. But now it's actually fully baked into Qtile and it's really easy to do key cords. And I'm talking about like Emax style where you know, Emax has these weird key bindings like control C followed by control F control C followed by control X. Those are key cords. And what you need to do is in your imports for Qtile. Now you know when you're importing from Qtile, libqtile.config and you import things like click drag group and key and screen and all of that make sure you also import key cord. And then in your key bindings, you know, these are just your standard key bindings key. That's just a normal key binding, which is mud return is launching my terminal. Now if you want a key cord instead of key, you need to actually type key cord. And I've got that somewhere down here. Let me go to the bottom of my key bindings. Alright, so here are my key cords to launch Emax. So instead of key, we have key cord. And I have control E and then in brackets here, you know, I've got the starting bracket, the ending bracket, and then the keys themselves. So control E followed by E just launches Emax control E followed by B launches an iBuffer in Emax control E followed by D launches deer ed in Emax. So if I did control E followed by D right now, that's deer ed, which is the file manager that's built into Emax. So that are those are key cords. And then I created another set of key gourds for my D menu scripts, which I like to do them as super P because super P is the default D menu key binding for I think DWM and X monad, it may be the default D menu key binding for cutile to I can't remember what the default is, but it's typically super P for a run prompt, you know, and what I did is I made all of my D menu scripts use the key cord super P followed by another key. So for example, super P followed by E runs my DM comp script, which is a it's a list of all the config files that I like to edit all the time. So super P followed by E runs that particular D menu script. And then I have, you know, all the other ones like super P followed by P runs past menu for my password. So there's the password script there. And actually, it's interesting looking at my config file right now on camera. I'm actually noticing another thing I need to take care of. It's not really error, but in all of my standard key bindings, I have a description, you know, I'm telling you exactly what the key binding does. And you put a description is because you do have the ability at the command line for cutile to tell you what all your key bindings are. And if you have a description set, of course, the description will spit out too. But you see, I didn't actually add a description for any of the keys and the key cords. So I need to go back and take care of that at some point. And one of the other things that was causing people problems, because it was really erroring out is if I go to the bottom of my configure for the window manager rules, this used to be a very long list, you notice I only have three window manager rules as far as these are rules for when a window needs to be floated. I used to have like 15 or 20 things here. And the reason that was broken is because they changed the syntax of it. They also changed the fact that now cutile ships with this here layout dot floating dot default underscore float underscore rules. So this particular library default underscore float underscore rules that defines windows that are always floated no matter what you don't have to go in and specify because everybody wants these windows to float. They are windows for utility notifications toolbar, splash screens, dialogue boxes, confirm boxes, download boxes, error messages. You know, these are all the standard windows that pop up that everybody wants to float. You never want those in a tiling kind of layout. So that's why the cutile guys smartly, you know, defined those as default float rules. And then I found some things that I needed to add myself for some programs I use all the time. For example, calculate with a queue. Now that is a calculator. And when I pull up a calculator, I don't want it to tile because it makes the layout all weird, the buttons and everything they're scrunched up or stretched out wide. A calculator just needs to be floated on the screen. So when I run calculate dash GTK here, you see it floats before it would have forced it in a tiling layout where it's taking up half the screen. And it just looked really odd, you know, being in a tiling layout. So now I forced that I've also forced the confirmation box within tasty works, which is trading stock trading platform, also for pine entry for the past command, I showed you my D menu script to run the past menu command before. So if I want to get my password for I don't know, zero AD, if I'm doing a multiplayer zero AD game, you have to log in. And this window used to be forced into tiling. But now, you know, I set this rule here, window manager class pine entry dash GTK dash two. So how do you get these rules? By the way, how did I know that the calculate window is actually titled calculate with a exclamation? How did I know window manager class for that that past menu window was pine entry GTK to where you use the exprop command in the terminal. So if I launch a terminal and type exprop and hit enter, you see my cursor turned into an x click on any window, for example, let me click on the alacrity window. And it will give me window manager class and title and everything. And you can see window manager class for alacrity is alacrity with a capital A. So that's what I would sit here if I needed to make alacrity always floating. Let me close out of alacrity there. I think that's all of the major changes I made to the config as far as correcting errors like the things that we're going to cause you real problems. If you used my config, I mean, I did clean up some of the key bindings I think used to. I had these key bindings reverse where, for example, if I'm focused on my Emacs window here, I used to have super L as a shrink the window and super H as an expand the window, which didn't make sense because I think super L should make that window bigger and super H should make it smaller. That's the way it is in my X Monad config and my DWM config. It was weird. I had it reversed in my Qtall config, so I fixed that. But I also doubled that binding because this shrink with super H and super L that works in the Monad tall layout, which is your standard master and stack layout. But if you're in a different layout, for example, let me get into the tiling layout. This is mainly like a master and stack, but it's a different kind of master and stack. But in this tiling layout, I have super H and super L do something different. I have them increase or decrease the number of windows in the master frame. So if I do super H right now, I just decrease the number of windows in the master frame. You can't decrease it less than one. So that didn't work. But if I do super L to increase the number of windows in the master frame, you see, I get a second window over there and then super L one more time. I've put three windows in the master frame. If I do super H, I decrease it, super H one more time. I decrease it again back to what it is out of the box. All the other layouts are the same. I had the full screen, the max layout. There's the stack layout, which you have two different stacks and windows just stack on top of these two windows. And then I had the tree tab layout, which I really don't use. It's in my config mainly just for proof of concept just to show you this thing. I don't know if I would ever have much of a use for it. And I really haven't played with it much. I originally wanted to configure it and do some neat things with it. I've just never taken the time. Maybe that's something I'll do in a future video is actually see what I can get done with tree tab and, you know, flesh it out a little bit more. You can see what I wanted to do is have two different stacks of the tree tab. You see, I have the first workspace and then the second workspace, but I'm not really doing anything with the second workspace. Anyway, that may be a future video. We may do something specifically on the tree tab layout with Qtile. Of course, this is a floating layout. And of course, back to monad tall, which is the master and stack. So that was just a little bit of the corrections for my config. I know a lot of people use my Qtile config. You know, those videos I've made on Qtile have had, you know, just tens of thousands of views. And in a lot of ways, I'm responsible for a lot of the popularity that were especially the resurgence of popularity in Qtile. And so many people are using my config and the fact that there were so many errors in it. You know, I'm kind of ashamed that it took me so long to go in and correct those errors. But you know, I was living in other window managers, so I didn't see them. You know, you guys were reporting them. But a lot of times, yeah, you'll report an error. Should I drop what I'm doing and go fix that error? A lot of times I'm recording videos and everything. But I know I'm making excuses. But really, I should have fixed these errors before now. So for those of you that were waiting for a working Qtile config, it is up on my GitLab. Now before I go, I need to think a few special people. I need to think Absi, Dallas, Gabe, Lou, Mitchell, Alan, Akami, Archvicar, 30, Chuck, David, the other David, Dylan, Gregory, Lewis, Paul, Scott, Wes, Willie, these guys. They are the producers of this episode. They are my highest tier patrons over on Patreon. Without these guys, this episode you just watched would not have been possible. The show is also brought to you by each and every one of these ladies and gentlemen as well. These are all my supporters over on Patreon because I couldn't do what I do without your guys support. You guys make the channel happen and if you'd like to support my work, consider doing so. Look for DistroTube over on Patreon. Alright guys. Peace. Python's so much easier than Haskell.