Qtile Is Love, Qtile Is Life

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so I spent the last couple of weeks reinstalling arol Linux here on my main production machine I had a arol Linux on this machine previously I had the same installation up and running for about four years but I had so much stuff installed on that installation thousands and thousands of programs that I've uh tested out software over the years for purposes of the YouTube channel I had like a million different window managers and programming languages I had so much stuff installed on that installation that I had eventually I was starting to experience some problems some breakage packages either weren't working properly or in some cases weren't working at all so I did a fresh installation of rco Linux D which is a a minimal version of Arco Linux Arco Linux D and I installed the qti Window Manager on it and I'm with qle I'm I'm using my qile configs not arco's configs because I've got my own uh configs for practically everything that I've saved over the years so I'm back up and running on this machine and it's quite minimal I've only got the one window manager qtile installed and for a a software suite you as far as you know desktop software programs I installed only absolutely what I needed thus far so I've got OBS up and running so I could record today's video I've got Kaden live so I can render the video later I've got so I can make a thumbnail I've got the brave browser and a few other odds and ends like you know I've got emacs installed of course but I've tried to keep things quite minimal that way if I do run into breakage anything that breaks it's obvious what is the problem because it's going to be that package that I just installed right if you install thousands and thousands of packages and your installation is broken it's very hard to figure out what is the problem there right but when you slowly add packages it's obvious if you do run into any issues and right now I've got everything up and running let me show you my qile config so let me go ahead and launch my qel config and let's go to my uh re me.org here and let me zoom in here so I've had to make some minor tweaks to my qel configs because I did run into some annoying situations where sddm which is the login manager that Arco Linux installs by default and I like sddm so I left it as the login manager but when I log into qow from sddm it would hang sometimes hang for a long period of time like it would take 60 seconds for it finally to load qle and sometimes when it finally did load qel it didn't launch all the necessary programs it didn't launch the session manager or the compositor pycom or it was not launching uh background Services needed for gpg Keys like the password store like the pass command things like like every now and then you know it would sort of log you in but it didn't launch everything that it should and it was kind of weird and I assumed that it was having a problem with some of my startup services with qtal because sddm when you log in in you tell it what Window Manager to log in in my case qle and it was trying to run some of these commands from these qle configs and it was probably something not quite right with one or more of the commands and you know it was just causing me issues so I started over with the qah config well I didn't start over but I I I really started with a blank canvas and I I tried to add only what I needed to the config so this is a org document by the way for those of you that haven't seen my 50 to 60 emac videos right I write a lot of my uh config files in org so read me.org actually writes out to a file called config.py that is actually the proper qile config if I scroll down there will be these source code blocks here so what this is this is python code inside this source code block and it gets written to a file config.py right but by doing a org document it also allows me to do a proper outline with comments these comments will not get get exported to config.py they're just for purposes of documentation when I push the readme to my gitlab and also for purposes of this video it's a little easier on video for me to show you this stuff because it's obvious what each of the sections of the configs are because I've got it outlined as an org document so I've tried to keep things pretty simple here the first section is about this config and this is simply all of the copyright and licensing information that is at the top of the default qal config.py so I kept all of that you know that's part of this source code block here that's really the First Source Code block is just these comments and then not part of config.py but part of the read me here is information about my gitlab and my YouTube channel the next section is of course the import so this is all of the Python libraries that I'm importing so that I can use inside the qtel config the next section of course is variables this is where I set up variables for my mod key mod full for that's the super key I always use super as my mod key uh you could use alt you could set mod to mod one to use the ALT key for your modifier key for your window manager but if you use emac or many other programs uh on Linux or not just Linux but pretty much any operating system the ALT key is used in a lot of other places where the super key is really never use so I strongly recommend using the super key as the modifier key for all of your windows managers I also set up variables for my term I use the elac terminal my browser is Firefox now I actually don't use Firefox that was part of the default config for qtop I'm actually going to change that to Brave I actually did not know that was set let me write that and let me go ahead and do a org Babble tangle to write that over to my config.py which is again the actual file that qtile reads I also set a variable for my emac and that's going to going to be the emac client command because I always use emac as a client server relationship the next section is custom functions so these are just three custom functions that I created because they solve some problems that I needed to solve the first one add Tree tab section what this does it allows me if I'm using the tree tab layout within gah I can add a section within the tree tab layout by assigning this a key binding essentially I don't actually have the tree tab uh layout in a in my config currently so I can't show you this but you know if I ever do in the future want to use the tree tab layout being able to quickly add sections to that layout with a key binding would be a nice thing to have so I've created a function for that if I want to use that and the next two I actually do use these are uh this function here called minimize all and then this function here maximize by switching the layout so minimize all what it does it allows me to have a key binding that runs this function to minimize all the windows on the screen so let me show you this in action let me open up three terminals here so if I do super shift m is what I've assigned this super shift M minimizes all the windows so all those programs are still up and running but it hides them right now to toggle that back on super shift M again will bring the all three of those windows back let me super shift C to close all those windows the next function is a weird little function I was having a problem when I want it to full screen uh Windows let me go back to an empty workspace so let's imagine I've got two windows open let me make this one here full screen so if I do super f it makes it full screen it essentially makes it like a a Max layout right but I was running into a problem where I'd sometimes toggle uh this full screen mode and I wouldn't get the layout I was in back so most of the time on most workspaces I have the monad tall layout which is your traditional master and stack layout and what I wanted is if I was already in monad tall and I you know decided to do super F to go to this Max layout it would go to the max layout right but if I was already in the max layout and I hit super f it would switch to the monad toall but what this does it basically allows that to actually be a toggle kind of thing right so right now I'm in moed tall if I do super F it's Max right if I right now I'm in max if I do super f it goes back to monad tall or you can see that's what's going on with the if and the else statement if I'm already in monad tall make me Max I'm already in Max then make me monad tall the next section is probably the biggest section of the config it is the key bindings and of course this is a just org comments here this table and this is not part of what gets exported to the config.py this this is just for documentation purposes so if you go to my gitlab to my do files repo to qle right you'll see a proper table that's nice and formatted for some of the more important key bindings right but this is actually the source code block begins here Keys equals and I have a lot of different key binding set one thing I did want to mention is I had always I've been using dmenu for my run launcher forever but I decided since you know I was changing things up a little bit doing a new installation I went ahead and changed my run launcher to roofi so you can see I'm going to do super shift return now launches roofy so super shift return launches roofy and you see drun so that's uh searching for your dot desktop files so proper desktop applications right where uh dmenu searches all the binaries on your system now I could change this if I do roofi Dash show and run instead of drun run would actually search all the binaries not just the uh desktop binaries well for the most part you know all of my key bindings are are basically the same things I've been using for years and all of my window managers I've got a key cords set for launching emac related key binding so I'm using the key cord uh Super E you can say key cord mod e Super E followed by another key so super e followed by E Just Launch as emx Super E followed by a launches emms which is a audio player music player in emac super EB launches the emac I buffer yada yada yada and I did go ahead and set one other kind of neat key binding here this key binding runs a couple of commands and that's super e followed by F4 kind of a weird key binding but it's not something you'll use very often but occasionally I need to do this I want to kill emac and I want to restart the emac server the Emax Damon so I set a key binding for it like if emac ever hangs if it ever crashes for some reason this is the nuclear option right Super E followed by F4 will kill emac restart the Damon and then Super E E I could launch emac again back at the dashboard and then the next key chord section super P for prompt super P followed by another key launches all of my dmenu uh scripts my DM scripts although I've got them all using the dasr flag which means run the DM script using roofi instead of dmenu so if I do super pH to run the DM hub it runs the DM Hub through roofi rather than dmenu the next section is groups this is pretty self-explanatory group names 1 through n uh if if you use my config don't change group names group names 1 through nine is important because Super 1 through n uh how it determines those key bindings is the group name super plus and then it takes this list right so don't change this if you want to change the actual titles of the workspaces group labels is actually where you would change that you can change this but don't change group names but for me I have them both set to the same because these days I just prefer one through nine as the labels as well and the the default layouts uh you can say I use monad tall on pretty much all nine layouts except three and four I have set to tile and then after that you've got these four Loops in Python these four Loops are what make the magic happen with Super 1 through n Super Two For example I'm already on two super three takes me to workspace three super two takes me back Super 9 would take me to workspace 9 right these are what makes that kind of magic happens so these four Loops don't touch these unless you really know what you're doing these also handle a super shift one through 9 super shift 1 through 9 would send a window to a workspace so super shift 3 just sent that emac window to workspace 3 super 3 takes me to workspace 3 uh super shift 2 sends that window back to workspace 2 super two takes me back to workspace 2 next section is color schemes this is all comments the only bit of code is this code block here this one line colors equals colors. doom1 so I'm going to use the Doom one color scheme and what this does it it takes that color scheme from a file that I have called colors dopy so you have config.py which is your actual qtile config but I created also a second library that gets imported called colors and I have defined like 10 or 12 different color schemes you say I give them a name so if I have colors set to colors. doom1 Doom one will be the color scheme for qle for for the widgets in the bar I'd set that colors equals colors. Dracula then the bar would be using the Dracula colors etc etc then I have this section here default settings for all layouts so all of your layouts monad tall Max floating whatever it happens to be I want them all to use the following variables border width needs to be two margin needs to be eight margin is the gaps between the windows border with Pocus needs to be this color border normal needs to be that color so uh that just saves me from unnecessary code duplication later where when I'm playing with the individual layouts you know I know I'm going to use this and all of them so let me just go ahead and set that right now and then the next section is titled layouts and it's a rather lengthy code block but most of it is commented out so what I've done is most of what I've got here are layouts that just pretty much all the available layouts in qtile I've got them all in my config I don't use but like four of them but I've got them here again mainly for documentation purposes so if you guys want to try them out for example maybe you wanted to try this bsp layout well you just uncomment that line right now for me now I'm not going to use the bsp layout so I'll undo that right and comment that back out but you can see you've got all of these other things like ratio tile vertical tole The Matrix layout I'm using monad tall your traditional master and stack but there's a monad wide layout which is like a master in stack but instead of like a horizontal Master stack it's like a vertical master and stack that's kind of weird maybe depending on your monitor size and you know the orientation you may want to experiment with some of that stuff but I'm just using moned toall TI and Max Max is full screen tile is is a tiling layout let me actually open two windows in the tile layout this is tile right I'm not using any gaps and I have one window bigger than the other and this is kind of weird why do you do that DT well I have certain situations where I actually want this where for example when I'm recording videos I typically have OBS and a file manager open side by side but OBS I need pretty big because I want to actually be able to preview what I'm recing recording but in the other window I I just want like my file manager open to the uh directory where those files those video files are being created so I can verify that the files are being created and recorded because I never want to hit start record in OBS without actually seeing that that file has actually been created because sometimes you'll mistakenly think that you hit start recording in OBS but you really didn't click it properly right and you you'll talk for 20 minutes and then realize you didn't record a dang thing so this is I use that for recording videos I also use this for streaming videos where again the big tiling section will be for OBS and the smaller tiling section would be for the uh YouTube browser window like the pop out chat so I can actually monitor the YouTube chat during a live stream so that's what I use that particular layout for next up is the widget section this is the biggest part of the config it's all the widgets in the panel you can think of this as the panel configuration I'm just going to scroll through it not going to really discuss this uh there's a lot to it but I you guys I I've done videos on how to configure the panel and the widgets before in qil the next section is the screens screens are your monitors I have three monitors so what I'm doing is this definition here a knit widget screen one this is my second monitor the middle monitor this is actually what we're watching here I'm saying on this monitor I want you to grab a knit widgets list so and basically grab all of the widgets that were part of that widgets block that I showed you a second ago I want everything but on the next one a widget screen too so this is uh the widgets that get displayed on the other two monitors monitors one and three right I want you to display a different uh set of widgets on the panel on those monitors basically all the widgets except I want you to delete uh two widgets you see I give it a range of 22 to 24 what this does is it deletes completes a Cy tray widget and a spacer widget so it basically gets rid of the Cy tray on one and three WR monitors one and three monitor 2 can have the Cy tray monitor 1 and three can't have the Cy tray and I did this because uh qel does not like you having multiple cyst trays it it won't allow it so if you use multiple monitors you got to get rid of those extra cyst trays so that is how I am doing it is I just have you know separate functions essentially for each panel on each monitor the next section that I've entitled here is some important functions these are I believe these were just default uh definitions in the default qile config I did not create these uh these are handling things like uh how Windows uh get sent to previous screen next screen things like that if you use key bindings for things like that and next section is a drag floating layouts so this is what your mouse does so mod and so mod and the left click will drag window mod and the uh right click resizes a window so mod Left mod right just drags it and then I can mod f to make that full screen mod f again to send that back super shift M remember minimizes super shift M would bring that back then near the end of the qile conf fit we've got some window rules so this is a list of various windows that I want to float so you can see you can specify a class name or you can specify title name for Windows and every time it finds a window that matches that class name or that title name it will make sure it floats it for example match title calculate I use calculate as my calculator so let me super shift enter to launch roopy and let me search for calculate and it launches calculate as a floating window if I didn't have that rule there it might actually try to force that into a tiling layout which would look very bad for a calculator right so that's how you force windows that need to float to float you just uh specify right here and if you have a a situation where you're not sure if what the program is what's its Window Manager class name is or what its title is what you need to do use the xprop command type xprop in a terminal let me zoom in so you can see xprop XP r o p hit enter and your cursor is going to turn into a x like a cross right click on the window that you want to figure out the class name for for for example this terminal window if I click on it right now I get returned here in the terminal Window Manager class name is a laity with a capital A you make sure you get the spelling right if you wanted the window name itself when I ran the command was X prop space the Tilted character because I was in the home directory now the the window manager name of a terminal is going to change depending on what you're doing in the terminal so in this case if if you want all your terminals to uh have a a floating rule you would specify the class name aacr but if you only wanted it when you're running a certain command and that command always showed the same title of the window then you could specify by title name if you prefer uh other than that the end of of this config is one I definitely did want to just briefly talk about Auto Start programs so one of the things this function here what it does is it runs this shelf script autost start.sh so let me go to AutoStart . sh because I did uh spend a little bit of time on this this file was much bigger before cuz I had a lot of different for loops and if statements I had a lot going on in it and some of that stuff I think was causing some of those login issues where things were hanging a little bit I've uh really slimmed this down to where all I'm doing in this config now is I'm assigning a color scheme Doom one so this variable color scheme equals Doom one I'm using that because here I'm going to uh have that that variable actually be substituted for Doom one and basically these lines here these individual lines are programs that will be executed so LX session is my session manager pycom D- Damon launch pycom as a Damon and then emac D- Damon launch emac as a Damon then NM applet is the network manager applet so that's your networking applet and then I want you to run uh screen layout layout. H this is a shell script that a rander which is a gooey front end to X rander U executes it basically fixes my monitor order because by default my monitors are plugged in in a weird order where they're all backwards so I have this a rander script that fixes the monitor order as soon as I log into qle then I sleep for one second just to give the computer time to breathe for one second and then I launch coni coni of course is the system monitoring program that runs here and then finally I have like four different ways to assign a wallpaper for you can comment out this one and you know choose a different one if you want for example maybe you want to use the find command and then use XRS to randomly pick a a wallpaper for me I'm always going to set a wallpaper that is found incash SL wall so this is just a plain text file that has a uh uh the location to a image saved so if I do super PB to run one of my DM scripts and I do set it launches sxiv which is the image viewer right and I just scroll down to any image I like such as this one here I hit M on the keyboard to mark it super shift C to close that window and what it does it sets that wallpaper and it wres to that file docash SL wall the location to this image so the next time I log into qel qel with the X wallpaper command draws this wallpaper again right so that's how it always remembers the wallpaper and always sets the correct wallpaper so that's just a little bit of what I've been playing around with here in the last couple of weeks uh getting my fresh installation of Orco Linux back up and running uh streamlining a little bit of what's going on on my computers qle is running beautifully I'm going to push the latest configs to my uh my lab so if you go to my gitlab.com dwt1 that's my gitlab look for my do files repository you will find my Q config and. config now before I go I want to thank a few special people I want to thank the producers of the show Gabe James Matt Paul Steve West arotic Armor Dragon Commander angry George Lee Matthew methos Nate or Yan Paul peace aror Realties for Less red profit Rolland Soul asri tianrun tools Dev waru and auntu and Willie these guys my highest tied patrons I want to thank these guys because I couldn't do what I do without each and every one of these guys I also want to thank each and every one of these fine ladies and gentlemen as well all these names you're seeing on the screen right now these are all my supporters over on patreon I don't have any corporate sponsors if you like my work want to see more videos about Linux and free and open source software like qel subscribe to Dro tube over on patreon peace guys
Info
Channel: DistroTube
Views: 43,504
Rating: undefined out of 5
Keywords:
Id: B0MCR7_103w
Channel Id: undefined
Length: 25min 27sec (1527 seconds)
Published: Fri Feb 02 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.