Commit graph

65 commits

Author SHA1 Message Date
Stacy Harper
c014c6bb92 Load user .profile after setting up default values
This allow the user .profile to switch case depending on the default
values. It is mandatory by example to setup custom wvkbd or svkbd,
depending on the wm we use.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-08-26 12:38:53 +02:00
Stacy Harper
8a27933c47 SWMO - SXMO over Wayland
This is a huge patch for Swmo, Sxmo over Sway.

It is Dwm backward compatible so dwm users should not expect regressions.

If you install all dependencies, you then can toggle between Sway and Dwm using a new config entry. It will reboot the phone.

This commit also contains:
    * Make the modemmonitor bullet proof
    * various other smaller fixes

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-08-22 13:23:22 +02:00
Maarten van Gompel
f057593692
write xinit stderr output to xinit.log
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 16:58:14 +02:00
Maarten van Gompel
41e66a0164
Restrict dimensions of gtk3 file chooser on phone screens
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 09:06:49 +02:00
Jochen Sprickerhof
e639291e49 Source customxinit before running daemonsneedingdbus
This makes sure that environment variables are set for the demons and
for example st started form the app menu (if launched through lisgd).

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-11 13:06:56 +02:00
Stacy Harper
e6ea657634 Cleanup hooks
This add a script to use either the user hook or the default one.

Sometime we checked the user hook or a default code. We move this
default code in a defaut hook.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-29 22:43:16 +02:00
Maarten van Gompel
35e39dbb90 implemented sxmo_networkmonitor to monitor when the network goes up/down and execute hooks
This implement a dbus monitor for networkamanger and is useful to
start/stop/restart certain things in user-defined hooks when
connectivity is gained/lost. By default all
it does is ensure the status bar is updated quickly to reflect the
network status.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-21 23:03:48 +02:00
Stacy Harper
e428d0c4a4 Simplify the termmode detection
As we now rely on sxmo_terminal.sh and the TERMCMD env variable, we then
can simplify things.

In the sxmo dwm context, TERMCMD="st -e" so sxmo_terminal.sh will run
the command in st.

In the ssh context, we dont have TERMCMD so sxmo_terminal.sh will just
run the command

In a tmux context, we can set TERMCMD="tmux split-window" with
set-environment -g TERMCMD "tmux split-window"
so sxmo_terminal.sh will run the command in a splited window.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-21 22:59:20 +02:00
Stacy Harper
70820d5f16 Add missing default hooks installation on first run
We also simplify some code.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-13 21:28:53 +02:00
Maarten van Gompel
f10d6cddaa various minor shellcheck fixes 2021-06-06 15:39:38 +02:00
Jochen Sprickerhof
06a6d472d7 Don't pass parameters when souring scripts
Passing additional parameters when sourcing scripts is not specified in
POSIX [1]. For example dash simply ignores it and proposes to use set
instead [2]. This is needed to use sxmo on top of Debian.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#dot
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713805#10

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-05-11 19:54:11 +00: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
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
bec7106317 Implement default hooks for ringing and incoming texts, playing audio 2021-03-30 21:02:42 +02:00
Maarten van Gompel
5f82699014 Added a more detailed xinit_template and added some default media resources (wallpaper,startup tune,keypress sound) that are preconfigured in the template 2021-03-29 14:00:09 +02:00
Stacy Harper
7bbb56723f Move conky in an auto configured user xinit
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-29 11:41:51 +02:00
tetrakist
51bc9ab8b8 Replace all XDG_RUNTIME_HOME with XDG_RUNTIME_DIR.
This is per the XDG Base Directory Specification:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-17 20:52:34 +01:00
Maarten van Gompel
39739ae974 fix for passing keyboard arguments 2021-03-15 21:29:52 +01:00
Maarten van Gompel
4eb914265d Added sxmo_keyboard script that acts as an intermediary to opening and closing the keyboard 2021-03-15 13:51:48 +01:00
tetrakist
49b435d24f Make Xresource loading generic. Call xrdb with "-merge".
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-06 23:13:24 +01:00
Maarten van Gompel
accd38806a Include custom Xresources if it exists 2021-02-26 14:30:08 +01:00
Maarten van Gompel
295af30993 various scripts were not sourcing the common include script yet (noted by mrrabbit1155) 2021-02-21 15:14:16 +01:00
Maarten van Gompel
24905884ee Removed explicit font from most dmenu calls, dmenu font is read from Xresources now and kept as uniform as possible 2021-02-01 18:32:32 +01:00
Maarten van Gompel
ce188e2f26 Use $SHELL, fix after patch: Start terminal with a login shell if run from dmenu
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-07 00:00:43 +01:00
Andre Ramnitz
a59aa85ee4 Don't touch $TERM
This name already exists and is usually set
by the terminal or a multiplexer.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-06 23:59:29 +01:00
Anjandev Momi
90ddbc3e74 move dwm.log to $XDG_CACHE_HOME 2020-11-02 14:59:54 -05:00
Maarten van Gompel
a537bea76a changed default background colour (to be the same as the one in sxmo-xdm-config)
it's subjective, but the old one was rather ugly imho. Of course people
should customise it in their own custom xinit, but it might be
better if the default is a bit more appealing to the eye as it's the
first thing new users will see.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 18:01:41 +01:00
Reed Wade
8d5eda8af7 Add automatic shellchecks with CI
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
2020-10-30 12:56:04 -04:00
Miles Alan
deb83c0967 Don't source /etc/profile & $HOME/.profile if nonexistant in xinit 2020-09-19 17:15:32 -05:00
Maarten van Gompel
7830d95209 also source ~/.profile when looking for envvars
I have the impression that setting environment variables in the custom
xinit script doesn't always work properly (no idea why). Putting them in
~/.profile seems to be more robust. Sourcing it is a good idea anyhow,
hence this patch:
2020-09-15 19:29:17 -05:00
Miles Alan
a211d82939 Set MPV_HOME in xinit and add input.conf & mpv.conf 2020-08-31 22:13:28 -05:00
Anjandev Momi
44784c106b camera: low latency preview and picture
- Take pictures by pressing "s" when the preview opens.
- Depends on sxmo_autorotate.sh
- movie is not currently working. See comments in code
- uses sxiv for image previews of photos taken during that photoshoot
- TODO: use sxiv keyhandlers to add a delete photo function
	- See: /usr/share/examples/sxiv/key-handler
	- I dont know how we would distribute this
2020-08-28 21:51:26 -05:00
Maarten van Gompel
dbdb45bd6c smarter configuration of default keyboard if none specified; now compatible with upstream svkbd
Minor patch that correctly detects which virtual keyboard is available
if none was set explicitly, supports both the new upstream svkbd, as
well as the current sxmo-svkbd fork.
2020-08-18 20:37:48 -05:00
Miles Alan
ce50d0aef7 Re-enable notifications monitor 2020-08-05 23:33:53 -05:00
Miles Alan
faf9bfc48d Refactor notifications work to use 1 interface for writing notifs & use dates
Summary of changes:
1. Always use the sxmo_notificationwrite.sh script to write notifications
   rather then sometimes using echo to the DIR
2. Reorder args for notiffile spec to be action as 1st line, watchfile 2nd, and
   rest as msg; this way msg can be multiple lines without propogating bugs
3. Write calls as a standard notification via sxmo_notificationwrite.sh
4. Use datestamps from notification files instead of filename, this way (3)
   works without extra logic
5. Various style fixes
2020-08-05 23:32:39 -05:00
iressa
e6635ba7ef Notification patch v4 2020-08-05 23:32:39 -05:00
Miles Alan
bc10d502bd Remove keynav daemon - this is only relevant for desktop usage.. 2020-08-05 20:11:05 -05:00
Miles Alan
91c77cec6c Actually source custom xinit so that ENV vars are properly exported 2020-07-28 17:32:39 -05:00
Maarten van Gompel
ace9960926 Made choice for virtual keyboard configurable through the $KEYBOARD environment variable.
This implements what was suggested in the discussion regarding the svkbd
patch, it makes the choice of virtual keyboard configurable using the
$KEYBOARD variable, rather than hard-coding it.
2020-07-26 10:22:31 -05:00
Anjandev Momi
92e185b888 Add XDG user directories and env variables
This patch adds the rest of XDG user directories as per XDG base directory
specification.

https://wiki.archlinux.org/index.php/XDG_Base_Directory

This fixes launching anbox on sxmo. Furthermore, it makes sure $XDG_RUNTIME_HOME
has the correct permissions.

Signed-off-by: Miles Alan <m@milesalan.com>
2020-07-18 10:38:22 -05:00
Miles Alan
5c4c6c15e2 Refactor xinit to be more structured and set $EDITOR if unset to vis 2020-07-18 10:14:58 -05:00
Miles Alan
0801bb1adb Restructure configs into seperate folder 2020-07-12 19:29:46 -05:00
Miles Alan
f448f3c444 Source rather than just run the user's custom xinit file; allows exporting ENV 2020-07-11 09:53:18 -05:00
Maarten van Gompel
e455d31e55 read custom conky.conf if available
Signed-off-by: Miles Alan <m@milesalan.com>
2020-06-28 09:34:14 -05:00
Miles Alan
60963cd20c Start lisgd via a script instead of directly so changing gestures is simpler 2020-06-26 19:56:56 -05:00
Miles Alan
1d13cb6379 Make sure shellcheck passes and fixup style in sxmo_gpsutil.sh script 2020-06-24 21:48:48 -05:00
Miles Alan
049a93e5d8 Shellcheck and tabindent all scripts 2020-06-13 20:36:13 -05:00
Miles Alan
8015d49b03 Run $XDG_CONFIG_HOME/sxmo/xinit if it exists on starting X 2020-06-07 11:16:27 -05:00
Miles Alan
6a432b305b Shellcheck a few core scripts 2020-06-07 10:17:14 -05:00