{ pkgs, lib, config, ... }:
{
  home.packages = with pkgs; lib.mkIf config.programs.rofi.enable [
    (pkgs.writeScriptBin "rofiscratch" ''
      SCRATCHPADS=$(echo -e "Btop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads")
      case $SCRATCHPADS in
        Btop) foot -a btop -T Btop btop;;
        Music) foot -a music -T Music ncmpcpp;;
        Sound) foot -a sound -T Sound pulsemixer;;
      esac
    '')
    (pkgs.writeScriptBin "rofipower" ''
      POWER=$(echo -e "Shutdown\nReboot\nLock\nSleep\nKill" | rofi -dmenu -i -p "Power")
      case $POWER in
        Shutdown) poweroff;;
        Reboot) reboot;;
        Lock) swaylock;;
        Sleep) swaylock & systemctl suspend;;
        Kill) pkill -9 $XDG_CURRENT_DESKTOP;;
      esac
    '')
  ];
}
