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:
ArenM
2023-08-14 13:26:03 -04:00
committed by Willow Barraco
parent da36357b4f
commit 228b936f08
19 changed files with 19 additions and 21 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;;

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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" "$@"

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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)"

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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 "$*"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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)