-
Notifications
You must be signed in to change notification settings - Fork 0
/
wintest.sh
72 lines (57 loc) · 1.43 KB
/
wintest.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
source $(dirname $0)/simple_curses.sh
main(){
window "Test 1" "red" "33%"
append "First simple window"
addsep
append_command "cal"
endwin
window "Tree files" "gree" "33%"
if [[ -x `which tree` ]]; then
append_command "tree -L 2 -C -A ./"
else
append "Please install tree command"
fi
endwin
col_right
move_up
window "Test 2" "red" "33%"
append "Multiline is allowed !!!\nLike this :)"
append "This is a new col here."
endwin
window "Test 3" "red" "33%"
append "We can had some text, log..."
endwin
window "Test 4" "grey" "33%"
append "Example using command"
append "`date`"
append "I only ask for date"
endwin
window "Let's play with libcaca" "green" "33%"
command="img2txt tux.gif -y 12 -W 45 -d ordered2 -f utf8"
append "$command"
if [[ -x `which img2txt` ]]; then
append_command "$command"
else
append "You should install caca-utils"
fi
endwin
col_right
move_up
window "Test 5" "red" "34%"
append "We can add some little windows... rememeber that very long lines are wrapped to fit window !" "left"
endwin
window "Tabbed values" "red" "34%"
append_tabbed "colomn1:column2:column3" 3
append_tabbed "val 1:val 2:val 3" 3
append_tabbed "val 4:val 5:val 6" 3
endwin
window "Little" "green" "12%"
append "this is a simple\nlittle window"
endwin
col_right
window "Other window" "blue" "22%"
append "And this is\nanother little window"
endwin
}
main_loop