I know it is a hack but this approach works for me since months and I just wanted to share it.Īs I wanted to use custom shortcuts in addition to custom screenshots location, I wanted to do this manually in terminal. Whenever something in the path $HOME/Pictures changes, the unit rvice gets called and moves every file that matches $HOME/Pictures/"Screenshot from"* to the subdirectory $HOME/Pictures/Screenshots. Systemctl -user enable -now screenshot-mover.pathĭo not run these commands as root, but as your user. Then, for every user who wants this mechanism, issue: systemctl -user daemon-reload Here is what I did:Ĭreate a file /etc/systemd/user/screenshot-mover.path: ĪssertPathIsDirectory=%h/Pictures/ScreenshotsĬreate a file /etc/systemd/user/rvice: ĬonditionPathExistsGlob=%h/Pictures/Screenshot\ from*ĮxecStart=/bin/sh -c '/bin/mv -v -t Screenshots "Screenshot from"*' Whenever something in that directory changes, all files named $HOME/Pictures/"Screenshot from"* are moved to the subdirectory $HOME/Pictures/Screenshots. You can get the exhaustive list of available options/flags via man gnome-screenshot.īecause the default screenshot application always stores the screenshots below $HOME/Pictures and there is no apparent way to reconfigure that directory I wrote a combination of systemd user units to monitor the directory $HOME/Pictures. You can combine flags together: e.g., gnome-screenshot -wB will take a screenshot of currently active window without its border. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |