Sxmo - Simple X Mobile Released for the Pinephone (new minimalistic UI & image)
#19
(05-23-2020, 05:42 PM)visiblink Wrote: I've been playing around with sxmo and I really like it.

I want to add a couple of gestures: one finger swipe down to close an application and a one finger swipe up to open the menu (system or app, depending on the context).

I have a couple of questions:

1. Do I understand correctly that if I want to add the gestures, I have to copy config.def.h to config.h, make my changes, and build lisgd? There's no stand-alone config file?

2. Is it correct that I should build on the phone rather than my amd64 laptop to get an ARM build?

Sorry about the rudimentary issues. I haven't built anything from source for over a decade. It hasn't been necessary!

Thanks for trying it out - regarding changing swipe gestures, no official support but wouldn't be hard to hack in. Should be doable without compiling anything extra (unless you want to ofc : ) The program used for bindings gestures is called lisgd:
https://git.sr.ht/~mil/lisgd

You can see the default bindings for lisgd here:
https://git.sr.ht/~mil/lisgd/tree/master/config.def.h

Essentially what you'd want to do is create a script to bind your gestures.. If you use the `-g` option with lisgd atleast once, it will override any default (config.def.h) bindings referenced above. So you could create a script like (untested - but added the 2 commands for single up/down swipe you'd need) this - essentially just translating the config.h gestures to command line options and adding your extra gestures:


Code:
#!/usr/bin/env sh
pkill lisgd # E.g. because that's with the default bindings autostarted
lisgd \
 -t 400 \
 -g '1,u,d,sh -c "xdotool key --clearmodifiers Alt+Shift+c"' \
 -g '1,d,u,sh -c "sxmo_appmenu.sh"' \
 -g '1,l,r,sh -c "xdotool key --clearmodifiers Alt+Shift+e"' \
 -g '1,r,l,sh -c "xdotool key --clearmodifiers Alt+Shift+r"' \
 -g '2,l,r,sh -c "xdotool key --clearmodifiers Alt+e"' \
 -g '2,r,l,sh -c "xdotool key --clearmodifiers Alt+r"' \
 -g '2,d,u,sh -c "pidof svkbd-sxmo || svkbd-sxmo &"' \
 -g '2,u,d,sh -c "pkill -9 svkbd-sxmo"' \
 -g '3,d,u,sh -c "sxmo_vol.sh up"' \
 -g '3,u,d,sh -c "sxmo_vol.sh down"' \
 -g '4,d,u,sh -c "sxmo_brightness.sh up"' \
 -g '4,u,d,sh -c "sxmo_brightness.sh down"'

And then run that script after you start up Sxmo / login. Not positive on the best way for a user-level change like that to persist - maybe in the future there will be a way to run a user xinit script on boot.


Messages In This Thread
RE: Sxmo - Simple X Mobile Released for the Pinephone (new minimalistic UI & image) - by mil - 05-23-2020, 08:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PostmarketOS sxmo pinephone keyboard keymaps? afwtioane 2 2,076 09-11-2022, 04:37 AM
Last Post: manubert
  sxmo pim nextcloud Uturn 8 6,129 02-22-2022, 03:23 PM
Last Post: TRS-80
  Battery life on sxmo xark 1 2,110 02-12-2022, 10:07 AM
Last Post: TRS-80
  Official Channels for Sxmo Support anjanmomi 2 3,099 02-12-2022, 09:50 AM
Last Post: TRS-80
  sxmo & php --- 2 1,799 01-31-2022, 01:45 PM
Last Post: ---
  sxmo improvements unrealb2 7 5,738 11-17-2021, 06:43 AM
Last Post: fdlamotte
  SXMO on Debian IVp 0 2,193 08-21-2021, 02:33 PM
Last Post: IVp
  Megi's multiboot sxmo image aithal 1 2,201 06-14-2021, 08:07 AM
Last Post: fdlamotte
  SXMO svkbd with joypad layout [for basic dosbox play] streak 0 1,500 05-27-2021, 08:47 AM
Last Post: streak
  Sxmo on Arch IVp 4 6,454 05-19-2021, 03:18 AM
Last Post: dukla2000

Forum Jump:


Users browsing this thread: 2 Guest(s)