dotfiles/hm/desktop/screenshots/default.nix

17 lines
590 B
Nix
Raw Permalink Normal View History

2024-01-12 23:52:53 +01:00
{ pkgs, lib, config, ... }:
let
dir = config.xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR;
scrot = "${pkgs.scrot}/bin/scrot --exec '${pkgs.coreutils}/bin/mv $f ${dir}/ && ${pkgs.optipng}/bin/optipng ${dir}/$f'";
mod = config.xsession.windowManager.i3.config.modifier;
in
{
config = lib.mkIf config.frogeye.desktop.xorg {
2024-06-24 15:53:09 +02:00
frogeye.folders.screenshots.path = "Screenshots";
2024-01-12 23:52:53 +01:00
xsession.windowManager.i3.config.keybindings = {
"Print" = "exec ${scrot} --focused";
"${mod}+Print" = "exec ${scrot}";
2024-03-09 19:02:57 +01:00
"Ctrl+Print" = "--release exec ${scrot} --select";
2024-01-12 23:52:53 +01:00
};
};
}