 Here in the last few weeks I've put in a lot of time working on DTOS and I haven't really been adding a whole lot of new Functionality to DTOS, but I've gone down this weird rabbit hole recently of theming DTOS Because I want to have several different color schemes available for you guys that are using the DTOS script So that way you can have whatever color scheme you want as far as your terminal emulator and doom emax XMObar, which is the panel for Xmonad, Kaki I want them all to be themed the same way. Trayer, which is the system tray Your login screen as well and will also be themed for your color scheme I want to be able to you guys pick a color scheme and Everything changes is eventually what I want to get to and what I've been working on here in the last few days is I wanted a way in my Xmonad config to where I can change one line And it will change the color scheme for XMObar Trayer, which is the system tray which is actually sitting on a different monitor right now And this is Kaki and I want to be able to change at least all of those by changing one line in my Xmonad config Let me switch over to this desktop So this is actually Trayer here on this monitor here And I'm gonna go ahead and open doom emax and I'm gonna go ahead and open my Xmonad config here This is a literate config meaning it's an org mode document But all the source code blocks within this org mode document they get Outputted to they get written to Xmonad.hs, which is the Xmonad config file So near the top of the config I have this import section where I import a whole bunch of Haskell libraries So we import all these libraries so we can use some of the functions within them later in the config And what I decided to do is I decided to create my own custom Libraries here and I created these 10 libraries doom 1, Dracula, Gripbox Dark, Monokai Pro, Nord, Oceanic Next, Pill Nights, Solarize Dark, Solarize Light, Tomorrow Night And what these are they are simply color schemes and you pick one of the 10 color schemes and then do import colors dot name of color scheme and Then that should change all the color values in my Xmonad config to the appropriate color values So let me show you this in action first actually let me I'm gonna launch a new instance of Emacs here and what I'll do is let me show you this folder here So in my home directory in dot Xmonad I created slash lib and this is where if you're gonna create custom libraries for Xmonad They need to be in dot Xmonad slash lib slash You can do the subdirectory in slash lib and that's what I did I did a directory called colors with a capital C slash and then the individual modules themselves such as doom1.hs Getting some LSP errors there, but anyway, there is that particular doom1.hs file and you see here module colors dot doom1 Where and that very first line that allows you to actually use this as an import in your Xmonad.hs So when I do import colors dot doom1, that is how we're accomplishing that I just need to make sure I have that line at the top of this file And then I set a whole bunch of variables first I set color scheme equals and then I give it a name doom dash one I'll show you why I need this variable later and then I set 18 colors here color back, which is the background color for which is the foreground and then colors 1 through 16 for our 16 base color scheme or a terminal color scheme or emacs color scheme for doom1 I plug in all the appropriate values and then I also created this variable here color tray equals dash dash tent which is a flag for Trayer and then 0x and then the color scheme Which should be the same as color back here So in our Xmonad config because we've imported this module here all of these variables are available to us in our Xmonad.hs and from here on what I did is I Decided to go in and substitute like I have my normal color Which this is the border color of normal windows and I had it set to a specific color for doom1 But what if you guys want to use grubbox dark? You would have to go in here and manually edit that hex code value Well, what I did is I just changed that to the variable color back color back here, right? And then my focus color is color 15 where before I had it set to a specific color You guys are probably seeing where I'm going with this and then the auto start hook what I'm doing here is Conky I have a whole bunch of conky configs and they all start with name of the color scheme dash 01.conky RC that's the name of them and what I've done is now I've inserted this variable color scheme plus plus dash 01.conky RC and so this variable here color scheme equals So what this is saying is the conky what I want you to do is launch a conky called doom dash 1 dash 01.conky RC and then I have this here which spawns an instance of Trayer and in this command There is a part where you set the background color and what I did that background color By the way is the dash dash tint space and then the hex code value I substituted that for color trigger so that particular variable and Then if I go to the very end of my X Monad config Let me make this full screen so you guys can see this. I had various colors for PP current PP visible PP hidden. So these are the pretty printer Commands for your X mobar settings here on the right-hand side of your X mobar and used to I had specific hex values Inserted here where now I substituted them all for variables that way Watch what happens. Let me go ahead. I'm going to move my X Monad config to the left-hand side I'm going to go back to the top here and if I go back to the import section where I had colors Dot doom 1 where I'm importing that what I could do here is actually I could change doom 1 to Nord for example I'm going to write that Then I'm going to go ahead and output that to X Monad dot HS with org babble tangle inside emax and then I'm going to restart An X mobar changed to using the Nord color scheme All the widgets in X mobar using the Nord colors Trayor now is using a background for Nord because I have a Nord dot HS module With the 16 base colors and everything also if I go back to this particular monitor the khaki It killed the doom 1 khaki and started the Nord color scheme khaki If you want to see this in action again, I could change it to something really crazy like solarized light Then let me org babble tangle and then restart X Monad And it kills khaki kills trayor and restarts X mobar trayor and khaki all using the Solarized light theme. Let me switch back to desktop 1 to show you the solarized light khaki. So Everything appears to be working correctly as I want. I'm getting real close to being able to Essentially changing one value because right now the only value I needed to change was imports change one line And of course I could automate this to the point where you know, I could you know Have a script that just grips out that line and changes it to the appropriate value You know, I can create like a demon use script where you can choose from these 10 possible choices and then you know Using grip or set or alt or whatever, you know, I could just change that line automatically for you The only thing I haven't gotten around to changing on the fly Just strictly by restarting X monad is of course e max I can't change the color scheme inside e max on the fly because that is more of an interactive command Where in do me max if you do space ht at least in my config I can search for something since we're using Light let me change the solarized light Just for sake of completeness here. One other thing I need to work on is d menu my d menu I actually have my d menu also with the ability to change to one of these 10 color schemes But what that involves is changing just one line in my d menu config Which is the config dot def dot h the problem with d menu and all suckless software is after you change that line You then have to recompile But I think I can eventually automate that as well Because I eventually want to be able to again get to the point where I can just make one change and Everything changes to the appropriate color scheme. So I'm going to go ahead and put this back to doom one Let me write that And then recompile x monad Yep, and then let me go ahead and get doom one back to Our theme inside do me max as well. Yeah, I think my eyes really appreciate going back to that dark theme solarized light Is a nice color scheme, but man that was blinding So for you guys that are actually trying out d to s right now I've already pushed the changes So if you've already got d to s installed when you do a sudo pacman syu to update your system You will have a package called d to s dash X monad that installs and that it installs my new x monad configs But it doesn't overwrite your existing configs it installs those configs to a folder in slash etsy slash d to s So go into slash etsy slash d to s and you'll find a dot x monad directory Copy that dot x monad directory to your home folder dot x monad directory And my new configs will take effect And you know then just recompile and you should now have the ability to change to one of those 10 color schemes Now before I go, I want to thank a few special people I want to thank the producers of this episode Devin Gabe james matt and michael michael paul scott with a commie allen linux ninja chuck commander angri kirk Diocai david dillon gregory hyko cosco lee maxim mike nitrix erion alexander peace arch and fedora polytech raver red prophet steven and willy dang I think I messed up a couple of names there, but I want to thank these guys They're my highest-tiered patrons without these guys this episode you just watch would not have been possible The show is also brought to you by each and every one of these ladies and gentlemen as well All these names you're seeing on the screen right now. These are all my supporters over on patreon because I'm really proud that I don't have any corporate sponsors I'm sponsored by you guys the community if you like this great content about linux and freight open source software Please subscribe to distro tube over on patreon. All right guys peace Blinded by the light Revved up like a deuce another runner in the night