WebsiteTemplate/cheatsheets/hyprland.html
2026-01-25 11:33:37 -04:00

252 lines
7.4 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>hyprland 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">hyprland 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>hyprland is a dynamic tiling Wayland compositor.</p>
<hr>
<h2>Application Launch</h2>
<ul>
<li>Super+Return - Launch terminal</li>
</ul>
<ul>
<li>Super+Shift+Return - Launch floating terminal</li>
</ul>
<ul>
<li>Super+D - Application launcher (rofi/dmenu)</li>
</ul>
<ul>
<li>Super+B - Launch browser</li>
</ul>
<ul>
<li>Super+E - Launch file manager</li>
</ul>
<ul>
<li>Super+Q - Close active window</li>
</ul>
<hr>
<h2>Window Management</h2>
<ul>
<li>Super+Q - Close focused window</li>
</ul>
<ul>
<li>Super+F - Toggle fullscreen</li>
</ul>
<ul>
<li>Super+Shift+F - Toggle floating</li>
</ul>
<ul>
<li>Super+T - Toggle tiling/floating</li>
</ul>
<ul>
<li>Super+P - Toggle pin (keep on top)</li>
</ul>
<ul>
<li>Super+S - Toggle split (horizontal/vertical)</li>
</ul>
<ul>
<li>Super+Shift+S - Swap windows</li>
</ul>
<ul>
<li>Super+R - Resize mode</li>
</ul>
<hr>
<h2>Window Navigation</h2>
<ul>
<li>Super+H/J/K/L - Move focus (vim-style)</li>
</ul>
<ul>
<li>Super+Shift+H/J/K/L - Move window</li>
</ul>
<ul>
<li>Super+Arrow - Move focus</li>
</ul>
<ul>
<li>Super+Shift+Arrow - Move window</li>
</ul>
<ul>
<li>Super+Tab - Switch to last window</li>
</ul>
<ul>
<li>Super+Shift+Tab - Switch windows (reverse)</li>
</ul>
<hr>
<h2>Workspaces</h2>
<ul>
<li>Super+1-9 - Switch to workspace</li>
</ul>
<ul>
<li>Super+Shift+1-9 - Move window to workspace</li>
</ul>
<ul>
<li>Super+Ctrl+Left/Right - Switch workspace</li>
</ul>
<ul>
<li>Super+Ctrl+Shift+Left/Right - Move window to workspace</li>
</ul>
<ul>
<li>Super+Mouse1 - Move window (drag)</li>
</ul>
<ul>
<li>Super+Mouse2 - Resize window (drag)</li>
</ul>
<hr>
<h2>Layout and Resize</h2>
<ul>
<li>Super+Plus - Increase window size</li>
</ul>
<ul>
<li>Super+Minus - Decrease window size</li>
</ul>
<ul>
<li>Super+Shift+Plus - Increase gap</li>
</ul>
<ul>
<li>Super+Shift+Minus - Decrease gap</li>
</ul>
<ul>
<li>Super+R - Enter resize mode</li>
</ul>
<ul>
<li>Super+Escape - Exit resize mode</li>
</ul>
<hr>
<h2>System</h2>
<ul>
<li>Super+Shift+Q - Quit hyprland</li>
</ul>
<ul>
<li>Super+Shift+E - Exit session</li>
</ul>
<ul>
<li>Super+L - Lock screen</li>
</ul>
<ul>
<li>Print - Screenshot</li>
</ul>
<ul>
<li>Super+Print - Screenshot (area)</li>
</ul>
<ul>
<li>Super+Shift+Print - Screenshot (window)</li>
</ul>
<hr>
<h2>Configuration</h2>
<h3>Config File Location</h3>
<ul>
<li>~/.config/hypr/hyprland.conf (main config)</li>
</ul>
<ul>
<li>~/.config/hypr/config.d/*.conf (split config files)</li>
</ul>
<h3>Example Key Bindings</h3>
<p>Customize in hyprland.conf:</p>
<pre><code># Application launch
bind = SUPER, RETURN, exec, kitty
bind = SUPER, B, exec, firefox
bind = SUPER, D, exec, rofi -show drun
# Window management
bind = SUPER, Q, killactive
bind = SUPER, F, fullscreen
bind = SUPER, SHIFT, F, togglefloating
# Window navigation
bind = SUPER, H, movefocus, l
bind = SUPER, L, movefocus, r
bind = SUPER, J, movefocus, d
bind = SUPER, K, movefocus, u
# Workspaces
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER SHIFT, 1, movetoworkspace, 1
bind = SUPER SHIFT, 2, movetoworkspace, 2
# System
bind = SUPER SHIFT, Q, exit
bind = , Print, exec, grim</code></pre>
<h3>Mouse Bindings</h3>
<pre><code># Mouse bindings
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow</code></pre>
<hr>
<h2>Tips</h2>
<ul>
<li>Bind syntax: bind = MODS, KEY, dispatcher, params</li>
</ul>
<ul>
<li>Supports flags: r (release), l (locked), e (repeat)</li>
</ul>
<ul>
<li>Use pass dispatcher for global keybinds</li>
</ul>
<ul>
<li>Window rules allow matching by class for app-specific behavior</li>
</ul>
<ul>
<li>Supports multiple keyboard layouts</li>
</ul>
<ul>
<li>Use bindsym for symbolic key names</li>
</ul>
<ul>
<li>Split config files for organization</li>
</ul>
<ul>
<li>Use exec-once for startup commands</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>