Brain Drain Friday: My Work-in-Progress Qtile Rice
dev·@thecrazygm·
0.000 HBDBrain Drain Friday: My Work-in-Progress Qtile Rice
Hey everyone, It's another Brain Drain Friday! My brain feels like it's running on fumes, so instead of a deep technical dive, I wanted to do something fun that most Linux enthusiasts can appreciate: "ricing" the desktop. For those unfamiliar, "ricing" is just a term for customizing your desktop's appearance and functionality to make it your own – from colors and fonts to window manager behavior. It’s a bit of an art form and a fun way to express yourself. I'm always tweaking my setup, and right now I'm running Qtile, a tiling window manager written and configured in Python. I wanted to share my current work-in-progress look and highlight a few key snippets from my `config.py` that make it all work.  Here are a few pieces of the configuration that you might not be able to see clearly in the image, but that define how my desktop looks and feels: #### 1. The Color Palette A good rice starts with a good color scheme. I'm using a new theme that defines a set of colors I can reference throughout the entire configuration, from the bar to the window borders. This makes it super easy to change the entire look and feel just by editing one section. ```python # --- Colors (New Theme from rootloops.sh) --- colors = { "background": "#0a0611", "foreground": "#e5dff1", "red": "#d97780", "green": "#7aa860", "yellow": "#bc904f", "blue": "#6b9bd9", "magenta": "#b77ed1", "cyan": "#52a9a9", "white": "#beb1da", "brightBlack": "#584875", } ``` #### 2. Layout Theme and Window Borders I like a clean, minimalist look with just enough of a border to know which window is active. The `layout_theme` applies these settings to all my layouts (like `MonadTall` and `Max`), ensuring consistency. The active window gets a nice magenta border, while inactive windows have a more subdued gray. ```python # --- Layouts --- layout_theme = { "border_width": 2, "margin": 8, "border_focus": colors["magenta"], "border_normal": colors["brightBlack"], } layouts = [ layout.MonadTall(**layout_theme), layout.Max(**layout_theme), layout.Floating(**layout_theme), ] ``` #### 3. Multi-Monitor Workspace (Group) Handling I run a multi-monitor setup, and one of the best things about Qtile is how you can customize it to manage workspaces across screens. I have a couple of helper functions, `go_to_group_on_screen` and `move_window_to_group_on_screen`, that automatically switch focus to the correct monitor when I switch to certain workspaces. For my setup: - Workspaces 1-5 live on my primary monitor (index 0). - Workspaces 6-9 are designated for my second monitor (index 1). ```python # Helper function example def go_to_group_on_screen(group_name: str): def _inner(qtile_instance): # ... logic to determine which screen the group belongs to ... if 1 <= int(group_name) <= 5: target_screen_index = 0 # Monitor 1 elif 6 <= int(group_name) <= 9: target_screen_index = 1 # Monitor 2 # ... logic to switch to the screen and then the group ... qtile_instance.to_screen(target_screen_index) qtile_instance.groups_map[group_name].toscreen() return _inner ``` #### 4. Custom Autostart Script To get everything running on login (like my notification daemon, wallpaper setter, etc.), Qtile has a startup hook. I have it set to run an `autostart.sh` script located in my config directory. This keeps my Python config clean and lets me manage startup applications with a simple shell script. ```python # --- Autostart --- @hook.subscribe.startup_once def autostart(): home = os.path.expanduser("~/.config/qtile/autostart.sh") # Check if the script exists and is executable if os.path.exists(home) and os.access(home, os.X_OK): subprocess.Popen([home]) ``` It’s always a fun process, and there’s always something new to tweak. What does your desktop look like? Share a link or describe your setup in the comments! As always, Michael Garcia a.k.a. TheCrazyGM
👍 beco132, hive.pizza, teamvn, hellobritt, chariiing, ecoinstant, eturnerx, tomiscurious, fatman, votehero, steembasicincome, sbi2, neoxvoter, pixelfan, bbarelyseal, sports.power.bot, freecompliments, funnel, grocko, hivetrending, huzzah, prosocialise, ravenmus1c, dadspardan, cryptoknight12, jozefkrichards, hivedrip, honeyjean24, anikys3reasure, awesomegames007, piestrikesback, buildingpies, sbi-tokens, qwertm, tub3r0, briefmarken, shauner, gamer00, slothlydoesit, hdmed, hetty-rowan, magnacarta, wongi, boeltermc, beststart, poplar-22, ngwinndave, hive-140084, pepetoken, fc-curation, fc-rewards, fc-arbitration, indiasierra, magicalex, indeedly, trovepower, mmbbot, instagram-models, dpend.active, sketching, iviaxpow3r, mxm0unite, thorlock, mighty-thor, splinterwhale, noloafing, sneakyninja, netzisde, bububoomt, thedailysneak, babysavage, ravensavage, michael561, shaharyar14, jacor, moretea, morwhale, coolguy123, braaiboy, guurry123, borniet, alkirua, trashyomen, noctury, marynn, chrisly.social, holdeck2, vrezion, tengolotodo.leo, converter.bonus, bankrobbery, spoonies, d-a-d, pepe.voter, claudiavb, itz.inno, murtaza-7868, gurseerat, vrezyy, timix648, digi-alt, esmeesmith, fonestreet, casimodo, kiemis, draygyn, iproto, emsenn0, youloseagain, penguinpablo, cryptonized, svanbo, robtheranger, morwhaleplus, morwhalebonus, najat, thearned, baasdebeer, afternoondrinks, aydie1000, ilanisnapshots, barbyjr, wynella, shmieta, mk992039, freemonster, calmphoenix, rudy-dj, kasih-sayang, mviews, funnyman, hungrybear, holovision.stem, learn2code, jacuzzi, stem.alfa, pakx, tejidorosa, vixmemon, eforucom, deepresearch, szukamnemo, techguard, niallon11, magic.cent, mirroredspork, likedeeler, omra-sky, cryptoniusrex, urun, lrekt01, mes, lolz.byte, esbat, paranormalhive, tydynrain, artlover, ecoinstats, accelerator, treasure.hoard, ryosai, thecrazygm.bank, bengy, a-bot, archon-gov, pof.archon, abrockman, monsterrerentals, everythingsmgirl, voxmortis, ykretz, adulruna, deggial, rama-dev, fw206, dkidfit, txracer,