Add screenshot tool to i3
This commit is contained in:
parent
48bf60da1b
commit
af9c209bd3
2 changed files with 141 additions and 127 deletions
|
@ -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
|
||||
|
|
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…
Add table
Reference in a new issue