diff options
author | Case Duckworth | 2020-05-22 15:55:03 -0500 |
---|---|---|
committer | Case Duckworth | 2020-05-22 15:55:03 -0500 |
commit | 5ff9d1c592511270abe871915aa0716cec1e6eac (patch) | |
tree | 409d23f3690a414b64995e85d6891684e0824104 /page | |
parent | It works! (diff) | |
download | bollux-5ff9d1c592511270abe871915aa0716cec1e6eac.tar.gz bollux-5ff9d1c592511270abe871915aa0716cec1e6eac.zip |
Remove unneeded stuff
Diffstat (limited to 'page')
-rwxr-xr-x | page | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/page b/page deleted file mode 100755 index c478d7a..0000000 --- a/page +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | # pager | ||
3 | |||
4 | . ./wrap | ||
5 | |||
6 | cleanup() { | ||
7 | tput reset | ||
8 | exit | ||
9 | } | ||
10 | |||
11 | refresh() { | ||
12 | shopt -s checkwinsize | ||
13 | ( | ||
14 | : | ||
15 | : | ||
16 | ) | ||
17 | printf '\e[?1049h\e?7l\e[2J\e[3;%sr\e[999H' "$((LINES - 1))" | ||
18 | } | ||
19 | |||
20 | resize() { | ||
21 | refresh | ||
22 | |||
23 | printf '\e7\e[?25l\e[H' | ||
24 | _wrap "$file" | ||
25 | printf '\e[999H\e[?25h' | ||
26 | } | ||
27 | |||
28 | _wrap() { | ||
29 | wrap "$COLUMNS" <"$1" | ||
30 | } | ||
31 | |||
32 | main() { | ||
33 | refresh | ||
34 | |||
35 | file="$1" | ||
36 | resize | ||
37 | |||
38 | trap resize WINCH | ||
39 | trap cleanup INT | ||
40 | |||
41 | while :; do | ||
42 | : | ||
43 | done | ||
44 | } | ||
45 | |||
46 | if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then | ||
47 | main "$@" | ||
48 | fi | ||