Fix swmo shellcheck issues

master
Stacy Harper 3 years ago
parent 8a27933c47
commit 5a769d3fa8
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 32
      scripts/core/sxmo_appmenu.sh
  2. 6
      scripts/core/sxmo_postwake.sh
  3. 2
      scripts/core/sxmo_winit.sh
  4. 2
      scripts/core/sxmo_wmtoggle.sh

@ -249,6 +249,21 @@ programchoicesinit() {
"
WINNAME=Sxiv && return
;;
*sthotkeys* )
# St hotkeys
CHOICES="
Send Ctrl-C ^ 0 ^ sxmo_type -M Ctrl -k c
Send Ctrl-Z ^ 0 ^ sxmo_type -M Ctrl -k z
Send Ctrl-L ^ 0 ^ sxmo_type -M Ctrl -k l
Send Ctrl-D ^ 0 ^ sxmo_type -M Ctrl -k d
Send Ctrl-A ^ 0 ^ sxmo_type -M Ctrl -k a
Send Ctrl-B ^ 0 ^ sxmo_type -M Ctrl -k b
Send ESC:w ^ 0 ^ sxmo_type -k Escape -M Shift -k semicolon -m Shift -k w -k Return
Send ESC:wq ^ 0 ^ sxmo_type -k Escape -M Shift -k semicolon -m Shift -k w -k q -k Return
Send ESC:wq! ^ 0 ^ sxmo_type -k Escape -M Shift -k semicolon -m Shift -k q -k exclam -k Return
"
WINNAME=St
;;
*foot*|*st* )
# First we try to handle the app running inside the terminal:
WMNAME="${1:-$(printf %s "$XPROPOUT" | grep title: | cut -d" " -f2- | tr '[:upper:]' '[:lower:]')}"
@ -438,21 +453,6 @@ programchoicesinit() {
;;
esac
fi
;;
*sthotkeys* )
# St hotkeys
CHOICES="
Send Ctrl-C ^ 0 ^ sxmo_type -M Ctrl -k c
Send Ctrl-Z ^ 0 ^ sxmo_type -M Ctrl -k z
Send Ctrl-L ^ 0 ^ sxmo_type -M Ctrl -k l
Send Ctrl-D ^ 0 ^ sxmo_type -M Ctrl -k d
Send Ctrl-A ^ 0 ^ sxmo_type -M Ctrl -k a
Send Ctrl-B ^ 0 ^ sxmo_type -M Ctrl -k b
Send ESC:w ^ 0 ^ sxmo_type -k Escape -M Shift -k semicolon -m Shift -k w -k Return
Send ESC:wq ^ 0 ^ sxmo_type -k Escape -M Shift -k semicolon -m Shift -k w -k q -k Return
Send ESC:wq! ^ 0 ^ sxmo_type -k Escape -M Shift -k semicolon -m Shift -k q -k exclam -k Return
"
WINNAME=St
;;
*netsurf* )
# Netsurf
@ -609,7 +609,6 @@ mainloop() {
echo "$PICKED" | grep . || quit
LOOP="$(echo "$PROGCHOICES" | grep -m1 -F "$PICKED" | cut -d '^' -f2)"
CMD="$(echo "$PROGCHOICES" | grep -m1 -F "$PICKED" | cut -d '^' -f3)"
DMENUIDX="$(echo "$PROGCHOICES" | grep -m1 -F -n "$PICKED" | cut -d ':' -f1)"
echo "sxmo_appmenu: Eval: <$CMD> from picked <$PICKED> with loop <$LOOP>">&2
if echo "$LOOP" | grep 1; then
eval "$CMD"
@ -622,7 +621,6 @@ mainloop() {
}
pgrep -f "$(command -v sxmo_appmenu.sh)" | grep -Ev "^${$}$" | xargs -r kill -TERM
DMENUIDX=0
PICKED=""
ARGS="$*"
mainloop

@ -34,7 +34,7 @@ finish() {
echo 0 > "$REDLED_PATH"
echo 0 > "$BLUELED_PATH"
wait $HOOKPID
wait "$HOOKPID"
# Going back to crust
if [ "$(sxmo_screenlock.sh getCurState)" != "unlock" ]; then
@ -82,5 +82,5 @@ HOOKPID=$!
checkstate &
CHECKPID=$!
wait $SLEEPPID
wait $HOOKPID
wait "$SLEEPPID"
wait "$HOOKPID"

@ -4,8 +4,8 @@
envvars() {
# shellcheck disable=SC1091
[ -f /etc/profile ] && . /etc/profile
# shellcheck source=/dev/null
export BEMENU_OPTS='--fn "Monospace 11"'
# shellcheck source=/dev/null
[ -f "$HOME"/.profile ] && . "$HOME"/.profile
export MOZ_ENABLE_WAYLAND=1
command -v "$TERMCMD" || export TERMCMD="foot"

@ -1,7 +1,5 @@
#!/bin/sh
wm="$(sxmo_wm.sh)"
case "$(realpath /var/lib/tinydm/default-session.desktop)" in
/usr/share/wayland-sessions/swmo.desktop)
sudo tinydm-set-session -f -s /usr/share/xsessions/sxmo.desktop

Loading…
Cancel
Save