diff --git a/i3/config b/i3/config index a328ef8512d514d625f367325cfc052fda01dc5c..2d4c4d90c7dd8b722f5397225b1e7e5c4f76b471 100644 --- a/i3/config +++ b/i3/config @@ -346,7 +346,7 @@ bindcode 123 exec "echo $(( $(cat .config/micloop/volume) + 10000 )) > .config/ #bindsym Control+Print exec gnome-screenshot -i #bindsym $mod+Print exec printscreengimp -bindsym Print exec "maim -suo | xclip -selection clipboard -t image/png" +bindsym Print exec "maim -suo | tee ~/screenshot.png | xclip -selection clipboard -t image/png" bindsym Shift+Print exec "maim -suo > ~/screenshot.png ; convert ~/screenshot.png $(zenity --file-selection --save --file-filter='Picture | *.png *.jpg *.gif *.bmp' --confirm-overwrite)" bindsym Ctrl+Shift+Print exec "maim -uo | convert png:- `zenity --file-selection --save --file-filter='Picture | *.png *.jpg *.gif *.bmp' --confirm-overwrite`" bindsym Ctrl+Print exec " maim -uo | xclip -selection clipboard -t image/png" @@ -356,6 +356,7 @@ exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agen for_window [class=".*"] border pixel 1 for_window [class="zoom"] move container to workspace ZOOM +for_window [title="MAIL"] move container to workspace MAIL for_window [title="Jitsi Meet"] floating enable @@ -380,6 +381,7 @@ bindsym $mod+Shift+o exec --no-startup-id killall -3 mate-session; exec --no-sta exec "setxkbmap us,cz -variant ,ucw -option grp:caps_switch" exec --no-startup-id "sleep 2; osdd-run & sleep 1;osdc --color=red START" +exec --no-startup-id "sleep 5; terminal -e m-daemon" bindcode 94 exec "osdc --duration=1 --log=1 \\"\\"" bindcode $mod+51 exec "osdc --duration=1 --log=1 \\"\\"" diff --git a/mail/init.sh b/mail/init.sh index c6d5f6168a4a7a45a541fe30816ab95bb39a3019..bd54158d22a56478e78e179cc9bbf78f82e19e45 100755 --- a/mail/init.sh +++ b/mail/init.sh @@ -12,6 +12,7 @@ sudo systemctl enable offlineimap-jiri mkdir -p ~/.config/neomutt ln -sr neomuttrc ~/.config/neomutt/ ln -sr m ~/bin +ln -sr m-daemon ~/bin ln -sr ~/Maildir-no-dot/INBOX ~/Maildir @@ -21,7 +22,7 @@ ln -sr ~/Maildir-no-dot/INBOX ~/Maildir do if [[ "$i" != "INBOX" ]] then - ln -sr $i INBOX/.$i + ln -sr $i INBOX/ fi done diff --git a/mail/m-daemon.sh b/mail/m-daemon.sh new file mode 100755 index 0000000000000000000000000000000000000000..e109481fce02fb85b5b9e1ae8799bbcc50a18f2b --- /dev/null +++ b/mail/m-daemon.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +kilrek() +{ + pgrep -P $1 | while read p; + do + echo $1 $2 to $p; + if [[ "$p" != "$2" ]] + then + kilrek $p $2 + echo $p; + kill $p; + fi + done + +} +whileok() +{ + while true + do + sleep 60 + read -ra x < ~/.cm + delay=$(( $(date +%s) - ${x[0]} )) + if (( $delay > 120 )) + then + ( + echo KILL + pidwok=$BASHPID + echo pidwok $pidwok + kilrek $1 $pidwok + return; + ) + fi + done +} + +pid=$BASHPID +while $run +do + whileok $pid & + echo -ne "\033]0;MAIL\007" + osdc --log=2 --color=red "TRY START MAIL" + m + sleep 2 +done +