2022-12-21 21:18:03 +00:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2022-06-15 12:14:01 +00:00
|
|
|
|
|
|
|
# Hammerspoon - MacOS custom automation scripting
|
|
|
|
|
2022-12-21 21:18:03 +00:00
|
|
|
config = lib.mkIf pkgs.stdenv.isDarwin {
|
|
|
|
|
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
xdg.configFile."hammerspoon/init.lua".source = ./hammerspoon/init.lua;
|
|
|
|
xdg.configFile."hammerspoon/Spoons/ControlEscape.spoon".source =
|
|
|
|
./hammerspoon/Spoons/ControlEscape.spoon;
|
|
|
|
xdg.configFile."hammerspoon/Spoons/DismissAlerts.spoon".source =
|
|
|
|
./hammerspoon/Spoons/DismissAlerts.spoon;
|
|
|
|
xdg.configFile."hammerspoon/Spoons/Launcher.spoon/init.lua".source =
|
|
|
|
pkgs.substituteAll {
|
|
|
|
src = ./hammerspoon/Spoons/Launcher.spoon/init.lua;
|
|
|
|
firefox = "${pkgs.firefox-bin}/Applications/Firefox.app";
|
|
|
|
discord = "${pkgs.discord}/Applications/Discord.app";
|
|
|
|
kitty = "${pkgs.kitty}/Applications/kitty.app";
|
2023-03-09 15:45:00 +00:00
|
|
|
slack = "${pkgs.slack}/Applications/Slack.app";
|
2022-12-21 21:18:03 +00:00
|
|
|
};
|
|
|
|
xdg.configFile."hammerspoon/Spoons/MoveWindow.spoon".source =
|
|
|
|
./hammerspoon/Spoons/MoveWindow.spoon;
|
|
|
|
};
|
2022-06-15 12:14:01 +00:00
|
|
|
|
2022-12-21 21:18:03 +00:00
|
|
|
homebrew.casks = [ "hammerspoon" ];
|
2022-06-15 12:14:01 +00:00
|
|
|
|
2022-12-21 21:18:03 +00:00
|
|
|
system.activationScripts.postUserActivation.text = ''
|
|
|
|
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
2022-06-15 12:14:01 +00:00
|
|
|
|
|
|
|
}
|