sway
This commit is contained in:
parent
492f085d52
commit
bb021a1aae
30 changed files with 487 additions and 573 deletions
|
@ -6,16 +6,23 @@
|
|||
}:
|
||||
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;
|
||||
gs =
|
||||
mode:
|
||||
pkgs.writeShellScript "grimshot-${mode}" ''
|
||||
path="${dir}/$(date -Isec).png"
|
||||
${lib.getExe pkgs.sway-contrib.grimshot} savecopy ${mode} "$path"
|
||||
${pkgs.optipng}/bin/optipng "$path"
|
||||
'';
|
||||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.frogeye.desktop.xorg {
|
||||
frogeye.folders.screenshots.path = "Screenshots";
|
||||
xsession.windowManager.i3.config.keybindings = {
|
||||
"Print" = "exec ${scrot} --focused";
|
||||
"${mod}+Print" = "exec ${scrot}";
|
||||
"Ctrl+Print" = "--release exec ${scrot} --select";
|
||||
home.packages = [ pkgs.sway-contrib.grimshot ];
|
||||
wayland.windowManager.sway.config.keybindings = lib.mkOptionDefault {
|
||||
"Print" = "exec ${gs "active"}";
|
||||
"${mod}+Print" = "exec ${gs "screen"}";
|
||||
"Ctrl+Print" = "exec ${gs "anything"}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue