File: progress.clj

package info (click to toggle)
fonts-firacode 6.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,796 kB
  • sloc: sh: 287; python: 146; makefile: 19
file content (35 lines) | stat: -rwxr-xr-x 771 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! bb

(def chars ["\uee06" "\uee07" "\uee08" "\uee09" "\uee0a" "\uee0b"])

(loop [i 0]
  (print
    (str
      ; \u001b \u000d " " ;; ESC CR Moves the cursor to column zero
      \u001b "[2J"
      \u001b "[H"

      ;; normal
      "\n  Other fonts ["
      (str/join
        (for [j (range 2 17)]
          (if (<= j i) "#" ".")))
      "] "
      (nth "|/-\\" (mod i 4))
      " "

      ;; Fira Code
      "\n\n  Fira Code   "
      (if (= 0 i) \uee00 \uee03) ;; Progress start
      (str/join
        (for [j (range 2 17)]
          (if (<= j i) \uee04 \uee01)))
      (if (= 17 i) \uee05 \uee02)
      " "
      (nth chars (mod i 6))
      " "
      #_#_(-> i (/ 17.0) (* 100) (int)) "%"
      "       "))
  (flush)
  (Thread/sleep 200)
  (recur (mod (inc i) 18)))