Commit graph

513 commits

Author SHA1 Message Date
Anjandev Momi
5e327629d9
badge: only show status for commits 2021-05-10 21:44:18 -04:00
Anjandev Momi
161cc52091 Clarify Lagrange submenu not firefox 2021-05-09 06:20:51 +00:00
Stacy Harper
94613e5ae7 Add lagrange shortcuts in appmenu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-05-09 06:18:30 +00:00
Nguyễn Gia Phong
401ca22d46 Add gomuks to apps launcher
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-30 20:47:01 +02:00
Maarten van Gompel
906226a4ed added gesture to close less/mless (swipe to left edge or left along bottom edge) 2021-04-26 23:00:35 +02:00
Anjandev Momi
b87be17a64 Revert "Log dwm to CACHEDIR not XDG_CACHE_HOME/sxmo"
This reverts commit 472ad269cb.

double quotes are annoying
2021-04-24 15:19:59 -04:00
Anjandev Momi
472ad269cb Log dwm to CACHEDIR not XDG_CACHE_HOME/sxmo
It's the same directory but we might want to change CACHEDIR in the
future
2021-04-24 15:12:46 -04:00
Clayton Craft
355f68652e sxmo_lisgdstart: log output to file
Useful when identifying/debugging lisgd crashes, and other strange behavior.

The log location is the same place where dwm logs to, so this seemed
appropriate.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-24 15:10:07 -04:00
Stacy Harper
bbece6a657 Use toprightcorner to open user script menu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-24 01:27:20 -04:00
Stacy Harper
f16422cf0c fix indentation style
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-24 01:27:20 -04:00
Clayton Craft
2d9740f252 sxmo_audio*: properly set vars with default values if they are unset
A mistake from implementing this resulted in the shell trying to expand
the 'word' part (e.g. "Line Out"), when the var was unset or null.
Obviously those are are strings and not expandable.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-24 01:14:55 -04:00
Anjandev Momi
7d9b86b54c Add shebang for target shell 2021-04-23 17:23:43 -04:00
Clayton Craft
af621dec7c sxmo_deviceprofile_librem5*: add initial profile for librem5
Currently there are 3 revisions of the L5, and they are all sharing the
same profile here since this only sets audio vars and they're all the
same. In the future the symlinks can be broken if profiles need to
deviate for some reason in order to set different values for vars, etc.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-23 17:22:03 -04:00
Clayton Craft
6abfc76bb7 sxmo_audiocurrentdevice: use existing env vars for audio devices
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-23 17:22:03 -04:00
Clayton Craft
fd0eb1dc88 sxmo_audioout: use existing env vars for audio devices
If the env variables in this script are set, use those values. Else it
defaults to using the values set before this patch.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-23 17:22:03 -04:00
Clayton Craft
42b9f482a9 sxmo_xinit: add support for overriding vars with device-specific profiles
This reads base/compatible from the devicetree to get the device name,
and sources a script in /bin with a filename in the format
'sxmo_deviceprofile_NAME.sh'. The purpose of this is to allow
setting/overriding variables in other sxmo scripts with device-specific
values. For example, some audio devices on one phone may have different
names on another.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-23 17:22:03 -04:00
Maarten van Gompel
b5e5387121 minor shellcheck fixes after applying latest patches 2021-04-23 19:23:06 +02:00
Clayton Craft
92561f7d7e udev: use more specific rule for creating touchscreen symlink
On the librem 5, this rule caused a symlink from /dev/input/mouse0
(which had the TOUCHSCREEN attrib set in udev... ??) to
/dev/input/touchscreen, when it should have been from something like
/dev/event*. This change causes udev to ignore mouse*, mice* etc in
/dev/input.

Tested on the librem 5.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:37 +02:00
Stacy Harper
7ac78f8272 sxmo_dmenu_with_kb should exit the dmenu exit code
Some script could behave differently if the dmenu has been killed with a
swipe up gesture. We have to return the dmenu exit code.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:32 +02:00
Stacy Harper
6426a94e46 Add proximity lock toggle on the config menu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:24 +02:00
Stacy Harper
f4ee396394 Rework the incoming call pickup/discard behavior
* The sxmo_modemmonitor.sh will now run a new sxmo_modemcall.sh
dedicated menu to Pickup, Hangup or Mute the call. It will not write
notifications anymore.

* We now can mute the ring with the new pickup menu. With the default
hook, this will stop the ringtone like the missed_call would do.

* The sxmo_modemcall.sh now use a new sxmo_proximitylock.sh which
will lock the screen when putting the phone in front of the ear. This
script should be smart enough to work smoothly with a crust context.

To achieve this, the proximity_lock will only disable the initial
lock (the one who want to go back in crust after some seconds) if the
phone moved a little bit and is not in your pocket. So forgetting the
phone in a table or not earing the ring in your bag will not empty the
battery. You'll find the phone in crust with notifications.

* The sxmo_modemcall.sh do not monitor finished calls anymore. We leave
it with hangup or being killed by sxmo_modemmonitor.sh. This simplify
the call script and prevent double deleting mmcli calls. I had to use
pids and wait commands to fix and issue and make the script killeable
by the monitor.

Plus, only the monitor will now delete calls. The call script should be
precise on what happen using cached files.

* Discarded and hanged up calls are two different behavior with
different script (by default use the same linked ones)

* Fixed a bug where sometime ringing was started twice. I think this is
cause by the new checkforincomingcalls in the connected state change. We
now use a file to test if the call already has been managed.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:08 +02:00
Stacy Harper
6423ece891
Add less|mless appmenus
Very usefull when displaying multiple files. It is used by mless, a
basic mblaze command to show emails.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-21 19:39:48 -04:00
Maxim Karasev
fbd0f24c50 Fix neovim executable name
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-11 17:59:03 +02:00
Maarten van Gompel
21379b7914 Renamed sxmo_gesturehandler.sh to sxmo_inputhandler.sh (after Sam Bowly's patches), renamed gesture hook to inputhandler hook. Removed hotcorner script and powerbutton scripts and their hooks (now all handled by inputhandler and its hook). 2021-04-10 13:47:22 +02:00
Sam Bowlby
a7e8b39165 add button actions. Use with my dwm patch
fixed to pass shellcheck

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-10 13:34:41 +02:00
Stacy Harper
a3e4dc0fa4 Make all sxmo menu SSH mode compatible
We then simplify the sxmo_modemtext that was already using SSH related
behaviors.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-10 13:20:19 +02:00
Stacy Harper
33e6ce14b3 sxmo_contactmenu.sh now use sxmo_contacts.sh
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-10 13:20:19 +02:00
Stacy Harper
91fe7fbeab Fix the unreliable modem numbers prefix issues
Sometime, the modem will give 0611924312 as incoming text or
call number instead of +33611924312 (example in france).

This cause two issues cause of format missmatch:

* Notifications sometime come from "Unknown" when we actually know
the contact
* Text/Dial menu entries are duplicated with "Unknown" persons

We try here to fix boths issues with a simple idea. We will fallback
to a default prefix when it is missing (on phone like numbers,
composed of 10 numbers).

This prefix is an environment variable that cause 0 impact if missing.

* sxmo_contacts.sh will fix the recent numbers prefixes with the default
* sxmo_modemmonitor.sh will also fix the prefix with the default one

This should solve missmatch issues as both will use country code format

I only recommend to always store contacts in the prefixed format in the
contacts.tsv file.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-10 13:20:19 +02:00
Stacy Harper
df73a9af1c Simplify and prevent killing existing mpv instances
Instead of the trigger file and killing mpv, we loop the ring
indefinitely until killed. Maybe we should still got a guardrail but I
still never needed it (modemmonitor would trigger missed_call late or
later ?)

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-09 23:25:27 +02:00
Stacy Harper
65270eaea8 Prevent starting multiple modemmonitor on logout/login
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-09 23:22:21 +02:00
Stacy Harper
de0697a83c Fix sxmo rotate left
lisgd doesnt care about negative rotations. Rotating left is 3 rotation
rights.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-09 22:56:20 +02:00
Sam Bowlby
bf212e1b7b add Profanity to app menu; add System Menu to Network menu
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 20:47:27 +02:00
Maarten van Gompel
e220a30e15 added some more apps to the app menu 2021-04-05 17:18:52 +02:00
Maarten van Gompel
2d1180389f fixed whitespace problem after last patch 2021-04-05 16:43:23 +02:00
Sam Bowlby
bcde43d369 add VPN/Wireguard symbol to statusbar
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 16:41:54 +02:00
Sam Bowlby
83d27eec2d add VPN/Wireguard symbol to statusbar
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 16:39:33 +02:00
Stacy Harper
c6764c2a0d Fix an issue when number was composed by multiple words
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 12:39:39 +02:00
Maarten van Gompel
6dc18e22a3 fixed minor shellcheck issues 2021-04-05 12:08:22 +02:00
Stacy Harper
f9b96d2d28 Update modem status state on errors
If modemmonitor crash for some reason, status bar is not updated. The
reason is that statusbar check if modemmonitor is running, which it is
when trying to shutdown itself.

We change the way modemmonitor is detected using a single modem state
file. If the file is not present, then the monitor is considered not
running.

This single file permit to add more state in the future, without adding
any more files.

We also add a sleep 1, look like it is required to have instand status
bar update.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 12:04:34 +02:00
Maarten van Gompel
d2d06ef65a Revert "Workaround for reliable incoming calls waking up from CRUST", no longer needed with eg25-manager and caused ModemManager restart issues
This reverts commit bcf4f5c249.
2021-04-05 12:01:32 +02:00
Stacy Harper
262418637f Rework of the sxmo_modemtext with benefit
* Draft files are assigned to each number:

Stored here ".local/share/modem/+33666666666/draft.txt"
We automatically edit this single file, making crash or unexpected
edition issue to leave intact saved draft.

* Simplification of some logics

Having a known draft file instead of using a TEXT var simplify lots
of things

* EDITOR is not run in a subshell

Some editors as kakoune got issues with that. Futhermore, it will be
usefull for some other development as making all menu ssh mode
compatible

* Remove modem check

As we now got draft, why do we care if modem is up or down ?

* Display the contact name instead of it number in the conversation

Or use "Unknown Number (+337798676)"

* Unify display message notif adding possibilities to bypass the
main menu

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 12:00:49 +02:00
Stacy Harper
016363dd57 Move no before yes to confirm
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-04 20:56:54 +02:00
Stacy Harper
7c7496c06f Add icons to the contactmenu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-04 20:56:24 +02:00
Stacy Harper
82301e6954 Add shortcut to sms or call a contact from the contactmenu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-04 20:56:13 +02:00
Maarten van Gompel
8959fa50ac fixed top right hotcorner #229 2021-04-02 17:45:52 +02:00
Maarten van Gompel
b37a1fb8b5 Fixed anbox start command #230 2021-04-02 17:38:03 +02:00
Anjandev Momi
47ef03f48c
change dino to scale=1 because of global dpi scaling
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-01 15:41:01 -04:00
Maarten van Gompel
da3dba4bfb minor fixes to satisfy shellcheck 2021-03-31 20:14:53 +02:00
Maarten van Gompel
ae3e1edd9c kill existing dmenu prior to asking SIM PIN 2021-03-31 17:05:42 +02:00
Stacy Harper
ceaea60141 Add some gemini apps
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-31 13:39:09 +02:00