What does the demo mean?
Toggling between the following:
Super+efor nvim scratchpadsSuper+tfor tmuxmiscsession withcountdownrunningSuper+mfor tmuxmusicsession withluerunningSuper+ufor Obsidian obsidian-excalidraw-plugin
Introduction
I used to use scratchpads from pyprland, but it has grown to a swiss army knife of different plugins that I don’t use. There were some stability issues that made me look for alternatives, and I found hyprscratch. It does exactly what I want: scratchpad management and nothing more.
Getting Started
- Add
hyprscratchto your flake input:
{
inputs = {
hyprscratch = {
url = "github:sashetophizika/hyprscratch";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
- Use the input in home-manager:
{ inputs, ... }:
{
imports = [ inputs.hyprscratch.homeModules.default ];
programs.hyprscratch = {
enable = true;
};
}
- start
hyprscratchinhyprland.confusinguwsm:
exec-once = sleep 10 ; uwsm app -- hyprscratch init
Info
I needed to add
sleep 10 to prevent some race condition that results in weird waybar/workspaces. You likely don’t need it.My setup:
bind = $mod, e, exec, hyprscratch terminal_super_e "[size (monitor_w*0.9) (monitor_h*0.9); center on] kitty --class terminal_super_e --execute tmux attach-session -t ai" persist pin
bind = $mod, t, exec, hyprscratch terminal_dropterm "[size (monitor_w*0.6) (monitor_h*0.45); move ((monitor_w-window_w)/2) (monitor_h*0.035)] kitty --class terminal_dropterm --execute tmux attach-session -t misc" persist pin
bind = $mod, m, exec, hyprscratch terminal_music "[size (monitor_w*0.43) (monitor_h*0.70); move (monitor_w*0.568) ((monitor_h-window_h)/2)] kitty --class terminal_music --execute tmux attach-session -t music" persist pin
bind = $mod, u, exec, hyprscratch obsidian "[size (monitor_w*0.9) (monitor_h*0.9); center on] obsidian" persist pin
Note
It’s using the new Window Rules syntax introduced in v0.53.0.
It’s not a plug-and-play solution. If you want to make the above work:
- I used
kittyas my terminal. - I have tmux sessions
ai,miscandmusicalready running. I used tmuxp as my session manager.tmux attach-session -t musicetc needs to work already.
Conclusion
Give this project some love!