scratchpad
What is a Special Workspace (Scratchpad)?
A special workspace in Hyprland is like a hidden, temporary workspace that:
- Doesn't appear in workspace switchers
- Can be toggled on/off with the same keybind
- Perfect for temporary windows you need quick access to (terminals, calculators, messaging apps)
How it works
Unlike normal workspaces (1-10), special workspaces:
- Are dynamic - they only exist when windows are in them
- Toggle - press the key to show/hide
- Overlay on top of your current workspace when shown
The code explained
lua
-- Show/hide the special workspace named "magic"
hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic"))
-- Move the focused window to the special workspace
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))toggle_special("magic")- PressSuper + Sto show your scratchpad, press again to hide itmove({ workspace = "special:magic" })- PressSuper + Shift + Sto send the current window to the scratchpad
How to use it
Basic usage
- Send window to scratchpad: Focus a window → Press
Super + Shift + S - Toggle scratchpad: Press
Super + S(shows/hides all windows in scratchpad) - Bring back to main workspace: While scratchpad is visible, press
Super + Shift + Sagain on the window
Practical examples
Terminal scratchpad:
lua
-- Launch a terminal directly into special workspace
hl.bind(mainMod .. " + RETURN", hl.dsp.exec_cmd("kitty --class=scratchpad"))
hl.on("window", function(win)
if win.class == "scratchpad" then
hl.dsp.window.move({ workspace = "special:terminal" })
end
end)Multiple special workspaces:
lua
-- Different scratchpads for different purposes
hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic")) -- Calculator/misc
hl.bind(mainMod .. " + T", hl.dsp.workspace.toggle_special("terminal")) -- Terminal
hl.bind(mainMod .. " + M", hl.dsp.workspace.toggle_special("music")) -- Music playerQuick access to messaging apps:
lua
-- Send Discord/Telegram to scratchpad
-- Launch Discord in special workspace
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd("discord"))
hl.on("window", function(win)
if win.class == "discord" then
hl.dsp.window.move({ workspace = "special:messaging" })
end
end)Tips
- Name matters: You can name special workspaces anything (
"magic","temp","calc", etc.) - Persistence: Windows in special workspaces stay open even when hidden
- Multiple windows: You can send multiple windows to the same special workspace - they'll all appear when toggled
- Resizing: When the scratchpad appears, you can resize/reposition windows normally
Should you use it?
Yes, if you:
- Want a quick terminal available at keypress
- Use a calculator/music player frequently
- Have apps that pop up temporarily (messaging, file manager)
- Want to reduce workspace clutter
Common use cases:
- Dropdown terminal (like Guake/Tilda)
- Quick calculator
- Music player controls
- Messaging apps (keep them hidden until needed)
- File manager for quick file access
The special workspace is one of Hyprland's most convenient features for workflow efficiency!
