 Xmonad is just a fantastic tiling window manager. It can do so much. And one of the reasons Xmonad can do so much is typically when you install Xmonad, you really install two different packages. You install the base package, Xmonad, and then most people will also install Xmonad-contrib, which is a bunch of extensions that are available for the Xmonad window manager. So if I go over to the documentation over at Haskell.org and you see this particular package Xmonad-contrib and it lists all the modules available in Xmonad-contrib. There's a bunch of them. And I've been going through it and seeing if I could discover some modules that I didn't know about and maybe find something interesting that I want to use in my config, maybe something I want to share with you guys. And I found this really cool module here at Xmonad.actions.treeSelect. And TreeSelect displays workspaces or actions in a tree-like format and they have a screenshot here. And by default, these are the colors. It's a blurred out kind of white background with a blue tree structure and red as the highlighted item. I changed the colors when I implemented this in my config though. The documentation mentions there's two things that you can display in this tree-like format. You can display workspaces or you can display actions. And they give you examples of both. The very first example they give is workspaces. So to display your workspaces in a TreeSelect, you need to import the following modules into your Xmonad.hs and then you need to define your workspaces as such. First of all, you need to make sure that the type is some color scheme and it can be one you create followed by a string. And then your workspaces are defined as such. It's a node and then the name. And then you can have subnodes within a node. And of course, you could have subnodes within that subnode and you create this tree-like almost directory structure of workspaces, which is really cool because you're no longer limited on numbers of workspaces. Typically, most people stick to 10 workspaces as a limit on tiling window managers because, you know, 0 through 9 on the keyboard. But using something like this, you can create dozens, hundreds of workspaces. And it doesn't matter because this tree-like structure we're going to create, this tree menu is going to handle it just fine. Once you've imported these particular libraries and created your workspaces, then somewhere in your config you have, of course, the Xmonad main somewhere, and you have workspaces equals probably my workspaces. You need to make sure you add two workspaces, space, my spaces to that. And also, this line here is optional. LogHook equals workspace history hook. I could not get this to work for me, so I didn't use it. That line, again, though, is optional. If you are able to put that in your config, what that does is it allows you to use the O and I keys on the keyboard to select previously visited workspaces. So let me show you what I'm doing in my config here. So I imported the libraries that I needed to import, including the most important one is Xmonad.actions.treeSelect. I had to import it qualified. So I imported qualified Xmonad.actions.treeSelect as TS. Now, why did I do that? Well, let me go down to my config where I have my tree select stuff. All right, so these are some key bindings that I'm using in regards to tree select. So anytime I bring up a tree select menu, these key bindings do these actions. Now these actions, when you look at the documentation, do not have TS in front of them. They're just cancel, select, move previous, move next, etc. Well, some of these commands cancel, select, move previous, move next are the exact same commands. The name is the exact same thing as commands in other Xmonad modules. So when I import qualified, and then I renamed it TS, then I can just prepend all of these commands with TS. So Xmonad knows TS dot cancel. That particular command cancel is from tree select and not from some other module that also has a cancel command. This here, my TS default config, this is basically the theme. So I changed the color scheme. I didn't want the white background with the blue and red. I changed mine. Well, let's see it in action. I've been talking long enough. This is my tree select. So I changed mine to have a dark background that's just a little opaque and then a almost black tree menu. And you see I get subtrees. I can navigate with hjkl the Mimkeys up, down, forward, back. Let me escape to get out of that. And if I page down to my workspaces, you see I have my workspaces. And basically this is exactly copied word for word from the documentation from the Haskell documentation. I took this right here and I just pasted it into my config. I haven't customized it in any way because I'm not sure if I really want to use tree select for my workspaces. It is kind of neat. So if when I pull it up, you know, I can navigate to a workspace so browser doesn't have any sub nodes. Home does though. There's four sub nodes. And if I hit enter on this one, you know, I go to that particular workspace. If I want to go back, I bring up the tree select and I just go back and I think I was on the second workspace before. No, that's not what I was on. I think I was on workspace one. So I go back in the very first workspace, which is called browser. That's the one I was on. Now that's kind of neat. But really what I want to do with this, I think is instead of doing the workspaces, I want a list of actions that I could do. And they give an example here of a very simple actions list, shutdown, restart, logout. And then they gave you an example of exactly how you could do that. So let me show you that. So back in my config here, I created this list of actions. And it's a very lengthy list. And if I bring up that particular menu, you will see I have hello, which just displays hello. That's all it's doing. I have shutdown. If I hit enter, it runs the shutdown command. So when I highlight Xmonad, if I hit L, which is, you know, the key to go right on the keyboard, I get a submenu here and I have edit Xmonad, which brings up my Xmonad config, recompile Xmonad, restart Xmonad. So that could be something useful. There was a brightness category. Now I'm not on a laptop, but this was part of the example config. And you see I have bright, normal dim. And you notice beside each command, there is a description. So you can put a description for each command. You see bright has full power out to the side. Normal says 50% dim says quite dark. Then I created this little systems monitor directory structure here. And if I hit L, I get H top glances, G top in mine, S2E, and of course escape to get out of that. Let me close my config. So again, I've got my workspaces or an example of workspaces. Again, I'm not sure if I'm going to use the workspaces tree select because Xmobar does not really handle at least not too many of these tree select workspaces very well because you see I have browser home, which is the second level. And then there is some sub nodes within the home node and they are home.one, home.two, home.three, home.four. Let me get back into that so you can see home and then one, two, three, four. And the same thing with programming. You have programming, then you're going to have programming.haskell, programming.docs, which programming, programming.haskell, programming.docs. So we're going to end up not being able to really display all our workspaces once you start adding a bunch. So I need to figure out how to hack Xmobar to only show me the current workspace because by default it shows all your workspaces. And I want also to have the layout of the workspace because this particular module is all one module, which you're seeing here. It's the workspaces, the layout, and then the number of windows on the screen. What I really want is just the current workspace and not the rest of the workspaces, the layout and the number of windows. I've got to do some research to see how I can hack Xmobar to make that happen. If any of you guys know a little bit about this, help a brother out and tell me exactly what I need to do in my Xmobar to make that work. But the actions menu, I think I could use this because I could create some really nifty little menus, maybe browser bookmarks or something. If I could dynamically pipe something into that actions menu, that would be really, really useful. I think the tree selection method makes a lot of sense. I think it makes a lot more sense than the grid select, which is something I demonstrated on camera a while back. You guys remember the grid select? This thing is kind of colorful and neat. It's got some bling to it, but as far as usefulness, the grid selection I don't think is very useful, but I could do something with the tree select. I'm kind of liking what I'm seeing with that. Now before I go, I need to thank a few special people. I need to thank Michael, Gabe, Heplo, Nate, Corbinion, Mitchell, Entropy UK, Arch5530, Chris, Chuck, DJ, Donnie, Dylan, George, Armory, Paul, Sean, Tobias, and Willie. These guys, they are the producers of the show. They're my highest tiered patrons over on Patreon. I also need to thank all of these ladies and gentlemen. Each and every one of these names you're seeing on the screen. They are my supporters over on Patreon because this channel is supported by you guys, the community. If you'd like to support my work, you'll find DT over on Patreon. Alright guys, peace.