diff options
| author | Yigit Sever | 2019-12-08 14:46:45 +0300 |
|---|---|---|
| committer | Yigit Sever | 2019-12-08 18:32:36 +0300 |
| commit | 2c523ef1eb51ab9e0e9b1ba6bc30c117396bb331 (patch) | |
| tree | a4c38a02e58360fafc408ef4938c6ca1416c49e7 | |
| parent | 56d0cda40714fb8d38103367b185c881a6e9d555 (diff) | |
| download | dotfiles-2c523ef1eb51ab9e0e9b1ba6bc30c117396bb331.tar.gz dotfiles-2c523ef1eb51ab9e0e9b1ba6bc30c117396bb331.tar.bz2 dotfiles-2c523ef1eb51ab9e0e9b1ba6bc30c117396bb331.zip | |
Work auto spliff
| -rwxr-xr-x | .config/dunst/dunstrc | 4 | ||||
| -rw-r--r-- | .config/i3/config##c.desktop,h.Lowe | 3 | ||||
| -rwxr-xr-x | bin/watch_incoming.sh | 16 |
3 files changed, 23 insertions, 0 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index e1d2052..523d3ba 100755 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc | |||
| @@ -57,3 +57,7 @@ timeout = 0 | |||
| 57 | [Spotify] | 57 | [Spotify] |
| 58 | appname = Spotify | 58 | appname = Spotify |
| 59 | format = "<b>Now Playing</b>\n%s\n%b" | 59 | format = "<b>Now Playing</b>\n%s\n%b" |
| 60 | |||
| 61 | [spliff] | ||
| 62 | appname = "spliff" | ||
| 63 | format = "<b>ready for printing</b>\n%s\n%b" | ||
diff --git a/.config/i3/config##c.desktop,h.Lowe b/.config/i3/config##c.desktop,h.Lowe index 30692e1..86688be 100644 --- a/.config/i3/config##c.desktop,h.Lowe +++ b/.config/i3/config##c.desktop,h.Lowe | |||
| @@ -8,6 +8,9 @@ set $alt Mod1 | |||
| 8 | # launch polybar | 8 | # launch polybar |
| 9 | exec --no-startup-id $HOME/.config/polybar/launch.sh & | 9 | exec --no-startup-id $HOME/.config/polybar/launch.sh & |
| 10 | 10 | ||
| 11 | # launch spliffer + notification | ||
| 12 | exec --no-startup-id $HOME/bin/watch_incoming.sh & | ||
| 13 | |||
| 11 | # start the screensaver, '' at the end is not a typo | 14 | # start the screensaver, '' at the end is not a typo |
| 12 | exec --no-startup-id xidlehook --not-when-fullscreen --not-when-audio --timer normal 300 'betterlockscreen -l dimblur -t "Welcome Back"' '' | 15 | exec --no-startup-id xidlehook --not-when-fullscreen --not-when-audio --timer normal 300 'betterlockscreen -l dimblur -t "Welcome Back"' '' |
| 13 | 16 | ||
diff --git a/bin/watch_incoming.sh b/bin/watch_incoming.sh new file mode 100755 index 0000000..b031461 --- /dev/null +++ b/bin/watch_incoming.sh | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | |||
| 3 | TARGET=$HOME/Downloads/toPrint/toPrint_staging | ||
| 4 | PROCESSED=$HOME/Downloads/toPrint/toPrint_ready | ||
| 5 | SPLIFF=$HOME/bin/spliff | ||
| 6 | |||
| 7 | inotifywait -m -e create -e moved_to --format "%f" "${TARGET}" \ | ||
| 8 | | while read FILENAME | ||
| 9 | do | ||
| 10 | THUMB=$(mktemp /tmp/pdf_thumbnail_XXXXXXXXX.png) | ||
| 11 | evince-thumbnailer -s 1024 -l "${TARGET}/${FILENAME}" "${THUMB}" | ||
| 12 | mv "${TARGET}/${FILENAME}" "${PROCESSED}/${FILENAME}" | ||
| 13 | $SPLIFF "${PROCESSED}/${FILENAME}" | ||
| 14 | rm -f "${PROCESSED}/${FILENAME}" | ||
| 15 | dunstify -a "spliff" -I "${THUMB}" "$FILENAME" | ||
| 16 | done | ||
