Add screenshot tool to i3

This commit is contained in:
Natsu Kagami 2021-11-16 11:05:41 -05:00
parent 48bf60da1b
commit af9c209bd3
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
2 changed files with 141 additions and 127 deletions

View file

@ -23,9 +23,12 @@ let
range = from: to:
let
f = cur: if cur == to then [ ] else [ cur ] ++ f (cur + 1);
in f from;
in
f from;
in
{
imports = [ ./i3/screenshot.nix ];
## i3 window manager
xsession.windowManager.i3 = {
enable = true;
@ -75,7 +78,8 @@ in
"${mod}+r" = "exec ${pkgs.dmenu}/bin/dmenu_run";
"${mod}+d" = "exec i3-dmenu-desktop --dmenu='${pkgs.dmenu}/bin/dmenu -i'";
} // (
builtins.listToAttrs (lib.flatten (map (key: [
builtins.listToAttrs (lib.flatten (map
(key: [
{
name = "${mod}+${key}";
value = "workspace ${builtins.getAttr key wsAttrs}";
@ -84,7 +88,8 @@ in
name = "${mod}+Shift+${key}";
value = "move to workspace ${builtins.getAttr key wsAttrs}";
}
]) (builtins.attrNames wsAttrs))
])
(builtins.attrNames wsAttrs))
)));
# Workspace

View file

@ -0,0 +1,9 @@
{ pkgs, config, lib, ... }:
with lib;
{
xsession.windowManager.i3.config = {
startup = [ { command = "${pkgs.flameshot}/bin/flameshot"; } ];
keybindings."Print" = "exec ${pkgs.flameshot}/bin/flameshot gui";
};
}