Compare commits
329 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0457e35d0d | ||
![]() |
2ae4cee5e2 | ||
![]() |
b44795554f | ||
![]() |
65815b84de | ||
![]() |
4c25adcf5f | ||
![]() |
9dfac57e70 | ||
![]() |
7f036513c5 | ||
![]() |
92a8034653 | ||
![]() |
7b4136253a | ||
![]() |
9ccb327d69 | ||
![]() |
dfd5d67f45 | ||
![]() |
36d0d4d03f | ||
![]() |
fd44d2693d | ||
![]() |
6bb78da702 | ||
![]() |
84b61f4a72 | ||
![]() |
d334511370 | ||
![]() |
0446e654cd | ||
![]() |
11a82dfa28 | ||
![]() |
3bc52ff642 | ||
![]() |
a95376738f | ||
![]() |
f6377a2cbc | ||
![]() |
a15d514aa3 | ||
![]() |
664b8b3649 | ||
![]() |
899dad32db | ||
![]() |
a73741f643 | ||
![]() |
793b0c6173 | ||
![]() |
f8067a1d89 | ||
![]() |
eb31dc88ce | ||
![]() |
f2de84c2a6 | ||
![]() |
6314236a72 | ||
![]() |
171cfbdf67 | ||
![]() |
91c3d645b2 | ||
![]() |
ffce273794 | ||
![]() |
f1dbcb0b4e | ||
![]() |
94e0122a11 | ||
![]() |
521d9a6e54 | ||
![]() |
2e01439104 | ||
![]() |
d7a77bb1c0 | ||
![]() |
2db900ce51 | ||
![]() |
c4f2fb9df5 | ||
![]() |
867fe86ca4 | ||
![]() |
7d658baa6d | ||
![]() |
843517fb6a | ||
![]() |
2f800272a0 | ||
![]() |
4bcbf0503d | ||
![]() |
921fa1e24c | ||
![]() |
4562daea67 | ||
![]() |
be4a4366ff | ||
![]() |
f3ae894e7f | ||
![]() |
81d8457b93 | ||
![]() |
6534048c03 | ||
![]() |
ae8c63508a | ||
![]() |
ff4b10aa72 | ||
![]() |
4d7037d7bf | ||
![]() |
0b77df6b6e | ||
![]() |
160d25659a | ||
![]() |
516c6d25db | ||
![]() |
ea8a95b58c | ||
![]() |
ab56046aee | ||
![]() |
56f1fe1cdb | ||
![]() |
4cda522a09 | ||
![]() |
d60c7ca2eb | ||
![]() |
75ed8bc5d3 | ||
![]() |
c9fe95684c | ||
![]() |
73b374f677 | ||
![]() |
e8baf38440 | ||
![]() |
3de2fced00 | ||
![]() |
9f7c9da445 | ||
![]() |
54ebae73d3 | ||
![]() |
f869295c1a | ||
![]() |
23617f1dad | ||
![]() |
f446630465 | ||
![]() |
20a89df023 | ||
![]() |
72c78db377 | ||
![]() |
64b4c63a1b | ||
![]() |
07e306e939 | ||
![]() |
c54ccb1485 | ||
![]() |
47b80502d9 | ||
![]() |
86dbca1502 | ||
![]() |
ec78d3b95b | ||
![]() |
c5f4abff77 | ||
![]() |
ba45b2abf3 | ||
![]() |
c25eacff14 | ||
![]() |
37b7e4ec18 | ||
![]() |
6c6b4aa6ff | ||
![]() |
96fd0e0088 | ||
![]() |
d1867650fa | ||
![]() |
3f41756429 | ||
![]() |
c714514d3a | ||
![]() |
585560f018 | ||
![]() |
6db78c4862 | ||
![]() |
fa2446c568 | ||
![]() |
a5f81b93aa | ||
![]() |
27da98032f | ||
![]() |
10b4e26d41 | ||
![]() |
fb4928b5a4 | ||
![]() |
706d1f5fd9 | ||
![]() |
7841952fb1 | ||
![]() |
3e03d299ac | ||
![]() |
ee3256b9f6 | ||
![]() |
66d866cea2 | ||
![]() |
6d4b5aa4a4 | ||
![]() |
b6b70ed1f9 | ||
![]() |
0a1379923f | ||
![]() |
e10825ba1a | ||
![]() |
11a16defa5 | ||
![]() |
0c1c9ff907 | ||
![]() |
da93740f95 | ||
![]() |
c68d16d7b6 | ||
![]() |
9c70125f63 | ||
![]() |
73390af620 | ||
![]() |
00c9758a1c | ||
![]() |
8a92ffde85 | ||
![]() |
95bd84db66 | ||
![]() |
eaa52601de | ||
![]() |
fb70b4f8d5 | ||
![]() |
582c9b1b7b | ||
![]() |
636053e4f1 | ||
![]() |
13e7a3bc69 | ||
![]() |
ce59e6b014 | ||
![]() |
e3554ce5f7 | ||
![]() |
0b58e5e1f2 | ||
![]() |
5fd6528f1e | ||
![]() |
d102a4c5ae | ||
![]() |
92b83c6753 | ||
![]() |
f09ab84092 | ||
![]() |
533e91e68d | ||
![]() |
4301899980 | ||
![]() |
be5dfcde36 | ||
![]() |
85b6207521 | ||
![]() |
711ecff7c7 | ||
![]() |
86686a1b29 | ||
![]() |
d5dbfc6586 | ||
![]() |
4b44d664c4 | ||
![]() |
9787be1395 | ||
![]() |
91d4319df5 | ||
![]() |
8c0c0e4311 | ||
![]() |
1826eaca5b | ||
![]() |
bccc1ab88d | ||
![]() |
1172819f59 | ||
![]() |
b8d4fa93aa | ||
![]() |
967ab3c8ad | ||
![]() |
ed69f8ae23 | ||
![]() |
bcdacb3a18 | ||
![]() |
2da465e533 | ||
![]() |
dc7b9dd7fe | ||
![]() |
4913fac4ee | ||
![]() |
abb50343c1 | ||
![]() |
fbfde5a886 | ||
![]() |
36a67632ad | ||
![]() |
f05c300616 | ||
![]() |
368bc48dc2 | ||
![]() |
dca4dffc57 | ||
![]() |
d617d31aca | ||
![]() |
562fa6129a | ||
![]() |
ac767b8eb0 | ||
![]() |
369557daf2 | ||
![]() |
b5be78d521 | ||
![]() |
db537e789a | ||
![]() |
fd27059b95 | ||
![]() |
d295949758 | ||
![]() |
1a348237cd | ||
![]() |
ce699dc01a | ||
![]() |
69fcc55e5d | ||
![]() |
fb153ce987 | ||
![]() |
6fb3fe6f98 | ||
![]() |
c6efaf8a94 | ||
![]() |
6ed845fd03 | ||
![]() |
df6b3d3d0d | ||
![]() |
1642daaf49 | ||
![]() |
9b6aa786a0 | ||
![]() |
29ff6e270f | ||
![]() |
6a024f2122 | ||
![]() |
5e86c77a2c | ||
![]() |
f9e8ed1667 | ||
![]() |
3fe7b2bb1e | ||
![]() |
1eb155ce47 | ||
![]() |
2f5fae6e10 | ||
![]() |
eaa596816f | ||
![]() |
b62eda14d6 | ||
![]() |
18d2845f78 | ||
![]() |
278d896eaa | ||
![]() |
1522fd4128 | ||
![]() |
fa57046245 | ||
![]() |
73416c9280 | ||
![]() |
5e7e07841f | ||
![]() |
2cde05382d | ||
![]() |
99f01be21f | ||
![]() |
542d6507cf | ||
![]() |
853690a704 | ||
![]() |
61aa02754f | ||
![]() |
0535059f7d | ||
![]() |
97447367f6 | ||
21d694822a | |||
f605068505 | |||
8758473866 | |||
da7e951159 | |||
9b0f6a3414 | |||
a264835cdd | |||
49aa6be220 | |||
9df61b2d32 | |||
b74c03d688 | |||
af7890dfdf | |||
46b64a713a | |||
8d92365ffb | |||
![]() |
1654cde76d | ||
![]() |
824ad04d59 | ||
![]() |
b8c42390be | ||
![]() |
819c5fad58 | ||
![]() |
bd6473dcfb | ||
![]() |
582b51ccca | ||
![]() |
e4ffce9a69 | ||
![]() |
6638fc402b | ||
![]() |
6a3269d358 | ||
![]() |
f24d0f7e1d | ||
![]() |
1b8d58e2ca | ||
![]() |
8249219793 | ||
![]() |
0de5c282ab | ||
![]() |
4e0715d87a | ||
![]() |
1caf280dd8 | ||
![]() |
aa56356463 | ||
![]() |
ab79ed6f72 | ||
![]() |
b09469d965 | ||
![]() |
b83b2e4f18 | ||
![]() |
7c487c3e0f | ||
![]() |
bbec613e8a | ||
![]() |
f479a599f6 | ||
![]() |
38e450902f | ||
![]() |
e2f767bde8 | ||
![]() |
86555424ed | ||
![]() |
37b50b6798 | ||
![]() |
598058494b | ||
![]() |
7ba7990a55 | ||
![]() |
c1b2803fcf | ||
![]() |
7a77851c9a | ||
![]() |
09a3b63b94 | ||
![]() |
d13ee22779 | ||
![]() |
db1614b7b7 | ||
![]() |
2c961c8c95 | ||
![]() |
03990468c0 | ||
![]() |
612f053d0c | ||
![]() |
5be5a97090 | ||
![]() |
7710b6211f | ||
![]() |
9a5babd048 | ||
![]() |
2dc137ce57 | ||
![]() |
5b6ddc7510 | ||
![]() |
e0efe35a2d | ||
![]() |
c33408abb5 | ||
![]() |
e55d30d2ad | ||
![]() |
df539391e5 | ||
b1e5d75162 | |||
c7df343008 | |||
![]() |
2547af4cbc | ||
![]() |
25c1827b5f | ||
![]() |
195f77d2cf | ||
![]() |
e1493cff6a | ||
![]() |
0210047512 | ||
![]() |
e99ef4e2e3 | ||
![]() |
b175f17acd | ||
![]() |
a4bbfd525f | ||
b579015748 | |||
![]() |
05fd5112d5 | ||
![]() |
ae7fd89b46 | ||
2db9353edb | |||
![]() |
7a7188bddc | ||
![]() |
d92f57f213 | ||
![]() |
0e3315b57b | ||
![]() |
17e4e917a7 | ||
![]() |
55aac86762 | ||
![]() |
0766872097 | ||
![]() |
c95f3d9e7b | ||
![]() |
ef8254681c | ||
![]() |
ee180f6e51 | ||
![]() |
e6c02e3bc3 | ||
![]() |
e2b2c510a2 | ||
![]() |
0acdebf0a7 | ||
![]() |
3fbcf32fee | ||
![]() |
a2d5d2ed08 | ||
![]() |
086d8de5f8 | ||
![]() |
a9c2c3b4bf | ||
![]() |
86dcf85612 | ||
![]() |
ebe88d9ef9 | ||
![]() |
f61bb64aca | ||
![]() |
ebb2c3e47e | ||
![]() |
471dce2b9e | ||
![]() |
22c3f178cd | ||
![]() |
788810268c | ||
![]() |
871caa7394 | ||
![]() |
6ce754385c | ||
![]() |
4c6840b4ff | ||
![]() |
56c7df703d | ||
![]() |
bd41443f55 | ||
![]() |
31dc146bde | ||
![]() |
d42739d1a2 | ||
![]() |
69b16dd017 | ||
![]() |
d9dd4d4ab6 | ||
![]() |
3abfb24924 | ||
![]() |
3ecbf9a727 | ||
![]() |
4394816f16 | ||
![]() |
0e39ef1c2d | ||
![]() |
af86f64500 | ||
![]() |
bd9eca7dd4 | ||
![]() |
700bee1659 | ||
![]() |
3a70be4fd7 | ||
![]() |
228b936f08 | ||
![]() |
da36357b4f | ||
0d56424cbc | |||
9e16a9fa47 | |||
![]() |
a69fbb2222 | ||
![]() |
a63a678077 | ||
![]() |
2a1782f397 | ||
![]() |
0791b182e9 | ||
![]() |
095678e77f | ||
![]() |
d0384a7cae | ||
![]() |
4a6b4f6981 | ||
7a4ccd3ec7 | |||
![]() |
f9605bc9c8 | ||
![]() |
628a5675b2 | ||
![]() |
333ec06d68 | ||
![]() |
fc24835fd5 | ||
![]() |
f57a4b0985 | ||
![]() |
5508e06ffe | ||
![]() |
f4479b8d8c | ||
![]() |
e0ecf42cb7 | ||
![]() |
853ad37d23 | ||
![]() |
90f00ef11a | ||
![]() |
f0888bbd03 | ||
![]() |
91070791ee | ||
![]() |
1373bc682e |
@@ -3,17 +3,12 @@ packages:
|
|||||||
- shellcheck
|
- shellcheck
|
||||||
- editorconfig-checker
|
- editorconfig-checker
|
||||||
- shellspec
|
- shellspec
|
||||||
- gojq
|
|
||||||
- jq
|
- jq
|
||||||
|
- icu-dev
|
||||||
|
- linux-headers
|
||||||
sources:
|
sources:
|
||||||
- https://git.sr.ht/~mil/sxmo-utils
|
- https://git.sr.ht/~mil/sxmo-utils
|
||||||
tasks:
|
tasks:
|
||||||
- shellcheck: |
|
- test: |
|
||||||
cd sxmo-utils
|
cd sxmo-utils
|
||||||
find . -type f -name '*.sh' -print0 | xargs -0 shellcheck -x --shell=sh
|
make test
|
||||||
- shellspec: |
|
|
||||||
cd sxmo-utils
|
|
||||||
shellspec
|
|
||||||
- editorconfig-check: |
|
|
||||||
cd sxmo-utils
|
|
||||||
ec
|
|
||||||
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Makefile export-subst
|
3
.hut.scfg
Normal file
3
.hut.scfg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
tracker https://todo.sr.ht/~mil/sxmo-tickets
|
||||||
|
development-mailing-list ~mil/sxmo-devel@lists.sr.ht
|
||||||
|
patch-prefix true
|
122
Makefile
122
Makefile
@@ -1,45 +1,110 @@
|
|||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX:=/usr
|
PREFIX:=/usr
|
||||||
|
SYSCONFDIR:=/etc
|
||||||
SHAREDIR=$(PREFIX)/share
|
SHAREDIR=$(PREFIX)/share
|
||||||
MANDIR=$(SHAREDIR)/man
|
MANDIR=$(SHAREDIR)/man
|
||||||
|
|
||||||
|
CFLAGS := -Wall -std=c99 -D_POSIX_C_SOURCE=200809L $(CFLAGS)
|
||||||
|
|
||||||
|
# use $(PREFIX)/lib/systemd/user for systemd integration
|
||||||
|
SERVICEDIR:=$(PREFIX)/share/superd/services
|
||||||
|
|
||||||
|
# Install services for packages outside sxmo
|
||||||
|
EXTERNAL_SERVICES:=1
|
||||||
|
|
||||||
SCDOC=scdoc
|
SCDOC=scdoc
|
||||||
|
SCD2HTML=scd2html
|
||||||
|
SCD2HTMLFLAGS =
|
||||||
|
|
||||||
.PHONY: install shellcheck
|
.PHONY: install test shellcheck shellspec test_legacy_nerdfont docs html-docs \
|
||||||
|
install-docs install-html-docs install-sway install-dwm install-scripts
|
||||||
|
|
||||||
VERSION:=1.13.0
|
VERSION ?= unknown
|
||||||
|
|
||||||
GITVERSION:=$(shell git describe --tags)
|
# git archive will expand $Format:true$ to just true, so we can use it to check
|
||||||
|
# if we should use the version from the tarball, or to generate it now.
|
||||||
|
ifeq "$Format:true$" "true"
|
||||||
|
VERSION := $Format:%(describe:tags)$
|
||||||
|
else
|
||||||
|
VERSION := $(shell git -c safe.directory="*" describe --tags)
|
||||||
|
endif
|
||||||
|
|
||||||
OPENRC:=1
|
OPENRC:=1
|
||||||
|
|
||||||
CC ?= $(CROSS_COMPILE)gcc
|
CC ?= $(CROSS_COMPILE)gcc
|
||||||
PROGRAMS = \
|
PROGRAMS = \
|
||||||
programs/sxmo_aligned_sleep \
|
programs/sxmo_aligned_sleep \
|
||||||
programs/sxmo_vibrate
|
programs/sxmo_sleep \
|
||||||
|
programs/sxmo_vibrate \
|
||||||
|
programs/sxmo_status_led
|
||||||
|
|
||||||
DOCS = \
|
DOCS = \
|
||||||
docs/sxmo.7
|
docs/sxmo.7 \
|
||||||
|
docs/sxmo_wakelock.sh.1 \
|
||||||
|
docs/sxmo_migrate.sh.1 \
|
||||||
|
docs/sxmo_files.sh.1 \
|
||||||
|
docs/sxmo_contacts.sh.1 \
|
||||||
|
|
||||||
|
HTMLDOCS := $(DOCS:%=%.html)
|
||||||
|
|
||||||
|
|
||||||
|
all: $(PROGRAMS) $(DOCS)
|
||||||
|
|
||||||
|
# We convert from SCDOC to HTML , the HTML conversion
|
||||||
|
# we apply some postprocessing for better internal hyperlinks and styling.
|
||||||
|
docs/%.html: docs/%.scd
|
||||||
|
$(SCD2HTML) $(SCD2HTMLFLAGS) < "$<" | \
|
||||||
|
sed -E -e 's/Georgia/Sans/g' \
|
||||||
|
-e 's/Menlo/FiraMono Nerd Font, Sxmo, Menlo/g' \
|
||||||
|
-e 's/See ([A-Z ]+)\./See <a href="#\1">\1<\/a>./g' \
|
||||||
|
-e 's/\(see ([A-Z ]+)\)/(see <a href="#\1">\1<\/a>)/g' \
|
||||||
|
-e 's/<u>sxmo_([a-z_\.]+)<\/u>\(([1-9])\)/<a href="sxmo_\1.\2.html"><u>sxmo_\1<\/u><\/a>(\2)/g' | \
|
||||||
|
sed -e ':loop' \
|
||||||
|
-e 's/\(href="[^" ]*\) \([^"]*"\)/\1_\2/' \
|
||||||
|
-e 't loop' > "$@" #this last sed statement replace spaces in href attributes with underscores
|
||||||
|
|
||||||
docs/%: docs/%.scd
|
docs/%: docs/%.scd
|
||||||
$(SCDOC) <$< >$@
|
$(SCDOC) <$< >$@
|
||||||
|
|
||||||
all: $(PROGRAMS) $(DOCS)
|
docs: $(DOCS)
|
||||||
|
|
||||||
test: shellcheck
|
html-docs: $(HTMLDOCS)
|
||||||
|
|
||||||
|
test: shellcheck shellspec test_legacy_nerdfont test_status_led
|
||||||
|
|
||||||
shellcheck:
|
shellcheck:
|
||||||
find . -type f -name '*.sh' -print0 | xargs -0 shellcheck -x --shell=sh
|
find . -type f -name '*.sh' -print0 | xargs -0 shellcheck -x --shell=sh
|
||||||
|
|
||||||
|
shellspec: ${PROGRAMS}
|
||||||
|
shellspec
|
||||||
|
|
||||||
|
test_status_led: programs/sxmo_status_led.test
|
||||||
|
./programs/sxmo_status_led.test
|
||||||
|
|
||||||
|
test_legacy_nerdfont: programs/test_legacy_nerdfont
|
||||||
|
programs/test_legacy_nerdfont < configs/default_hooks/sxmo_hook_icons.sh
|
||||||
|
|
||||||
|
programs/sxmo_status_led: LDLIBS := -lm
|
||||||
|
programs/sxmo_status_led.test: LDLIBS := -lm
|
||||||
|
programs/test_legacy_nerdfont: LDLIBS := $(shell pkg-config --cflags --libs icu-io)
|
||||||
|
|
||||||
programs/%: programs/%.c
|
programs/%: programs/%.c
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -o $@
|
||||||
|
|
||||||
|
# only used for sxmo_status_led
|
||||||
|
programs/%.test: programs/%.c
|
||||||
|
$(CC) $(CPPFLAGS) $(CFLAGS) -DTEST $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f programs/sxmo_aligned_sleep programs/sxmo_vibrate
|
rm -f ${PROGRAMS} ${DOCS} ${HTMLDOCS} programs/test_legacy_nerdfont programs/sxmo_status_led.test
|
||||||
|
|
||||||
install: install-sway install-dwm install-scripts install-docs
|
install: install-sway install-dwm install-scripts install-docs
|
||||||
|
|
||||||
install-docs: $(DOCS)
|
install-docs: $(DOCS)
|
||||||
cd docs && find . -type f -name '*.7' -exec install -D -m 0644 "{}" "$(DESTDIR)$(MANDIR)/man7/{}" \; && cd ..
|
cd docs && find . -type f -name '*.7' -exec install -D -m 0644 "{}" "$(DESTDIR)$(MANDIR)/man7/{}" \; && find . -type f -name '*.1' -exec install -D -m 0644 "{}" "$(DESTDIR)$(MANDIR)/man1/{}" \; && cd ..
|
||||||
|
|
||||||
|
install-html-docs: $(HTMLDOCS)
|
||||||
|
cd docs && find . -type f -name '*.html' -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/doc/sxmo/html/{}" \; && cd ..
|
||||||
|
|
||||||
install-sway:
|
install-sway:
|
||||||
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/share/wayland-sessions/ configs/applications/swmo.desktop
|
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/share/wayland-sessions/ configs/applications/swmo.desktop
|
||||||
@@ -48,34 +113,31 @@ install-dwm:
|
|||||||
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/share/xsessions/ configs/applications/sxmo.desktop
|
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/share/xsessions/ configs/applications/sxmo.desktop
|
||||||
|
|
||||||
install-scripts: $(PROGRAMS)
|
install-scripts: $(PROGRAMS)
|
||||||
cd configs && find . -type f -not -name sxmo-setpermissions -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
|
cd configs && find . -type f -not -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
|
||||||
|
|
||||||
rm -rf "$(DESTDIR)$(PREFIX)/share/sxmo/default_hooks/"
|
rm -rf "$(DESTDIR)$(PREFIX)/share/sxmo/default_hooks/"
|
||||||
cd configs && find default_hooks -type f -exec install -D -m 0755 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
|
cd configs && find default_hooks -type f -exec install -D -m 0755 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
|
||||||
cd configs && find default_hooks -type l -exec cp -R "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
|
cd configs && find default_hooks -type l -exec cp -R "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
|
||||||
|
|
||||||
[ -n "$(GITVERSION)" ] && echo "$(GITVERSION)" > "$(DESTDIR)$(PREFIX)/share/sxmo/version" || echo "$(VERSION)" > "$(DESTDIR)$(PREFIX)/share/sxmo/version"
|
echo "$(VERSION)" > "$(DESTDIR)$(PREFIX)/share/sxmo/version"
|
||||||
|
|
||||||
cd resources && find . -type f -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
|
cd resources && find . -type f -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
|
||||||
|
|
||||||
# Configs
|
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/lib/udev/rules.d/ configs/udev/*.rules
|
||||||
if [ "$(OPENRC)" = "1" ]; then \
|
|
||||||
install -D -m 0755 -t $(DESTDIR)/etc/init.d configs/openrc/sxmo-setpermissions; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
install -D -m 0644 -t $(DESTDIR)/usr/lib/udev/rules.d/ configs/udev/*.rules
|
|
||||||
|
|
||||||
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/share/applications/ configs/xdg/mimeapps.list
|
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/share/applications/ configs/xdg/mimeapps.list
|
||||||
|
|
||||||
install -D -m 0640 -t $(DESTDIR)/etc/doas.d/ configs/doas/sxmo.conf
|
install -D -m 0644 -t $(DESTDIR)$(SYSCONFDIR)/polkit-1/rules.d/ configs/polkit/01-sensor-claim.rules
|
||||||
|
|
||||||
|
install -D -m 0640 -t $(DESTDIR)$(SYSCONFDIR)/doas.d/ configs/doas/sxmo.conf
|
||||||
|
|
||||||
install -D -m 0644 -T configs/xorg/monitor.conf $(DESTDIR)$(PREFIX)/share/X11/xorg.conf.d/90-monitor.conf
|
install -D -m 0644 -T configs/xorg/monitor.conf $(DESTDIR)$(PREFIX)/share/X11/xorg.conf.d/90-monitor.conf
|
||||||
|
|
||||||
mkdir -p $(DESTDIR)/etc/NetworkManager/dispatcher.d
|
mkdir -p $(DESTDIR)$(SYSCONFDIR)/NetworkManager/dispatcher.d
|
||||||
|
|
||||||
install -D -m 0644 -T configs/appcfg/mpv_input.conf $(DESTDIR)/etc/mpv/input.conf
|
install -D -m 0644 -T configs/appcfg/mpv_input.conf $(DESTDIR)$(SYSCONFDIR)/mpv/input.conf
|
||||||
|
|
||||||
install -D -m 0755 -T configs/profile.d/sxmo_init.sh $(DESTDIR)/etc/profile.d/sxmo_init.sh
|
install -D -m 0755 -T configs/profile.d/sxmo_init.sh $(DESTDIR)$(SYSCONFDIR)/profile.d/sxmo_init.sh
|
||||||
|
|
||||||
# Migrations
|
# Migrations
|
||||||
install -D -t $(DESTDIR)$(PREFIX)/share/sxmo/migrations migrations/*
|
install -D -t $(DESTDIR)$(PREFIX)/share/sxmo/migrations migrations/*
|
||||||
@@ -83,8 +145,8 @@ install-scripts: $(PROGRAMS)
|
|||||||
# Bin
|
# Bin
|
||||||
install -D -t $(DESTDIR)$(PREFIX)/bin scripts/*/*.sh
|
install -D -t $(DESTDIR)$(PREFIX)/bin scripts/*/*.sh
|
||||||
|
|
||||||
install -D programs/sxmo_aligned_sleep $(DESTDIR)$(PREFIX)/bin/
|
install -t $(DESTDIR)$(PREFIX)/bin/ ${PROGRAMS}
|
||||||
install -D programs/sxmo_vibrate $(DESTDIR)$(PREFIX)/bin/
|
setcap 'cap_wake_alarm=ep' $(DESTDIR)$(PREFIX)/bin/sxmo_sleep
|
||||||
|
|
||||||
find $(DESTDIR)$(PREFIX)/share/sxmo/default_hooks/ -type f -exec ./setup_config_version.sh "{}" \;
|
find $(DESTDIR)$(PREFIX)/share/sxmo/default_hooks/ -type f -exec ./setup_config_version.sh "{}" \;
|
||||||
find $(DESTDIR)$(PREFIX)/share/sxmo/appcfg/ -type f -exec ./setup_config_version.sh "{}" \;
|
find $(DESTDIR)$(PREFIX)/share/sxmo/appcfg/ -type f -exec ./setup_config_version.sh "{}" \;
|
||||||
@@ -93,12 +155,12 @@ install-scripts: $(PROGRAMS)
|
|||||||
mkdir -p "$(DESTDIR)$(PREFIX)/share/sxmo/appscripts"
|
mkdir -p "$(DESTDIR)$(PREFIX)/share/sxmo/appscripts"
|
||||||
cd scripts/appscripts && find . -name 'sxmo_*.sh' | xargs -I{} ln -fs "$(PREFIX)/bin/{}" "$(DESTDIR)$(PREFIX)/share/sxmo/appscripts/{}" && cd ../..
|
cd scripts/appscripts && find . -name 'sxmo_*.sh' | xargs -I{} ln -fs "$(PREFIX)/bin/{}" "$(DESTDIR)$(PREFIX)/share/sxmo/appscripts/{}" && cd ../..
|
||||||
|
|
||||||
|
mkdir -p "$(DESTDIR)$(SERVICEDIR)"
|
||||||
mkdir -p "$(DESTDIR)$(PREFIX)/share/superd/services"
|
install -m 0644 -t "$(DESTDIR)$(SERVICEDIR)" configs/services/*
|
||||||
install -m 0644 -t $(DESTDIR)$(PREFIX)/share/superd/services configs/superd/services/*
|
if [ "$(EXTERNAL_SERVICES)" = "1" ]; then \
|
||||||
|
install -m 0644 -t "$(DESTDIR)$(SERVICEDIR)" configs/external-services/*; \
|
||||||
|
fi
|
||||||
|
|
||||||
@echo "-------------------------------------------------------------------">&2
|
@echo "-------------------------------------------------------------------">&2
|
||||||
@echo "NOTICE 1: Do not forget to add sxmo-setpermissions to your init system, e.g. for openrc: rc-update add sxmo-setpermissions default && rc-service sxmo-setpermissions start" >&2
|
@echo "NOTICE: After an upgrade, it is recommended you reboot and when prompted run sxmo_migrate.sh to check and upgrade your configuration files and custom hooks against the defaults (it will not make any changes unless explicitly told to)" >&2
|
||||||
@echo "-------------------------------------------------------------------">&2
|
|
||||||
@echo "NOTICE 2: After an upgrade, it is recommended you reboot and when prompted run sxmo_migrate.sh to check and upgrade your configuration files and custom hooks against the defaults (it will not make any changes unless explicitly told to)" >&2
|
|
||||||
@echo "-------------------------------------------------------------------">&2
|
@echo "-------------------------------------------------------------------">&2
|
||||||
|
@@ -8,11 +8,11 @@ conky.config = {
|
|||||||
draw_shades = true,
|
draw_shades = true,
|
||||||
font = 'Sxmo:size=13',
|
font = 'Sxmo:size=13',
|
||||||
use_xft = true,
|
use_xft = true,
|
||||||
update_interval = 5,
|
update_interval = 15,
|
||||||
}
|
}
|
||||||
|
|
||||||
conky.text = [[
|
conky.text = [[
|
||||||
${alignc}${font Sxmo:size=50:style=Bold}${exec date +"%H"}${font Sxmo:size=50}:${exec date +"%M"}${font}
|
${alignc}${font Sxmo:size=50:style=Bold}${time %H}${font Sxmo:size=50}:${time %M}${font}
|
||||||
|
|
||||||
${font Sxmo:size=20}${exec date +"%a %d %b %Y"}${font}
|
${font Sxmo:size=20}${time %a %d %b %Y}${font}
|
||||||
]]
|
]]
|
||||||
|
@@ -5,6 +5,7 @@ text-color=#000000
|
|||||||
border-color=#000000
|
border-color=#000000
|
||||||
layer=overlay
|
layer=overlay
|
||||||
group-by=app-name
|
group-by=app-name
|
||||||
|
on-touch=invoke-default-action
|
||||||
|
|
||||||
[urgency=low]
|
[urgency=low]
|
||||||
default-timeout=10000
|
default-timeout=10000
|
||||||
|
@@ -3474,6 +3474,26 @@ Palivere, Estonia 58.9702778 23.9033337
|
|||||||
Aravete, Estonia 59.1416667 25.7613888
|
Aravete, Estonia 59.1416667 25.7613888
|
||||||
Kiili, Estonia 59.3069444 24.8377781
|
Kiili, Estonia 59.3069444 24.8377781
|
||||||
Lagedi, Estonia 59.4055556 24.9422226
|
Lagedi, Estonia 59.4055556 24.9422226
|
||||||
|
Manzini, Eswatini -26.4833333 31.3666668
|
||||||
|
Mbabane, Eswatini -26.3166667 31.1333332
|
||||||
|
Big Bend, Eswatini -26.8166667 31.9333324
|
||||||
|
Malkerns, Eswatini -26.5666667 31.1833324
|
||||||
|
Mhlume, Eswatini -26.0333333 31.8500004
|
||||||
|
Hluti, Eswatini -27.2166667 31.6166668
|
||||||
|
Siteki, Eswatini -26.4500000 31.9500008
|
||||||
|
Piggs Peak, Eswatini -25.9666667 31.2500000
|
||||||
|
Lobamba, Eswatini -26.4666667 31.2000008
|
||||||
|
Kwaluseni, Eswatini -26.4833333 31.3333340
|
||||||
|
Bhunya, Eswatini -26.5500000 31.0166664
|
||||||
|
Mhlambanyatsi, Eswatini -26.4500000 31.0166664
|
||||||
|
Hlatikulu, Eswatini -26.9666667 31.3166676
|
||||||
|
Bulembu, Eswatini -25.9666667 31.1333332
|
||||||
|
Kubuta, Eswatini -26.8833333 31.4833336
|
||||||
|
Tshaneni, Eswatini -25.9833333 31.7166672
|
||||||
|
Sidvokodvo, Eswatini -26.6166667 31.4500008
|
||||||
|
Lavumisa, Eswatini -27.3166667 31.8999996
|
||||||
|
Darkton, Eswatini -26.2333333 31.0333328
|
||||||
|
Nsoko, Eswatini -27.0333333 31.9500008
|
||||||
Addis Ababa, Ethiopia 9.0333333 38.7000008
|
Addis Ababa, Ethiopia 9.0333333 38.7000008
|
||||||
Dire Dawa, Ethiopia 9.5930556 41.8661118
|
Dire Dawa, Ethiopia 9.5930556 41.8661118
|
||||||
Nazret, Ethiopia 8.5500000 39.2666664
|
Nazret, Ethiopia 8.5500000 39.2666664
|
||||||
@@ -9240,26 +9260,6 @@ Onverwacht, Suriname 5.5833333 -55.1833344
|
|||||||
Totness, Suriname 5.8833333 -56.3166656
|
Totness, Suriname 5.8833333 -56.3166656
|
||||||
Benzdorp (Monte Hermon), Suriname 3.6720670 -54.1035461
|
Benzdorp (Monte Hermon), Suriname 3.6720670 -54.1035461
|
||||||
Kabana-vo, Suriname 3.6741067 -54.0848846
|
Kabana-vo, Suriname 3.6741067 -54.0848846
|
||||||
Manzini, Swaziland -26.4833333 31.3666668
|
|
||||||
Mbabane, Swaziland -26.3166667 31.1333332
|
|
||||||
Big Bend, Swaziland -26.8166667 31.9333324
|
|
||||||
Malkerns, Swaziland -26.5666667 31.1833324
|
|
||||||
Mhlume, Swaziland -26.0333333 31.8500004
|
|
||||||
Hluti, Swaziland -27.2166667 31.6166668
|
|
||||||
Siteki, Swaziland -26.4500000 31.9500008
|
|
||||||
Piggs Peak, Swaziland -25.9666667 31.2500000
|
|
||||||
Lobamba, Swaziland -26.4666667 31.2000008
|
|
||||||
Kwaluseni, Swaziland -26.4833333 31.3333340
|
|
||||||
Bhunya, Swaziland -26.5500000 31.0166664
|
|
||||||
Mhlambanyatsi, Swaziland -26.4500000 31.0166664
|
|
||||||
Hlatikulu, Swaziland -26.9666667 31.3166676
|
|
||||||
Bulembu, Swaziland -25.9666667 31.1333332
|
|
||||||
Kubuta, Swaziland -26.8833333 31.4833336
|
|
||||||
Tshaneni, Swaziland -25.9833333 31.7166672
|
|
||||||
Sidvokodvo, Swaziland -26.6166667 31.4500008
|
|
||||||
Lavumisa, Swaziland -27.3166667 31.8999996
|
|
||||||
Darkton, Swaziland -26.2333333 31.0333328
|
|
||||||
Nsoko, Swaziland -27.0333333 31.9500008
|
|
||||||
Stockholm, Sweden 59.3325765 18.0649033
|
Stockholm, Sweden 59.3325765 18.0649033
|
||||||
Goteborg, Sweden 57.7071623 11.9667931
|
Goteborg, Sweden 57.7071623 11.9667931
|
||||||
Malmoe, Sweden 55.6058691 13.0007315
|
Malmoe, Sweden 55.6058691 13.0007315
|
||||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
@@ -28,7 +28,10 @@ command -v firefox >/dev/null && export BROWSER=firefox
|
|||||||
#export SXMO_SUBREDDITS="postmarketos pinephoneOfficial pinephone unixporn"
|
#export SXMO_SUBREDDITS="postmarketos pinephoneOfficial pinephone unixporn"
|
||||||
|
|
||||||
# Change the default terminal command
|
# Change the default terminal command
|
||||||
# export TERMCMD="st -e"
|
export TERMCMD="sxmo_terminal.sh"
|
||||||
|
|
||||||
|
# Change the used terminal command
|
||||||
|
# export SXMO_TERMINAL="st"
|
||||||
|
|
||||||
# When scrolling past the beginning or end of a menu, wrap it around:
|
# When scrolling past the beginning or end of a menu, wrap it around:
|
||||||
#export DMENU_WRAP_AROUND=1
|
#export DMENU_WRAP_AROUND=1
|
||||||
@@ -65,6 +68,3 @@ export SXMO_RINGNUMBER=10
|
|||||||
|
|
||||||
#Set to the default text for a new text message.
|
#Set to the default text for a new text message.
|
||||||
export SXMO_DEFAULT_DRAFT="Enter new message here."
|
export SXMO_DEFAULT_DRAFT="Enter new message here."
|
||||||
|
|
||||||
#Set background image
|
|
||||||
export SXMO_BG_IMG="$(xdg_data_path sxmo/background.jpg)"
|
|
||||||
|
@@ -20,28 +20,47 @@ set $term sxmo_terminal.sh
|
|||||||
# on the original workspace that the command was run on.
|
# on the original workspace that the command was run on.
|
||||||
set $menu bemenu-run
|
set $menu bemenu-run
|
||||||
|
|
||||||
font "Sxmo 10"
|
font "Sxmo 11"
|
||||||
|
|
||||||
exec_always sxmo_swayinitconf.sh
|
exec_always sxmo_swayinitconf.sh
|
||||||
|
|
||||||
exec_always dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
exec_always dbus-update-activation-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP
|
||||||
|
|
||||||
mode "menu" {
|
mode "menu" {
|
||||||
bindsym --input-device=1:1:1c21800.lradc XF86AudioMute exec nothing # just a placeholder for "menu" mode
|
# This is slower than remapping the keys using a keymap, but we don't need
|
||||||
|
# to know the device names, so use it as a fallback so this functionality
|
||||||
|
# keeps working if a deviceprofile doesn't exist.
|
||||||
|
# TODO: the correct way to do this is to implement custom keybindings in
|
||||||
|
# bemenu & wofi
|
||||||
|
bindsym XF86PowerOff exec wtype -k Return
|
||||||
|
bindsym XF86AudioRaiseVolume exec wtype -k Up
|
||||||
|
bindsym XF86AudioLowerVolume exec wtype -k Down
|
||||||
}
|
}
|
||||||
|
|
||||||
### Key bindings
|
### Key bindings
|
||||||
#
|
#
|
||||||
# Basics:
|
# Basics:
|
||||||
#
|
#
|
||||||
|
input * xkb_options compose:ralt
|
||||||
|
|
||||||
|
# Nokia N900 hardware keyboard
|
||||||
|
input "1:1:TWL4030_Keypad" {
|
||||||
|
xkb_model "nokiarx51"
|
||||||
|
xkb_layout "us"
|
||||||
|
# ralt has special meaning on N900 keyboard so do not use as
|
||||||
|
# compose key
|
||||||
|
xkb_options compose:rwin
|
||||||
|
}
|
||||||
|
|
||||||
# Start a terminal
|
# Start a terminal
|
||||||
bindsym $mod+Return exec $term
|
bindsym $mod+Return exec $term
|
||||||
|
|
||||||
# Launch appmenu
|
# Launch appmenu
|
||||||
bindsym $mod+p exec sxmo_appmenu.sh
|
bindsym $mod+p exec sxmo_appmenu.sh
|
||||||
|
bindsym $mod+Shift+p exec sxmo_appmenu.sh sys
|
||||||
|
|
||||||
# Launch scripts menu
|
# Wm menu switcher
|
||||||
bindsym $mod+i exec sxmo_appmenu.sh scripts
|
bindsym $mod+i exec sxmo_wmmenu.sh windowswitcher
|
||||||
|
|
||||||
# Kill focused window
|
# Kill focused window
|
||||||
bindsym $mod+Shift+q kill
|
bindsym $mod+Shift+q kill
|
||||||
@@ -133,7 +152,7 @@ mode "menu" {
|
|||||||
bindsym $mod+e layout toggle split
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
# Make the current focus fullscreen
|
# Make the current focus fullscreen
|
||||||
# bindsym $mod+f fullscreen
|
bindsym $mod+f fullscreen
|
||||||
|
|
||||||
# Toggle the current focus between tiling and floating mode
|
# Toggle the current focus between tiling and floating mode
|
||||||
bindsym $mod+Shift+space floating toggle
|
bindsym $mod+Shift+space floating toggle
|
||||||
@@ -143,6 +162,13 @@ mode "menu" {
|
|||||||
|
|
||||||
# Move focus to the parent container
|
# Move focus to the parent container
|
||||||
bindsym $mod+a focus parent
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
|
# Manual locker
|
||||||
|
bindsym $mod+g exec sxmo_state.sh set locker
|
||||||
|
|
||||||
|
# Shutdown
|
||||||
|
bindsym $mod+t exec sxmo_appmenu.sh power
|
||||||
|
|
||||||
#
|
#
|
||||||
# Scratchpad:
|
# Scratchpad:
|
||||||
#
|
#
|
||||||
@@ -163,16 +189,16 @@ mode "resize" {
|
|||||||
# right will grow the containers width
|
# right will grow the containers width
|
||||||
# up will shrink the containers height
|
# up will shrink the containers height
|
||||||
# down will grow the containers height
|
# down will grow the containers height
|
||||||
bindsym $left resize shrink width 10px
|
bindsym $left resize shrink width 30px
|
||||||
bindsym $down resize grow height 10px
|
bindsym $down resize grow height 30px
|
||||||
bindsym $up resize shrink height 10px
|
bindsym $up resize shrink height 30px
|
||||||
bindsym $right resize grow width 10px
|
bindsym $right resize grow width 30px
|
||||||
|
|
||||||
# Ditto, with arrow keys
|
# Ditto, with arrow keys
|
||||||
bindsym Left resize shrink width 10px
|
bindsym Left resize shrink width 30px
|
||||||
bindsym Down resize grow height 10px
|
bindsym Down resize grow height 30px
|
||||||
bindsym Up resize shrink height 10px
|
bindsym Up resize shrink height 30px
|
||||||
bindsym Right resize grow width 10px
|
bindsym Right resize grow width 30px
|
||||||
|
|
||||||
# Return to default mode
|
# Return to default mode
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
@@ -196,18 +222,36 @@ bar {
|
|||||||
colors {
|
colors {
|
||||||
statusline #ffffff
|
statusline #ffffff
|
||||||
background #323232
|
background #323232
|
||||||
inactive_workspace #32323200 #32323200 #5c5c5c
|
inactive_workspace #323232 #323232 #ffffff
|
||||||
font "Sxmo"
|
font "Sxmo 11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for_window [app_id="pinentry-.*"] floating true
|
||||||
for_window [app_id="foot" title=".*sxmo/modem/.*/draft.txt.*"] resize set height 25
|
for_window [app_id="foot" title=".*sxmo/modem/.*/draft.txt.*"] resize set height 25
|
||||||
for_window [title="megapixels"] inhibit_idle open
|
for_window [title="megapixels"] inhibit_idle open
|
||||||
|
for_window [title="ep[yr].*"] inhibit_idle visible
|
||||||
|
|
||||||
default_border pixel 3
|
default_border pixel 3
|
||||||
titlebar_border_thickness 3
|
titlebar_border_thickness 3
|
||||||
hide_edge_borders smart
|
hide_edge_borders smart
|
||||||
|
|
||||||
|
# Need playerctl installed and running
|
||||||
|
bindsym XF86AudioPlay exec playerctl play-pause
|
||||||
|
bindsym XF86AudioStop exec playerctl stop
|
||||||
|
bindsym XF86AudioNext exec playerctl next
|
||||||
|
bindsym XF86AudioPrev exec playerctl previous
|
||||||
|
|
||||||
|
bindsym XF86MonBrightnessUp exec sxmo_brightness.sh up
|
||||||
|
bindsym XF86MonBrightnessDown exec sxmo_brightness.sh down
|
||||||
|
|
||||||
|
bindsym Print exec sxmo_screenshot.sh
|
||||||
|
|
||||||
|
bindsym button2 kill
|
||||||
|
|
||||||
|
bindswitch lid:on exec sxmo_wm.sh dpms on
|
||||||
|
bindswitch lid:off exec sxmo_wm.sh dpms off
|
||||||
|
|
||||||
include /etc/sway/config.d/*
|
include /etc/sway/config.d/*
|
||||||
|
|
||||||
exec 'printf %s "$SWAYSOCK" > "$XDG_RUNTIME_DIR"/sxmo.swaysock'
|
exec 'printf %s "$SWAYSOCK" > "$XDG_RUNTIME_DIR"/sxmo.swaysock'
|
||||||
|
10
configs/appcfg/wofi.config
Normal file
10
configs/appcfg/wofi.config
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Space to setup configversion
|
||||||
|
single_click=true
|
||||||
|
dynamic_lines=true
|
||||||
|
line_wrap=word
|
||||||
|
width=80%
|
||||||
|
height=60%
|
||||||
|
allow_images=true
|
||||||
|
allow_markup=true
|
||||||
|
show=dmenu
|
||||||
|
no_actions=true
|
46
configs/appcfg/wofi.css
Normal file
46
configs/appcfg/wofi.css
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/* Space to setup configversion */
|
||||||
|
window {
|
||||||
|
margin: 5px;
|
||||||
|
border: 3px solid #005577;
|
||||||
|
background-color: #222222;
|
||||||
|
font-family: Sxmo;
|
||||||
|
font-size: 14pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
#input {
|
||||||
|
margin: 5px;
|
||||||
|
border: 2px solid #005577;
|
||||||
|
background-color: #444444;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inner-box {
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#outer-box {
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scroll {
|
||||||
|
color: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
#text {
|
||||||
|
margin: 5px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#img {
|
||||||
|
padding-right: 25px;
|
||||||
|
}
|
||||||
|
#entry {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
#entry:selected {
|
||||||
|
background-color: #005577;
|
||||||
|
}
|
||||||
|
#entry #entry {
|
||||||
|
background-color: #444444;
|
||||||
|
}
|
3
configs/appcfg/xob_styles.cfg
Normal file → Executable file
3
configs/appcfg/xob_styles.cfg
Normal file → Executable file
@@ -1,7 +1,8 @@
|
|||||||
# Space to setup configversion
|
# Space to setup configversion
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
x = {relative = 0.5; offset = 0;};
|
x = {relative = 0.5; offset = 0;};
|
||||||
y = {relative = 0.15; offset = 0;};
|
y = {relative = 0.05; offset = 0;};
|
||||||
length = {relative = 0.75; offset = 0;};
|
length = {relative = 0.75; offset = 0;};
|
||||||
thickness = 50;
|
thickness = 50;
|
||||||
outline = 3;
|
outline = 3;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=sxiv Image Viewer
|
Name=nsxiv Image Viewer
|
||||||
Exec=sxiv
|
Exec=nsxiv
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
MimeType=image/jpeg;image/png;image/gif
|
MimeType=image/jpeg;image/png;image/gif
|
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
# Copyright 2022 Sxmo Contributors
|
|
||||||
|
|
||||||
sxmo_wakelock.sh lock not_screenoff infinite
|
|
||||||
|
|
||||||
# Go to locker after 5 minutes of inactivity
|
|
||||||
if [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
|
|
||||||
sxmo_daemons.sh stop idle_locker
|
|
||||||
else
|
|
||||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
|
||||||
timeout 300 'sxmo_hook_locker.sh'
|
|
||||||
fi
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1,299 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
# Copyright 2022 Sxmo Contributors
|
|
||||||
|
|
||||||
# This script handles input actions, it is called by lisgd for gestures
|
|
||||||
# and by dwm for button presses
|
|
||||||
|
|
||||||
ACTION="$1"
|
|
||||||
|
|
||||||
# include common definitions
|
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
|
||||||
. sxmo_common.sh
|
|
||||||
|
|
||||||
XPROPOUT="$(sxmo_wm.sh focusedwindow)"
|
|
||||||
WMCLASS="$(printf %s "$XPROPOUT" | grep app: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')"
|
|
||||||
WMNAME="$(printf %s "$XPROPOUT" | grep title: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')"
|
|
||||||
|
|
||||||
sxmo_debug "ACTION: $ACTION WMNAME: $WMNAME WMCLASS: $WMCLASS XPROPOUT: $XPROPOUT"
|
|
||||||
|
|
||||||
#special context-sensitive handling
|
|
||||||
case "$WMCLASS" in
|
|
||||||
*"mpv"*)
|
|
||||||
case "$ACTION" in
|
|
||||||
"oneright")
|
|
||||||
sxmo_type.sh -k Left
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"oneleft")
|
|
||||||
sxmo_type.sh -k Right
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"oneup")
|
|
||||||
sxmo_type.sh m
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"onedown")
|
|
||||||
sxmo_type.sh p
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*"foot"*|*"st"*)
|
|
||||||
# First we try to handle the app running inside st:
|
|
||||||
case "$WMNAME" in
|
|
||||||
*"weechat"*)
|
|
||||||
case "$ACTION" in
|
|
||||||
*"oneleft")
|
|
||||||
sxmo_type.sh -M Alt -k a
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneright")
|
|
||||||
sxmo_type.sh -M Alt -k less
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneup")
|
|
||||||
sxmo_type.sh -k Page_Down
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"onedown")
|
|
||||||
sxmo_type.sh -k Page_Up
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*" sms")
|
|
||||||
case "$ACTION" in
|
|
||||||
*"upbottomedge")
|
|
||||||
number="$(printf %s "$WMNAME" | sed -e 's|^\"||' -e 's|\"$||' | cut -f1 -d' ')"
|
|
||||||
sxmo_terminal.sh sxmo_modemtext.sh conversationloop "$number" &
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*"tuir"*)
|
|
||||||
if [ "$ACTION" = "rightbottomedge" ]; then
|
|
||||||
sxmo_type.sh o
|
|
||||||
exit 0
|
|
||||||
elif [ "$ACTION" = "leftbottomedge" ]; then
|
|
||||||
sxmo_type.sh s
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*"less"*)
|
|
||||||
case "$ACTION" in
|
|
||||||
"leftbottomedge")
|
|
||||||
sxmo_type.sh q
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"leftrightedge_short")
|
|
||||||
sxmo_type.sh q
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"onedown")
|
|
||||||
sxmo_type.sh u
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneup")
|
|
||||||
sxmo_type.sh d
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneleft")
|
|
||||||
sxmo_type.sh ":n" -k Return
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneright")
|
|
||||||
sxmo_type.sh ":p" -k Return
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*"amfora"*)
|
|
||||||
case "$ACTION" in
|
|
||||||
"downright")
|
|
||||||
sxmo_type.sh -k Tab
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"upleft")
|
|
||||||
sxmo_type.sh -M Shift -k Tab
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"onedown")
|
|
||||||
sxmo_type.sh u
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneup")
|
|
||||||
sxmo_type.sh d
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneright")
|
|
||||||
sxmo_type.sh -k Return
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"upright")
|
|
||||||
sxmo_type.sh -M Ctrl t
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneleft")
|
|
||||||
sxmo_type.sh b
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"downleft")
|
|
||||||
sxmo_type.sh -M Ctrl w
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
# Now we try generic actions for terminal
|
|
||||||
case "$ACTION" in
|
|
||||||
*"onedown")
|
|
||||||
case "$WMCLASS" in
|
|
||||||
*"foot"*)
|
|
||||||
sxmo_type.sh -M Shift -k Page_Up
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"st"*)
|
|
||||||
sxmo_type.sh -M Ctrl -M Shift -k b
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*"oneup")
|
|
||||||
case "$WMCLASS" in
|
|
||||||
*"foot"*)
|
|
||||||
sxmo_type.sh -M Shift -k Page_Down
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"st"*)
|
|
||||||
sxmo_type.sh -M Ctrl -M Shift -k f
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
esac
|
|
||||||
|
|
||||||
#standard handling
|
|
||||||
case "$ACTION" in
|
|
||||||
"powerbutton_one")
|
|
||||||
if echo "$WMCLASS" | grep -i "megapixels"; then
|
|
||||||
sxmo_type.sh -k space
|
|
||||||
fi
|
|
||||||
# swallow: postwake calls sxmo_hook_unlock.sh
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"powerbutton_two")
|
|
||||||
sxmo_keyboard.sh toggle
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"powerbutton_three")
|
|
||||||
sxmo_killwindow.sh
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"rightleftedge")
|
|
||||||
sxmo_wm.sh previousworkspace
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"leftrightedge")
|
|
||||||
sxmo_wm.sh nextworkspace
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"twoleft")
|
|
||||||
sxmo_wm.sh movepreviousworkspace
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"tworight")
|
|
||||||
sxmo_wm.sh movenextworkspace
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"righttopedge")
|
|
||||||
sxmo_brightness.sh up
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"lefttopedge")
|
|
||||||
sxmo_brightness.sh down
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"upleftedge")
|
|
||||||
sxmo_audio.sh vol up
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"downleftedge")
|
|
||||||
sxmo_audio.sh vol down
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"upbottomedge")
|
|
||||||
sxmo_keyboard.sh open
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"downbottomedge")
|
|
||||||
sxmo_keyboard.sh close
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"downtopedge")
|
|
||||||
sxmo_dmenu.sh isopen || sxmo_appmenu.sh &
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"twodowntopedge")
|
|
||||||
sxmo_dmenu.sh isopen || sxmo_appmenu.sh sys &
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"uptopedge")
|
|
||||||
sxmo_dmenu.sh close
|
|
||||||
if pgrep mako >/dev/null; then
|
|
||||||
makoctl dismiss --all
|
|
||||||
elif pgrep dunst >/dev/null; then
|
|
||||||
dunstctl close-all
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"twodownbottomedge")
|
|
||||||
sxmo_killwindow.sh
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"uprightedge")
|
|
||||||
sxmo_type.sh -k Up
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"downrightedge")
|
|
||||||
sxmo_type.sh -k Down
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"leftrightedge_short")
|
|
||||||
sxmo_type.sh -k Left
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"rightrightedge_short")
|
|
||||||
sxmo_type.sh -k Right
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"rightbottomedge")
|
|
||||||
sxmo_type.sh -k Return
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"leftbottomedge")
|
|
||||||
sxmo_type.sh -k BackSpace
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"topleftcorner")
|
|
||||||
sxmo_appmenu.sh sys &
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"toprightcorner")
|
|
||||||
sxmo_appmenu.sh scripts &
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"bottomleftcorner")
|
|
||||||
# could go into suspend? leaving blank for now.
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"bottomrightcorner")
|
|
||||||
if [ "$(sxmo_rotate.sh isrotated)" = "right" ]; then
|
|
||||||
sxmo_rotate.sh rotinvert
|
|
||||||
else
|
|
||||||
sxmo_rotate.sh rotright
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
@@ -1,28 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
# Copyright 2022 Sxmo Contributors
|
|
||||||
|
|
||||||
# This hook is called when the system becomes unlocked again
|
|
||||||
|
|
||||||
# include common definitions
|
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
|
||||||
. sxmo_common.sh
|
|
||||||
|
|
||||||
sxmo_log "transitioning to stage unlock"
|
|
||||||
printf unlock > "$SXMO_STATE"
|
|
||||||
|
|
||||||
sxmo_wakelock.sh lock stay_awake "${SXMO_UNLOCK_IDLE_TIME:-120}s"
|
|
||||||
|
|
||||||
sxmo_hook_statusbar.sh state_change &
|
|
||||||
|
|
||||||
sxmo_wm.sh dpms off
|
|
||||||
sxmo_wm.sh inputevent touchscreen on
|
|
||||||
sxmo_wm.sh inputevent stylus on
|
|
||||||
superctl start sxmo_hook_lisgd
|
|
||||||
|
|
||||||
# suspend after if no activity after 120s
|
|
||||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
|
||||||
timeout "1" '' \
|
|
||||||
resume "sxmo_wakelock.sh lock stay_awake \"${SXMO_UNLOCK_IDLE_TIME:-120}s\""
|
|
||||||
|
|
||||||
wait
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen/
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
one_button_e_reader
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen/
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
three_button_touchscreen
|
|
5
configs/default_hooks/sxmo_hook_after_call.sh
Normal file
5
configs/default_hooks/sxmo_hook_after_call.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script is executed after the last call finished
|
||||||
|
|
||||||
|
sxmo_playerctl.sh resume_all
|
@@ -21,95 +21,159 @@ write_line_app() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
write_line_app jami-qt "$icon_msg Jami" "jami-qt"
|
write_line_app jami-qt "$icon_msg Jami" "jami-qt"
|
||||||
|
[ -n "$PLAN9" ] && write_line_app acme "$icon_edt Acme" "acme -c 1 -f $PLAN9/font/pelm/ascii.16.font"
|
||||||
|
write_line_app adventure "$icon_trm Adventure" "sxmo_terminal.sh adventure"
|
||||||
write_line_app aerc "$icon_eml Aerc" "sxmo_terminal.sh aerc"
|
write_line_app aerc "$icon_eml Aerc" "sxmo_terminal.sh aerc"
|
||||||
write_line_app geary "$icon_eml Geary" "geary"
|
write_line_app alacritty "$icon_trm Alacritty" "alacritty"
|
||||||
|
write_line_app amberol "$icon_mus Amberol" "amberol $XDG_MUSIC_DIR"
|
||||||
|
write_line_app harbour-amazfish-ui "$icon_wat Amazfish" "harbour-amazfish-ui"
|
||||||
write_line_app amfora "$icon_glb Amfora" "sxmo_terminal.sh amfora"
|
write_line_app amfora "$icon_glb Amfora" "sxmo_terminal.sh amfora"
|
||||||
|
write_line_app angelfish "$icon_glb Angelfish" "angelfish"
|
||||||
|
write_line_app animatch "$icon_gam Animatch" "animatch"
|
||||||
write_line_app alpine "$icon_eml Alpine" "sxmo_terminal.sh alpine"
|
write_line_app alpine "$icon_eml Alpine" "sxmo_terminal.sh alpine"
|
||||||
write_line_app anbox-launch "$icon_and Anbox" "anbox"
|
write_line_app anbox-launch "$icon_and Anbox" "anbox"
|
||||||
write_line_app anki "$icon_str Anki" "anki"
|
write_line_app anki "$icon_str Anki" "anki"
|
||||||
write_line_app audacity "$icon_mic Audacity" "audacity"
|
write_line_app audacity "$icon_mic Audacity" "audacity"
|
||||||
|
write_line_app badwolf "$icon_glb Badwolf" "badwolf"
|
||||||
write_line_app gnome-calculator "$icon_clc Calculator" "gnome-calculator"
|
write_line_app gnome-calculator "$icon_clc Calculator" "gnome-calculator"
|
||||||
write_line_app calcurse "$icon_clk Calcurse" "sxmo_terminal.sh calcurse"
|
write_line_app calcurse "$icon_clk Calcurse" "sxmo_terminal.sh calcurse"
|
||||||
|
write_line_app chatty "$icon_msg Chatty" "chatty"
|
||||||
|
([ "$SXMO_WM" = dwm ] && command -v clipmenu >/dev/null) && \
|
||||||
|
write_line_app clipmenu "$icon_bok Clipmenu" "clipmenu"
|
||||||
write_line_app cmus "$icon_mus Cmus" "sxmo_terminal.sh cmus"
|
write_line_app cmus "$icon_mus Cmus" "sxmo_terminal.sh cmus"
|
||||||
|
write_line_app com.github.geigi.cozy "$icon_mus Cozy" "com.github.geigi.cozy"
|
||||||
|
write_line_app cpupower-gui "$icon_cfg Cpupower-gui" "cpupower-gui"
|
||||||
write_line_app dino "$icon_msg Dino" "GDK_SCALE=1 dino"
|
write_line_app dino "$icon_msg Dino" "GDK_SCALE=1 dino"
|
||||||
write_line_app dolphin "$icon_dir Dolphin" "dolphin"
|
write_line_app dolphin "$icon_dir Dolphin" "dolphin"
|
||||||
|
write_line_app eartag "$icon_mus Eartag" "eartag"
|
||||||
|
write_line_app elinks "$icon_glb ELinks" "sxmo_terminal.sh elinks"
|
||||||
write_line_app emacs "$icon_edt Emacs (Terminal)" "sxmo_terminal.sh emacs -nw"
|
write_line_app emacs "$icon_edt Emacs (Terminal)" "sxmo_terminal.sh emacs -nw"
|
||||||
write_line_app emacs "$icon_edt Emacs (X)" "emacs"
|
write_line_app emacs "$icon_edt Emacs (X)" "emacs"
|
||||||
|
write_line_app eog "$icon_img Eye of Gnome" "eog"
|
||||||
write_line_app epiphany "$icon_glb Epiphany" "epiphany"
|
write_line_app epiphany "$icon_glb Epiphany" "epiphany"
|
||||||
write_line_app epy "$icon_bok Epy" "sxmo_terminal.sh epy"
|
write_line_app epy "$icon_bok Epy" "sxmo_terminal.sh epy"
|
||||||
|
write_line_app epr "$icon_bok Epr" "sxmo_terminal.sh epr"
|
||||||
write_line_app evince "$icon_bok Evince" "evince"
|
write_line_app evince "$icon_bok Evince" "evince"
|
||||||
write_line_app falkon "$icon_flk Falkon" "falkon"
|
write_line_app falkon "$icon_flk Falkon" "falkon"
|
||||||
write_line_app firefox "$icon_ffx Firefox" "firefox"
|
write_line_app firefox "$icon_ffx Firefox" "firefox"
|
||||||
write_line_app firefox-esr "$icon_ffx Firefox ESR" "firefox-esr"
|
write_line_app firefox-esr "$icon_ffx Firefox ESR" "firefox-esr"
|
||||||
|
write_line_app flare "$icon_msg Flare" "flare"
|
||||||
write_line_app foliate "$icon_bok Foliate" "foliate"
|
write_line_app foliate "$icon_bok Foliate" "foliate"
|
||||||
( [ "$SXMO_WM" = sway ] && command -v foot >/dev/null) && \
|
( [ "$SXMO_WM" = sway ] && command -v foot >/dev/null) && \
|
||||||
write_line "$icon_trm Foot" "foot $SHELL"
|
write_line "$icon_trm Foot" "foot $SHELL"
|
||||||
write_line_app foxtrotgps "$icon_gps Foxtrotgps" "foxtrotgps"
|
write_line_app foxtrotgps "$icon_gps Foxtrotgps" "foxtrotgps"
|
||||||
|
write_line_app fractal "$icon_msg Fractal" "fractal"
|
||||||
|
write_line_app g4music "$icon_mus G4Music" "g4music"
|
||||||
write_line_app geany "$icon_eml Geany" "geany"
|
write_line_app geany "$icon_eml Geany" "geany"
|
||||||
|
write_line_app geary "$icon_eml Geary" "geary"
|
||||||
write_line_app gedit "$icon_edt Gedit" "gedit"
|
write_line_app gedit "$icon_edt Gedit" "gedit"
|
||||||
write_line_app geeqie "$icon_img Geeqie" "geeqie"
|
write_line_app geeqie "$icon_img Geeqie" "geeqie"
|
||||||
write_line_app geopard "$icon_glb Geopard" "geopard"
|
write_line_app geopard "$icon_glb Geopard" "geopard"
|
||||||
write_line_app gerbil "$icon_glb Gerbil" "gerbil"
|
write_line_app gerbil "$icon_glb Gerbil" "gerbil"
|
||||||
write_line_app giara "$icon_red Giara" "giara"
|
write_line_app giara "$icon_red Giara" "giara"
|
||||||
|
write_line_app gnome-2048 "$icon_mvi Gnome-2048" "gnome-2048"
|
||||||
write_line_app gnome-chess "$icon_chs Gnome Chess" "gnome-chess"
|
write_line_app gnome-chess "$icon_chs Gnome Chess" "gnome-chess"
|
||||||
|
write_line_app gnome-firmware "$icon_cfg Gnome Firmware" "gnome-firmware"
|
||||||
|
write_line_app gnome-weather "$icon_wtr Gnome Weather" "gnome-weather"
|
||||||
|
write_line_app gnome-disks "$icon_cfg Gnome Disks" "gnome-disks"
|
||||||
write_line_app gomuks "$icon_msg Gomuks" "sxmo_terminal.sh gomuks"
|
write_line_app gomuks "$icon_msg Gomuks" "sxmo_terminal.sh gomuks"
|
||||||
write_line_app gpodder "$icon_rss gPodder" "gpodder"
|
write_line_app gpodder "$icon_rss gPodder" "gpodder"
|
||||||
write_line_app gucharmap "$icon_inf Gucharmap" "gucharmap"
|
write_line_app gucharmap "$icon_inf Gucharmap" "gucharmap"
|
||||||
write_line_app hexchat "$icon_msg Hexchat" "hexchat"
|
write_line_app hexchat "$icon_msg Hexchat" "hexchat"
|
||||||
write_line_app htop "$icon_cfg Htop" "sxmo_terminal.sh htop"
|
write_line_app htop "$icon_cfg Htop" "sxmo_terminal.sh htop"
|
||||||
|
write_line_app iamb "$icon_msg Iamb" "sxmo_terminal.sh iamb"
|
||||||
write_line_app irssi "$icon_msg Irssi" "sxmo_terminal.sh irssi"
|
write_line_app irssi "$icon_msg Irssi" "sxmo_terminal.sh irssi"
|
||||||
write_line_app ii "$icon_msg Ii" "sxmo_terminal.sh ii"
|
write_line_app ii "$icon_msg Ii" "sxmo_terminal.sh ii"
|
||||||
write_line_app ipython "$icon_trm IPython" "sxmo_terminal.sh ipython"
|
write_line_app ipython "$icon_trm IPython" "sxmo_terminal.sh ipython"
|
||||||
|
write_line_app index "$icon_dir Index" "index"
|
||||||
|
write_line_app itinerary "$icon_map Itinerary" "itinerary"
|
||||||
write_line_app kasts "$icon_rss Kasts" "kasts"
|
write_line_app kasts "$icon_rss Kasts" "kasts"
|
||||||
|
write_line_app kcalc "$icon_clc KCalc" "kcalc"
|
||||||
write_line_app kmail "$icon_eml KMail" "kmail"
|
write_line_app kmail "$icon_eml KMail" "kmail"
|
||||||
|
write_line_app komikku "$icon_bok Komikku" "komikku"
|
||||||
write_line_app kontact "$icon_msg Kontact" "kontact"
|
write_line_app kontact "$icon_msg Kontact" "kontact"
|
||||||
write_line_app konversation "$icon_msg Konversation" "konversation"
|
write_line_app konversation "$icon_msg Konversation" "konversation"
|
||||||
|
write_line_app koreader "$icon_bok KOReader" "koreader"
|
||||||
|
write_line_app krita "$icon_img Krita" "krita --nosplash"
|
||||||
write_line_app kwrite "$icon_edt Kwrite" "kwrite"
|
write_line_app kwrite "$icon_edt Kwrite" "kwrite"
|
||||||
write_line_app lagrange "$icon_glb Lagrange" "lagrange"
|
write_line_app lagrange "$icon_glb Lagrange" "lagrange"
|
||||||
write_line_app lf "$icon_dir Lf" "sxmo_terminal.sh lf"
|
write_line_app lf "$icon_dir Lf" "sxmo_terminal.sh lf"
|
||||||
|
write_line_app librewolf "$icon_glb Librewolf" "librewolf"
|
||||||
|
write_line_app links "$icon_glb Links" "sxmo_terminal.sh links"
|
||||||
|
write_line_app links "$icon_glb Links (GUI)" "links -g"
|
||||||
write_line_app lollypop "$icon_mus Lollypop" "lollypop"
|
write_line_app lollypop "$icon_mus Lollypop" "lollypop"
|
||||||
|
write_line_app lpa-gtk "$icon_sim Lpa Gtk" "lpa-gtk"
|
||||||
write_line_app luakit "$icon_glb Luakit" "luakit"
|
write_line_app luakit "$icon_glb Luakit" "luakit"
|
||||||
write_line_app marble "$icon_map Marble" "marble"
|
write_line_app marble "$icon_map Marble" "marble"
|
||||||
|
write_line_app gnome-maps "$icon_map Maps" "gnome-maps"
|
||||||
|
write_line_app megapixels "$icon_cam Megapixels" "megapixels"
|
||||||
|
write_line_app mepo "$icon_map Mepo" "mepo"
|
||||||
|
write_line_app metronome "$icon_mtr Metronome" "metronome"
|
||||||
write_line_app micro "$icon_edt Micro" "sxmo_terminal.sh micro"
|
write_line_app micro "$icon_edt Micro" "sxmo_terminal.sh micro"
|
||||||
write_line_app midori "$icon_glb Midori" "midori"
|
write_line_app midori "$icon_glb Midori" "midori"
|
||||||
|
write_line_app moment "$icon_msg Moment" "moment"
|
||||||
|
write_line_app mupdf "$icon_bok Mupdf" "mupdf"
|
||||||
|
write_line_app mupdf-gl "$icon_bok Mupdf-gl" "mupdf-gl"
|
||||||
write_line_app mutt "$icon_eml Mutt" "sxmo_terminal.sh mutt"
|
write_line_app mutt "$icon_eml Mutt" "sxmo_terminal.sh mutt"
|
||||||
|
write_line_app mumble "$icon_grp Mumble" mumble
|
||||||
write_line_app nano "$icon_edt Nano" "sxmo_terminal.sh nano"
|
write_line_app nano "$icon_edt Nano" "sxmo_terminal.sh nano"
|
||||||
|
write_line_app nautilus "$icon_dir Nautilus" "nautilus"
|
||||||
write_line_app navit "$icon_gps Navit" "navit"
|
write_line_app navit "$icon_gps Navit" "navit"
|
||||||
write_line_app ncmpcpp "$icon_mus Ncmpcpp" "sxmo_terminal.sh ncmpcpp"
|
write_line_app ncmpcpp "$icon_mus Ncmpcpp" "sxmo_terminal.sh ncmpcpp"
|
||||||
write_line_app neomutt "$icon_eml Neomutt" "sxmo_terminal.sh neomutt"
|
write_line_app neomutt "$icon_eml Neomutt" "sxmo_terminal.sh neomutt"
|
||||||
|
write_line_app nethack "$icon_trm Nethack" "sxmo_terminal.sh nethack"
|
||||||
write_line_app nheko "$icon_msg Nheko" "nheko"
|
write_line_app nheko "$icon_msg Nheko" "nheko"
|
||||||
write_line_app nvim "$icon_vim Neovim" "sxmo_terminal.sh nvim"
|
write_line_app nvim "$icon_nvi Neovim" "sxmo_terminal.sh nvim"
|
||||||
write_line_app netsurf "$icon_glb Netsurf" "netsurf"
|
write_line_app netsurf "$icon_glb Netsurf" "netsurf"
|
||||||
write_line_app newsboat "$icon_rss Newsboat" "sxmo_terminal.sh newsboat"
|
write_line_app newsboat "$icon_rss Newsboat" "sxmo_terminal.sh newsboat"
|
||||||
write_line_app com.gitlab.newsflash "$icon_rss Newsflash" com.gitlab.newsflash
|
write_line_app com.gitlab.newsflash "$icon_rss Newsflash" com.gitlab.newsflash
|
||||||
|
write_line_app newsraft "$icon_rss Newsraft" "sxmo_terminal.sh newsraft"
|
||||||
write_line_app nnn "$icon_dir Nnn" "sxmo_terminal.sh nnn"
|
write_line_app nnn "$icon_dir Nnn" "sxmo_terminal.sh nnn"
|
||||||
|
write_line_app numberstation "$icon_clc Numberstation" "numberstation"
|
||||||
|
write_line_app nyxt "$icon_glb Nyxt" "nyxt"
|
||||||
|
write_line_app offpunk "$icon_glb Offpunk" "sxmo_terminal.sh offpunk"
|
||||||
|
write_line_app osmin "$icon_map Osmin" "osmin"
|
||||||
|
write_line_app papers "$icon_bok Papers" "papers"
|
||||||
|
write_line_app pavucontrol "$icon_mus Pavucontrol" "pavucontrol"
|
||||||
write_line_app pidgin "$icon_msg Pidgin" "pidgin"
|
write_line_app pidgin "$icon_msg Pidgin" "pidgin"
|
||||||
write_line_app pulsemixer "$icon_mus Pulsemixer" "sxmo_terminal.sh pulsemixer"
|
|
||||||
write_line_app pure-maps "$icon_map Pure-Maps" "pure-maps"
|
|
||||||
write_line_app mepo "$icon_map mepo" "mepo"
|
|
||||||
write_line_app podboat "$icon_rss Podboat" "sxmo_terminal.sh podboat"
|
write_line_app podboat "$icon_rss Podboat" "sxmo_terminal.sh podboat"
|
||||||
|
write_line_app dev.tchx84.Portfolio "$icon_dir Portfolio" "dev.tchx84.Portfolio"
|
||||||
write_line_app profanity "$icon_msg Profanity" "sxmo_terminal.sh profanity"
|
write_line_app profanity "$icon_msg Profanity" "sxmo_terminal.sh profanity"
|
||||||
|
write_line_app pulsemixer "$icon_mus Pulsemixer" "sxmo_terminal.sh pulsemixer"
|
||||||
|
write_line_app pure-maps "$icon_map Pure Maps" "pure-maps"
|
||||||
|
write_line_app qalc "$icon_clc Qalc" "sxmo_terminal.sh qalc"
|
||||||
write_line_app qutebrowser "$icon_glb Qutebrowser" "qutebrowser"
|
write_line_app qutebrowser "$icon_glb Qutebrowser" "qutebrowser"
|
||||||
write_line_app ranger "$icon_dir Ranger" "sxmo_terminal.sh ranger"
|
write_line_app ranger "$icon_dir Ranger" "sxmo_terminal.sh ranger"
|
||||||
write_line_app sacc "$icon_glb Sacc" "sxmo_terminal.sh sacc i-logout.cz/1/bongusta"
|
write_line_app sacc "$icon_glb Sacc" "sxmo_terminal.sh sacc i-logout.cz/1/bongusta"
|
||||||
write_line_app secrets "$icon_lck Secrets" "secrets"
|
write_line_app secrets "$icon_lck Secrets" "secrets"
|
||||||
|
write_line_app screen "$icon_msg Screen" "sxmo_terminal.sh screen"
|
||||||
|
write_line_app seahorse "$icon_key Seahorse" "seahorse"
|
||||||
write_line_app senpai "$icon_msg Senpai" "sxmo_terminal.sh senpai"
|
write_line_app senpai "$icon_msg Senpai" "sxmo_terminal.sh senpai"
|
||||||
write_line_app sic "$icon_msg Sic" "sxmo_terminal.sh sic"
|
write_line_app sic "$icon_msg Sic" "sxmo_terminal.sh sic"
|
||||||
|
write_line_app siglo "$icon_clk Siglo" "siglo"
|
||||||
|
write_line_app simple-scan "$icon_scn Simple Scan" "simple-scan"
|
||||||
|
write_line_app snapshot "$icon_cam Snapshot" "snapshot"
|
||||||
([ "$SXMO_WM" = dwm ] && command -v st >/dev/null) && \
|
([ "$SXMO_WM" = dwm ] && command -v st >/dev/null) && \
|
||||||
write_line "$icon_trm St" "st -e $SHELL"
|
write_line "$icon_trm St" "st -e $SHELL"
|
||||||
write_line_app surf "$icon_glb Surf" "surf"
|
write_line_app surf "$icon_glb Surf" "surf"
|
||||||
write_line_app syncthing "$icon_rld Syncthing" "syncthing"
|
write_line_app syncthing "$icon_rld Syncthing" "syncthing"
|
||||||
|
write_line_app syncthing-gtk "$icon_rld Syncthing GTK" "syncthing-gtk"
|
||||||
|
([ "$SXMO_WM" = dwm ] && command -v tabbed >/dev/null) && \
|
||||||
|
write_line_app tabbed "$icon_grd Tabbed" "sxmo_tabbed.sh"
|
||||||
write_line_app telegram-desktop "$icon_tgm Telegram" "telegram-desktop"
|
write_line_app telegram-desktop "$icon_tgm Telegram" "telegram-desktop"
|
||||||
write_line_app termite "$icon_trm Termite" "termite -e $SHELL"
|
write_line_app termite "$icon_trm Termite" "termite -e $SHELL"
|
||||||
write_line_app thunar "$icon_dir Thunar" "sxmo_terminal.sh thunar"
|
write_line_app thunar "$icon_dir Thunar" "sxmo_terminal.sh thunar"
|
||||||
write_line_app thunderbird "$icon_eml Thunderbird" "thunderbird"
|
write_line_app thunderbird "$icon_eml Thunderbird" "thunderbird"
|
||||||
|
write_line_app tilix "$icon_trm Tilix" "tilix"
|
||||||
write_line_app com.github.bleakgrey.tootle "$icon_msg Tootle" "com.github.bleakgrey.tootle"
|
write_line_app com.github.bleakgrey.tootle "$icon_msg Tootle" "com.github.bleakgrey.tootle"
|
||||||
|
write_line_app re.sonny.Tangram "$icon_glb Tangram" "re.sonny.Tangram"
|
||||||
write_line_app totem "$icon_mvi Totem" "totem"
|
write_line_app totem "$icon_mvi Totem" "totem"
|
||||||
|
write_line_app dev.geopjr.Tuba "$icon_msg Tuba" "dev.geopjr.Tuba"
|
||||||
write_line_app tuir "$icon_red Tuir" "sxmo_terminal.sh tuir"
|
write_line_app tuir "$icon_red Tuir" "sxmo_terminal.sh tuir"
|
||||||
write_line_app tut "$icon_msg Tut" "sxmo_terminal.sh tut"
|
write_line_app tut "$icon_msg Tut" "sxmo_terminal.sh tut"
|
||||||
write_line_app waydroid "$icon_and Waydroid" "waydroid show-full-ui"
|
write_line_app waydroid "$icon_and Waydroid" "waydroid show-full-ui"
|
||||||
write_line_app weechat "$icon_msg Weechat" "sxmo_terminal.sh weechat"
|
write_line_app weechat "$icon_msg Weechat" "sxmo_terminal.sh weechat"
|
||||||
write_line_app pavucontrol "$icon_mus Pavucontrol" "pavucontrol"
|
write_line_app wike "$icon_bok Wike" "wike"
|
||||||
write_line_app w3m "$icon_glb W3m" "sxmo_terminal.sh w3m duck.com"
|
write_line_app w3m "$icon_glb W3m" "sxmo_terminal.sh w3m duck.com"
|
||||||
write_line_app vim "$icon_vim Vim" "sxmo_terminal.sh vim"
|
write_line_app vim "$icon_vim Vim" "sxmo_terminal.sh vim"
|
||||||
write_line_app vimb "$icon_glb Vimb" "vimb"
|
write_line_app vimb "$icon_glb Vimb" "vimb"
|
||||||
@@ -119,7 +183,7 @@ write_line_app vte-2.91 "$icon_trm VTE 3" "vte-2.91"
|
|||||||
write_line_app vte-2.91-gtk4 "$icon_trm VTE 3 (GTK-4)" "vte-2.91-gtk4"
|
write_line_app vte-2.91-gtk4 "$icon_trm VTE 3 (GTK-4)" "vte-2.91-gtk4"
|
||||||
([ "$SXMO_WM" = dwm ] && command -v xcalc >/dev/null) && \
|
([ "$SXMO_WM" = dwm ] && command -v xcalc >/dev/null) && \
|
||||||
write_line "$icon_clc Xcalc" "xcalc"
|
write_line "$icon_clc Xcalc" "xcalc"
|
||||||
|
write_line_app xfce4-terminal "$icon_trm XFCE4 Terminal" "xfce4-terminal"
|
||||||
write_line_app xournal "$icon_bok Xournal" "xournal"
|
write_line_app xournal "$icon_bok Xournal" "xournal"
|
||||||
write_line_app xournalpp "$icon_bok Xournalpp" "xournalpp"
|
write_line_app xournalpp "$icon_bok Xournalpp" "xournalpp"
|
||||||
write_line_app zathura "$icon_bok Zathura" "zathura"
|
write_line_app zathura "$icon_bok Zathura" "zathura"
|
||||||
write_line_app j4-dmenu-desktop "$icon_grd All apps" "j4-dmenu-desktop --dmenu=sxmo_dmenu.sh --term=sxmo_terminal.sh"
|
|
||||||
|
51
configs/default_hooks/sxmo_hook_battery.sh
Executable file
51
configs/default_hooks/sxmo_hook_battery.sh
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
load_data() {
|
||||||
|
data="$(upower -i "$1" | grep . | sed -e 's|^ \+||' -e 's|: \+|:|')"
|
||||||
|
type="$(printf "%b" "$data" | grep -m1 -v : | sed -e 's|^ \+||')"
|
||||||
|
}
|
||||||
|
|
||||||
|
data_get() {
|
||||||
|
printf "%b" "$data" | grep "^$1:" | cut -d: -f2
|
||||||
|
}
|
||||||
|
|
||||||
|
SET_LED_PATH="$XDG_RUNTIME_DIR/sxmo_hook_battery_set_led"
|
||||||
|
|
||||||
|
device_changed() {
|
||||||
|
name="$(data_get "native-path")"
|
||||||
|
state="$(data_get "state")"
|
||||||
|
percentage="$(data_get "percentage" | cut -d% -f1)"
|
||||||
|
|
||||||
|
if [ -z "$name" ] || [ -z "$state" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$state" = unknown ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$percentage" -lt 25 ] && [ ! -f "$SET_LED_PATH" ]; then
|
||||||
|
touch "$SET_LED_PATH"
|
||||||
|
sxmo_led.sh set red 100
|
||||||
|
elif [ -f "$SET_LED_PATH" ]; then
|
||||||
|
rm "$SET_LED_PATH"
|
||||||
|
sxmo_led.sh set red 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
sxmo_hook_statusbar.sh battery "$name" "$state" "$percentage"
|
||||||
|
}
|
||||||
|
|
||||||
|
object="$1"
|
||||||
|
event="$2"
|
||||||
|
|
||||||
|
load_data "$object"
|
||||||
|
|
||||||
|
if [ "$type" != "battery" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$event" in
|
||||||
|
"device changed")
|
||||||
|
device_changed "$object"
|
||||||
|
;;
|
||||||
|
esac
|
8
configs/default_hooks/sxmo_hook_block_call.sh
Executable file
8
configs/default_hooks/sxmo_hook_block_call.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This hook is executed to check if a call should be blocked
|
||||||
|
# If the hook return 0 the call will be blocked
|
||||||
|
|
||||||
|
INCOMINGNUMBER="$1"
|
||||||
|
|
||||||
|
cut -f1 "$SXMO_BLOCKFILE" 2>/dev/null | grep -q "^$INCOMINGNUMBER$"
|
@@ -30,6 +30,7 @@ delay() {
|
|||||||
wait_item() {
|
wait_item() {
|
||||||
delay_time=1
|
delay_time=1
|
||||||
while $1 > /dev/null 2>&1; do
|
while $1 > /dev/null 2>&1; do
|
||||||
|
sxmo_log "Blocking suspend for $1"
|
||||||
waited=1
|
waited=1
|
||||||
${2:-delay}
|
${2:-delay}
|
||||||
done
|
done
|
||||||
@@ -47,6 +48,10 @@ in_call() {
|
|||||||
pgrep -f sxmo_modemcall.sh
|
pgrep -f sxmo_modemcall.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
in_call_dino() {
|
||||||
|
command -v pw-link && [ -n "$(pw-link -o Dino)" ]
|
||||||
|
}
|
||||||
|
|
||||||
hotspot_active() {
|
hotspot_active() {
|
||||||
nmcli -t c show --active | grep -q ^Hotspot
|
nmcli -t c show --active | grep -q ^Hotspot
|
||||||
}
|
}
|
||||||
@@ -63,8 +68,12 @@ active_mosh() {
|
|||||||
command -v mosh-server && pgrep -f mosh-server
|
command -v mosh-server && pgrep -f mosh-server
|
||||||
}
|
}
|
||||||
|
|
||||||
playing_mpc() {
|
active_mpc() {
|
||||||
command -v mpc && mpc status | grep -q '\[playing\]'
|
if ! command -v mpc; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mpc status | grep -q '\[playing\]\|Updating'
|
||||||
}
|
}
|
||||||
|
|
||||||
playing_mpris() {
|
playing_mpris() {
|
||||||
@@ -82,10 +91,11 @@ while [ "$waited" != "0" ]; do
|
|||||||
waited=0
|
waited=0
|
||||||
wait_item suspend_disabled
|
wait_item suspend_disabled
|
||||||
wait_item in_call
|
wait_item in_call
|
||||||
|
wait_item in_call_dino
|
||||||
wait_item hotspot_active
|
wait_item hotspot_active
|
||||||
wait_item ssh_connected
|
wait_item ssh_connected
|
||||||
wait_item active_mosh
|
wait_item active_mosh
|
||||||
wait_item playing_mpc
|
wait_item active_mpc
|
||||||
wait_item playing_mpris
|
wait_item playing_mpris
|
||||||
wait_item photos_processing
|
wait_item photos_processing
|
||||||
done
|
done
|
||||||
|
@@ -9,25 +9,3 @@
|
|||||||
|
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
. sxmo_common.sh
|
. sxmo_common.sh
|
||||||
|
|
||||||
# Phonecall started
|
|
||||||
if [ "$1" = "enable" ]; then
|
|
||||||
sxmo_log "Attempting hack to get things just right."
|
|
||||||
# fixes bug where sometimes we start with speaker on and mic off
|
|
||||||
sxmo_modemaudio.sh enable_speaker
|
|
||||||
sxmo_modemaudio.sh disable_speaker
|
|
||||||
sxmo_modemaudio.sh mute_mic
|
|
||||||
sxmo_modemaudio.sh unmute_mic
|
|
||||||
|
|
||||||
# Add other things here, e.g., volume boosters
|
|
||||||
|
|
||||||
# Phonecall ended
|
|
||||||
elif [ "$1" = "disable" ]; then
|
|
||||||
sxmo_log "Attempting hack to get things just right."
|
|
||||||
# fixes bug where sometimes we leave call with speaker off
|
|
||||||
sxmo_modemaudio.sh disable_speaker
|
|
||||||
sxmo_modemaudio.sh enable_speaker
|
|
||||||
|
|
||||||
# Add other things here, e.g., volume boosters
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
@@ -19,7 +19,7 @@ superd_service_isrunning() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sxmo_service_isrunning() {
|
sxmo_service_isrunning() {
|
||||||
sxmo_daemons.sh running "$1" > /dev/null
|
sxmo_jobs.sh running "$1" > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$XPROPOUT" ]; then
|
if [ -z "$XPROPOUT" ]; then
|
||||||
@@ -74,32 +74,37 @@ case "$WMCLASS" in
|
|||||||
$icon_cfg Gestures $(
|
$icon_cfg Gestures $(
|
||||||
superd_service_isrunning "sxmo_hook_lisgd" &&
|
superd_service_isrunning "sxmo_hook_lisgd" &&
|
||||||
printf "%s" "$icon_ton" || printf "%s" "$icon_tof"
|
printf "%s" "$icon_ton" || printf "%s" "$icon_tof"
|
||||||
) ^ 1 ^ supertoggle_daemon 'sxmo_hook_lisgd'
|
) ^ 1 ^ supertoggle_daemon 'sxmo_hook_lisgd' && (rm $XDG_CACHE_HOME/sxmo/sxmo.nogesture 2>/dev/null || touch $XDG_CACHE_HOME/sxmo/sxmo.nogesture)
|
||||||
$icon_cfg Toggle Bar ^ 0 ^ sxmo_wm.sh togglebar
|
$icon_cfg Toggle Bar ^ 0 ^ sxmo_wm.sh togglebar
|
||||||
$icon_bth Bluetooth $(
|
$icon_bth Bluetooth $(
|
||||||
rfkill list bluetooth | grep -q "yes" &&
|
rfkill list bluetooth -no ID,SOFT,HARD | grep -vq " blocked" &&
|
||||||
printf %b "$icon_tof" || printf %b "$icon_ton";
|
printf %b "$icon_ton" || printf %b "$icon_tof";
|
||||||
printf %b "^ 1 ^ doas sxmo_bluetoothtoggle.sh && sxmo_hook_statusbar.sh bluetooth"
|
printf %b "^ 1 ^ doas sxmo_bluetoothtoggle.sh && sxmo_hook_statusbar.sh bluetooth"
|
||||||
)
|
)
|
||||||
$(test "$SXMO_WM" = dwm && printf %b "$icon_cfg Invert Colors ^ 1 ^ xcalib -a -invert")
|
$(test "$SXMO_WM" = dwm && printf %b "$icon_cfg Invert Colors ^ 1 ^ xcalib -a -invert")
|
||||||
$icon_clk Change Timezone ^ 1 ^ sxmo_timezonechange.sh
|
$icon_clk Change Timezone ^ 1 ^ sxmo_timezonechange.sh
|
||||||
$icon_zzz Auto-suspend $(
|
$icon_zzz Auto-suspend $(
|
||||||
[ -e "$XDG_CACHE_HOME"/sxmo/sxmo.nosuspend ] && printf "%s" "$icon_tof" || printf "%s" "$icon_ton"
|
[ -e "$XDG_CACHE_HOME"/sxmo/sxmo.nosuspend ] && printf "%s" "$icon_tof" || printf "%s" "$icon_ton"
|
||||||
) ^ 1 ^ (rm $XDG_CACHE_HOME/sxmo/sxmo.nosuspend || touch $XDG_CACHE_HOME/sxmo/sxmo.nosuspend)
|
) ^ 1 ^ (rm $XDG_CACHE_HOME/sxmo/sxmo.nosuspend 2>/dev/null || touch $XDG_CACHE_HOME/sxmo/sxmo.nosuspend)
|
||||||
$icon_zzz Auto-screen-off $(
|
$icon_zzz Auto-screen-off $(
|
||||||
[ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ] && printf "%s" "$icon_tof" || printf "%s" "$icon_ton"
|
[ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ] && printf "%s" "$icon_tof" || printf "%s" "$icon_ton"
|
||||||
) ^ 1 ^ (rm $XDG_CACHE_HOME/sxmo/sxmo.noidle || touch $XDG_CACHE_HOME/sxmo/sxmo.noidle) && sxmo_hook_unlock.sh
|
) ^ 1 ^ (rm $XDG_CACHE_HOME/sxmo/sxmo.noidle 2>/dev/null || touch $XDG_CACHE_HOME/sxmo/sxmo.noidle) && sxmo_state.sh set unlock
|
||||||
$icon_ror Autorotate $(
|
$icon_ror Autorotate $(
|
||||||
sxmo_daemons.sh running autorotate -q &&
|
sxmo_jobs.sh running autorotate -q &&
|
||||||
printf "%s" "$icon_ton" || printf "%s" "$icon_tof"
|
printf "%s" "$icon_ton" || printf "%s" "$icon_tof"
|
||||||
) ^ 1 ^ toggle_daemon 'Autorotate' autorotate sxmo_autorotate.sh
|
) ^ 1 ^ toggle_daemon 'Autorotate' autorotate sxmo_autorotate.sh
|
||||||
|
$([ -n "$SXMO_KEYBOARD_SLIDER_EVENT_DEVICE" ] && echo "$icon_ror Autorotate on Keyboard Open/Close $(
|
||||||
|
sxmo_jobs.sh running kb_autorotate -q &&
|
||||||
|
printf "%s" "$icon_ton" || printf "%s" "$icon_tof"
|
||||||
|
) ^ 1 ^ toggle_daemon 'Keyboard Autorotate' kb_autorotate sxmo_keyboard_autorotate.sh")
|
||||||
$icon_ror Rotate ^ 1 ^ sxmo_rotate.sh rotate
|
$icon_ror Rotate ^ 1 ^ sxmo_rotate.sh rotate
|
||||||
$icon_trm Hooks ^ 0 ^ sxmo_hookmenu.sh
|
$icon_trm Hooks ^ 0 ^ sxmo_hookmenu.sh
|
||||||
$icon_upc Upgrade Pkgs ^ 0 ^ sxmo_terminal.sh sxmo_upgrade.sh
|
$icon_upc Upgrade Pkgs ^ 0 ^ sxmo_terminal.sh sxmo_upgrade.sh
|
||||||
$icon_sfl Migrate configuration ^ 0 ^ sxmo_terminal.sh sxmo_migrate.sh
|
$icon_sfl Migrate configuration ^ 0 ^ sxmo_terminal.sh sxmo_migrate.sh
|
||||||
$icon_cfg Edit configuration ^ 0 ^ sxmo_terminal.sh $EDITOR $XDG_CONFIG_HOME/sxmo/$(test "$SXMO_WM" = sway && printf sway || printf xinit)
|
$icon_cfg Edit configuration ^ 0 ^ sxmo_terminal.sh $EDITOR $XDG_CONFIG_HOME/sxmo/$(test "$SXMO_WM" = sway && printf sway || printf xinit)
|
||||||
$(command -v pmos-tweaks >/dev/null && echo "$icon_cfg PostmarketOS Tweaks ^ 0 ^ GDK_SCALE=1 pmos-tweaks")
|
$(command -v pmos-tweaks >/dev/null && echo "$icon_cfg PostmarketOS Tweaks ^ 0 ^ GDK_SCALE=1 pmos-tweaks")
|
||||||
$icon_cfg Suspend Blockers ^ 0 ^ sxmo_terminal.sh sxmo_wakelock.sh debug watch
|
$icon_cfg Suspend Blockers ^ 0 ^ sxmo_terminal.sh sxmo_debug_suspend.sh
|
||||||
|
$icon_inf Log ^ 0 ^ sxmo_terminal.sh tail -n 100 -f ${XDG_STATE_HOME:-$HOME}/sxmo.log
|
||||||
$icon_inf Version ^ 0 ^ sxmo_terminal.sh sxmo_version.sh --block
|
$icon_inf Version ^ 0 ^ sxmo_terminal.sh sxmo_version.sh --block
|
||||||
"
|
"
|
||||||
WINNAME=Config
|
WINNAME=Config
|
||||||
@@ -107,8 +112,8 @@ case "$WMCLASS" in
|
|||||||
power)
|
power)
|
||||||
# Power menu
|
# Power menu
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_lck Lock ^ 0 ^ sxmo_hook_lock.sh
|
$icon_lck Lock ^ 0 ^ sxmo_state.sh set lock
|
||||||
$icon_lck Lock (Screen off) ^ 0 ^ sxmo_hook_screenoff.sh
|
$icon_lck Lock (Screen off) ^ 0 ^ sxmo_state.sh set screenoff
|
||||||
$icon_out Logout ^ 0 ^ confirm Logout && sxmo_power.sh logout
|
$icon_out Logout ^ 0 ^ confirm Logout && sxmo_power.sh logout
|
||||||
$([ -f "$(xdg_data_path xsessions/sxmo.desktop)" ] &&
|
$([ -f "$(xdg_data_path xsessions/sxmo.desktop)" ] &&
|
||||||
[ -f "$(xdg_data_path wayland-sessions/swmo.desktop)" ] &&
|
[ -f "$(xdg_data_path wayland-sessions/swmo.desktop)" ] &&
|
||||||
@@ -136,6 +141,14 @@ case "$WMCLASS" in
|
|||||||
"
|
"
|
||||||
WINNAME=Mpv
|
WINNAME=Mpv
|
||||||
;;
|
;;
|
||||||
|
io.bassi.amberol)
|
||||||
|
CHOICES="
|
||||||
|
$icon_pau Play/Pause ^ 0 ^ playerctl play-pause
|
||||||
|
$icon_prv Previous Track ^ 1 ^ playerctl previous
|
||||||
|
$icon_nxt Next Track ^ 1 ^ playerctl next
|
||||||
|
"
|
||||||
|
WINNAME=Amberol
|
||||||
|
;;
|
||||||
*feh*)
|
*feh*)
|
||||||
# Feh
|
# Feh
|
||||||
CHOICES="
|
CHOICES="
|
||||||
@@ -204,9 +217,18 @@ case "$WMCLASS" in
|
|||||||
WINNAME=St
|
WINNAME=St
|
||||||
;;
|
;;
|
||||||
*foot*|*st*|*terminal*|org.gnome.vte.application|*alacritty*)
|
*foot*|*st*|*terminal*|org.gnome.vte.application|*alacritty*)
|
||||||
# First we try to handle the app running inside the terminal:
|
|
||||||
WMNAME="${1:-$(printf %s "$XPROPOUT" | grep title: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')}"
|
WMNAME="${1:-$(printf %s "$XPROPOUT" | grep title: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')}"
|
||||||
if printf %s "$WMNAME" | grep -qi -E -w "(vi|vim|vis|nvim|neovim|kakoune)"; then
|
|
||||||
|
# These git commands only launch the editor.
|
||||||
|
case "$WMNAME" in
|
||||||
|
*"git add"*|*"git bugreport"*|*"git commit"*|*"git merge"*|*"git notes"*|*"git rebase"*|*"git replace"*|*"git send-email"*|*"git svn"*)
|
||||||
|
WMNAME="$WMCLASS $EDITOR"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# First we try to handle the app running inside the terminal:
|
||||||
|
case " $WMNAME " in
|
||||||
|
*" vi "*|*" vim "*|*" vis "*|*" nvim "*|*neovim*|*kakoune*)
|
||||||
#Vim in foot
|
#Vim in foot
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_cls Save and Quit ^ 0 ^ sxmo_type -k Escape -s 300 ':wq' -k Return
|
$icon_cls Save and Quit ^ 0 ^ sxmo_type -k Escape -s 300 ':wq' -k Return
|
||||||
@@ -225,7 +247,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=Vim
|
WINNAME=Vim
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "nano"; then
|
;;
|
||||||
|
*nano*)
|
||||||
#Nano in foot
|
#Nano in foot
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_aru Scroll up ^ 1 ^ sxmo_type -k Prior
|
$icon_aru Scroll up ^ 1 ^ sxmo_type -k Prior
|
||||||
@@ -240,7 +263,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=Nano
|
WINNAME=Nano
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "micro"; then
|
;;
|
||||||
|
*micro*)
|
||||||
#Micro
|
#Micro
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_aru Scroll up ^ 1 ^ sxmo_type -k Prior
|
$icon_aru Scroll up ^ 1 ^ sxmo_type -k Prior
|
||||||
@@ -258,7 +282,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=Micro
|
WINNAME=Micro
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "tuir"; then
|
;;
|
||||||
|
*tuir*)
|
||||||
#tuir (reddit client) in foot
|
#tuir (reddit client) in foot
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_aru Previous ^ 1 ^ sxmo_type k
|
$icon_aru Previous ^ 1 ^ sxmo_type k
|
||||||
@@ -276,7 +301,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=tuir
|
WINNAME=tuir
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "w3m"; then
|
;;
|
||||||
|
*w3m*)
|
||||||
#w3m
|
#w3m
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_arl Back ^ 1 ^ sxmo_type b
|
$icon_arl Back ^ 1 ^ sxmo_type b
|
||||||
@@ -292,7 +318,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=w3m
|
WINNAME=w3m
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "ncmpcpp"; then
|
;;
|
||||||
|
*ncmpcpp*)
|
||||||
#ncmpcpp
|
#ncmpcpp
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_lst Playlist ^ 0 ^ sxmo_type 1
|
$icon_lst Playlist ^ 0 ^ sxmo_type 1
|
||||||
@@ -308,7 +335,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=ncmpcpp
|
WINNAME=ncmpcpp
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "aerc"; then
|
;;
|
||||||
|
*aerc*)
|
||||||
#aerc
|
#aerc
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_pau Archive ^ 1 ^ sxmo_type ':archive flat' -k Return
|
$icon_pau Archive ^ 1 ^ sxmo_type ':archive flat' -k Return
|
||||||
@@ -319,7 +347,8 @@ case "$WMCLASS" in
|
|||||||
$icon_trm xdg-open Part ^ 0 ^ sxmo_type ':open' -k Return
|
$icon_trm xdg-open Part ^ 0 ^ sxmo_type ':open' -k Return
|
||||||
"
|
"
|
||||||
WINNAME=aerc
|
WINNAME=aerc
|
||||||
elif printf %s "$WMNAME" | grep -qi -E -w "(less|mless)"; then
|
;;
|
||||||
|
*less*|*"git blame"*|*"git diff"*|*"git grep"*|*"git help"*|*"git log"*|*"git stash"*|*"git tag"*|*"git var"*)
|
||||||
#less
|
#less
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_arr Page next ^ 1 ^ sxmo_type ':n' -k Return
|
$icon_arr Page next ^ 1 ^ sxmo_type ':n' -k Return
|
||||||
@@ -332,13 +361,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=less
|
WINNAME=less
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "git \(blame\|diff\|grep\|help\|log\|stash\|tag\|var\)"; then
|
;;
|
||||||
# These git commands only launch the pager.
|
*git*)
|
||||||
exec "$0" "$WMCLASS ${PAGER:-less}"
|
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "git \(add\|bugreport\|commit\|merge\|notes\|rebase\|replace\|send-email\|svn\)"; then
|
|
||||||
# These git commands only launch the editor.
|
|
||||||
exec "$0" "$WMCLASS $EDITOR"
|
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "git"; then
|
|
||||||
# git am, branch, config, tag (and other commands which launch both).
|
# git am, branch, config, tag (and other commands which launch both).
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_fil ${PAGER:-less} menu ^ 0 ^ sxmo_appmenu.sh '$WMCLASS ${PAGER:-less}'
|
$icon_fil ${PAGER:-less} menu ^ 0 ^ sxmo_appmenu.sh '$WMCLASS ${PAGER:-less}'
|
||||||
@@ -346,7 +370,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=git
|
WINNAME=git
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "senpai"; then
|
;;
|
||||||
|
*senpai*)
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_aru Scroll up ^ 1 ^ sxmo_type -k Prior
|
$icon_aru Scroll up ^ 1 ^ sxmo_type -k Prior
|
||||||
$icon_ard Scroll down ^ 1 ^ sxmo_type -k Next
|
$icon_ard Scroll down ^ 1 ^ sxmo_type -k Next
|
||||||
@@ -356,7 +381,8 @@ case "$WMCLASS" in
|
|||||||
$icon_usr Toggle Members ^ 0 ^ sxmo_type -k F8
|
$icon_usr Toggle Members ^ 0 ^ sxmo_type -k F8
|
||||||
"
|
"
|
||||||
WINNAME=senpai
|
WINNAME=senpai
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "weechat"; then
|
;;
|
||||||
|
*weechat*)
|
||||||
#weechat
|
#weechat
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_msg Hotlist Next ^ 1 ^ sxmo_type -M Alt a
|
$icon_msg Hotlist Next ^ 1 ^ sxmo_type -M Alt a
|
||||||
@@ -368,7 +394,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=weechat
|
WINNAME=weechat
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "sms\|missed call"; then
|
;;
|
||||||
|
*" sms "*|*"missed call"*)
|
||||||
number="$(printf "%s\n" "$WMNAME" | xargs -0 pnc find | tr -d '\n')"
|
number="$(printf "%s\n" "$WMNAME" | xargs -0 pnc find | tr -d '\n')"
|
||||||
#sms
|
#sms
|
||||||
CHOICES="
|
CHOICES="
|
||||||
@@ -393,7 +420,8 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=phone
|
WINNAME=phone
|
||||||
elif printf %s "$WMNAME" | grep -qi -w "cmus"; then
|
;;
|
||||||
|
*cmus*)
|
||||||
# cmus
|
# cmus
|
||||||
# requires `:set set_term_title=false` in cmus to match the application
|
# requires `:set set_term_title=false` in cmus to match the application
|
||||||
CHOICES="
|
CHOICES="
|
||||||
@@ -407,7 +435,29 @@ case "$WMCLASS" in
|
|||||||
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
$icon_mnu Terminal menu ^ 0 ^ sxmo_appmenu.sh $WMCLASS
|
||||||
"
|
"
|
||||||
WINNAME=cmus
|
WINNAME=cmus
|
||||||
else
|
;;
|
||||||
|
*iamb*)
|
||||||
|
CHOICES="
|
||||||
|
$icon_aru Page Up ^ 1 ^ sxmo_type.sh -k Escape -M Ctrl -k b
|
||||||
|
$icon_tab Toggle Selection ^ 0 ^ sxmo_type.sh -k Escape -M Ctrl -k W m
|
||||||
|
$icon_ard Page Down ^ 1 ^ sxmo_type.sh -k Escape -M Ctrl -k f
|
||||||
|
$icon_ret Reply To Message ^ 0 ^ sxmo_type.sh -k Escape :reply -k Return
|
||||||
|
$icon_tab New Tab ^ 0 ^ sxmo_type.sh -k Escape :tab rooms -k Return
|
||||||
|
$icon_arl Previous Tab ^ 0 ^ sxmo_type.sh -k Escape :tabp -k Return
|
||||||
|
$icon_arr Next Tab ^ 0 ^ sxmo_type.sh -k Escape :tabn -k Return
|
||||||
|
$icon_cls Close Tab ^ 0 ^ sxmo_type.sh -k Escape :tabclose -k Return
|
||||||
|
$icon_win Split View ^ 0 ^ sxmo_type.sh -k Escape :split -k Return
|
||||||
|
$icon_win Split View Vertical ^ 0 ^ sxmo_type.sh -k Escape :vsplit -k Return
|
||||||
|
$icon_msg All Chats ^ 0 ^ sxmo_type.sh -k Escape :chats -k Return
|
||||||
|
$icon_msg Direct Messages ^ 0 ^ sxmo_type.sh -k Escape :dms -k Return
|
||||||
|
$icon_grp Rooms ^ 0 ^ sxmo_type.sh -k Escape :rooms -k Return
|
||||||
|
$icon_glb Spaces ^ 0 ^ sxmo_type.sh -k Escape :spaces -k Return
|
||||||
|
$icon_sav Download ^ 0 ^ sxmo_type.sh -k Escape :download -k Return
|
||||||
|
$icon_cls Close View/Quit ^ 0 ^ sxmo_type.sh -k Escape :quit -k Return
|
||||||
|
"
|
||||||
|
WINNAME=iamb
|
||||||
|
;;
|
||||||
|
*)
|
||||||
# Now we fallback to the default terminal menu
|
# Now we fallback to the default terminal menu
|
||||||
case "$WMCLASS" in
|
case "$WMCLASS" in
|
||||||
*st*)
|
*st*)
|
||||||
@@ -469,7 +519,7 @@ case "$WMCLASS" in
|
|||||||
WINNAME=Alacritty
|
WINNAME=Alacritty
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
esac
|
||||||
;;
|
;;
|
||||||
*okular*)
|
*okular*)
|
||||||
# Okular
|
# Okular
|
||||||
@@ -524,6 +574,7 @@ case "$WMCLASS" in
|
|||||||
# Netsurf
|
# Netsurf
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_flt Pipe URL ^ 0 ^ sxmo_urlhandler.sh
|
$icon_flt Pipe URL ^ 0 ^ sxmo_urlhandler.sh
|
||||||
|
$icon_lnk Enter URL ^ 0 ^ sxmo_type.sh -M Ctrl -k l
|
||||||
$icon_zmi Zoom ^ 1 ^ sxmo_type -M Ctrl -k plus
|
$icon_zmi Zoom ^ 1 ^ sxmo_type -M Ctrl -k plus
|
||||||
$icon_zmo Zoom ^ 1 ^ sxmo_type -M Ctrl -k minus
|
$icon_zmo Zoom ^ 1 ^ sxmo_type -M Ctrl -k minus
|
||||||
$icon_arl History ^ 1 ^ sxmo_type -M Alt -k Left
|
$icon_arl History ^ 1 ^ sxmo_type -M Alt -k Left
|
||||||
@@ -584,9 +635,26 @@ case "$WMCLASS" in
|
|||||||
"
|
"
|
||||||
WINNAME=Firefox
|
WINNAME=Firefox
|
||||||
;;
|
;;
|
||||||
|
*krita*)
|
||||||
|
# Krita
|
||||||
|
CHOICES="
|
||||||
|
$icon_fnd Open ^ 0 ^ sxmo_type -M Ctrl o
|
||||||
|
$icon_sav Save ^ 0 ^ sxmo_type -M Ctrl s
|
||||||
|
$icon_pst Paste ^ 0 ^ sxmo_type -M Ctrl v
|
||||||
|
$icon_del Delete ^ 0 ^ sxmo_type -k Delete
|
||||||
|
$icon_win Select ^ 0 ^ sxmo_type -M Ctrl r
|
||||||
|
$icon_modem_disabled Deselect ^ 0 ^ sxmo_type -M Ctrl -M Shift a
|
||||||
|
$icon_wn2 Crop ^ 0 ^ sxmo_type c
|
||||||
|
$icon_flt Fill ^ 0 ^ sxmo_type f
|
||||||
|
$icon_modem_connected Gradient ^ 0 ^ sxmo_type g
|
||||||
|
$icon_dof HSV Adjust ^ 0 ^ sxmo_type -M Ctrl u
|
||||||
|
$icon_cls Close Image ^ 0 ^ sxmo_type -M Ctrl w
|
||||||
|
"
|
||||||
|
WINNAME=Krita
|
||||||
|
;;
|
||||||
*vimb*)
|
*vimb*)
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_glb Navigate ^ 0 ^ sxmo_type -k Escape o && sxmo_keyboard.sh open
|
$icon_glb Navigate ^ 0 ^ sxmo_type -k Escape o
|
||||||
$icon_zmi Zoom ^ 1 ^ sxmo_type -k Escape zi
|
$icon_zmi Zoom ^ 1 ^ sxmo_type -k Escape zi
|
||||||
$icon_zmo Zoom ^ 1 ^ sxmo_type -k Escape zo
|
$icon_zmo Zoom ^ 1 ^ sxmo_type -k Escape zo
|
||||||
$icon_arl History ^ 1 ^ sxmo_type -M Ctrl o
|
$icon_arl History ^ 1 ^ sxmo_type -M Ctrl o
|
||||||
@@ -598,16 +666,17 @@ case "$WMCLASS" in
|
|||||||
*geopard*)
|
*geopard*)
|
||||||
# Geopard
|
# Geopard
|
||||||
CHOICES="
|
CHOICES="
|
||||||
|
$icon_flt Pipe URL ^ 0 ^ sxmo_urlhandler.sh
|
||||||
$icon_pls New Tab ^ 0 ^ sxmo_type -M Ctrl t
|
$icon_pls New Tab ^ 0 ^ sxmo_type -M Ctrl t
|
||||||
$icon_cls Close Tab ^ 0 ^ sxmo_type -M Ctrl w
|
$icon_cls Close Tab ^ 0 ^ sxmo_type -M Ctrl w
|
||||||
$icon_bok Open Bookmarks ^ 0 ^ sxmo_type -M Ctrl b
|
$icon_bok Open Bookmarks ^ 0 ^ sxmo_type -M Ctrl b
|
||||||
$icon_pls Add Bookmark ^ 0 ^ sxmo_type -M Ctrl d
|
$icon_pls Add Bookmark ^ 0 ^ sxmo_type -M Ctrl d
|
||||||
$icon_edt Edit Bookmarks ^ 0 ^ sxmo_keyboard.sh open && sxmo_terminal.sh $EDITOR ~/.local/share/geopard/bookmarks.gemini
|
$icon_edt Edit Bookmarks ^ 0 ^ sxmo_terminal.sh $EDITOR ~/.local/share/geopard/bookmarks.gemini
|
||||||
$icon_zmi Increase Font Size ^ 1 ^ sxmo_type -M Ctrl -k plus
|
$icon_zmi Increase Font Size ^ 1 ^ sxmo_type -M Ctrl -k plus
|
||||||
$icon_zmo Decrease Font Size ^ 1 ^ sxmo_type -M Ctrl -k minus
|
$icon_zmo Decrease Font Size ^ 1 ^ sxmo_type -M Ctrl -k minus
|
||||||
$icon_arl History Back ^ 1 ^ sxmo_type -M Alt -k Left
|
$icon_arl History Back ^ 1 ^ sxmo_type -M Alt -k Left
|
||||||
$icon_arr History Forward ^ 1 ^ sxmo_type -M Alt -k Right
|
$icon_arr History Forward ^ 1 ^ sxmo_type -M Alt -k Right
|
||||||
$icon_fnd URL Bar ^ 0 ^ sxmo_keyboard.sh open && sxmo_type -k F6
|
$icon_fnd URL Bar ^ 0 ^ sxmo_type -k F6
|
||||||
$icon_rld Refresh ^ 0 ^ sxmo_type -k F6 -k Return
|
$icon_rld Refresh ^ 0 ^ sxmo_type -k F6 -k Return
|
||||||
"
|
"
|
||||||
WINNAME=Geopard
|
WINNAME=Geopard
|
||||||
@@ -627,6 +696,19 @@ case "$WMCLASS" in
|
|||||||
"
|
"
|
||||||
WINNAME=Lagrange
|
WINNAME=Lagrange
|
||||||
;;
|
;;
|
||||||
|
org.gnome.maps)
|
||||||
|
CHOICES="
|
||||||
|
$icon_gps Toggle Geoclue ^ 0 ^ superctl status geoclue-agent |grep started >/dev/null && superctl stop geoclue-agent || superctl start geoclue-agent
|
||||||
|
$icon_zmi Zoom in ^ 1 ^ sxmo_type -M ctrl =
|
||||||
|
$icon_zmo Zoom out ^ 1 ^ sxmo_type -M ctrl -k minus
|
||||||
|
$icon_fnd Explore POI ^ 0 ^ sxmo_type -M ctrl -M Shift F
|
||||||
|
$icon_fnd Search ^ 0 ^ sxmo_type -M ctrl f
|
||||||
|
$icon_lst Show last results ^ 0 ^ sxmo_type -M ctrl r
|
||||||
|
$icon_map Toggle route planner ^ 0 ^ sxmo_type -M ctrl d
|
||||||
|
$icon_gps Show current location ^ 0 ^ sxmo_type -M ctrl l
|
||||||
|
"
|
||||||
|
WINNAME=Maps
|
||||||
|
;;
|
||||||
*mepo*)
|
*mepo*)
|
||||||
# Mepo
|
# Mepo
|
||||||
# The choices / hotkeys for the contextmenu are generated through mepo's
|
# The choices / hotkeys for the contextmenu are generated through mepo's
|
||||||
@@ -645,33 +727,119 @@ case "$WMCLASS" in
|
|||||||
"
|
"
|
||||||
WINNAME=Maps
|
WINNAME=Maps
|
||||||
;;
|
;;
|
||||||
|
*badwolf*)
|
||||||
|
# Badwolf Browser
|
||||||
|
CHOICES="
|
||||||
|
$icon_tab New Tab ^ 0 ^ sxmo_type -M Ctrl -k t
|
||||||
|
$icon_cls Close Tab ^ 0 ^ sxmo_type -M Alt -k d
|
||||||
|
$icon_fnd Reset Zoom ^ 0 ^ sxmo_type -M Ctrl -k 0
|
||||||
|
$icon_arr History ^ 1 ^ sxmo_type -M Ctrl ]
|
||||||
|
$icon_arl History ^ 1 ^ sxmo_type -M Ctrl [
|
||||||
|
$icon_arr Next Tab ^ 1 ^ sxmo_type -M Alt -k Right
|
||||||
|
$icon_arl Previous Tab ^ 1 ^ sxmo_type -M Alt -k Left
|
||||||
|
$icon_rld Refresh ^ 0 ^ sxmo_type -M Shift -M Ctrl -k r
|
||||||
|
$icon_fnd Search ^ 0 ^ sxmo_type -M Shift -M Ctrl -k f
|
||||||
|
$icon_arr Next (Search) ^ 0 ^ sxmo_type -M Shift -M Ctrl -k g
|
||||||
|
$icon_arl Previous (Search) ^ 0 ^ sxmo_type -M Shift -M Ctrl -M Shift -k g
|
||||||
|
$icon_flt URL Bar ^ 0 ^ sxmo_type -M Shift -M Ctrl l
|
||||||
|
$icon_fnd Open Web Inspector ^ 0 ^ sxmo_type -k F12
|
||||||
|
"
|
||||||
|
WINNAME=Badwolf
|
||||||
|
;;
|
||||||
|
*acme*)
|
||||||
|
# Acme
|
||||||
|
CHOICES="
|
||||||
|
$icon_mse 2 (Right) [2s delay] ^ 0 ^ sleep 2 && xdotool click 3
|
||||||
|
$icon_mse 3 (Middle) [2s delay] ^ 0 ^ sleep 2 && xdotool click 2
|
||||||
|
$icon_itm Autocomplete ^ 0 ^ sxmo_type.sh -M Ctrl -k f
|
||||||
|
$icon_exp Select Last Typed Text ^ 0 ^ sxmo_type.sh -M Escape
|
||||||
|
$icon_del Delete To Start Of Line ^ 0 ^ sxmo_type.sh -M Ctrl -k U
|
||||||
|
$icon_arl Move To Start Of Line ^ 0 ^ sxmo_type.sh -M Ctrl -k A
|
||||||
|
$icon_arr Move To End Of Line ^ 0 ^ sxmo_type.sh -M Ctrl -k E
|
||||||
|
"
|
||||||
|
WINNAME=Acme
|
||||||
|
;;
|
||||||
|
*mupdf*)
|
||||||
|
# Mupdf
|
||||||
|
CHOICES="
|
||||||
|
$icon_nxt Next Page ^ 0 ^ sxmo_type -k Space
|
||||||
|
$icon_prv Previous Page ^ 0 ^ sxmo_type -k b
|
||||||
|
$icon_chk Mark Page ^ 0 ^ sxmo_type -k m
|
||||||
|
$icon_ret Pop To Last Mark ^ 0 ^ sxmo_type -k t
|
||||||
|
$icon_zmi Zoom In ^ 1 ^ sxmo_type -k +
|
||||||
|
$icon_zmo Zoom Out ^ 1 ^ sxmo_type -k -
|
||||||
|
$icon_fnd Fit Width ^ 0 ^ sxmo_type -k W
|
||||||
|
$icon_fnd Fit Height ^ 0 ^ sxmo_type -k H
|
||||||
|
$icon_fnd Zoom To Fit ^ 0 ^ sxmo_type -k Z
|
||||||
|
$icon_fnd Reset Zoom ^ 0 ^ sxmo_type -k z
|
||||||
|
$icon_rol Rotate Counterclockwise ^ 0 ^ sxmo_type -k [
|
||||||
|
$icon_ror Rotate Clockwise ^ 0 ^ sxmo_type -k ]
|
||||||
|
$icon_fnd Search ^ 0 ^ sxmo_type -k /
|
||||||
|
"
|
||||||
|
WINNAME=Mupdf
|
||||||
|
;;
|
||||||
|
*tabbed*)
|
||||||
|
# Tabbed
|
||||||
|
CHOICES="
|
||||||
|
$icon_tab New Tab ^ 0 ^ sxmo_type.sh -M Ctrl -M Shift -M Enter
|
||||||
|
$icon_arl Previous Tab ^ 1 ^ sxmo_type.sh -M Ctrl -M Shift -k h
|
||||||
|
$icon_arr Next Tab ^ 1 ^ sxmo_type.sh -M Ctrl -M Shift -k l
|
||||||
|
$icon_arl Move Tab Left ^ 1 ^ sxmo_type.sh -M Ctrl -M Shift -k j
|
||||||
|
$icon_arr Move Tab Right ^ 1 ^ sxmo_type.sh -M Ctrl -M Shift -k k
|
||||||
|
$icon_mnu Menu Prompt ^ 0 ^ sxmo_type.sh -M Ctrl -k U0060
|
||||||
|
$icon_cls Close Tab ^ 0 ^ sxmo_type.sh -M Ctrl -k q
|
||||||
|
"
|
||||||
|
WINNAME=Tabbed
|
||||||
|
;;
|
||||||
|
*links*)
|
||||||
|
# Links Browser
|
||||||
|
CHOICES="
|
||||||
|
$icon_mnu Menu ^ 0 ^ sxmo_type.sh -k Escape
|
||||||
|
$icon_ret Follow Link ^ 0 ^ sxmo_type.sh -k Enter
|
||||||
|
$icon_arl History ^ 1 ^ sxmo_type.sh -k z
|
||||||
|
$icon_arr History ^ 1 ^ sxmo_type.sh -k x
|
||||||
|
$icon_glb Enter URL ^ 0 ^ sxmo_type.sh -k g
|
||||||
|
$icon_glb Edit Current URL ^ 0 ^ sxmo_type.sh -k G
|
||||||
|
$icon_glb View Highlighted URL ^ 0 ^ sxmo_type.sh -M Ctrl -k g
|
||||||
|
$icon_cam Toggle Images ^ 0 ^ sxmo_type.sh -k U002A
|
||||||
|
$icon_aru Scroll Up ^ 1 ^ sxmo_type.sh -k p
|
||||||
|
$icon_ard Scroll Down ^ 1 ^ sxmo_type.sh -k l
|
||||||
|
$icon_arl Scroll Left ^ 1 ^ sxmo_type.sh -k U005B
|
||||||
|
$icon_arr Scroll Right ^ 1 ^ sxmo_type.sh -k U005D
|
||||||
|
"
|
||||||
|
WINNAME=Links
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# Default system menu (no matches)
|
# Default system menu (no matches)
|
||||||
CHOICES="
|
CHOICES="
|
||||||
$icon_grd Scripts ^ 0 ^ sxmo_appmenu.sh scripts
|
$icon_grd Scripts ^ 0 ^ sxmo_appmenu.sh scripts
|
||||||
$icon_grd Apps ^ 0 ^ sxmo_appmenu.sh applications
|
$icon_grd Apps ^ 0 ^ sxmo_appmenu.sh applications
|
||||||
|
$([ "$SXMO_MENU" = "wofi" ] && echo "$icon_grd All Apps ^ 0 ^ wofi -O alphabetical -i --show drun")
|
||||||
|
$([ "$SXMO_MENU" != "wofi" ] && command -v j4-dmenu-desktop > /dev/null && echo "$icon_grd All Apps ^ 0 ^ j4-dmenu-desktop --dmenu=sxmo_dmenu.sh --term=sxmo_terminal.sh")
|
||||||
$icon_grd Binaries ^ 0 ^ sxmo_brun.sh
|
$icon_grd Binaries ^ 0 ^ sxmo_brun.sh
|
||||||
$icon_dir Files ^ 0 ^ sxmo_files.sh
|
$icon_dir Files ^ 0 ^ sxmo_files.sh
|
||||||
$icon_phn Dialer ^ 0 ^ sxmo_modemdial.sh
|
$icon_phn Dialer ^ 0 ^ sxmo_modemdial.sh
|
||||||
$icon_msg Texts ^ 0 ^ sxmo_modemtext.sh
|
$icon_msg Texts ^ 0 ^ sxmo_modemtext.sh
|
||||||
$icon_usr Contacts ^ 0 ^ sxmo_contactmenu.sh
|
$icon_usr Contacts ^ 0 ^ sxmo_contactmenu.sh
|
||||||
$(
|
$(
|
||||||
rfkill list bluetooth | grep -q "yes" ||
|
rfkill list bluetooth -no ID,SOFT,HARD | grep -vq " blocked" &&
|
||||||
printf %b "$icon_bth Bluetooth ^ 1 ^ sxmo_bluetoothmenu.sh"
|
printf %b "$icon_bth Bluetooth ^ 1 ^ sxmo_bluetoothmenu.sh"
|
||||||
)
|
)
|
||||||
$(command -v megapixels >/dev/null && echo "$icon_cam Camera ^ 0 ^ GDK_SCALE=2 megapixels")
|
$(command -v megapixels >/dev/null && echo "$icon_cam Camera ^ 0 ^ GDK_SCALE=2 megapixels")
|
||||||
$(
|
$(
|
||||||
if [ -z "$SXMO_DISABLE_LEDS" ]; then
|
if brightness="$(brightnessctl -d "white:flash" get)"; then
|
||||||
printf "%s Flashlight " "$icon_fll"
|
printf "%s Flashlight " "$icon_fll"
|
||||||
sxmo_led.sh get white | grep -vq ^100$ &&
|
[ "$brightness" -gt 0 ] &&
|
||||||
printf %b "$icon_tof" || printf %b "$icon_ton";
|
printf %b "$icon_ton" || printf %b "$icon_tof";
|
||||||
printf %b "^ 1 ^ sxmo_flashtoggle.sh"
|
printf %b "^ 1 ^ sxmo_flashtoggle.sh"
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
$icon_net Networks ^ 0 ^ sxmo_networks.sh
|
$icon_net Networks ^ 0 ^ sxmo_networks.sh
|
||||||
$icon_mus Audio ^ 0 ^ sxmo_audio.sh
|
$icon_mus Audio ^ 0 ^ sxmo_audio.sh
|
||||||
$icon_phn Modem ^ 0 ^ sxmo_appmenu.sh modem
|
$icon_phn Modem ^ 0 ^ sxmo_appmenu.sh modem
|
||||||
|
$icon_win Windows ^ 0 ^ sxmo_wmmenu.sh
|
||||||
$icon_cfg Config ^ 0 ^ sxmo_appmenu.sh config
|
$icon_cfg Config ^ 0 ^ sxmo_appmenu.sh config
|
||||||
|
$icon_inf Help ^ 0 ^ sxmo_terminal.sh man sxmo
|
||||||
$icon_pwr Power ^ 0 ^ sxmo_appmenu.sh power
|
$icon_pwr Power ^ 0 ^ sxmo_appmenu.sh power
|
||||||
"
|
"
|
||||||
WINNAME=Sys
|
WINNAME=Sys
|
||||||
|
@@ -7,10 +7,6 @@
|
|||||||
# up the call).
|
# up the call).
|
||||||
|
|
||||||
# kill existing ring playback
|
# kill existing ring playback
|
||||||
if [ -e "$XDG_RUNTIME_DIR/sxmo.ring.pid" ]; then
|
sxmo_jobs.sh stop ringing
|
||||||
MPVID="$(cat "$XDG_RUNTIME_DIR/sxmo.ring.pid")"
|
|
||||||
kill "$MPVID"
|
|
||||||
rm "$XDG_RUNTIME_DIR/sxmo.ring.pid"
|
|
||||||
fi
|
|
||||||
|
|
||||||
sxmo_playerctl.sh resume_all
|
sxmo_playerctl.sh resume_all
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This script is executed (asynchronously) when you hangup an incoming call
|
# This script is executed (asynchronously) when you hangup an incoming call
|
||||||
|
|
||||||
sxmo_playerctl.sh resume_all
|
|
||||||
|
@@ -57,7 +57,7 @@ icon_fil="" #file
|
|||||||
icon_flk="" #falkon
|
icon_flk="" #falkon
|
||||||
icon_fll="" #flashlight
|
icon_fll="" #flashlight
|
||||||
icon_flt="" #filter/pipe
|
icon_flt="" #filter/pipe
|
||||||
icon_fnd="" #search/find
|
icon_fnd="" #search/find
|
||||||
icon_gam="" # gaming controller (🎮)
|
icon_gam="" # gaming controller (🎮)
|
||||||
icon_glb="" #globe
|
icon_glb="" #globe
|
||||||
icon_gps='' #gps
|
icon_gps='' #gps
|
||||||
@@ -65,6 +65,7 @@ icon_grd=""
|
|||||||
icon_grp="" #group
|
icon_grp="" #group
|
||||||
icon_hdp="" #headphones
|
icon_hdp="" #headphones
|
||||||
icon_hom=""
|
icon_hom=""
|
||||||
|
icon_hst="" #headset🗣️
|
||||||
icon_img=""
|
icon_img=""
|
||||||
icon_inf="" #info
|
icon_inf="" #info
|
||||||
icon_itm="" #item (default)
|
icon_itm="" #item (default)
|
||||||
@@ -82,11 +83,13 @@ icon_mod="" # modem
|
|||||||
icon_mov=""
|
icon_mov=""
|
||||||
icon_mse="" # computer mouse (🖱️)
|
icon_mse="" # computer mouse (🖱️)
|
||||||
icon_msg="" #text
|
icon_msg="" #text
|
||||||
|
icon_mtr="" # metronome
|
||||||
icon_mus=""
|
icon_mus=""
|
||||||
icon_mut="" #mute
|
icon_mut="" #mute
|
||||||
icon_mvi="" #movie
|
icon_mvi="" #movie
|
||||||
icon_net=""
|
icon_net=""
|
||||||
icon_nto="" #no touch
|
icon_nto="" #no touch
|
||||||
|
icon_nvi="" # neovim
|
||||||
icon_nxt="" #next
|
icon_nxt="" #next
|
||||||
icon_out="" #logout
|
icon_out="" #logout
|
||||||
icon_pau=""
|
icon_pau=""
|
||||||
@@ -106,8 +109,10 @@ icon_rol="" #rotate left
|
|||||||
icon_ror="" #rotate right
|
icon_ror="" #rotate right
|
||||||
icon_rss=""
|
icon_rss=""
|
||||||
icon_sav="" #save
|
icon_sav="" #save
|
||||||
|
icon_scn="" #scanner
|
||||||
icon_sfl="" #shuffle, random
|
icon_sfl="" #shuffle, random
|
||||||
icon_shr="" #shrink
|
icon_shr="" #shrink
|
||||||
|
icon_sim="" # sim card
|
||||||
icon_snd="" #send
|
icon_snd="" #send
|
||||||
icon_spk="" #speaker
|
icon_spk="" #speaker
|
||||||
icon_spl=""
|
icon_spl=""
|
||||||
@@ -135,8 +140,8 @@ icon_wn2=""
|
|||||||
icon_wrh=""
|
icon_wrh=""
|
||||||
icon_wtr="" #weather
|
icon_wtr="" #weather
|
||||||
icon_ytb="" #youtube
|
icon_ytb="" #youtube
|
||||||
icon_zmi=""
|
icon_zmi="" # Zoom in/magnify
|
||||||
icon_zmo=""
|
icon_zmo="" # Zoom out/demagnify
|
||||||
icon_zzz="" #sleep/suspend/crust
|
icon_zzz="" #sleep/suspend/crust
|
||||||
|
|
||||||
# modem states
|
# modem states
|
||||||
|
@@ -3,7 +3,8 @@
|
|||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
# This script handles input actions, it is called by lisgd for gestures
|
# This script handles input actions, it is called by lisgd for gestures
|
||||||
# and by dwm for button presses
|
# and by dwm for button presses. Gestures are tied to actions in
|
||||||
|
# sxmo_hook_lisgdstart.sh .
|
||||||
|
|
||||||
ACTION="$1"
|
ACTION="$1"
|
||||||
|
|
||||||
@@ -12,52 +13,39 @@ ACTION="$1"
|
|||||||
. sxmo_common.sh
|
. sxmo_common.sh
|
||||||
|
|
||||||
stop_proximity_lock() {
|
stop_proximity_lock() {
|
||||||
sxmo_daemons.sh stop proximity_lock
|
sxmo_jobs.sh stop proximity_lock
|
||||||
}
|
|
||||||
|
|
||||||
# this action will move the lock state $1 levels higher
|
|
||||||
lock_screen_action() {
|
|
||||||
count="${1:-1}"
|
|
||||||
|
|
||||||
state="$(cat "$SXMO_STATE")"
|
|
||||||
while [ "$count" -gt 0 ]; do
|
|
||||||
case "$state" in
|
|
||||||
unlock)
|
|
||||||
state=screenoff
|
|
||||||
;;
|
|
||||||
screenoff)
|
|
||||||
state=lock
|
|
||||||
;;
|
|
||||||
lock)
|
|
||||||
state=unlock
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
count=$((count-1))
|
|
||||||
done
|
|
||||||
|
|
||||||
sxmo_hook_"$state".sh
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XPROPOUT="$(sxmo_wm.sh focusedwindow)"
|
XPROPOUT="$(sxmo_wm.sh focusedwindow)"
|
||||||
WMCLASS="$(printf %s "$XPROPOUT" | grep app: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')"
|
WMCLASS="$(printf %s "$XPROPOUT" | grep app: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')"
|
||||||
WMNAME="$(printf %s "$XPROPOUT" | grep title: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')"
|
WMNAME="$(printf %s "$XPROPOUT" | grep title: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')"
|
||||||
|
|
||||||
sxmo_debug "STATE: $(cat "$SXMO_STATE") ACTION: $ACTION WMCLASS: $WMCLASS WMNAME: $WMNAME"
|
sxmo_debug "STATE: $(sxmo_state.sh get) ACTION: $ACTION WMCLASS: $WMCLASS WMNAME: $WMNAME"
|
||||||
|
|
||||||
if ! grep -q unlock "$SXMO_STATE"; then
|
if sxmo_state.sh is_locked; then
|
||||||
|
case "$WMNAME" in # Handle programs
|
||||||
|
*"epy"*|*"epr"*)
|
||||||
|
case "$ACTION" in
|
||||||
|
"voldown_one")
|
||||||
|
sxmo_type.sh l
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"volup_one")
|
||||||
|
sxmo_type.sh h
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
"powerbutton_one")
|
"powerbutton_one")
|
||||||
lock_screen_action
|
sxmo_state.sh click
|
||||||
;;
|
;;
|
||||||
"powerbutton_two")
|
"powerbutton_two")
|
||||||
lock_screen_action 2
|
sxmo_state.sh click 2
|
||||||
;;
|
;;
|
||||||
"powerbutton_three")
|
"powerbutton_three")
|
||||||
if grep -q proximity "$SXMO_STATE"; then
|
sxmo_state.sh click 2
|
||||||
stop_proximity_lock
|
|
||||||
else
|
|
||||||
lock_screen_action 2
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
"voldown_one")
|
"voldown_one")
|
||||||
sxmo_audio.sh vol down 5
|
sxmo_audio.sh vol down 5
|
||||||
@@ -110,9 +98,117 @@ case "$WMCLASS" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*"foot"*|*"st"*|*"vte"*|"terminal")
|
*"acme"*)
|
||||||
# First we try to handle the app running inside st:
|
case "$ACTION" in
|
||||||
|
"volup_one")
|
||||||
|
xdotool click 3
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"voldown_one")
|
||||||
|
xdotool click 2
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*"links"*)
|
||||||
|
case "$ACTION" in
|
||||||
|
# you're probably dragging the scrollbar
|
||||||
|
*"uprightedge") exit 0 ;;
|
||||||
|
*"downrightedge") exit 0 ;;
|
||||||
|
*"onedown")
|
||||||
|
sxmo_type.sh -M Ctrl -M Shift -k b
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*"oneup")
|
||||||
|
sxmo_type.sh -M Ctrl -M Shift -k f
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*"netsurf"*)
|
||||||
|
case "$ACTION" in
|
||||||
|
# you're probably dragging the scrollbar
|
||||||
|
*"uprightedge") exit 0 ;;
|
||||||
|
*"downrightedge") exit 0 ;;
|
||||||
|
*"onedown")
|
||||||
|
sxmo_type.sh -k Page_Up
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*"oneup")
|
||||||
|
sxmo_type.sh -k Page_Down
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*"foot"*|*"st"*|*"vte"*|"terminal") # Terminals
|
||||||
|
case "$WMCLASS" in # Handle programs without touch support
|
||||||
|
*"st"*)
|
||||||
case "$WMNAME" in
|
case "$WMNAME" in
|
||||||
|
*"weechat"*|*'gomuks'*)
|
||||||
|
case "$ACTION" in
|
||||||
|
*"onedown")
|
||||||
|
sxmo_type.sh -k Page_Up
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*"oneup")
|
||||||
|
sxmo_type.sh -k Page_Down
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*"less"*|*"amfora"*)
|
||||||
|
case "$ACTION" in
|
||||||
|
*"onedown")
|
||||||
|
sxmo_type.sh u
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*"oneup")
|
||||||
|
sxmo_type.sh d
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*'irssi'*)
|
||||||
|
case "$ACTION" in
|
||||||
|
"onedown")
|
||||||
|
sxmo_type.sh -M Alt p
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"oneup")
|
||||||
|
sxmo_type.sh -M Alt n
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*'epy'*|*'epr'*)
|
||||||
|
case "$ACTION" in
|
||||||
|
"onedown")
|
||||||
|
sxmo_type.sh h
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"oneup")
|
||||||
|
sxmo_type.sh l
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*'nnn'*|'lf')
|
||||||
|
case "$ACTION" in
|
||||||
|
"onedown")
|
||||||
|
sxmo_type.sh -k Down
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"oneup")
|
||||||
|
sxmo_type.sh -k Up
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$WMNAME" in # Handle programs
|
||||||
*"weechat"*)
|
*"weechat"*)
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
*"oneleft")
|
*"oneleft")
|
||||||
@@ -123,14 +219,6 @@ case "$WMCLASS" in
|
|||||||
sxmo_type.sh -M Alt -k less
|
sxmo_type.sh -M Alt -k less
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*"oneup")
|
|
||||||
sxmo_type.sh -k Page_Down
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"onedown")
|
|
||||||
sxmo_type.sh -k Page_Up
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*" sms")
|
*" sms")
|
||||||
@@ -161,14 +249,6 @@ case "$WMCLASS" in
|
|||||||
sxmo_type.sh q
|
sxmo_type.sh q
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*"onedown")
|
|
||||||
sxmo_type.sh u
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneup")
|
|
||||||
sxmo_type.sh d
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneleft")
|
*"oneleft")
|
||||||
sxmo_type.sh ":n" -k Return
|
sxmo_type.sh ":n" -k Return
|
||||||
exit 0
|
exit 0
|
||||||
@@ -189,14 +269,6 @@ case "$WMCLASS" in
|
|||||||
sxmo_type.sh -M Shift -k Tab
|
sxmo_type.sh -M Shift -k Tab
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*"onedown")
|
|
||||||
sxmo_type.sh u
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneup")
|
|
||||||
sxmo_type.sh d
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"oneright")
|
*"oneright")
|
||||||
sxmo_type.sh -k Return
|
sxmo_type.sh -k Return
|
||||||
exit 0
|
exit 0
|
||||||
@@ -215,76 +287,59 @@ case "$WMCLASS" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*'irssi'*)
|
*"epy"*|*"epr"*)
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
"onedown")
|
*"left"|"voldown_one")
|
||||||
sxmo_type.sh -M Alt p
|
sxmo_type.sh l
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"oneup")
|
*"right"|"volup_one")
|
||||||
sxmo_type.sh -M Alt n
|
sxmo_type.sh h
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
"voldown_three"|"twodownbottomedge")
|
||||||
|
sxmo_type.sh q
|
||||||
|
exit
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*'gomuks'*)
|
*'nnn'*|'lf')
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
*"oneup")
|
*"left")
|
||||||
sxmo_type.sh -k Page_Down
|
sxmo_type.sh -k Right
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*"onedown")
|
*"right")
|
||||||
sxmo_type.sh -k Page_Up
|
sxmo_type.sh -k Left
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# Now we try generic actions for terminal
|
|
||||||
case "$ACTION" in
|
case "$WMCLASS" in # Handle general scrolling without touch support
|
||||||
*"onedown")
|
|
||||||
case "$WMCLASS" in
|
|
||||||
*"foot"*)
|
|
||||||
sxmo_type.sh -M Shift -k Page_Up
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"st"*)
|
*"st"*)
|
||||||
|
case "$ACTION" in
|
||||||
|
*"onedown")
|
||||||
sxmo_type.sh -M Ctrl -M Shift -k b
|
sxmo_type.sh -M Ctrl -M Shift -k b
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*"oneup")
|
*"oneup")
|
||||||
case "$WMCLASS" in
|
|
||||||
*"foot"*)
|
|
||||||
sxmo_type.sh -M Shift -k Page_Down
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*"st"*)
|
|
||||||
sxmo_type.sh -M Ctrl -M Shift -k f
|
sxmo_type.sh -M Ctrl -M Shift -k f
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
"uprightedge")
|
|
||||||
case "$WMCLASS" in
|
|
||||||
"org.gnome.vte.application"|"terminal")
|
"org.gnome.vte.application"|"terminal")
|
||||||
|
case "$ACTION" in
|
||||||
# For VTE, fallback to doing nothing,
|
# For VTE, fallback to doing nothing,
|
||||||
# you're probably dragging the scrollbar
|
# you're probably dragging the scrollbar
|
||||||
exit 0
|
*"uprightedge") exit 0 ;;
|
||||||
;;
|
*"downrightedge") exit 0 ;;
|
||||||
esac
|
|
||||||
;;
|
|
||||||
"downrightedge")
|
|
||||||
case "$WMCLASS" in
|
|
||||||
"org.gnome.vte.application"|"terminal")
|
|
||||||
# For VTE, fallback to doing nothing,
|
|
||||||
# you're probably dragging the scrollbar
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#standard handling
|
#standard handling
|
||||||
@@ -293,24 +348,24 @@ case "$ACTION" in
|
|||||||
if echo "$WMCLASS" | grep -i "megapixels"; then
|
if echo "$WMCLASS" | grep -i "megapixels"; then
|
||||||
sxmo_type.sh -k space
|
sxmo_type.sh -k space
|
||||||
else
|
else
|
||||||
lock_screen_action
|
sxmo_state.sh click
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"powerbutton_two")
|
"powerbutton_two")
|
||||||
lock_screen_action 2
|
sxmo_state.sh click 2
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"powerbutton_three")
|
"powerbutton_three")
|
||||||
if grep -q proximity "$SXMO_STATE"; then
|
|
||||||
stop_proximity_lock
|
|
||||||
else
|
|
||||||
sxmo_terminal.sh
|
sxmo_terminal.sh
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"voldown_one")
|
"voldown_one")
|
||||||
|
if [ -n "$SXMO_NO_VIRTUAL_KEYBOARD" ]; then
|
||||||
|
sxmo_killwindow.sh
|
||||||
|
else
|
||||||
sxmo_keyboard.sh toggle
|
sxmo_keyboard.sh toggle
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
"voldown_two")
|
"voldown_two")
|
||||||
@@ -366,11 +421,19 @@ case "$ACTION" in
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"upbottomedge")
|
"upbottomedge")
|
||||||
|
if [ -n "$SXMO_NO_VIRTUAL_KEYBOARD" ]; then
|
||||||
|
sxmo_terminal.sh
|
||||||
|
else
|
||||||
sxmo_keyboard.sh open
|
sxmo_keyboard.sh open
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"downbottomedge")
|
"downbottomedge")
|
||||||
|
if [ -n "$SXMO_NO_VIRTUAL_KEYBOARD" ]; then
|
||||||
|
sxmo_killwindow.sh
|
||||||
|
else
|
||||||
sxmo_keyboard.sh close
|
sxmo_keyboard.sh close
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"downtopedge")
|
"downtopedge")
|
||||||
@@ -427,14 +490,12 @@ case "$ACTION" in
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"bottomleftcorner")
|
"bottomleftcorner")
|
||||||
if grep -q proximity "$SXMO_STATE"; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
sxmo_dmenu.sh close
|
sxmo_dmenu.sh close
|
||||||
|
sxmo_keyboard.sh close
|
||||||
if [ -n "$WMCLASS" ]; then
|
if [ -n "$WMCLASS" ]; then
|
||||||
sxmo_hook_lock.sh
|
sxmo_state.sh set lock
|
||||||
else
|
else
|
||||||
sxmo_hook_screenoff.sh
|
sxmo_state.sh set screenoff
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
LISGD_THRESHOLD="${SXMO_LISGD_THRESHOLD:-125}"
|
LISGD_THRESHOLD="${SXMO_LISGD_THRESHOLD:-125}"
|
||||||
LISGD_THRESHOLD_PRESSED="${SXMO_LISGD_THRESHOLD_PRESSED:-60}"
|
LISGD_THRESHOLD_PRESSED="${SXMO_LISGD_THRESHOLD_PRESSED:-60}"
|
||||||
LISGD_INPUT_DEVICE="${SXMO_LISGD_INPUT_DEVICE:-"/dev/input/touchscreen"}"
|
LISGD_INPUT_DEVICE="${SXMO_LISGD_INPUT_DEVICE:-"/dev/input/by-path/first-touchscreen"}"
|
||||||
|
|
||||||
if [ dwm = "$SXMO_WM" ]; then
|
if [ dwm = "$SXMO_WM" ]; then
|
||||||
case "$(xrandr | grep primary | cut -d' ' -f 5)" in
|
case "$(xrandr | grep primary | cut -d' ' -f 5)" in
|
||||||
@@ -23,7 +23,7 @@ fi
|
|||||||
# fingers,swipe,edge,distance,command
|
# fingers,swipe,edge,distance,command
|
||||||
#order matters, only the first match gets executed
|
#order matters, only the first match gets executed
|
||||||
lisgd "$@" -d "$LISGD_INPUT_DEVICE" ${orientation:+-o $orientation} \
|
lisgd "$@" -d "$LISGD_INPUT_DEVICE" ${orientation:+-o $orientation} \
|
||||||
-t "$LISGD_THRESHOLD" -T "$LISGD_THRESHOLD_PRESSED" \
|
-s "${LISGD_EDGE_SIZE:-1.0}" -t "$LISGD_THRESHOLD" -T "$LISGD_THRESHOLD_PRESSED" \
|
||||||
-g "1,DRUL,BR,*,setsid -f sxmo_hook_inputhandler.sh bottomrightcorner" \
|
-g "1,DRUL,BR,*,setsid -f sxmo_hook_inputhandler.sh bottomrightcorner" \
|
||||||
-g "1,DLUR,BL,*,setsid -f sxmo_hook_inputhandler.sh bottomleftcorner" \
|
-g "1,DLUR,BL,*,setsid -f sxmo_hook_inputhandler.sh bottomleftcorner" \
|
||||||
-g "1,ULDR,TL,*,setsid -f sxmo_hook_inputhandler.sh topleftcorner" \
|
-g "1,ULDR,TL,*,setsid -f sxmo_hook_inputhandler.sh topleftcorner" \
|
||||||
|
@@ -14,30 +14,23 @@
|
|||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
. sxmo_common.sh
|
. sxmo_common.sh
|
||||||
|
|
||||||
exec 3<> "$SXMO_STATE.lock"
|
|
||||||
flock -x 3
|
|
||||||
|
|
||||||
sxmo_log "transitioning to stage lock"
|
|
||||||
printf lock > "$SXMO_STATE"
|
|
||||||
|
|
||||||
sxmo_wakelock.sh lock not_screenoff infinite
|
|
||||||
|
|
||||||
# This hook is called when the system reaches a locked state
|
# This hook is called when the system reaches a locked state
|
||||||
|
|
||||||
sxmo_led.sh blink blue &
|
sxmo_led.sh blink blue &
|
||||||
sxmo_hook_statusbar.sh state_change &
|
|
||||||
|
|
||||||
[ "$SXMO_WM" = "sway" ] && swaymsg mode default
|
[ "$SXMO_WM" = "sway" ] && swaymsg mode default
|
||||||
sxmo_wm.sh dpms off
|
sxmo_wm.sh dpms off
|
||||||
sxmo_wm.sh inputevent touchscreen off
|
sxmo_wm.sh inputevent touchscreen off
|
||||||
|
|
||||||
sxmo_daemons.sh stop periodic_blink
|
sxmo_jobs.sh stop periodic_blink
|
||||||
sxmo_daemons.sh stop periodic_wakelock_check
|
sxmo_jobs.sh stop periodic_wakelock_check
|
||||||
|
|
||||||
# Go to screenoff after 8 seconds of inactivity
|
# Go down after 8 seconds of inactivity
|
||||||
if ! [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
|
if [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
|
||||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
sxmo_jobs.sh stop idle_locker
|
||||||
timeout "${SXMO_LOCK_IDLE_TIME:-8}" "sxmo_hook_screenoff.sh"
|
else
|
||||||
|
sxmo_jobs.sh start idle_locker sxmo_idle.sh -w \
|
||||||
|
timeout "${SXMO_LOCK_IDLE_TIME:-8}" "sxmo_state.sh idle"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wait
|
wait
|
@@ -2,7 +2,7 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
sxmo_jobs.sh start idle_locker sxmo_idle.sh -w \
|
||||||
timeout 10 'sxmo_wm.sh dpms on' \
|
timeout 10 'sxmo_wm.sh dpms on' \
|
||||||
resume 'sxmo_wm.sh dpms off'
|
resume 'sxmo_wm.sh dpms off'
|
||||||
|
|
||||||
@@ -15,4 +15,5 @@ case "$SXMO_WM" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
sxmo_hook_unlock.sh
|
# need & cause we are still holding flock
|
||||||
|
sxmo_state.sh set unlock &
|
12
configs/default_hooks/sxmo_hook_lockstatusbar.sh
Executable file
12
configs/default_hooks/sxmo_hook_lockstatusbar.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
|
# For use with peanutbutter (peanutbutter --font Sxmo --statuscommand sxmo_hook_lockstatusbar.sh)
|
||||||
|
# This filters out the last component (which is usually the time and is already displayed more prominently
|
||||||
|
|
||||||
|
# make sure status bar icons are suited for peanutbutter
|
||||||
|
sxmo_hook_statusbar.sh state_change
|
||||||
|
|
||||||
|
# obtain status output to pass to peanutbutter (this keeps running and updating to stdout)
|
||||||
|
exec sxmo_status_watch.sh -o pango
|
@@ -9,10 +9,4 @@
|
|||||||
# $1 = Contact Name or Number (if not in contacts)
|
# $1 = Contact Name or Number (if not in contacts)
|
||||||
|
|
||||||
# kill existing ring playback
|
# kill existing ring playback
|
||||||
if [ -e "$XDG_RUNTIME_DIR/sxmo.ring.pid" ]; then
|
sxmo_jobs.sh stop ringing
|
||||||
MPVID="$(cat "$XDG_RUNTIME_DIR/sxmo.ring.pid")"
|
|
||||||
kill "$MPVID"
|
|
||||||
rm "$XDG_RUNTIME_DIR/sxmo.ring.pid"
|
|
||||||
fi
|
|
||||||
|
|
||||||
sxmo_playerctl.sh resume_all
|
|
||||||
|
@@ -24,7 +24,6 @@ case "$newstate" in
|
|||||||
"enabling")
|
"enabling")
|
||||||
sxmo_log "State is enabling. Clearing stale call files."
|
sxmo_log "State is enabling. Clearing stale call files."
|
||||||
rm "$XDG_RUNTIME_DIR"/sxmo_calls/* 2>/dev/null
|
rm "$XDG_RUNTIME_DIR"/sxmo_calls/* 2>/dev/null
|
||||||
rm -f "$XDG_RUNTIME_DIR"/sxmo.ring.pid 2>/dev/null
|
|
||||||
rm -f "$SXMO_NOTIFDIR"/incomingcall* 2>/dev/null
|
rm -f "$SXMO_NOTIFDIR"/incomingcall* 2>/dev/null
|
||||||
;;
|
;;
|
||||||
"registered")
|
"registered")
|
||||||
|
@@ -6,8 +6,6 @@
|
|||||||
# incoming call, i.e., ignore the call ringing in.
|
# incoming call, i.e., ignore the call ringing in.
|
||||||
|
|
||||||
# kill existing ring playback
|
# kill existing ring playback
|
||||||
if [ -e "$XDG_RUNTIME_DIR/sxmo.ring.pid" ]; then
|
sxmo_jobs.sh stop ringing
|
||||||
MPVID="$(cat "$XDG_RUNTIME_DIR/sxmo.ring.pid")"
|
|
||||||
kill "$MPVID"
|
sxmo_playerctl.sh resume_all
|
||||||
rm "$XDG_RUNTIME_DIR/sxmo.ring.pid"
|
|
||||||
fi
|
|
||||||
|
@@ -2,15 +2,19 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
|
# Runs when a notification arrives,
|
||||||
|
# Arguments:
|
||||||
|
# $1 - The notification file which contains the notification text.
|
||||||
|
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
. sxmo_common.sh
|
. sxmo_common.sh
|
||||||
|
|
||||||
#if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then
|
#if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then
|
||||||
# VIBS=5
|
# VIBS=5
|
||||||
# VIBI=0
|
# VIBI=0
|
||||||
# while [ $VIBI -lt $VIBS ]; do
|
# while [ "$VIBI" -lt "$VIBS" ]; do
|
||||||
# sxmo_vibrate 400 &
|
# sxmo_vibrate 400 "${SXMO_VIBRATE_STRENGTH:-1}" &
|
||||||
# sleep 0.5
|
# sleep 0.5
|
||||||
# VIBI=$(echo $VIBI+1 | bc)
|
# VIBI="$(echo "$VIBI+1" | bc)"
|
||||||
# done
|
# done
|
||||||
#fi
|
#fi
|
||||||
|
@@ -5,10 +5,4 @@
|
|||||||
# This script is executed (asynchronously) when you pick up an incoming call
|
# This script is executed (asynchronously) when you pick up an incoming call
|
||||||
|
|
||||||
# kill existing ring playback
|
# kill existing ring playback
|
||||||
if [ -e "$XDG_RUNTIME_DIR/sxmo.ring.pid" ]; then
|
sxmo_jobs.sh stop ringing
|
||||||
xargs -r kill < "$XDG_RUNTIME_DIR/sxmo.ring.pid"
|
|
||||||
rm "$XDG_RUNTIME_DIR/sxmo.ring.pid"
|
|
||||||
fi
|
|
||||||
|
|
||||||
sxmo_playerctl.sh pause_all
|
|
||||||
|
|
||||||
|
@@ -6,6 +6,12 @@
|
|||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
. sxmo_common.sh
|
. sxmo_common.sh
|
||||||
|
|
||||||
sxmo_wakelock.sh lock stay_awake "${SXMO_UNLOCK_IDLE_TIME:-120}s"
|
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||||
|
MMCLI="$(mmcli -m any -J 2>/dev/null)"
|
||||||
|
if [ -z "$MMCLI" ]; then
|
||||||
|
sxmo_notify_user.sh "Modem crashed! 30s recovery."
|
||||||
|
sxmo_wakelock.sh lock sxmo_modem_crashed 30s
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Add here whatever you want to do
|
# Add here whatever you want to do
|
8
configs/default_hooks/sxmo_hook_power.sh
Normal file
8
configs/default_hooks/sxmo_hook_power.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
|
# This script is executed before reboot and poweroff the system
|
||||||
|
#
|
||||||
|
# The following parameters are provided:
|
||||||
|
# $1 = Action (poweroff or reboot)
|
@@ -100,4 +100,4 @@ if ! daemon_isrunning modemmanager; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# we want 120s before sleeping again
|
# we want 120s before sleeping again
|
||||||
sxmo_wakelock.sh lock modem_manually_reset 120s
|
sxmo_wakelock.sh lock sxmo_modem_manually_reset 120s
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
if sxmo_modemcall.sh list_active_calls \
|
if sxmo_modemcall.sh list_active_calls \
|
||||||
| grep -v ringing-in \
|
| grep -v ringing-in \
|
||||||
| grep -q .; then
|
| grep -q .; then
|
||||||
sxmo_vibrate 1500
|
sxmo_vibrate 1500 "${SXMO_VIBRATE_STRENGTH:-1}"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -25,6 +25,36 @@ if ! sxmo_modemcall.sh list_active_calls \
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
finish() {
|
||||||
|
trap - INT TERM EXIT
|
||||||
|
jobs -p | xargs -r kill
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
ring() {
|
||||||
|
mpv --no-resume-playback --quiet --no-video \
|
||||||
|
--loop="${SXMO_RINGNUMBER:-10}" "$SXMO_RINGTONE" >/dev/null &
|
||||||
|
}
|
||||||
|
|
||||||
|
vibrate() {
|
||||||
|
while : ; do
|
||||||
|
trap 'finish' INT TERM EXIT
|
||||||
|
sxmo_vibrate 1500 "${SXMO_VIBRATE_STRENGTH:-1}" &
|
||||||
|
wait "$!"
|
||||||
|
|
||||||
|
sleep 0.5 &
|
||||||
|
wait "$!"
|
||||||
|
done &
|
||||||
|
}
|
||||||
|
|
||||||
|
# SILENT MODE
|
||||||
|
if [ -f "$XDG_CONFIG_HOME"/sxmo/.busy ]; then
|
||||||
|
end="$(cat "$XDG_CONFIG_HOME"/sxmo/.busy)"
|
||||||
|
if [ -z "$end" ] || [ "$(date +%s)" -lt "$end" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# RING & VIBRATE MODE (DEFAULT)
|
# RING & VIBRATE MODE (DEFAULT)
|
||||||
if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ] && [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then
|
if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ] && [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then
|
||||||
sxmo_log "RING AND VIBRATE"
|
sxmo_log "RING AND VIBRATE"
|
||||||
@@ -33,15 +63,8 @@ if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ] && [ ! -f "$XDG_CONFIG_HOME"/sxmo/.n
|
|||||||
# In order for this to work with mpv, you will need to install mpv-mdis.
|
# In order for this to work with mpv, you will need to install mpv-mdis.
|
||||||
sxmo_playerctl.sh pause_all
|
sxmo_playerctl.sh pause_all
|
||||||
|
|
||||||
timeout "$SXMO_RINGTIME" mpv --no-resume-playback --quiet --no-video \
|
ring
|
||||||
--loop="$SXMO_RINGNUMBER" "$SXMO_RINGTONE" >/dev/null &
|
vibrate
|
||||||
MPVID=$!
|
|
||||||
echo "$MPVID" > "$XDG_RUNTIME_DIR/sxmo.ring.pid"
|
|
||||||
# vibrate while mpv is running
|
|
||||||
while kill -0 $MPVID; do
|
|
||||||
sxmo_vibrate 1500
|
|
||||||
sleep 0.5
|
|
||||||
done
|
|
||||||
|
|
||||||
# RING-ONLY MODE
|
# RING-ONLY MODE
|
||||||
elif [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ] && [ -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then
|
elif [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ] && [ -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then
|
||||||
@@ -51,16 +74,15 @@ elif [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ] && [ -f "$XDG_CONFIG_HOME"/sxmo/.n
|
|||||||
# In order for this to work with mpv, you will need to install mpv-mdis.
|
# In order for this to work with mpv, you will need to install mpv-mdis.
|
||||||
sxmo_playerctl.sh pause_all
|
sxmo_playerctl.sh pause_all
|
||||||
|
|
||||||
timeout "$SXMO_RINGTIME" mpv --no-resume-playback --quiet --no-video \
|
ring
|
||||||
--loop="$SXMO_RINGNUMBER" "$SXMO_RINGTONE" >/dev/null &
|
|
||||||
echo "$!" > "$XDG_RUNTIME_DIR/sxmo.ring.pid"
|
|
||||||
|
|
||||||
# VIBRATE-ONLY MODE
|
# VIBRATE-ONLY MODE
|
||||||
elif [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ] && [ -f "$XDG_CONFIG_HOME"/sxmo/.noring ]; then
|
elif [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ] && [ -f "$XDG_CONFIG_HOME"/sxmo/.noring ]; then
|
||||||
smxo_log "VIBRATE ONLY"
|
smxo_log "VIBRATE ONLY"
|
||||||
for _ in $(seq 5); do
|
|
||||||
sxmo_vibrate 1500
|
vibrate
|
||||||
sleep 0.5
|
|
||||||
done &
|
|
||||||
echo "$!" > "$XDG_RUNTIME_DIR/sxmo.ring.pid"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
trap 'finish' INT TERM EXIT
|
||||||
|
sleep "${SXMO_RINGTIME:-20}" &
|
||||||
|
wait "$!"
|
||||||
|
@@ -8,4 +8,4 @@
|
|||||||
|
|
||||||
# The following parameters are provided:
|
# The following parameters are provided:
|
||||||
# $1 = the new orientation
|
# $1 = the new orientation
|
||||||
# possible values are "normal", "left" and "right"
|
# possible values are "normal", "invert", "left" and "right"
|
||||||
|
@@ -16,30 +16,35 @@
|
|||||||
|
|
||||||
# This hook is called when the system reaches a off state (screen off)
|
# This hook is called when the system reaches a off state (screen off)
|
||||||
|
|
||||||
exec 3<> "$SXMO_STATE.lock"
|
sxmo_led.sh blink red blue &
|
||||||
flock -x 3
|
|
||||||
|
|
||||||
sxmo_log "transitioning to stage off"
|
|
||||||
printf screenoff > "$SXMO_STATE"
|
|
||||||
sxmo_hook_statusbar.sh state_change &
|
|
||||||
|
|
||||||
[ "$SXMO_WM" = "sway" ] && swaymsg mode default
|
[ "$SXMO_WM" = "sway" ] && swaymsg mode default
|
||||||
sxmo_wm.sh dpms on
|
sxmo_wm.sh dpms on
|
||||||
sxmo_wm.sh inputevent touchscreen off
|
sxmo_wm.sh inputevent touchscreen off
|
||||||
|
|
||||||
sxmo_daemons.sh start periodic_blink sxmo_run_periodically.sh 2 sxmo_led.sh blink red blue
|
if [ ! -e "$XDG_CACHE_HOME"/sxmo/sxmo.nosuspend ]; then
|
||||||
|
sxmo_jobs.sh start periodic_blink \
|
||||||
|
sxmo_run_periodically.sh -w 2 -- sxmo_led.sh blink red blue
|
||||||
|
fi
|
||||||
|
|
||||||
case "$SXMO_WM" in
|
case "$SXMO_WM" in
|
||||||
dwm)
|
dwm)
|
||||||
# dmenu will grab input focus (i.e. power button) so kill it before going to
|
# dmenu will grab input focus (i.e. power button) so kill it before going to
|
||||||
# screenoff unless proximity lock is running (i.e. there's a phone call).
|
# screenoff unless proximity lock is running (i.e. there's a phone call).
|
||||||
if ! sxmo_daemons.sh running proximity_lock -q; then
|
if ! sxmo_jobs.sh running proximity_lock -q; then
|
||||||
sxmo_dmenu.sh close
|
sxmo_dmenu.sh close
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
sxmo_jobs.sh stop idle_locker
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
|
||||||
sxmo_wakelock.sh lock hold_a_bit 3s # avoid immediate suspension
|
case "$SXMO_WM" in
|
||||||
sxmo_wakelock.sh unlock not_screenoff
|
sway)
|
||||||
|
if command -v peanutbutter > /dev/null; then
|
||||||
|
peanutbutter --font Sxmo --statuscommand sxmo_hook_lockstatusbar.sh && sxmo_hook_statusbar.sh state_change &
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
@@ -17,14 +17,24 @@
|
|||||||
. sxmo_common.sh
|
. sxmo_common.sh
|
||||||
|
|
||||||
# do nothing if active call
|
# do nothing if active call
|
||||||
if ! sxmo_modemcall.sh list_active_calls | grep -q active; then
|
if sxmo_modemcall.sh list_active_calls | grep -q active; then
|
||||||
|
exit
|
||||||
if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ]; then
|
|
||||||
mpv --no-resume-playback --quiet --no-video "$SXMO_TEXTSOUND" >> /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then
|
|
||||||
sxmo_vibrate 500
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# do nothing if silent mode
|
||||||
|
if [ -f "$XDG_CONFIG_HOME"/sxmo/.busy ]; then
|
||||||
|
end="$(cat "$XDG_CONFIG_HOME"/sxmo/.busy)"
|
||||||
|
if [ -z "$end" ] || [ "$(date +%s)" -lt "$end" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ]; then
|
||||||
|
mpv --no-resume-playback --quiet --no-video "$SXMO_TEXTSOUND" >> /dev/null 2>&1 &
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then
|
||||||
|
sxmo_vibrate 500 "${SXMO_VIBRATE_STRENGTH:-1}" &
|
||||||
|
fi
|
||||||
|
|
||||||
|
wait
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
# Allow user to override what we log in the sms.txt file. Note if you change
|
# Allow user to override what we log in the sms.txt file. Note if you change
|
||||||
# this you probably should change sxmo_hook_parselog.sh
|
# this you probably should change sxmo_hook_tailtextlog.sh
|
||||||
|
|
||||||
# include common definitions
|
# include common definitions
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
|
# Runs upon system start and starts various background services
|
||||||
|
|
||||||
# include common definitions
|
# include common definitions
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
. sxmo_common.sh
|
. sxmo_common.sh
|
||||||
@@ -9,26 +11,38 @@
|
|||||||
# Create xdg user directories, such as ~/Pictures
|
# Create xdg user directories, such as ~/Pictures
|
||||||
xdg-user-dirs-update
|
xdg-user-dirs-update
|
||||||
|
|
||||||
sxmo_daemons.sh start daemon_manager superd -v
|
sxmo_jobs.sh start daemon_manager superd
|
||||||
|
|
||||||
# let time to superd to start correctly
|
# let time to superd to start correctly
|
||||||
while ! superctl status > /dev/null 2>&1; do
|
while ! superctl status > /dev/null 2>&1; do
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Not dangerous if "locker" isn't an available state
|
||||||
|
sxmo_state.sh set locker
|
||||||
|
|
||||||
|
if [ -n "$SXMO_ROTATE_START" ]; then
|
||||||
|
sxmo_rotate.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# Load our sound daemons
|
# Load our sound daemons
|
||||||
|
|
||||||
if [ "$(command -v pulseaudio)" ]; then
|
if [ -z "$SXMO_NO_AUDIO" ]; then
|
||||||
|
if [ "$(command -v pulseaudio)" ]; then
|
||||||
superctl start pulseaudio
|
superctl start pulseaudio
|
||||||
elif [ "$(command -v pipewire)" ]; then
|
elif [ "$(command -v pipewire)" ]; then
|
||||||
# pipewire-pulse will start pipewire
|
# pipewire-pulse will start pipewire
|
||||||
superctl start pipewire-pulse
|
superctl start pipewire-pulse
|
||||||
superctl start wireplumber
|
superctl start wireplumber
|
||||||
|
fi
|
||||||
|
|
||||||
|
# monitor for headphone for statusbar
|
||||||
|
superctl start sxmo_soundmonitor
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Periodically update some status bar components
|
# Periodically update some status bar components
|
||||||
sxmo_hook_statusbar.sh all
|
sxmo_hook_statusbar.sh all
|
||||||
sxmo_daemons.sh start statusbar_periodics sxmo_run_aligned.sh 60 \
|
sxmo_jobs.sh start statusbar_periodics sxmo_run_aligned.sh 60 \
|
||||||
sxmo_hook_statusbar.sh periodics
|
sxmo_hook_statusbar.sh periodics
|
||||||
|
|
||||||
# mako/dunst are required for warnings.
|
# mako/dunst are required for warnings.
|
||||||
@@ -39,10 +53,10 @@ case "$SXMO_WM" in
|
|||||||
superctl start sxmo_wob
|
superctl start sxmo_wob
|
||||||
superctl start sxmo_menumode_toggler
|
superctl start sxmo_menumode_toggler
|
||||||
superctl start bonsaid
|
superctl start bonsaid
|
||||||
swaymsg output '*' bg "$SXMO_BG_IMG" fill
|
|
||||||
;;
|
;;
|
||||||
dwm)
|
dwm)
|
||||||
superctl start dunst
|
superctl start dunst
|
||||||
|
superctl start sxmo_xob
|
||||||
|
|
||||||
# Auto hide cursor with touchscreen, Show it with a mouse
|
# Auto hide cursor with touchscreen, Show it with a mouse
|
||||||
if command -v "unclutter-xfixes" > /dev/null; then
|
if command -v "unclutter-xfixes" > /dev/null; then
|
||||||
@@ -57,30 +71,35 @@ case "$SXMO_WM" in
|
|||||||
superctl start sxmo-x11-status
|
superctl start sxmo-x11-status
|
||||||
superctl start bonsaid
|
superctl start bonsaid
|
||||||
[ -n "$SXMO_MONITOR" ] && xrandr --output "$SXMO_MONITOR" --primary
|
[ -n "$SXMO_MONITOR" ] && xrandr --output "$SXMO_MONITOR" --primary
|
||||||
feh --bg-fill "$SXMO_BG_IMG"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# To setup initial lock state
|
|
||||||
sxmo_hook_unlock.sh
|
|
||||||
|
|
||||||
# Turn on auto-suspend
|
# Turn on auto-suspend
|
||||||
if [ -w "/sys/power/wakeup_count" ] && [ -f "/sys/power/wake_lock" ]; then
|
if sxmo_wakelock.sh isenabled; then
|
||||||
|
sxmo_wakelock.sh lock sxmo_not_suspendable infinite
|
||||||
superctl start sxmo_autosuspend
|
superctl start sxmo_autosuspend
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Turn on lisgd
|
# To setup initial unlock state
|
||||||
superctl start sxmo_hook_lisgd
|
sxmo_state.sh set unlock
|
||||||
|
|
||||||
if [ "$(command -v ModemManager)" ]; then
|
# Turn on lisgd
|
||||||
|
if [ ! -e "$XDG_CACHE_HOME"/sxmo/sxmo.nogesture ]; then
|
||||||
|
superctl start sxmo_hook_lisgd
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$SXMO_NO_MODEM" ] && command -v ModemManager > /dev/null; then
|
||||||
# Turn on the dbus-monitors for modem-related tasks
|
# Turn on the dbus-monitors for modem-related tasks
|
||||||
superctl start sxmo_modemmonitor
|
superctl start sxmo_modemmonitor
|
||||||
|
|
||||||
# place a wakelock for 120s to allow the modem to fully warm up (eg25 +
|
# place a wakelock for 120s to allow the modem to fully warm up (eg25 +
|
||||||
# elogind/systemd would do this for us, but we don't use those.)
|
# elogind/systemd would do this for us, but we don't use those.)
|
||||||
sxmo_wakelock.sh lock modem_warming_up 120s
|
sxmo_wakelock.sh lock sxmo_modem_warming_up 120s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Start the desktop wallpaper
|
||||||
|
superctl start sxmo_bg
|
||||||
|
|
||||||
# Start the desktop widget (e.g. clock)
|
# Start the desktop widget (e.g. clock)
|
||||||
superctl start sxmo_conky
|
superctl start sxmo_conky
|
||||||
|
|
||||||
@@ -93,26 +112,25 @@ superctl start sxmo_networkmonitor
|
|||||||
# The daemon that display notifications popup messages
|
# The daemon that display notifications popup messages
|
||||||
superctl start sxmo_notificationmonitor
|
superctl start sxmo_notificationmonitor
|
||||||
|
|
||||||
# monitor for headphone for statusbar
|
|
||||||
superctl start sxmo_soundmonitor
|
|
||||||
|
|
||||||
# Play a funky startup tune if you want (disabled by default)
|
# Play a funky startup tune if you want (disabled by default)
|
||||||
#mpv --quiet --no-video ~/welcome.ogg &
|
#mpv --quiet --no-video ~/welcome.ogg &
|
||||||
|
|
||||||
# mmsd and vvmd
|
# mmsd and vvmd
|
||||||
if [ -f "${SXMO_MMS_BASE_DIR:-"$HOME"/.mms/modemmanager}/mms" ]; then
|
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||||
|
if [ -f "${SXMO_MMS_BASE_DIR:-"$HOME"/.mms/modemmanager}/mms" ]; then
|
||||||
superctl start mmsd-tng
|
superctl start mmsd-tng
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "${SXMO_VVM_BASE_DIR:-"$HOME"/.vvm/modemmanager}/vvm" ]; then
|
if [ -f "${SXMO_VVM_BASE_DIR:-"$HOME"/.vvm/modemmanager}/vvm" ]; then
|
||||||
superctl start vvmd
|
superctl start vvmd
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add some warnings if things are not setup correctly
|
# add some warnings if things are not setup correctly
|
||||||
deviceprofile="$(command -v "sxmo_deviceprofile_$SXMO_DEVICE_NAME.sh")"
|
if ! command -v "sxmo_deviceprofile_$SXMO_DEVICE_NAME.sh"; then
|
||||||
|
sxmo_notify_user.sh --urgency=critical \
|
||||||
[ -f "$deviceprofile" ] || sxmo_notify_user.sh --urgency=critical \
|
|
||||||
"No deviceprofile found $SXMO_DEVICE_NAME. See: https://sxmo.org/deviceprofile"
|
"No deviceprofile found $SXMO_DEVICE_NAME. See: https://sxmo.org/deviceprofile"
|
||||||
|
fi
|
||||||
|
|
||||||
sxmo_migrate.sh state || sxmo_notify_user.sh --urgency=critical \
|
sxmo_migrate.sh state || sxmo_notify_user.sh --urgency=critical \
|
||||||
"Config needs migration" "$? file(s) in your sxmo configuration are out of date and disabled - using defaults until you migrate (run sxmo_migrate.sh)"
|
"Config needs migration" "$? file(s) in your sxmo configuration are out of date and disabled - using defaults until you migrate (run sxmo_migrate.sh)"
|
||||||
|
@@ -17,9 +17,14 @@
|
|||||||
# right and "variable" icons (that come and go) on the left.
|
# right and "variable" icons (that come and go) on the left.
|
||||||
|
|
||||||
set_time() {
|
set_time() {
|
||||||
|
if pidof peanutbutter > /dev/null; then
|
||||||
|
#peanutbutter already features a clock, no need for one in the icon bar
|
||||||
|
sxmobar -d time
|
||||||
|
else
|
||||||
date "+${SXMO_STATUS_DATE_FORMAT:-%H:%M}" | while read -r date; do
|
date "+${SXMO_STATUS_DATE_FORMAT:-%H:%M}" | while read -r date; do
|
||||||
sxmobar -a time 99 "$date"
|
sxmobar -a time 99 "$date"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_state() {
|
set_state() {
|
||||||
@@ -27,11 +32,18 @@ set_state() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
STATE_LABEL="$(cat "$SXMO_STATE")"
|
if sxmo_jobs.sh running proximity_lock; then
|
||||||
case "$STATE_LABEL" in
|
|
||||||
proximity*)
|
|
||||||
sxmobar -a -e bold -f orange state 90 "$icon_state_proximity" # circle with dot
|
sxmobar -a -e bold -f orange state 90 "$icon_state_proximity" # circle with dot
|
||||||
;;
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v peanutbutter > /dev/null; then
|
||||||
|
# no need for a state icon in this (default) scenario, the state will be obvious, either peanutbutter is on or it isn't
|
||||||
|
sxmobar -d state
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$(sxmo_state.sh get)" in
|
||||||
screenoff)
|
screenoff)
|
||||||
sxmobar -a -e bold -f red state 90 "$icon_state_screenoff" # filled circle
|
sxmobar -a -e bold -f red state 90 "$icon_state_screenoff" # filled circle
|
||||||
;;
|
;;
|
||||||
@@ -177,8 +189,10 @@ set_modem() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ "$MODEMSTATE" != failed ] && [ "$MODEMSTATE" != unknown ]; then
|
||||||
sxmobar -a -f "$fgcolor" -b "$bgcolor" -t "$style" \
|
sxmobar -a -f "$fgcolor" -b "$bgcolor" -t "$style" \
|
||||||
modem-tech 11 "$MODEMTECHCMP"
|
modem-tech 11 "$MODEMTECHCMP"
|
||||||
|
fi
|
||||||
|
|
||||||
MODEMSIGNALCMP="$icon_modem_signal_0"
|
MODEMSIGNALCMP="$icon_modem_signal_0"
|
||||||
bgcolor=default
|
bgcolor=default
|
||||||
@@ -198,8 +212,10 @@ set_modem() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ "$MODEMSTATE" != failed ] && [ "$MODEMSTATE" != unknown ]; then
|
||||||
sxmobar -a -f "$fgcolor" -b "$bgcolor" -t "$style" \
|
sxmobar -a -f "$fgcolor" -b "$bgcolor" -t "$style" \
|
||||||
modem-signal 12 "$MODEMSIGNALCMP"
|
modem-signal 12 "$MODEMSIGNALCMP"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 = type (wifi, tun)
|
# $1 = type (wifi, tun)
|
||||||
@@ -227,7 +243,7 @@ set_wifi() {
|
|||||||
|
|
||||||
# if they have a vpn nmcli c shown --active should also list:
|
# if they have a vpn nmcli c shown --active should also list:
|
||||||
# tun0 ef5fcce9-fdae-4ffe-a540-b16fc7b42852 tun tun0
|
# tun0 ef5fcce9-fdae-4ffe-a540-b16fc7b42852 tun tun0
|
||||||
if printf %b "$CONN" | cut -d':' -f3 | grep -q ^tun$; then
|
if printf %b "$CONN" | cut -d':' -f3 | grep -q -E "^tun$|^wireguard$"; then
|
||||||
wifivpn=1
|
wifivpn=1
|
||||||
else
|
else
|
||||||
wifivpn=0
|
wifivpn=0
|
||||||
@@ -271,87 +287,89 @@ set_wifi() {
|
|||||||
sxmobar -a wifi-status 30 "$icon_wif"
|
sxmobar -a wifi-status 30 "$icon_wif"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# $1 = type (wifi, tun)
|
||||||
|
# $2 = interface name (wlan0, tun0)
|
||||||
|
set_ethernet() {
|
||||||
|
conname="$(nmcli -t device show "$2" | grep ^GENERAL.CONNECTION | cut -d: -f2-)"
|
||||||
|
if [ "$conname" = "--" ]; then
|
||||||
|
# not used device
|
||||||
|
sxmobar -d ethernet-status-"$2" 30
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if nmcli -t connection show "$conname" | grep ^ipv4.method | grep -q :shared; then
|
||||||
|
sxmobar -a ethernet-status-"$2" 30 "$icon_lnk"
|
||||||
|
else
|
||||||
|
sxmobar -d ethernet-status-"$2" 30
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# $1: type (reported by nmcli, e.g., wifi, tun)
|
# $1: type (reported by nmcli, e.g., wifi, tun)
|
||||||
# $2: interface name (reported by nmcli, e.g., wlan0, tun0)
|
# $2: interface name (reported by nmcli, e.g., wlan0, tun0)
|
||||||
set_network() {
|
set_network() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
wifi|tun) set_wifi "$@" ;;
|
wifi|tun) set_wifi "$@" ;;
|
||||||
|
ethernet) set_ethernet "$@" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
set_battery() {
|
set_battery() {
|
||||||
for power_supply in /sys/class/power_supply/*; do
|
name="$1"
|
||||||
power_name="$(basename "$power_supply")"
|
state="$2"
|
||||||
|
percentage="$3"
|
||||||
|
|
||||||
fgcolor=default
|
fgcolor=default
|
||||||
bgcolor=default
|
bgcolor=default
|
||||||
style=normal
|
style=normal
|
||||||
BATCMP=
|
BATCMP=
|
||||||
|
|
||||||
if [ "$(cat "$power_supply"/type)" = "Battery" ]; then
|
case "$state" in
|
||||||
if [ -e "$power_supply"/capacity ]; then
|
fully-charged)
|
||||||
PCT="$(cat "$power_supply"/capacity)"
|
BATCMP="$icon_bat_c_3"
|
||||||
elif [ -e "$power_supply"/charge_now ]; then
|
;;
|
||||||
CHARGE_NOW="$(cat "$power_supply"/charge_now)"
|
charging)
|
||||||
CHARGE_FULL="$(cat "$power_supply"/charge_full_design)"
|
if [ "$percentage" -lt 25 ]; then
|
||||||
PCT="$(printf "scale=2; %s / %s * 100\n" "$CHARGE_NOW" "$CHARGE_FULL" | bc | cut -d'.' -f1)"
|
|
||||||
else
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e "$power_supply"/status ]; then
|
|
||||||
# The status is not always given for the battery device.
|
|
||||||
# (sometimes it's linked to the charger device).
|
|
||||||
BATSTATUS="$(cut -c1 "$power_supply"/status)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# fixes a bug with keyboard case where
|
|
||||||
# /sys/class/power_supply/ip5xxx-charger/capacity
|
|
||||||
# exists but returns 'Not a tty'
|
|
||||||
if [ -z "$PCT" ]; then
|
|
||||||
BATCMP="ERR"
|
|
||||||
elif [ "$BATSTATUS" = "C" ] || [ "$BATSTATUS" = "F" ]; then
|
|
||||||
if [ "$PCT" -lt 25 ]; then
|
|
||||||
BATCMP="$icon_bat_c_0"
|
BATCMP="$icon_bat_c_0"
|
||||||
elif [ "$PCT" -lt 50 ]; then
|
elif [ "$percentage" -lt 50 ]; then
|
||||||
BATCMP="$icon_bat_c_1"
|
BATCMP="$icon_bat_c_1"
|
||||||
elif [ "$PCT" -lt 75 ]; then
|
elif [ "$percentage" -lt 75 ]; then
|
||||||
BATCMP="$icon_bat_c_2"
|
BATCMP="$icon_bat_c_2"
|
||||||
else
|
else
|
||||||
# Treat 'Full' status as same as 'Charging'
|
# Treat 'Full' status as same as 'fully-charged'
|
||||||
BATCMP="$icon_bat_c_3"
|
BATCMP="$icon_bat_c_3"
|
||||||
fi
|
fi
|
||||||
else
|
;;
|
||||||
if [ "$PCT" -lt 25 ]; then
|
discharging)
|
||||||
|
if [ "$percentage" -lt 25 ]; then
|
||||||
fgcolor=red
|
fgcolor=red
|
||||||
if [ "$PCT" -lt 5 ]; then
|
if [ "$percentage" -lt 5 ]; then
|
||||||
BATCMP="$icon_bat_0"
|
BATCMP="$icon_bat_0"
|
||||||
elif [ "$PCT" -lt 10 ]; then
|
elif [ "$percentage" -lt 10 ]; then
|
||||||
BATCMP="$icon_bat_1"
|
BATCMP="$icon_bat_1"
|
||||||
elif [ "$PCT" -lt 15 ]; then
|
elif [ "$percentage" -lt 15 ]; then
|
||||||
BATCMP="$icon_bat_2"
|
BATCMP="$icon_bat_2"
|
||||||
else
|
else
|
||||||
BATCMP="$icon_bat_3"
|
BATCMP="$icon_bat_3"
|
||||||
fi
|
fi
|
||||||
elif [ "$PCT" -lt 50 ]; then
|
elif [ "$percentage" -lt 50 ]; then
|
||||||
fgcolor=orange
|
fgcolor=orange
|
||||||
BATCMP="$icon_bat_1"
|
BATCMP="$icon_bat_1"
|
||||||
elif [ "$PCT" -lt 75 ]; then
|
elif [ "$percentage" -lt 75 ]; then
|
||||||
BATCMP="$icon_bat_2"
|
BATCMP="$icon_bat_2"
|
||||||
else
|
else
|
||||||
BATCMP="$icon_bat_3"
|
BATCMP="$icon_bat_3"
|
||||||
fi
|
fi
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
sxmobar -a -t "$style" -b "$bgcolor" -f "$fgcolor" \
|
sxmobar -a -t "$style" -b "$bgcolor" -f "$fgcolor" \
|
||||||
"battery-icon-$power_name" 40 "$BATCMP"
|
"battery-icon-$name" 40 "$BATCMP"
|
||||||
|
|
||||||
if [ -z "$SXMO_BAR_SHOW_BAT_PER" ]; then
|
if [ -z "$SXMO_BAR_SHOW_BAT_PER" ]; then
|
||||||
sxmobar -d "battery-status-$power_name"
|
sxmobar -d "battery-status-$name"
|
||||||
else
|
else
|
||||||
sxmobar -a "battery-status-$power_name" 41 "$PCT%"
|
sxmobar -a "battery-status-$name" 41 "$percentage%"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_notifications() {
|
set_notifications() {
|
||||||
@@ -367,51 +385,56 @@ set_notifications() {
|
|||||||
set_volume() {
|
set_volume() {
|
||||||
VOLCMP=""
|
VOLCMP=""
|
||||||
|
|
||||||
if sxmo_modemaudio.sh is_call_audio_mode; then
|
|
||||||
if sxmo_modemaudio.sh is_muted_mic; then
|
|
||||||
VOLCMP="$icon_mmc"
|
|
||||||
else
|
|
||||||
VOLCMP="$icon_mic"
|
|
||||||
fi
|
|
||||||
if sxmo_modemaudio.sh is_enabled_speaker; then
|
|
||||||
VOLCMP="$VOLCMP $icon_spk"
|
|
||||||
else
|
|
||||||
VOLCMP="$VOLCMP $icon_ear"
|
|
||||||
fi
|
|
||||||
sxmobar -a -f green volume 50 "$VOLCMP"
|
|
||||||
return;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if sxmo_audio.sh mic ismuted; then
|
if sxmo_audio.sh mic ismuted; then
|
||||||
VOLCMP="$icon_mmc"
|
VOLCMP="$icon_mmc"
|
||||||
else
|
else
|
||||||
|
case "$(sxmo_audio.sh device getinput 2>/dev/null)" in
|
||||||
|
*Headset*)
|
||||||
|
VOLCMP="$icon_hst"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
VOLCMP="$icon_mic"
|
VOLCMP="$icon_mic"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if sxmo_audio.sh vol ismuted; then
|
||||||
|
VOLCMP="$VOLCMP $icon_mut"
|
||||||
|
else
|
||||||
case "$(sxmo_audio.sh device get 2>/dev/null)" in
|
case "$(sxmo_audio.sh device get 2>/dev/null)" in
|
||||||
Speaker|"")
|
*Speaker*|"")
|
||||||
# nothing for default or pulse devices
|
# nothing for default or pulse devices
|
||||||
;;
|
;;
|
||||||
Headphones|Headphone)
|
*Headphone*)
|
||||||
VOLCMP="$VOLCMP $icon_hdp"
|
VOLCMP="$VOLCMP $icon_hdp"
|
||||||
;;
|
;;
|
||||||
Earpiece)
|
*Earpiece*)
|
||||||
VOLCMP="$VOLCMP $icon_ear"
|
VOLCMP="$VOLCMP $icon_ear"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
VOL="$(sxmo_audio.sh vol get)"
|
VOL="$(sxmo_audio.sh vol get)"
|
||||||
if [ -z "$VOL" ] || [ "$VOL" = "muted" ]; then
|
if [ "$VOL" -gt 66 ]; then
|
||||||
VOLCMP="$VOLCMP $icon_mut"
|
|
||||||
elif [ "$VOL" -gt 66 ]; then
|
|
||||||
VOLCMP="$VOLCMP $icon_spk"
|
VOLCMP="$VOLCMP $icon_spk"
|
||||||
elif [ "$VOL" -gt 33 ]; then
|
elif [ "$VOL" -gt 33 ]; then
|
||||||
VOLCMP="$VOLCMP $icon_spm"
|
VOLCMP="$VOLCMP $icon_spm"
|
||||||
elif [ "$VOL" -ge 0 ]; then
|
elif [ "$VOL" -ge 0 ]; then
|
||||||
VOLCMP="$VOLCMP $icon_spl"
|
VOLCMP="$VOLCMP $icon_spl"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if sxmo_modemaudio.sh is_call_audio_mode; then
|
||||||
|
sxmobar -a -f green volume 50 "$VOLCMP"
|
||||||
|
else
|
||||||
sxmobar -a volume 50 "$VOLCMP"
|
sxmobar -a volume 50 "$VOLCMP"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
set_notch() {
|
||||||
|
if [ -n "$SXMO_NOTCH" ] && ! pidof peanutbutter > /dev/null; then
|
||||||
|
sxmobar -a notch "${SXMO_NOTCH_PRIO:-29}" "$SXMO_NOTCH"
|
||||||
|
else
|
||||||
|
sxmobar -d notch
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
sxmo_debug "$@"
|
sxmo_debug "$@"
|
||||||
@@ -420,28 +443,37 @@ case "$1" in
|
|||||||
shift
|
shift
|
||||||
set_network "$@"
|
set_network "$@"
|
||||||
;;
|
;;
|
||||||
time|modem|battery|volume|state|notifications)
|
battery)
|
||||||
|
shift
|
||||||
|
set_battery "$@"
|
||||||
|
;;
|
||||||
|
time|modem|volume|state|notifications|notch)
|
||||||
set_"$1"
|
set_"$1"
|
||||||
;;
|
;;
|
||||||
periodics|state_change) # 55 s loop and screenlock triggers
|
periodics|state_change) # 55 s loop and screenlock triggers
|
||||||
set_time
|
set_time
|
||||||
|
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||||
set_modem
|
set_modem
|
||||||
set_battery
|
fi
|
||||||
|
set_notch
|
||||||
set_state
|
set_state
|
||||||
set_network wifi wlan0
|
set_network wifi wlan0
|
||||||
;;
|
;;
|
||||||
all)
|
all)
|
||||||
sxmobar -r
|
sxmobar -r
|
||||||
set_time
|
set_time
|
||||||
|
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||||
set_modem
|
set_modem
|
||||||
set_battery
|
fi
|
||||||
|
if [ -z "$SXMO_NO_AUDIO" ]; then
|
||||||
set_volume
|
set_volume
|
||||||
|
fi
|
||||||
set_state
|
set_state
|
||||||
set_notifications
|
set_notifications
|
||||||
|
set_notch
|
||||||
set_network wifi wlan0
|
set_network wifi wlan0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exit # swallow it !
|
exit # swallow it !
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Runs after wm has been stopped.
|
# Runs after wm has been stopped., useful for cleanup
|
||||||
|
|
||||||
# clean up misc. stale files (if any)
|
# clean up misc. stale files (if any)
|
||||||
rm -rf "$XDG_RUNTIME_DIR"/sxmo*
|
rm -rf "$XDG_RUNTIME_DIR"/sxmo*
|
||||||
|
@@ -15,7 +15,9 @@ export TERMNAME
|
|||||||
# If it's already open, switch to it.
|
# If it's already open, switch to it.
|
||||||
if [ "$SXMO_WM" = "sway" ] && [ -z "$SSH_CLIENT" ]; then
|
if [ "$SXMO_WM" = "sway" ] && [ -z "$SSH_CLIENT" ]; then
|
||||||
regesc_termname="$(echo "$TERMNAME" | sed 's|+|\\+|g')"
|
regesc_termname="$(echo "$TERMNAME" | sed 's|+|\\+|g')"
|
||||||
swaymsg "[title=\"^$regesc_termname\$\"]" focus && exit 0
|
if swaymsg -q "[title=\"^$regesc_termname\$\"]" focus; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkcontactssedcmd() {
|
mkcontactssedcmd() {
|
||||||
@@ -31,7 +33,7 @@ mkcontactssedcmd() {
|
|||||||
TODAY="$(date +%F)"
|
TODAY="$(date +%F)"
|
||||||
YESTERDAY="$(date -d "- 1 day" +%F)"
|
YESTERDAY="$(date -d "- 1 day" +%F)"
|
||||||
TWO_DAYS="$(date -d "- 2 day" +%F)"
|
TWO_DAYS="$(date -d "- 2 day" +%F)"
|
||||||
DATESEDCMD="s/at.*${TODAY}T/today at /; s/at.*${YESTERDAY}T/yesterday at /; s/at.*${TWO_DAYS}T/two days ago at /; s/-[0-9][0-9][0-9][0-9]://; s/\(-[0-9][0-9]\)T\([0-9][0-9]\)/\1 \2/;"
|
DATESEDCMD="s/ at ${TODAY}T/today at /; s/ at ${YESTERDAY}T/yesterday at /; s/ at ${TWO_DAYS}T/two days ago at /; s/[-+][0-9][0-9][0-9][0-9]://; s/\(-[0-9][0-9]\)T\([0-9][0-9]\)/\1 \2/;"
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
#ALIGNSEDCMD="s/^Sent/<right align>/;s/^Received/<left align>/;"
|
#ALIGNSEDCMD="s/^Sent/<right align>/;s/^Received/<left align>/;"
|
||||||
@@ -46,4 +48,3 @@ CONTACTSSEDCMD="$(mkcontactssedcmd)"
|
|||||||
|
|
||||||
sxmo_terminal.sh sh -c "tail -n9999 -f \"$SXMO_LOGDIR/$LOGDIRNUM/sms.txt\" |\
|
sxmo_terminal.sh sh -c "tail -n9999 -f \"$SXMO_LOGDIR/$LOGDIRNUM/sms.txt\" |\
|
||||||
sed -e \"$CONTACTSSEDCMD\" -e \"$DATESEDCMD\" -e \"$COLORSEDCMD\""
|
sed -e \"$CONTACTSSEDCMD\" -e \"$DATESEDCMD\" -e \"$COLORSEDCMD\""
|
||||||
#sxmo_terminal.sh sh -c "sxmo_hook_parselog.sh \"$NUMBER\""
|
|
||||||
|
38
configs/default_hooks/sxmo_hook_unlock.sh
Executable file
38
configs/default_hooks/sxmo_hook_unlock.sh
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
|
# include common definitions
|
||||||
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
|
. sxmo_common.sh
|
||||||
|
|
||||||
|
# This hook is called when the system becomes unlocked again
|
||||||
|
|
||||||
|
sxmo_led.sh blink red green &
|
||||||
|
|
||||||
|
sxmo_wm.sh dpms off
|
||||||
|
sxmo_wm.sh inputevent touchscreen on
|
||||||
|
|
||||||
|
sxmo_jobs.sh stop periodic_blink
|
||||||
|
sxmo_jobs.sh stop periodic_wakelock_check
|
||||||
|
|
||||||
|
# Go to the next idle state after 120 seconds of inactivity
|
||||||
|
if [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
|
||||||
|
sxmo_jobs.sh stop idle_locker
|
||||||
|
else
|
||||||
|
case "$SXMO_WM" in
|
||||||
|
sway)
|
||||||
|
sxmo_jobs.sh start idle_locker sxmo_idle.sh -w \
|
||||||
|
timeout "${SXMO_UNLOCK_IDLE_TIME:-120}" 'sh -c "
|
||||||
|
swaymsg mode default;
|
||||||
|
exec sxmo_state.sh idle
|
||||||
|
"'
|
||||||
|
;;
|
||||||
|
dwm)
|
||||||
|
sxmo_jobs.sh start idle_locker sxmo_idle.sh -w \
|
||||||
|
timeout "${SXMO_UNLOCK_IDLE_TIME:-120}" "sxmo_state.sh idle"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
wait
|
28
configs/default_hooks/sxmo_hook_wallpaper.sh
Executable file
28
configs/default_hooks/sxmo_hook_wallpaper.sh
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
|
. sxmo_common.sh
|
||||||
|
|
||||||
|
# This script is executed once, and must output the wallpaper to display
|
||||||
|
|
||||||
|
installed_wallpapers() {
|
||||||
|
xdg_data_path wallpapers 0 "\0" | xargs -r0I{} find "{}" -name "$SXMO_OS.*"
|
||||||
|
}
|
||||||
|
|
||||||
|
sxmo_wallpaper() {
|
||||||
|
xdg_data_path sxmo/background.jpg
|
||||||
|
}
|
||||||
|
|
||||||
|
all_wallpapers() {
|
||||||
|
installed_wallpapers
|
||||||
|
sxmo_wallpaper
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$SXMO_BG_IMG" ]; then
|
||||||
|
printf "%s" "$SXMO_BG_IMG"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
all_wallpapers | head -n1
|
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
# Copyright 2022 Sxmo Contributors
|
|
||||||
|
|
||||||
# include common definitions
|
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
|
||||||
. sxmo_common.sh
|
|
||||||
|
|
||||||
MMCLI="$(mmcli -m any -J 2>/dev/null)"
|
|
||||||
if [ -z "$MMCLI" ]; then
|
|
||||||
sxmo_notify_user.sh "Modem crashed! 30s recovery."
|
|
||||||
sxmo_wakelock.sh lock modem_crashed 30s
|
|
||||||
fi
|
|
||||||
|
|
||||||
# see the comments in sxmo_hook_lock.sh
|
|
||||||
# and https://todo.sr.ht/~mil/sxmo-tickets/150
|
|
||||||
if [ 1 = "$SXMO_RTW_SCAN_INTERVAL" ]; then
|
|
||||||
echo 1200 > "/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add here whatever you want to do
|
|
@@ -1,56 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
# Copyright 2022 Sxmo Contributors
|
|
||||||
|
|
||||||
# include common definitions
|
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
|
||||||
. sxmo_common.sh
|
|
||||||
|
|
||||||
# This hook is called when the system becomes unlocked again
|
|
||||||
|
|
||||||
exec 3<> "$SXMO_STATE.lock"
|
|
||||||
flock -x 3
|
|
||||||
|
|
||||||
sxmo_log "transitioning to stage unlock"
|
|
||||||
printf unlock > "$SXMO_STATE"
|
|
||||||
|
|
||||||
sxmo_wakelock.sh lock not_screenoff infinite
|
|
||||||
|
|
||||||
sxmo_led.sh blink red green &
|
|
||||||
sxmo_hook_statusbar.sh state_change &
|
|
||||||
|
|
||||||
sxmo_wm.sh dpms off
|
|
||||||
sxmo_wm.sh inputevent touchscreen on
|
|
||||||
|
|
||||||
sxmo_daemons.sh stop periodic_blink
|
|
||||||
sxmo_daemons.sh stop periodic_wakelock_check
|
|
||||||
|
|
||||||
# see https://todo.sr.ht/~mil/sxmo-tickets/150
|
|
||||||
# We set the scan interval threshold here to
|
|
||||||
# 16000 (16s) the default, since in sxmo_hook_postwake.sh
|
|
||||||
# we set it to 1200 (.12s) so that we can reconnect to wifi
|
|
||||||
# quicker after resuming from suspend.
|
|
||||||
if [ 1 = "$SXMO_RTW_SCAN_INTERVAL" ]; then
|
|
||||||
echo 16000 > "/sys/module/$SXMO_WIFI_MODULE/parameters/rtw_scan_interval_thr"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Go to lock after 120 seconds of inactivity
|
|
||||||
if [ -e "$XDG_CACHE_HOME/sxmo/sxmo.noidle" ]; then
|
|
||||||
sxmo_daemons.sh stop idle_locker
|
|
||||||
else
|
|
||||||
case "$SXMO_WM" in
|
|
||||||
sway)
|
|
||||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
|
||||||
timeout "${SXMO_UNLOCK_IDLE_TIME:-120}" 'sh -c "
|
|
||||||
swaymsg mode default;
|
|
||||||
exec sxmo_hook_lock.sh
|
|
||||||
"'
|
|
||||||
;;
|
|
||||||
dwm)
|
|
||||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
|
||||||
timeout "${SXMO_UNLOCK_IDLE_TIME:-120}" "sxmo_hook_lock.sh"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
wait
|
|
@@ -1 +0,0 @@
|
|||||||
./three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
./three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
./three_button_touchscreen
|
|
@@ -1 +0,0 @@
|
|||||||
./three_button_touchscreen
|
|
@@ -4,7 +4,7 @@ permit nopass :wheel as root cmd busybox args reboot
|
|||||||
permit nopass :wheel as root cmd poweroff
|
permit nopass :wheel as root cmd poweroff
|
||||||
permit nopass :wheel as root cmd reboot
|
permit nopass :wheel as root cmd reboot
|
||||||
permit nopass :wheel as root cmd sxmo_wifitoggle.sh
|
permit nopass :wheel as root cmd sxmo_wifitoggle.sh
|
||||||
permit nopass :wheel as root cmd sxmo_bluetoothtoggle.sh
|
permit nopass setenv { SXMO_OS } :wheel as root cmd sxmo_bluetoothtoggle.sh
|
||||||
permit nopass :wheel as root cmd rc-service args bluetooth restart
|
permit nopass :wheel as root cmd rc-service args bluetooth restart
|
||||||
permit nopass :wheel as root cmd systemctl args restart bluetooth
|
permit nopass :wheel as root cmd systemctl args restart bluetooth
|
||||||
permit nopass :wheel as root cmd tinydm-set-session
|
permit nopass :wheel as root cmd tinydm-set-session
|
||||||
@@ -16,5 +16,9 @@ permit nopass :wheel as root cmd systemctl args start eg25-manager
|
|||||||
permit nopass :wheel as root cmd systemctl args stop eg25-manager
|
permit nopass :wheel as root cmd systemctl args stop eg25-manager
|
||||||
permit nopass :wheel as root cmd systemctl args start ModemManager
|
permit nopass :wheel as root cmd systemctl args start ModemManager
|
||||||
permit nopass :wheel as root cmd systemctl args stop ModemManager
|
permit nopass :wheel as root cmd systemctl args stop ModemManager
|
||||||
|
permit nopass :wheel as root cmd rtcwake
|
||||||
permit nopass :wheel as root cmd tee args -a /sys/power/wake_lock
|
permit nopass :wheel as root cmd tee args -a /sys/power/wake_lock
|
||||||
permit nopass :wheel as root cmd tee args -a /sys/power/wake_unlock
|
permit nopass :wheel as root cmd tee args -a /sys/power/wake_unlock
|
||||||
|
permit nopass :wheel as root cmd tee args /sys/power/wakeup_count
|
||||||
|
permit nopass :wheel as root cmd rc-service args hexagonrpcd-adsp-sensorspd stop
|
||||||
|
permit nopass :wheel as root cmd systemctl args stop hexagonrpcd-adsp-sensorspd
|
||||||
|
10
configs/external-services/pipewire-filter-chain.service
Normal file
10
configs/external-services/pipewire-filter-chain.service
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Pipewire filter chain
|
||||||
|
After=pipewire
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/usr/bin/pipewire -c filter-chain.conf
|
||||||
|
ExecOnFailure=/usr/bin/sxmo_notify_user.sh "superd failed to start pipewire-filter-chain"
|
||||||
|
RestartSec=1s
|
@@ -1,5 +0,0 @@
|
|||||||
#!/sbin/openrc-run
|
|
||||||
|
|
||||||
description="Set user permissions to aspects of the hardware kernel interface"
|
|
||||||
|
|
||||||
command="/usr/bin/sxmo_setpermissions.sh"
|
|
6
configs/polkit/01-sensor-claim.rules
Normal file
6
configs/polkit/01-sensor-claim.rules
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (action.id == "net.hadess.SensorProxy.claim-sensor" &&
|
||||||
|
subject.isInGroup("plugdev")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
@@ -9,15 +9,18 @@
|
|||||||
_sxmo_is_running() {
|
_sxmo_is_running() {
|
||||||
unset SXMO_WM
|
unset SXMO_WM
|
||||||
|
|
||||||
if [ -f "${XDG_RUNTIME_DIR}"/sxmo.swaysock ]; then
|
_XDG_RUNTIME_DIR="$(_sxmo_find_runtime_dir)"
|
||||||
unset SWAYSOCK
|
|
||||||
if SWAYSOCK="$(cat "${XDG_RUNTIME_DIR}"/sxmo.swaysock)" \
|
if [ -f "${_XDG_RUNTIME_DIR}"/sxmo.swaysock ]; then
|
||||||
swaymsg 2>/dev/null; then
|
if SWAYSOCK="$(cat "${_XDG_RUNTIME_DIR}"/sxmo.swaysock)" swaymsg 2>/dev/null
|
||||||
|
then
|
||||||
printf "Detected the Sway environment\n" >&2
|
printf "Detected the Sway environment\n" >&2
|
||||||
export SXMO_WM=sway
|
export SXMO_WM=sway
|
||||||
|
unset _XDG_RUNTIME_DIR
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
unset _XDG_RUNTIME_DIR
|
||||||
|
|
||||||
if DISPLAY=:0 xrandr >/dev/null 2>&1; then
|
if DISPLAY=:0 xrandr >/dev/null 2>&1; then
|
||||||
printf "Detected the Dwm environment\n" >&2
|
printf "Detected the Dwm environment\n" >&2
|
||||||
@@ -36,8 +39,17 @@ _sxmo_find_runtime_dir() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "/var/run/user/$(id -u)" ]; then
|
# Try something existing
|
||||||
printf "/var/run/user/%s" "$(id -u)"
|
for root in /run /var/run; do
|
||||||
|
path="$root/user/$(id -u)"
|
||||||
|
if [ -d "$path" ] && [ -w "$path" ]; then
|
||||||
|
printf %s "$path"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if command -v mkrundir > /dev/null 2>&1; then
|
||||||
|
mkrundir
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -80,11 +92,17 @@ _sxmo_load_environments() {
|
|||||||
export BROWSER="${BROWSER:-firefox}"
|
export BROWSER="${BROWSER:-firefox}"
|
||||||
export SHELL="${SHELL:-/bin/sh}"
|
export SHELL="${SHELL:-/bin/sh}"
|
||||||
|
|
||||||
# The user can already forced a $SXMO_DEVICE_NAME value
|
# The user can already force a $SXMO_DEVICE_NAME value in ~/.profile
|
||||||
if [ -z "$SXMO_DEVICE_NAME" ] && [ -e /proc/device-tree/compatible ]; then
|
if [ -z "$SXMO_DEVICE_NAME" ]; then
|
||||||
|
if [ -e /proc/device-tree/compatible ]; then
|
||||||
SXMO_DEVICE_NAME="$(tr -c '\0[:alnum:].,-' '_' < /proc/device-tree/compatible |
|
SXMO_DEVICE_NAME="$(tr -c '\0[:alnum:].,-' '_' < /proc/device-tree/compatible |
|
||||||
tr '\0' '\n' | head -n1)"
|
tr '\0' '\n' | head -n1)"
|
||||||
|
else
|
||||||
|
SXMO_DEVICE_NAME=desktop
|
||||||
|
fi
|
||||||
|
fi
|
||||||
export SXMO_DEVICE_NAME
|
export SXMO_DEVICE_NAME
|
||||||
|
|
||||||
deviceprofile="$(command -v "sxmo_deviceprofile_$SXMO_DEVICE_NAME.sh")"
|
deviceprofile="$(command -v "sxmo_deviceprofile_$SXMO_DEVICE_NAME.sh")"
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
if [ -f "$deviceprofile" ]; then
|
if [ -f "$deviceprofile" ]; then
|
||||||
@@ -98,39 +116,25 @@ _sxmo_load_environments() {
|
|||||||
# or suspend
|
# or suspend
|
||||||
touch "$XDG_CACHE_HOME"/sxmo/sxmo.nosuspend
|
touch "$XDG_CACHE_HOME"/sxmo/sxmo.nosuspend
|
||||||
touch "$XDG_CACHE_HOME"/sxmo/sxmo.noidle
|
touch "$XDG_CACHE_HOME"/sxmo/sxmo.noidle
|
||||||
|
|
||||||
SXMO_DEVICE_NAME=unknown
|
|
||||||
fi
|
fi
|
||||||
unset deviceprofile
|
unset deviceprofile
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$SXMO_DEVICE_NAME" ]; then
|
|
||||||
_device_hooks_path="$(xdg_data_path "sxmo/default_hooks/$SXMO_DEVICE_NAME" 0 ':')"
|
|
||||||
if [ -z "$_device_hooks_path" ]; then
|
|
||||||
_device_hooks_path="$(xdg_data_path "sxmo/default_hooks/three_button_touchscreen" 0 ':')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
PATH="\
|
PATH="\
|
||||||
$XDG_CONFIG_HOME/sxmo/hooks/$SXMO_DEVICE_NAME:\
|
$XDG_CONFIG_HOME/sxmo/hooks/$SXMO_DEVICE_NAME:\
|
||||||
$XDG_CONFIG_HOME/sxmo/hooks:\
|
$XDG_CONFIG_HOME/sxmo/hooks:\
|
||||||
$_device_hooks_path:\
|
|
||||||
$(xdg_data_path "sxmo/default_hooks" 0 ':'):\
|
$(xdg_data_path "sxmo/default_hooks" 0 ':'):\
|
||||||
$PATH"
|
$PATH"
|
||||||
export PATH
|
export PATH
|
||||||
else
|
|
||||||
default_hooks_path=$(xdg_data_path sxmo/default_hooks 0 ':')
|
|
||||||
export PATH="$XDG_CONFIG_HOME/sxmo/hooks:$default_hooks_path:$PATH"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_sxmo_grab_session() {
|
_sxmo_grab_session() {
|
||||||
XDG_RUNTIME_DIR="$(_sxmo_find_runtime_dir)"
|
|
||||||
export XDG_RUNTIME_DIR
|
|
||||||
if ! _sxmo_is_running; then
|
if ! _sxmo_is_running; then
|
||||||
unset XDG_RUNTIME_DIR
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
XDG_RUNTIME_DIR="$(_sxmo_find_runtime_dir)"
|
||||||
|
export XDG_RUNTIME_DIR
|
||||||
|
|
||||||
_sxmo_load_environments
|
_sxmo_load_environments
|
||||||
|
|
||||||
if [ -f "$XDG_RUNTIME_DIR"/dbus.bus ]; then
|
if [ -f "$XDG_RUNTIME_DIR"/dbus.bus ]; then
|
||||||
|
7
configs/services/geoclue-agent.service
Normal file
7
configs/services/geoclue-agent.service
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Proxy location data to map applications
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/usr/libexec/geoclue-2.0/demos/agent
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user