Remove useless dirname calls
sxmo_common.sh is in $PATH so we can let the shell handle finding it. Running a script with sh -x <scriptname> can be handy for debugging, but doesn't work with these because $0 doesn't get set to the full path to the script. Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This commit is contained in:
@@ -2,5 +2,4 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
# Copyright 2022 Sxmo Contributors
|
||||
# title="$icon_cam Screenshot (selection)"
|
||||
dir="$(dirname "$0")"
|
||||
"$dir/sxmo_screenshot.sh" selection
|
||||
sxmo_screenshot.sh selection
|
||||
|
@@ -2,5 +2,4 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
# Copyright 2022 Sxmo Contributors
|
||||
# title="$icon_ytb YouTube (audio)"
|
||||
dir="$(dirname "$0")"
|
||||
"$dir/sxmo_youtube.sh" audio
|
||||
sxmo_youtube.sh audio
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
# shellcheck source=configs/default_hooks/sxmo_hook_icons.sh
|
||||
. sxmo_hook_icons.sh
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
case "$SXMO_WM" in
|
||||
sway) swaymsg kill;;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# shellcheck source=configs/default_hooks/sxmo_hook_icons.sh
|
||||
. sxmo_hook_icons.sh
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
set -e
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# shellcheck source=configs/default_hooks/sxmo_hook_icons.sh
|
||||
. sxmo_hook_icons.sh
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
set -e
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# shellcheck source=configs/default_hooks/sxmo_hook_icons.sh
|
||||
. sxmo_hook_icons.sh
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
set -e
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
applyptrmatrix() {
|
||||
[ -n "$SXMO_TOUCHSCREEN_ID" ] && xinput set-prop "$SXMO_TOUCHSCREEN_ID" --type=float --type=float "Coordinate Transformation Matrix" "$@"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
wtype_to_xdotool() {
|
||||
if [ "$#" -eq 0 ]; then
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# Copyright 2022 Sxmo Contributors
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
trap "read -r" EXIT
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# Copyright 2022 Sxmo Contributors
|
||||
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
returnvalid() {
|
||||
printf %s "$1"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
printf "Sxmo "
|
||||
cat "$(xdg_data_path sxmo/version)"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# shellcheck source=configs/default_hooks/sxmo_hook_icons.sh
|
||||
. sxmo_hook_icons.sh
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
set -e
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
xorgdpms() {
|
||||
STATE=off
|
||||
|
@@ -4,6 +4,6 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
sxmo_terminal.sh sh -c "tail -n9999 -f $SXMO_LOGDIR/modemlog.tsv"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# shellcheck source=configs/default_hooks/sxmo_hook_icons.sh
|
||||
. sxmo_hook_icons.sh
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
stderr() {
|
||||
sxmo_log "$*"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
handlenewnotiffile(){
|
||||
NOTIFFILE="$1"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# shellcheck source=configs/default_hooks/sxmo_hook_icons.sh
|
||||
. sxmo_hook_icons.sh
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
notificationmenu() {
|
||||
CHOICES="$icon_cls Close Menu\n$icon_del Clear Notifications"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
# include common definitions
|
||||
# shellcheck source=scripts/core/sxmo_common.sh
|
||||
. "$(dirname "$0")/sxmo_common.sh"
|
||||
. sxmo_common.sh
|
||||
|
||||
# Takes 4 args:
|
||||
# (1) the filepath of the notification to write (or random to generate a random id)
|
||||
|
Reference in New Issue
Block a user