274 lines
9.3 KiB
HTML
274 lines
9.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; font-src 'self' data:; img-src 'self' data:; connect-src 'self'; base-uri 'self'; form-action 'self' https://defcon.social https://bsky.app;">
|
|
<meta http-equiv="X-Content-Type-Options" content="nosniff">
|
|
<link rel="stylesheet" href="../assets/css/style.css">
|
|
<link rel="icon" type="image/x-icon" href="../favicon.ico">
|
|
<script>
|
|
// Apply theme immediately to prevent flash
|
|
(function() {
|
|
const theme = localStorage.getItem('theme') ||
|
|
(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
|
document.documentElement.setAttribute('data-theme', theme);
|
|
})();
|
|
</script>
|
|
<title>qtile Cheatsheet - Cheatsheets - Launch Pad</title>
|
|
</head>
|
|
<body>
|
|
<button class="theme-toggle" id="themeToggle" aria-label="Toggle dark mode">
|
|
<svg class="theme-icon theme-icon-moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
|
|
<svg class="theme-icon theme-icon-sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display: none;"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
|
|
</button>
|
|
<br/><br/>
|
|
<div class="name">
|
|
__ _______________________ _________._________________________
|
|
\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/
|
|
| __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_
|
|
| \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \
|
|
\___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ /
|
|
\/ \/ \/ \/ \/ \/ \/
|
|
</div>
|
|
<div class="blog-page-header">
|
|
<div class="blog-header-content">
|
|
<a href="/cheatsheets" class="back-link" title="Back to Cheatsheets">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 24 24" class="home-icon"><path fill="currentColor" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>
|
|
</a>
|
|
<h1 class="blog-page-title">qtile Cheatsheet</h1>
|
|
</div>
|
|
</div>
|
|
<div class="blog-post-container">
|
|
<div class="blog-posts-container" style="max-width: 900px; margin: 0 auto;">
|
|
<div class="blog-post">
|
|
<div class="blog-post-content">
|
|
<p><a href="index.html">← Back to cheatsheets</a></p>
|
|
<p><a href="../index.html">← Home</a></p>
|
|
<hr>
|
|
<p>qtile is a full-featured, hackable tiling window manager written in Python.</p>
|
|
<hr>
|
|
<h2>Application Launch</h2>
|
|
<ul>
|
|
<li>Mod+Return - Launch terminal</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+P - Application launcher (rofi/dmenu)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+P - Application launcher (alternative)</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Window Management</h2>
|
|
<ul>
|
|
<li>Mod+W - Close focused window</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+C - Close window (alternative)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+F - Toggle fullscreen</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+F - Toggle floating</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+M - Minimize window</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+M - Restore minimized window</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Window Navigation</h2>
|
|
<ul>
|
|
<li>Mod+J or Mod+↓ - Focus down</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+K or Mod+↑ - Focus up</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+H or Mod+← - Focus left</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+L or Mod+→ - Focus right</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Space - Switch focus between panes (stack layout)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Tab - Switch to next window</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+Tab - Switch to previous window</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Window Movement</h2>
|
|
<ul>
|
|
<li>Mod+Shift+J or Mod+Shift+↓ - Move window down</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+K or Mod+Shift+↑ - Move window up</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+H or Mod+Shift+← - Move window left</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+L or Mod+Shift+→ - Move window right</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+Space - Swap window with master</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Window Resizing</h2>
|
|
<ul>
|
|
<li>Mod+Ctrl+H or Mod+Ctrl+← - Grow window left</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Ctrl+L or Mod+Ctrl+→ - Grow window right</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Ctrl+J or Mod+Ctrl+↓ - Grow window down</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Ctrl+K or Mod+Ctrl+↑ - Grow window up</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+Equal - Reset window sizes</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Layouts</h2>
|
|
<ul>
|
|
<li>Mod+Tab - Switch to next layout</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+Tab - Switch to previous layout</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Space - Switch focus (stack layout)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+Space - Swap window with master</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Groups (Workspaces)</h2>
|
|
<ul>
|
|
<li>Mod+1-9 - Switch to group</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+1-9 - Move window to group</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+G - Switch to next group</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+G - Switch to previous group</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>System</h2>
|
|
<ul>
|
|
<li>Mod+Ctrl+R - Reload qtile config</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Ctrl+Q - Restart qtile</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+Q - Shutdown qtile</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Mod+Shift+R - Restart qtile (alternative)</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Configuration</h2>
|
|
<h3>Config File Location</h3>
|
|
<ul>
|
|
<li>~/.config/qtile/config.py (user config)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Default config in libqtile/resources/default_config.py</li>
|
|
</ul>
|
|
<h3>Example Key Bindings</h3>
|
|
<p>Customize in config.py:</p>
|
|
<pre><code>from libqtile.config import Key
|
|
from libqtile.lazy import lazy
|
|
|
|
mod = "mod4" # Super/Windows key
|
|
|
|
keys = [
|
|
# Application launch
|
|
Key([mod], "Return", lazy.spawn("kitty"), desc="Launch terminal"),
|
|
Key([mod], "p", lazy.spawn("rofi -show drun"), desc="Application launcher"),
|
|
|
|
# Window navigation
|
|
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
|
|
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
|
|
Key([mod], "h", lazy.layout.left(), desc="Move focus left"),
|
|
Key([mod], "l", lazy.layout.right(), desc="Move focus right"),
|
|
|
|
# Window movement
|
|
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
|
|
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
|
|
Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window left"),
|
|
Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window right"),
|
|
|
|
# Window management
|
|
Key([mod], "w", lazy.window.kill(), desc="Close window"),
|
|
Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"),
|
|
Key([mod, "shift"], "f", lazy.window.toggle_floating(), desc="Toggle floating"),
|
|
|
|
# Layouts
|
|
Key([mod], "Tab", lazy.next_layout(), desc="Switch layouts"),
|
|
Key([mod], "space", lazy.layout.next(), desc="Switch focus"),
|
|
|
|
# Groups
|
|
Key([mod], "1", lazy.group["1"].toscreen(), desc="Switch to group 1"),
|
|
Key([mod, "shift"], "1", lazy.window.togroup("1"), desc="Move window to group 1"),
|
|
|
|
# System
|
|
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload config"),
|
|
Key([mod, "control"], "q", lazy.restart(), desc="Restart qtile"),
|
|
Key([mod, "shift"], "q", lazy.shutdown(), desc="Shutdown qtile"),
|
|
]</code></pre>
|
|
<h3>Change Modifier Key</h3>
|
|
<pre><code>mod = "mod4" # Super/Windows key
|
|
# or
|
|
mod = "mod1" # Alt key</code></pre>
|
|
<hr>
|
|
<h2>Tips</h2>
|
|
<ul>
|
|
<li>Config is Python - full programming language available</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use KeyChord for binding sequences/modes</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Supports groups (workspaces) and moving windows between them</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Layouts, widgets, and screen settings all in Python config</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Default layout switching and focus commands use hjkl</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use lazy.call() for custom functions</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Supports multiple screens/monitors</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Widgets configurable via Python</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use EzKey helper for simpler key definitions</li>
|
|
</ul>
|
|
<hr>
|
|
<p><a href="index.html">← Back to cheatsheets</a></p>
|
|
<p><a href="../index.html">← Home</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script async type="text/javascript" src="../blog/analytics.js"></script>
|
|
<script src="../theme.js"></script>
|
|
</body>
|
|
</html> |