Last active
June 30, 2018 05:25
-
-
Save lonsagisawa/9116223 to your computer and use it in GitHub Desktop.
ImageMagickでスクリーンショットを撮り、libnofityで通知させる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# アクティブなウィンドウのスクリーンショットを撮り、通知する | |
# 12 Mar 2014: dateコマンドの辺りで間抜けな間違いをしていたので修正 | |
activeWinLine=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)") | |
activeWinId=${activeWinLine:40} | |
exec import -window "$activeWinId" -frame $HOME/Pictures/screenshot/$(date +%y%m%d_%H%M%S).png & | |
exec notify-send 'Screenshot Taken' $HOME/Pictures/screenshot/$(date +%y%m%d_%H%M%S).png & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 画面全体のスクリーンショットを撮り、通知する | |
# 12 Mar 2014: dateコマンドの辺りで間抜けな間違いをしていたので修正 | |
exec import -window root $HOME/Pictures/screenshot/$(date +%y%m%d_%H%M%S).png & | |
exec notify-send 'Screenshot Taken' $HOME/Pictures/screenshot/$(date +%y%m%d_%H%M%S).png & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment