File: selection_simple.sh

package info (click to toggle)
terminology 1.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,708 kB
  • sloc: ansic: 39,451; sh: 6,352; python: 314; perl: 105; makefile: 8
file content (40 lines) | stat: -rwxr-xr-x 533 bytes parent folder | download | duplicates (3)
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
#!/bin/sh


# fill space with E
printf '\033#8'
# set color
printf '\033[46;31;3m'

# mouse down to start selection
printf '\033}td;20;10;1;0;0\0'

# mouse move
printf '\033}tm;48;10\0'

# mouse up
printf '\033}tu;48;10;1;0;0\0'

# force render
printf '\033}tr\0'

# selection is 'EEEEE'
printf '\033}tsEEEEE\0'

# insert E in color
printf '\033[;4HE'

# force render
printf '\033}tr\0'

# selection is 'EEEEE'
printf '\033}tsEEEEE\0'

# insert a
printf 'a'

# force render
printf '\033}tr\0'

# no more selection
printf '\033}tn\0'