A versatile window stashing manager for Hyprland that can turn any application into a toggleable stashed window.
- Universal: Works with any application, not just terminals
- Customizable sizing: Support for both pixel and percentage-based dimensions
- Flexible positioning: Top, bottom, left, right, or center positioning
- Smart toggling: Automatically shows/stashes windows with proper workspace management
- Window pinning: Keeps stashed windows visible across workspaces when active
- Special workspace integration: Uses Hyprland's special workspace for stashed state
- Clone the repository:
git clone https://github.com/SherLock707/HyprStash.git
cd hyprstash
- Make the script executable:
chmod +x hyprstash.sh
- (Optional) Add to your PATH:
sudo cp hyprstash.sh /usr/local/bin/hyprstash
./hyprstash.sh [OPTIONS] -- COMMAND
Option | Description | Default |
---|---|---|
-s, --size |
Window size (WIDTHxHEIGHT or WIDTH%xHEIGHT%) | 50x50 |
-p, --position |
Spawn position (top/bottom/left/right/center) | top |
-c, --class |
Window class name for identification | Required |
-h, --help |
Show help message | - |
-- |
Separator between options and command | Required |
./hyprstash.sh -s 70x60 -p top -c foot-drop -- foot --app-id foot-drop
./hyprstash.sh -s 60x40 -p top -c foot-drop -- foot --app-id foot-drop -e zellij attach --create scratchpad
./hyprstash.sh -s 80x70 -p center -c nemo-drop -- nemo --class nemo-drop
./hyprstash.sh -s 400x500 -p right -c calc-drop -- gnome-calculator --class calc-drop
./hyprstash.sh -s 90x80 -p center -c code-drop -- code --class code-drop
Add keybindings to your hyprland.conf
:
# Stashed terminal
bind = SUPER, grave, exec, /path/to/hyprstash.sh -s 70x60 -p top -c foot-drop -- foot --app-id foot-drop
# Stashed file manager
bind = SUPER SHIFT, E, exec, /path/to/hyprstash.sh -s 80x70 -p center -c nemo-drop -- nemo --class nemo-drop
# Stashed calculator
bind = SUPER, C, exec, /path/to/hyprstash.sh -s 400x500 -p right -c calc-drop -- gnome-calculator --class calc-drop
- Pixels:
800x600
,1200x800
- Percentages:
50%x40%
,80%x70%
- Mixed:
800x50%
,60%x600
top
: Upper area of screenbottom
: Lower area of screenleft
: Left side of screenright
: Right side of screencenter
: Center of screen
- First call: Creates the application window, pins it, and shows it on current workspace
- Second call: Unpins the window and stashes it to special workspace (hidden)
- Subsequent calls: Toggles between visible (pinned on current workspace) and stashed (in special workspace)
- Verify the application command works independently
- Check that the class name matches what the application uses
- Use
hyprctl clients
to see actual window classes
- Ensure the class name in the script matches the actual window class
- Some applications need specific flags to set window class (e.g.,
--class
,--app-id
)
- Each unique class name creates a separate stashed window instance
- Use different class names for different stashed applications
- Hyprland (Window Manager)
- jq (JSON processor)
- Bash 4.0+
Install dependencies on Arch Linux:
sudo pacman -S jq
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Hyprland - Amazing Wayland compositor
- Inspired by stash/scratchpad functionality in tiling window managers