Sxmo - Simple X Mobile Released for the Pinephone (new minimalistic UI & image)
#21
So I have successfully re-built sxmo-dwm with new keybindings, but I haven't managed to rebuild lisgd with the new gestures yet.

If anyone wants to play around with the configs, here's what I did:
  • copy the config.def.h file to config.h in each directory and alter the config.h files as you desire
  • copy the directories to your sxmo micro-sd card (I put them in /home/mo/build)
  • boot the phone
  • on the phone, install the build tools and a bunch of libraries needed to build:
         sudo apk add build-base libx11-dev libxft-dev libxinerama-dev libinput-dev eudev-dev
  • enter each directory (lisgd and sxmo-dwm) and type "make install". Don't type "make clean install" because doing so will remove your altered config.h file.
As I mentioned, this has worked for sxmo-dwm, but not lisgd -- yet. But I'm a persistent bastard... (and I'll take any suggestions).
#22
"I'm a persistent bastard..." Who controlled their origin? Smile
#23
(05-24-2020, 11:12 AM)--- Wrote: "I'm a persistent bastard..." Who controlled their origin? Smile

lol ... it took me a minute to get that one.

Here's the output when I try to build lisgd. Whatever is going on, it's not working. Any ideas?

lisgd build options:
CDFLAGS    =
LDFLAGS    = -linput
CC              = cc
cc -c    lisgd.c
lisgd.c: In function 'die':
lisgd.c:40:2: warning: format not a format arguments [-Wformat-security]
   40 |   fprint(stderr, msg);
        |   ^~~~~~~
cc -g -o lisgd lisgd.o -linput
mkdir -p /bin
cp -f lisgd /bin
chmod 755 /bin/lisgd

-------------------------------------------------------------------------

Edit: it turns out that lisgd IS building. If I kill lisgd after building it, and then run /bin/lisgd, it runs with the new commands. However, if I reboot, the changes are lost.

So here's the oddity, changes to sxmo-dwm are getting written to the sdcard. They're permanent.

But changes to lisgd appear to be written to RAM only. They don't persist.

Any ideas as to how to write the changes to the card?
#24
(05-24-2020, 11:43 AM)visiblink Wrote:
(05-24-2020, 11:12 AM)--- Wrote: "I'm a persistent bastard..." Who controlled their origin? Smile

lol ... it took me a minute to get that one.

Here's the output when I try to build lisgd. Whatever is going on, it's not working. Any ideas?

lisgd build options:
CDFLAGS    =
LDFLAGS    = -linput
CC              = cc
cc -c    lisgd.c
lisgd.c: In function 'die':
lisgd.c:40:2: warning: format not a format arguments [-Wformat-security]
   40 |   fprint(stderr, msg);
        |   ^~~~~~~
cc -g -o lisgd lisgd.o -linput
mkdir -p /bin
cp -f lisgd /bin
chmod 755 /bin/lisgd

-------------------------------------------------------------------------

Edit: it turns out that lisgd IS building. If I kill lisgd after building it, and then run /bin/lisgd, it runs with the new commands. However, if I reboot, the changes are lost.

So here's the oddity, changes to sxmo-dwm are getting written to the sdcard. They're permanent.

But changes to lisgd appear to be written to RAM only. They don't persist.

Any ideas as to how to write the changes to the card?

Glad that you got sxmo-dwm building. Regarding lisgd - I think it's being installed to the wrong path - you need to do `make install PREFIX=/usr/`.
The original binary is installed to /usr/bin/lisgd so that would take precedence over /bin/lisgd.

Do note if you do a global package update `apk upgrade` and if anything changes in those packages then any changes you make would be overwritten.

Using the APKBUILDs rather than manual builds via:
https://git.sr.ht/~mil/sxmo-alpine/
https://wiki.alpinelinux.org/wiki/Creati...ne_package

is likely the better way to do things - but whatever works for you Smile

Let me know if there's anything you come up with that might be worth putting in the official builds. I wouldn't want to do single finger up/down swipe in lisgd because that would conflict with scrolling in surf / other browsers. But I am generally open to contributions / patches to make the things better out of the box.
#25
(05-24-2020, 03:32 PM)mil Wrote:
(05-24-2020, 11:43 AM)visiblink Wrote:
(05-24-2020, 11:12 AM)--- Wrote: "I'm a persistent bastard..." Who controlled their origin? Smile

lol ... it took me a minute to get that one.

Here's the output when I try to build lisgd. Whatever is going on, it's not working. Any ideas?

lisgd build options:
CDFLAGS    =
LDFLAGS    = -linput
CC              = cc
cc -c    lisgd.c
lisgd.c: In function 'die':
lisgd.c:40:2: warning: format not a format arguments [-Wformat-security]
   40 |   fprint(stderr, msg);
        |   ^~~~~~~
cc -g -o lisgd lisgd.o -linput
mkdir -p /bin
cp -f lisgd /bin
chmod 755 /bin/lisgd

-------------------------------------------------------------------------

Edit: it turns out that lisgd IS building. If I kill lisgd after building it, and then run /bin/lisgd, it runs with the new commands. However, if I reboot, the changes are lost.

So here's the oddity, changes to sxmo-dwm are getting written to the sdcard. They're permanent.

But changes to lisgd appear to be written to RAM only. They don't persist.

Any ideas as to how to write the changes to the card?

Glad that you got sxmo-dwm building. Regarding lisgd - I think it's being installed to the wrong path - you need to do `make install PREFIX=/usr/`.
The original binary is installed to /usr/bin/lisgd so that would take precedence over /bin/lisgd.

Do note if you do a global package update `apk upgrade` and if anything changes in those packages then any changes you make would be overwritten.

Using the APKBUILDs rather than manual builds via:
https://git.sr.ht/~mil/sxmo-alpine/
https://wiki.alpinelinux.org/wiki/Creati...ne_package

is likely the better way to do things - but whatever works for you Smile

Let me know if there's anything you come up with that might be worth putting in the official builds. I wouldn't want to do single finger up/down swipe in lisgd because that would conflict with scrolling in surf / other browsers. But I am generally open to contributions / patches to make the things better out of the box.

Thanks for the instructions and the explanations. Everything is building properly now!

Here's my setup in case you're interested in any of it.

I didn't realize at first that the gestures worked from any starting position on the screen, provided there's enough room to meet the 300 (pixel?) minimum. I use GMD Gesture Control on Android, and it has starting zones, where you have to begin the gesture within -- for example -- 50px of the bottom screen edge.

So I did away with the one-finger-up and one-finger-down gestures. Here's what seemed to make sense to me:

one finger swipe left -- change desktop (as original)
one finger swipe right -- menu
two finger swipe down -- close app
three finger swipe up -- keyboard
three finger swipe down -- close keyboard

I didn't need any of dwm's app-switching features, because I like apps to take up the full screen, so I'm essentially using the desktops like webOS cards, one app per desktop. I just flip through them with left-to-right gestures.

Since I have access to the menu at any time via the right-to-left gesture, I changed the key bindings (much reduced) to reflect my likely needs.

Here's that section:

  /* PP */
    {1,  0,  XF86XK_AudioRaiseVolume, spawn, SHCMD("sxmo_vol.sh up") },
    {1,  0,  XF86XK_AudioLowerVolume, spawn, SHCMD("sxmo_vol.sh down") },
    {1,  0,  XF86XK_PowerOff, spawn, SHCMD("sxmo_screenlock") },

I didn't touch anything else, so the power key triggers the screenlock. Hold the volume up key to turn off the screen. Click the power key a few times to unlock. I'll probably simplify that more later, if I can.

Finally, I increased the font size on the top bar in the appearance section of the sxmo-dwm config.h file:
"monospaceConfusedize=20", /* PP default start index */
(that's not supposed to be a smiley!)

I'd like to increase the menu font size too, but that's a task for another day!

So far, this all works great. The power consumption is reasonable. With Crust (or the big battery case) this is going to be perfect! Thanks for all the work you put into it!
#26
Quote:So I did away with the one-finger-up and one-finger-down gestures. Here's what seemed to make sense to me:

one finger swipe left -- change desktop (as original)
one finger swipe right -- menu
two finger swipe down -- close app
three finger swipe up -- keyboard
three finger swipe down -- close keyboard

I didn't need any of dwm's app-switching features, because I like apps to take up the full screen, so I'm essentially using the desktops like webOS cards, one app per desktop. I just flip through them with left-to-right gestures.

Since I have access to the menu at any time via the right-to-left gesture, I changed the key bindings (much reduced) to reflect my likely needs.

Here's that section:

  /* PP */
    {1,  0,  XF86XK_AudioRaiseVolume, spawn, SHCMD("sxmo_vol.sh up") },
    {1,  0,  XF86XK_AudioLowerVolume, spawn, SHCMD("sxmo_vol.sh down") },
    {1,  0,  XF86XK_PowerOff, spawn, SHCMD("sxmo_screenlock") },

I didn't touch anything else, so the power key triggers the screenlock. Hold the volume up key to turn off the screen. Click the power key a few times to unlock. I'll probably simplify that more later, if I can.

With this setup, can you still use the volume keys to scroll in dmenu? 

Also, is there some way to scroll in st? My first preference would be to use a gesture, but I'd be ok with volume up/down for that.

edit: here's a screenshot of Alpine running on PostmarketOS (Alpine Linux) running on Pinephone! Having some fun with this. 
[Image: alpine.png]
#27
(05-25-2020, 02:22 AM)saba Wrote:
Quote:So I did away with the one-finger-up and one-finger-down gestures. Here's what seemed to make sense to me:

one finger swipe left -- change desktop (as original)
one finger swipe right -- menu
two finger swipe down -- close app
three finger swipe up -- keyboard
three finger swipe down -- close keyboard

I didn't need any of dwm's app-switching features, because I like apps to take up the full screen, so I'm essentially using the desktops like webOS cards, one app per desktop. I just flip through them with left-to-right gestures.

Since I have access to the menu at any time via the right-to-left gesture, I changed the key bindings (much reduced) to reflect my likely needs.

Here's that section:

  /* PP */
    {1,  0,  XF86XK_AudioRaiseVolume, spawn, SHCMD("sxmo_vol.sh up") },
    {1,  0,  XF86XK_AudioLowerVolume, spawn, SHCMD("sxmo_vol.sh down") },
    {1,  0,  XF86XK_PowerOff, spawn, SHCMD("sxmo_screenlock") },

I didn't touch anything else, so the power key triggers the screenlock. Hold the volume up key to turn off the screen. Click the power key a few times to unlock. I'll probably simplify that more later, if I can.

With this setup, can you still use the volume keys to scroll in dmenu? 

Also, is there some way to scroll in st? My first preference would be to use a gesture, but I'd be ok with volume up/down for that.

I took the scroll-by-key commands out, but you could do anything you wanted to -- it's completely customizable, which is the great thing. If you examine the config.def.h files for both sxmo-dwm and lisgd, you can figure out how they work quite easily, and then start making changes in your config.h files. You can even transfer functions from one to the other (from keys to gestures or vice-versa). I made a list of how I wanted the interface to work first, and then made the alterations.

I don't have any trouble selecting the menu items by touch, but I am going to figure out to make them even larger, so that the interface is even more touch friendly.
#28
(05-25-2020, 07:53 AM)visiblink Wrote: I don't have any trouble selecting the menu items by touch, but I am going to figure out to make them even larger, so that the interface is even more touch friendly.

I was playing around with the config.h for both dwm and dmenu trying to adjust that font size. The only thing I could do to make it work was to edit /usr/bin/sxmo-appmenu.sh on line 186:

Code:
dmenu -idx $DMENUIDX -l 14 -c -fn "Mono-32" -p "$WINNAME"

It works, but not sure I like doing it like this
#29
(05-25-2020, 02:22 AM)saba Wrote:
Quote:So I did away with the one-finger-up and one-finger-down gestures. Here's what seemed to make sense to me:

one finger swipe left -- change desktop (as original)
one finger swipe right -- menu
two finger swipe down -- close app
three finger swipe up -- keyboard
three finger swipe down -- close keyboard

I didn't need any of dwm's app-switching features, because I like apps to take up the full screen, so I'm essentially using the desktops like webOS cards, one app per desktop. I just flip through them with left-to-right gestures.

Since I have access to the menu at any time via the right-to-left gesture, I changed the key bindings (much reduced) to reflect my likely needs.

Here's that section:

  /* PP */
    {1,  0,  XF86XK_AudioRaiseVolume, spawn, SHCMD("sxmo_vol.sh up") },
    {1,  0,  XF86XK_AudioLowerVolume, spawn, SHCMD("sxmo_vol.sh down") },
    {1,  0,  XF86XK_PowerOff, spawn, SHCMD("sxmo_screenlock") },

I didn't touch anything else, so the power key triggers the screenlock. Hold the volume up key to turn off the screen. Click the power key a few times to unlock. I'll probably simplify that more later, if I can.

With this setup, can you still use the volume keys to scroll in dmenu? 

Also, is there some way to scroll in st? My first preference would be to use a gesture, but I'd be ok with volume up/down for that.

edit: here's a screenshot of Alpine running on PostmarketOS (Alpine Linux) running on Pinephone! Having some fun with this. 
[Image: alpine.png]

How do you change the keyboard like that? I'd like to alter the layout on mine a bit too.

I use the keyboard arrow keys to scroll in apps in st. I haven't been able to scroll back up while at the prompt (like after you cat a long file).

Edit: and thanks for the tip on the menu font size setting.
#30
(05-25-2020, 09:29 AM)visiblink Wrote: How do you change the keyboard like that? I'd like to alter the layout on mine a bit too.

I use the keyboard arrow keys to scroll in apps in st. I haven't been able to scroll back up while at the prompt (like after you cat a long file).

Edit: and thanks for the tip on the menu font size setting.

for the keyboard you need https://git.sr.ht/~mil/sxmo-svkbd and edit the layout.
I actually modified the layout.en.h and when I install I just do a symlink from /usr/bin/svkbd-sxmo to svkbd-en, but I probably could have edited the layout.sxmo.h and wouldn't need the symlink.  The colors are in config.h

edit: some more layout examples are here: https://github.com/ceemos/svkbd


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

Forum Jump:


Users browsing this thread: 2 Guest(s)