obv: do stuff in /tmp instead

This commit is contained in:
xfnw 2023-12-09 15:37:00 -05:00
parent 01b3b5b8e8
commit 42c22451aa
2 changed files with 9 additions and 6 deletions

View File

@ -105,8 +105,8 @@ bindsym $mod+space focus mode_toggle
# take a screenshot # take a screenshot
bindsym --release $mod+s exec "scrot -l mode=edge -s -e 'curl -F\\"file=@$f\\" https://0x0.st/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'" bindsym --release $mod+s exec "scrot -l mode=edge -s -e 'curl -F\\"file=@$f\\" https://0x0.st/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
bindsym $mod+z exec "scrot -l mode=edge -oF ~/screen.png" bindsym $mod+z exec "scrot -l mode=edge -oF /tmp/screen.png"
bindsym $mod+shift+z exec "scrot -l mode=edge -F ~/screen.png -e 'cp $f ~/screen.png'" bindsym $mod+shift+z exec "scrot -l mode=edge -F /tmp/screen.png -e 'cp $f /tmp/screen.png'"
bindsym $mod+shift+s exec "scrot -l mode=edge -e 'curl -F\\"file=@$f\\" https://0x0.st/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'" bindsym $mod+shift+s exec "scrot -l mode=edge -e 'curl -F\\"file=@$f\\" https://0x0.st/ | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"
#bindsym --release $mod+x exec "scrot -l mode=edge -s -e 'curl -F\\"file=@$f\\" https://xfnw.ttm.sh/u.php | xclip -selection clipboard; mv $f ~/Pictures/scrot/'" #bindsym --release $mod+x exec "scrot -l mode=edge -s -e 'curl -F\\"file=@$f\\" https://xfnw.ttm.sh/u.php | xclip -selection clipboard; mv $f ~/Pictures/scrot/'"

11
bin/obv
View File

@ -1,17 +1,20 @@
#!/bin/sh #!/bin/sh
idiff() { idiff() {
ffmpeg -i ~/screen.png -pattern_type glob -i 'i*.png' -filter_complex '[1]boxblur=1[m];[0][m]blend=all_mode=grainextract' o%03d.png ffmpeg -i /tmp/screen.png -pattern_type glob -i 'i*.png' -filter_complex '[1]boxblur=1[m];[0][m]blend=all_mode=grainextract' o%03d.png
} }
tile() { tile() {
montage -background black -geometry 683x o*.png m.png montage -background black -geometry 683x o*.png m.png
} }
mkdir -p ~/.cache/obv mkdir -p /tmp/obv
cd ~/.cache/obv cd /tmp/obv
while inotifywait -e close_write ~/screen.png idiff
tile
while inotifywait -e close_write /tmp/screen.png
do do
sleep 0.1 sleep 0.1
idiff idiff