From e013824a899088b284ee4150cfc7530a620aa571 Mon Sep 17 00:00:00 2001 From: askiiart Date: Thu, 7 Mar 2024 19:49:01 -0600 Subject: [PATCH] Fix screenshots for sway --- restore.sh | 1 + sway/config.d/misc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/restore.sh b/restore.sh index aaf2bd5..13a1954 100755 --- a/restore.sh +++ b/restore.sh @@ -24,6 +24,7 @@ cp -r $GIT_DIR/gnupg/* $HOME/.gnupg/ # vesktop mkdir $HOME/vesktop cp -r $GIT_DIR/vesktop/* $HOME/vesktop/ + # i3 rm -rf $HOME/.config/i3 cp -r $GIT_DIR/i3 $HOME/.config/ diff --git a/sway/config.d/misc b/sway/config.d/misc index c1ec8c3..82332a2 100644 --- a/sway/config.d/misc +++ b/sway/config.d/misc @@ -3,7 +3,7 @@ exec wl-paste -t text --watch clipman store --no-persist # Add screenshot and color picker #bindsym Print exec grim -t png -c -bindsym Mod4+Shift+P exec "slurp -d | xargs -I % grim -g % -t png -c && wl-copy --type image/png < $(ls ~/Pictures/*_grim.png | tail --lines 1)" +bindsym Mod4+Shift+P exec "mkdir $HOME/Pictures; export FILENAME=$HOME/Pictures/screenshot_$(date +%F_%H:%M:%S).png; slurp -d | xargs -I % grim -g % -t png -c $FILENAME; wl-copy --type image/png < $FILENAME" bindsym Mod4+Mod1+Shift+P exec "slurp -p | xargs -I % grim -g % -t png - | convert - -format '%[pixel:p{0,0}]' txt:- | tail --lines 1 | xargs -I % zenity --info --text=% --title='Color picker'" # Delete all user data