summaryrefslogtreecommitdiff
path: root/.local/bin/wtos
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-28 00:42:22 +0300
committerThomas Voss <mail@thomasvoss.com> 2023-08-28 00:42:22 +0300
commit65bab05b45b0dd3b5f5629861ec44c24201f28e2 (patch)
treef7fd3e1da9487d8b98f2a0c298bb0452956580e9 /.local/bin/wtos
parent91b3cc9119cb2ba7b7966a3fb86dd0766303de04 (diff)
wots: Add script to wrap to screen
Diffstat (limited to '.local/bin/wtos')
-rwxr-xr-x.local/bin/wtos7
1 files changed, 7 insertions, 0 deletions
diff --git a/.local/bin/wtos b/.local/bin/wtos
new file mode 100755
index 0000000..e3a6da2
--- /dev/null
+++ b/.local/bin/wtos
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+: ${COLUMNS:=`tput cols`}
+width=`dc -e "$COLUMNS 80 $COLUMNS 80 [r] sx >x p"`
+fold -sw $width