Replace backup script
06213d699338c77b8c25cec17c113712abd1c791
1 parent
3c2161a4
.xmobarrc
+2 -2
| 15 | 15 | [ Run StdinReader |
|
| 16 | 16 | , Run MultiCpu [ "--template", "<total0> <total1> <total2> <total3>", "-w", "3" ] 50 |
|
| 17 | 17 | , Run Memory [ "--template", "<available>" ] 50 |
|
| 18 | 18 | , Run Date "%b %d %H:%M" "date" 10 |
|
| 19 | 19 | , Run DiskU [("/", "<free>"), ("/home", "<free>")] [] 20 |
|
| 20 | - | , Run CommandReader "xmobar-unison-status" "unison" |
|
| 20 | + | , Run CommandReader "xmobar-sync-status" "sync" |
|
| 21 | 21 | , Run Com "todo-widget" [] "todo" 10 |
|
| 22 | 22 | , Run Com "xmobar-brightness" [] "brightness" 10 |
|
| 23 | 23 | , Run Wireless "wlp2s0" [ "--template", "<essid>/<fc=#666><quality></fc>"] 10 |
|
| 24 | 24 | , Run Battery [ "--template", "<fc=#555>⌁</fc> <left>" ] 100 |
|
| 25 | 25 | ] |
|
| 26 | 26 | , sepChar = "%" |
|
| 27 | 27 | , alignSep = "}{" |
|
| 28 | - | , template = " %StdinReader% }{ %unison% %todo% <fc=#555>☀</fc> %brightness% %battery% %wlp2s0wi% %disku% %memory% %multicpu% <fc=#aaaaaa>%date%</fc> " |
|
| 28 | + | , template = " %StdinReader% }{ %sync% %todo% <fc=#555>☀</fc> %brightness% %battery% %wlp2s0wi% %disku% %memory% %multicpu% <fc=#aaaaaa>%date%</fc> " |
|
| 29 | 29 | } |
bin/share-sync
added
+10 -0
| 1 | + | #!/bin/sh |
|
| 2 | + | ||
| 3 | + | dir=$HOME/share/ |
|
| 4 | + | user=$(whoami) |
|
| 5 | + | ||
| 6 | + | while inotifywait -qqr \ |
|
| 7 | + | -e modify -e moved_to -e moved_from -e create -e delete "$dir"; |
|
| 8 | + | do |
|
| 9 | + | rsync --del -avz ~/share/ $user@box:share |
|
| 10 | + | done |
bin/xmobar-unison-status
deleted
+0 -18
| 1 | - | #!/bin/sh |
|
| 2 | - | ||
| 3 | - | while :; do |
|
| 4 | - | status="$(systemctl --user is-active dropbox)" |
|
| 5 | - | ||
| 6 | - | case "$status" in |
|
| 7 | - | "active") |
|
| 8 | - | if $(unison dropbox -testserver 2>/dev/null); then |
|
| 9 | - | echo "<fc=aquamarine>✔</fc>" |
|
| 10 | - | else |
|
| 11 | - | echo "<fc=maroon>↯</fc>" |
|
| 12 | - | fi ;; |
|
| 13 | - | *) |
|
| 14 | - | echo "<fc=maroon>✘</fc>" ;; |
|
| 15 | - | esac |
|
| 16 | - | ||
| 17 | - | sleep 5 |
|
| 18 | - | done |