Add screenshot tool to i3
This commit is contained in:
parent
48bf60da1b
commit
af9c209bd3
|
@ -23,9 +23,12 @@ let
|
||||||
range = from: to:
|
range = from: to:
|
||||||
let
|
let
|
||||||
f = cur: if cur == to then [ ] else [ cur ] ++ f (cur + 1);
|
f = cur: if cur == to then [ ] else [ cur ] ++ f (cur + 1);
|
||||||
in f from;
|
in
|
||||||
|
f from;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [ ./i3/screenshot.nix ];
|
||||||
|
|
||||||
## i3 window manager
|
## i3 window manager
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -75,7 +78,8 @@ in
|
||||||
"${mod}+r" = "exec ${pkgs.dmenu}/bin/dmenu_run";
|
"${mod}+r" = "exec ${pkgs.dmenu}/bin/dmenu_run";
|
||||||
"${mod}+d" = "exec i3-dmenu-desktop --dmenu='${pkgs.dmenu}/bin/dmenu -i'";
|
"${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}";
|
name = "${mod}+${key}";
|
||||||
value = "workspace ${builtins.getAttr key wsAttrs}";
|
value = "workspace ${builtins.getAttr key wsAttrs}";
|
||||||
|
@ -84,7 +88,8 @@ in
|
||||||
name = "${mod}+Shift+${key}";
|
name = "${mod}+Shift+${key}";
|
||||||
value = "move to workspace ${builtins.getAttr key wsAttrs}";
|
value = "move to workspace ${builtins.getAttr key wsAttrs}";
|
||||||
}
|
}
|
||||||
]) (builtins.attrNames wsAttrs))
|
])
|
||||||
|
(builtins.attrNames wsAttrs))
|
||||||
)));
|
)));
|
||||||
|
|
||||||
# Workspace
|
# Workspace
|
||||||
|
|
9
home/X11/i3/screenshot.nix
Normal file
9
home/X11/i3/screenshot.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue