From dc29c5a33c04527ad316d82e26a603e6c637f514 Mon Sep 17 00:00:00 2001 From: Hydroxycarbamide Date: Thu, 16 May 2024 18:52:51 +0200 Subject: [PATCH] Fix screenshot tools on river and sway --- dot_config/river/executable_init | 23 ++++++++++++++++------- dot_config/sway/config | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dot_config/river/executable_init b/dot_config/river/executable_init index db15a09..52c5a25 100644 --- a/dot_config/river/executable_init +++ b/dot_config/river/executable_init @@ -158,9 +158,17 @@ riverctl map normal Super D spawn "rofi -show drun -theme catppuccin-macchiato" riverctl map normal Super W spawn "rofi -show window -theme catppuccin-macchiato" riverctl map normal Super E spawn "kitty --class='fm-term' nnn -da -P p" riverctl map normal Super+Shift E spawn "xdg-open $HOME" -riverctl map normal Super+Shift S spawn "hyprshot -m region" + +# shellcheck disable=SC2016 +riverctl map normal Super+Shift S spawn 'grim -g "$(slurp)" - | wl-copy' + +# shellcheck disable=SC2016 riverctl map normal Super+Control+Shift S spawn 'grim -g "$(slurp)" /tmp/grim.png && tesseract -l eng+jpn /tmp/grim.png - | wl-copy && wl-paste | xargs -I{} notify-send "Tesseract" "Copied {}"' -riverctl map normal Super Print spawn "hyprshot -m window" + +riverctl map normal Super P spawn "grim - | wl-copy" + +# shellcheck disable=SC2016 +riverctl map normal Super+Shift P spawn 'grim -g "$(slurp -o)" - | wl-copy' ############ @@ -280,12 +288,13 @@ flatpak run me.kozec.syncthingtk -m & systemctl start --user foot-server systemctl start --user sunshine -# polkit -/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +## cliphist +wl-paste --type text --watch cliphist store & #Stores only text data +wl-paste --type image --watch cliphist store & #Stores only image data ## lock swayidle before-sleep 'loginctl lock-session' lock '/home/eric/.config/hypr/bsplock' -## cliphist -wl-paste --type text --watch cliphist store & #Stores only text data -wl-paste --type image --watch cliphist store & #Stores only image data +# polkit +/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & + diff --git a/dot_config/sway/config b/dot_config/sway/config index 8f3f890..a3555da 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -99,7 +99,7 @@ bindsym $mod+w exec rofi -show window -theme catppuccin-macchiato bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy bindsym $mod+Control+Shift+s exec grim -g "$(slurp)" /tmp/grim.png && tesseract -l eng+jpn /tmp/grim.png - | wl-copy && wl-paste | xargs -I{} notify-send "Tesseract" "Copied '{}'" -bindsym $mod+P exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy +bindsym $mod+P exec grim -g "$(slurp -o)" - | wl-copy bindsym $mod+Shift+P exec grim - | wl-copy # Drag floating windows by holding down $mod and left mouse button.