about summary refs log tree commit diff stats
path: root/page
diff options
context:
space:
mode:
authorCase Duckworth2020-05-22 15:55:03 -0500
committerCase Duckworth2020-05-22 15:55:03 -0500
commit5ff9d1c592511270abe871915aa0716cec1e6eac (patch)
tree409d23f3690a414b64995e85d6891684e0824104 /page
parentIt works! (diff)
downloadbollux-5ff9d1c592511270abe871915aa0716cec1e6eac.tar.gz
bollux-5ff9d1c592511270abe871915aa0716cec1e6eac.zip
Remove unneeded stuff
Diffstat (limited to 'page')
-rwxr-xr-xpage48
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
6cleanup() {
7 tput reset
8 exit
9}
10
11refresh() {
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
20resize() {
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
32main() {
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
46if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
47 main "$@"
48fi