four_two_seven 0.0.1 → 1.04.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/bin/427 +15 -2
- data/example.png +0 -0
- data/lib/427/command.rb +1 -1
- data/lib/427/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f665d174ac8968e8543b94ea10b1b5c33aadbb05
|
4
|
+
data.tar.gz: 774ef901e30d2c23b76e1a855720baa806369f0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ea1891da372a0c0c45cf0f5e0c912fe0ddae58c628ce7a1f808c632aec30b7c7c67b510c86e8e30d916d7465b3e104806829485349514bd657e48a59685d060
|
7
|
+
data.tar.gz: cd95ac5301aab20ff22c44f8b7f0226f5de699c4689b09d0db5d843793045b666d10dc4864d5190ec99b7a427cf285d1c081ec308f4d557f7c2f1504400ca388
|
data/README.md
CHANGED
@@ -8,6 +8,9 @@
|
|
8
8
|
|
9
9
|
Now you get to be the new Employee 427 ;)
|
10
10
|
|
11
|
+
|
12
|
+
![](example.png)
|
13
|
+
|
11
14
|
## Installation
|
12
15
|
|
13
16
|
```bash
|
@@ -27,3 +30,4 @@ And follow the commands. Quickly, of course. Slacking off won't be tolerated.
|
|
27
30
|
## Todo
|
28
31
|
|
29
32
|
- Get the long keypresses to work. Keypresses stack up and get used for future commands, breaking the entire thing.
|
33
|
+
|
data/bin/427
CHANGED
@@ -12,7 +12,13 @@ include Curses
|
|
12
12
|
include FourTwoSeven
|
13
13
|
include Timeout
|
14
14
|
|
15
|
+
|
16
|
+
height, width = *IO.console.winsize
|
17
|
+
|
15
18
|
DEFAULT_COLORS = 1
|
19
|
+
TITLE_BAR_LEFT = "> Employee #427 Terminal Prompt"
|
20
|
+
TITLE_BAR_RIGHT = "v. #{VERSION}".rjust(width - TITLE_BAR_LEFT.length)
|
21
|
+
|
16
22
|
|
17
23
|
begin
|
18
24
|
noecho
|
@@ -22,13 +28,20 @@ begin
|
|
22
28
|
nonl
|
23
29
|
|
24
30
|
init_pair(DEFAULT_COLORS, COLOR_GREEN, COLOR_BLACK)
|
25
|
-
window = Window.new(
|
31
|
+
window = Window.new(height - 1, width, 1, 0)
|
26
32
|
|
27
33
|
window.scrollok(true)
|
28
34
|
window.idlok(true)
|
29
35
|
window.color_set(DEFAULT_COLORS)
|
30
36
|
|
31
|
-
|
37
|
+
title_bar = Window.new(1, width, 0, 0)
|
38
|
+
title_bar.color_set(DEFAULT_COLORS)
|
39
|
+
title_bar.box(0, ?_)
|
40
|
+
title_bar << (TITLE_BAR_LEFT + TITLE_BAR_RIGHT)
|
41
|
+
title_bar.refresh
|
42
|
+
|
43
|
+
window.setpos(height - 1, 0)
|
44
|
+
window.scroll
|
32
45
|
window << Command::SEPARATOR
|
33
46
|
|
34
47
|
prev_cmd = nil
|
data/example.png
ADDED
Binary file
|
data/lib/427/command.rb
CHANGED
data/lib/427/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: four_two_seven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.04.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Machin
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
69
|
- bin/427
|
70
|
+
- example.png
|
70
71
|
- lib/427.rb
|
71
72
|
- lib/427/command.rb
|
72
73
|
- lib/427/version.rb
|