~mil/f_scripts

ref: 275669b0a30b23454809dd98fbc3d528c9e266ae f_scripts/scripts/f_maps -rwxr-xr-x 706 bytes
275669b0Miles Alan f_maps: Add missing deps for mepo 0.3 compat 7 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
#!/usr/bin/env osh
shopt -s strict:all
DEP="mepo tslib kbd vis-menu"
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 DFBARGS="system=fbdev,no-cursor,disable-module=linux_input,no-vt-switch"
  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