~mil/f_scripts

ref: dev-f_xorg f_scripts/scripts/f_maps -rwxr-xr-x 981 bytes
2344f048Miles Alan f_xorg: Use fbvncm fork, switch to i3, don't run fbvnc in loop 11 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
28
29
30
31
32
33
34
35
36
#!/usr/bin/env osh
shopt -s strict:all
DEP="mepo"
DEC="Browse OSM maps using mepo (via SDL directfb)."
DOC="
  Launches mepo to browse OSM maps in SDL / directfb mode.  Has limited
  compatibility currently since there's nothing like dmenu on the
  framebuffer which mepo relies on for compatibility.  Mepo should be
  compatible with framebuffer more fully eventually via save/restore
  state scripts and then running menus in CLI via slmenu or similar.
"

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

  # E.g. unbind keybinding's that rely on dmenu etc.
  echo "
    bind_key _ b [];
    bind_key _ s [];
    bind_key _ q [];
    bind_key _ a [];
    bind_key _ u [];
    bind_key _ z [];
  " | mepo -i

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

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

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