i3/desktop: Split out
This commit is contained in:
parent
2ad4bee0f9
commit
d994dfb9fb
11 changed files with 161 additions and 94 deletions
17
hm/desktop/screenshots/default.nix
Normal file
17
hm/desktop/screenshots/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ 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 {
|
||||
xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR = "${config.home.homeDirectory}/Screenshots";
|
||||
xsession.windowManager.i3.config.keybindings = {
|
||||
"Print" = "exec ${scrot} --focused";
|
||||
"${mod}+Print" = "exec ${scrot}";
|
||||
"Ctrl+Print" = "exec ${pkgs.coreutils}/bin/sleep 1 && ${scrot} --select";
|
||||
# TODO Try using bindsym --release instead of sleep
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue