diff options
Diffstat (limited to 'modules/desktop/sxhkd/keybindings')
| -rw-r--r-- | modules/desktop/sxhkd/keybindings/maim.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/desktop/sxhkd/keybindings/maim.nix b/modules/desktop/sxhkd/keybindings/maim.nix new file mode 100644 index 0000000..bce0f1b --- /dev/null +++ b/modules/desktop/sxhkd/keybindings/maim.nix @@ -0,0 +1,15 @@ +{ createKeybinding, pkgs, lib }: + +let + maim = "${pkgs.maim}/bin/maim"; +in lib.mkMerge [ + (createKeybinding + "Print" + "Take screenshot of selected area and save to clipboard" + "${maim} -s | xclip -selection clipboard -t image/png") + + (createKeybinding + "Shift + Print" + "Take screenshot of selected area and save to ~/Pictures/Screenshots" + "mkdir -p ~/Pictures/Screenshots && ${maim} -s ~/Pictures/Screenshots/screenshot-$(date +%Y%m%d-%H%M%S).png") +] |
