various scripts were not sourcing the common include script yet (noted by mrrabbit1155)

This commit is contained in:
Maarten van Gompel 2021-02-20 14:20:03 +01:00
parent d71c11d993
commit 295af30993
25 changed files with 119 additions and 0 deletions

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
DIR="$1"
[ -z "$DIR" ] && DIR="/home/$USER/"
cd "$DIR" || exit 1

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
[ -z "$SXMO_RECDIR" ] && SXMO_RECDIR="$XDG_DATA_HOME"/sxmo/recordings
mkdir -p "$SXMO_RECDIR"

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
[ -z "$SXMO_SUBREDDITS" ] && SXMO_SUBREDDITS="pine64official pinephoneofficial unixporn postmarketos linux"
menu() {

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
FETCHENABLED=1
if [ -f "$XDG_CONFIG_HOME/sxmo/sfeedrc" ]; then

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
timerrun() {
TIME=$(
echo "$@" |

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
[ -z "$SXMO_GPSLOCATIONSFILES" ] && SXMO_GPSLOCATIONSFILES="/usr/share/sxmo/appcfg/places_for_gps.tsv"
ROWHOURS=12
WEATHERXML=""

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
pidof "$KEYBOARD" || "$KEYBOARD" &
SEARCHQUERY="$(
echo "Close Menu" | dmenu -t -p "Search:" -c -l 20

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
HISTORY_FILE="$XDG_CACHE_HOME"/sxmo/youtubehistory.tsv
NRESULTS=5
AUDIOONLY=0

View file

@ -1,6 +1,10 @@
#!/usr/bin/env sh
ARG="$1"
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
SPEAKER="Line Out"
HEADPHONE="Headphone"
EARPIECE="Earpiece"

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
PIDS=""
for i in "$@"; do
sxmo_setpineled "$i" 150 &

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
[ -e /sys/class/backlight/edp-backlight ] && DEV=/sys/class/backlight/edp-backlight
[ -e /sys/devices/platform/backlight/backlight/backlight ] && DEV=/sys/devices/platform/backlight/backlight/backlight

View file

@ -9,6 +9,10 @@
#
# Prints in output format: "number: contact"
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
CONTACTSFILE="$XDG_CONFIG_HOME"/sxmo/contacts.tsv
LOGFILE="$XDG_DATA_HOME"/sxmo/modem/modemlog.tsv

View file

@ -1,6 +1,11 @@
#!/usr/bin/env sh
ACTION="$1"
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
XPROPOUT="$(xprop -id "$(xdotool getactivewindow)")"
WMCLASS="$(echo "$XPROPOUT" | grep WM_CLASS | cut -d ' ' -f3- | cut -d ' ' -f1 | tr -d '\",')"

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
[ -z "$SXMO_GPSLOCATIONSFILES" ] && SXMO_GPSLOCATIONSFILES="/usr/share/sxmo/appcfg/places_for_gps.tsv"
CTILESIZE=256
CLN2=0.693147180559945309417

View file

@ -1,2 +1,7 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
xdotool windowkill "$(xdotool getactivewindow)"

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
pkill -9 lisgd
if [ -x "$XDG_CONFIG_HOME"/sxmo/hooks/lisgdstart ]; then

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/lock" ]; then
"$XDG_CONFIG_HOME/sxmo/hooks/lock"
fi

View file

@ -1,5 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
connections() {
ACTIVE="$(nmcli -c no -t c show --active | cut -d: -f1,3 | sed 's/$/ ✓/')"
INACTIVE="$(nmcli -c no -t c show | cut -d: -f1,3)"

View file

@ -1,5 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
MIMEAPPS="${XDG_CONFIG_HOME:-$HOME/.config}/mimeapps.list"
DESKTOPS_CACHED_MIMEAPPS="${XDG_CONFIG_HOME:-$HOME/.config}/desktops.mimeapps.list"
DESKTOP_DIRS="/usr/share/sxmo/applications/|/usr/share/applications/|/usr/local/share/applications/|${XDG_DATA_HOME:-$HOME/.local/share}/applications/"

View file

@ -1,5 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
applyptrmatrix() {
PTRID="$(
xinput | grep -iE 'touchscreen.+pointer' | grep -oE 'id=[0-9]+' | cut -d= -f2

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
trap "update" USR1
pgrep -f sxmo_statusbar.sh | grep -v $$ | xargs -r kill -9

View file

@ -1,4 +1,8 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
echo "Updating all packages from repositories"
sudo apk update

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
FORK="$2"
if [ -n "$1" ]

View file

@ -1,4 +1,9 @@
#!/usr/bin/env sh
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
notify() {
VOL="$(
amixer get "$(sxmo_audiocurrentdevice.sh)" |

View file

@ -1,5 +1,6 @@
#!/usr/bin/env sh
envvars() {
# shellcheck disable=SC1091
[ -f /etc/profile ] && . /etc/profile
@ -84,6 +85,10 @@ startdwm() {
}
xinit() {
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
envvars
setupxdgdir
xdefaults