feat: add hyprscratch scratchpad management with rule reapply fork

- Add hyprscratch from colonelpanic8/reapply-rules-on-toggle fork that
  reapplies size/position/float rules on every toggle (not just spawn)
- Configure 9 scratchpads: htop, volume, spotify, element, slack,
  transmission, dropdown, gmail, messages
- Use clean mode (hide on workspace change) and auto-dismiss (only
  dropdown persists)
- Fix pavucontrol class (org.pulseaudio.pavucontrol) and dropdown
  position (offset by taffybar height)
- Add kanshi-sni, dbus-menu, dbus-hslogger flake inputs and follows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-10 22:25:58 -08:00
committed by Kat Huang
parent a15fee5b30
commit cf8892152c
5 changed files with 180 additions and 95 deletions

View File

@@ -10,10 +10,77 @@ makeEnable config "myModules.hyprland" true {
withUWSM = true;
};
home-manager.sharedModules = [
inputs.hyprscratch.homeModules.default
{
services.kanshi = {
enable = true;
systemdTarget = "hyprland-session.target";
};
programs.hyprscratch = {
enable = true;
settings = {
daemon_options = "clean";
global_options = "";
global_rules = "float;size monitor_w*0.95 monitor_h*0.95;center";
htop = {
command = "alacritty --class htop-scratch --title htop -e htop";
class = "htop-scratch";
};
volume = {
command = "pavucontrol";
class = "org.pulseaudio.pavucontrol";
};
spotify = {
command = "spotify";
class = "spotify";
};
element = {
command = "element-desktop";
class = "Element";
};
slack = {
command = "slack";
class = "Slack";
};
transmission = {
command = "transmission-gtk";
class = "transmission-gtk";
};
dropdown = {
command = "ghostty --config-file=/home/imalison/.config/ghostty/dropdown";
class = "com.mitchellh.ghostty.dropdown";
options = "persist";
rules = "float;size monitor_w monitor_h*0.5;move 0 60;noborder;noshadow;animation slide";
};
gmail = {
command = "google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox";
class = "google-chrome";
title = "Gmail";
};
messages = {
command = "google-chrome-stable --new-window https://messages.google.com/web/conversations";
class = "google-chrome";
title = "Messages";
};
};
};
}
];
# Hyprland-specific packages
environment.systemPackages = with pkgs; [
# Hyprland utilities
kanshi # Monitor hotplug management
hyprpaper # Wallpaper
hypridle # Idle daemon
hyprlock # Screen locker