~mil/f_scripts

ref: cd1986844d6b5eaeb0e991e07d7329b221c5aa5a f_scripts/scripts/f_maps -rwxr-xr-x 760 bytes
cd198684Miles Alan f_maps: Disable bg clearing in directfb to prevent clearing fbp space 5 months ago
                                                                                
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
#!/usr/bin/env osh
shopt -s strict:all
DEP="mepo tslib directfb mesa-gl kbd vis"
DEC="Browse OSM maps using mepo (via SDL directfb)."
DOC="
  Launches mepo to browse OSM maps in SDL / directfb mode.  Uses chvt
  and vis-menu to present menus as needed via mepo's helper menu script.
"

runmepo() {
  export SDL_VIDEODRIVER=directfb
  export DFBARGS="system=fbdev,no-cursor,disable-module=linux_input,no-vt-switch,bg-none"
  INPUTDEV="$(ts_uinput -d -v)"
  export TSLIB_TSDEVICE="$INPUTDEV"
  ts_calibrate

  [ -p /tmp/fbp.fifo ] && { echo -e "\b\f\e"; echo "g b /" | tr " " "\n"; } > /tmp/fbp.fifo
  mepo

  [ -p /tmp/fbp.fifo ] && echo -e "\v" > /tmp/fbp.fifo
}

main() {
  sudo USER=$USER "$(realpath $0)" runmepo
}

if [ -n "$1" ]; then "$@"; else main; fi