-
Notifications
You must be signed in to change notification settings - Fork 34
/
platform_others.go
58 lines (44 loc) · 1.42 KB
/
platform_others.go
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
// +build !windows,!linux
package main
import (
"os"
"syscall"
"github.com/nsf/termbox-go"
)
func handleSpecialKeys(key termbox.Key) {
if key == termbox.KeyCtrlZ {
process, _ := os.FindProcess(os.Getpid())
termbox.Close()
process.Signal(syscall.SIGSTOP)
termbox.Init()
}
}
const outputMode = termbox.Output256
func defaultStyle() Style {
var style Style
style.default_bg = termbox.Attribute(1)
style.default_fg = termbox.Attribute(256)
style.rune_fg = termbox.Attribute(248)
style.int_fg = termbox.Attribute(154)
style.bit_fg = termbox.Attribute(154)
style.space_rune_fg = termbox.Attribute(240)
style.selected_option_bg = termbox.Attribute(240)
style.search_progress_fg = termbox.Attribute(76)
style.text_cursor_hex_bg = termbox.Attribute(167)
style.bit_cursor_hex_bg = termbox.Attribute(26)
style.int_cursor_hex_bg = termbox.Attribute(63)
style.fp_cursor_hex_bg = termbox.Attribute(127)
style.hilite_hex_fg = termbox.Attribute(231)
style.hilite_rune_fg = termbox.Attribute(256)
style.about_logo_bg = termbox.Attribute(125)
style.field_editor_bg = style.default_fg
style.field_editor_fg = style.default_bg
style.field_editor_last_bg = style.rune_fg
style.field_editor_last_fg = style.default_fg
style.field_editor_invalid_bg = termbox.Attribute(125)
style.field_editor_invalid_fg = style.rune_fg
style.space_rune = '•'
style.filled_bit_rune = '●'
style.empty_bit_rune = '○'
return style
}