From bcbf1ed1e179b667a20a008254c629a1fc3f3716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sat, 2 Nov 2024 06:39:01 +0100 Subject: [PATCH] feat(sway): Add screenshot keybinds --- home-config/config/desktop/sway.nix | 1 + home-config/dotfiles/sway.conf | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/home-config/config/desktop/sway.nix b/home-config/config/desktop/sway.nix index 05e855a4..a7d92c62 100644 --- a/home-config/config/desktop/sway.nix +++ b/home-config/config/desktop/sway.nix @@ -41,6 +41,7 @@ in home.packages = [ keepassxc-copy pkgs.glib + pkgs.sway-contrib.grimshot ]; wayland.windowManager.sway = { diff --git a/home-config/dotfiles/sway.conf b/home-config/dotfiles/sway.conf index 7081af14..7ca67c17 100644 --- a/home-config/dotfiles/sway.conf +++ b/home-config/dotfiles/sway.conf @@ -34,6 +34,17 @@ bindsym { ## Window/desktop management floating_modifier $mod +bindsym { + $mod+G mode "screenshot" +} + +mode "screenshot" { + bindsym Escape mode "default" + bindsym c exec grimshot copy active; mode "default" + bindsym r exec grimshot copy area; mode "default" + bindsym a exec grimshot copy output; mode "default" +} + bindsym { $mod+Up focus up $mod+Right focus right