bindsym Print exec bash -c 'grim -g "$(slurp)" ~/Screenshots/$(date…
- User
bindsym Print exec bash -c 'grim -g "(date +%Y-%m-%d_%H-%M-%S).png && swappy -f ~/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png' swappy storing screenshot in home directory when I click save in swappy
- Assistant
The command you've shared is set up to take a screenshot using
grim, save it in the~/Screenshots/directory with a timestamp, and then openswappyto allow you to annotate or edit the screenshot. However, the issue you're experiencing is thatswappysaves the edited image in your home directory instead of the~/Screenshots/directory.To resolve this issue, you can modify
swappyto save the edited output to the same~/Screenshots/directory. One way to do this is by changing the command to either specify a save location forswappyor by moving the file after you save it.Option 1: Specify Save Location in Swappy
You can use
swappy's-oor--outputoption to specify the output file directly. Here’s how you can modify your command:bindsym Print exec bash -c 'grim -g "$(slurp)" ~/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png && swappy -f ~/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png -o ~/Screenshots/$(date +%Y-%m-%d_%H-%M-%S)_edited.png'Option 2: Move the Output Later
If
swappydoes not have an output option that suits your needs, you can leave the command as it is (whereswappysaves the result in your home directory) and then move the saved file to the~/Screenshots/directory after you're done. Here’s how you can set that up:bindsym Print exec bash -c 'grim -g "$(slurp)" ~/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png && swappy -f ~/Screenshots/$(date +%Y-%m-%d_%H-%M-%S).png; mv ~/$(date +%Y-%m-%d_%H-%M-%S)_edited.png ~/Screenshots/'Summary
- Use
swappywith the-ooption to directly specify where to save the edited image. - Alternatively, you can move the edited image to
~/Screenshots/after saving ifswappydoes not provide an option to specify the output location.
Try out one of these solutions, and it should help you manage your screenshots better!
- Use