From ac61a305ba3dca47d3a954feef3bf8bcfd9a257a Mon Sep 17 00:00:00 2001 From: Taffer Date: Sat, 28 Dec 2019 11:54:26 -0500 Subject: [PATCH 1/2] Add SublimeText 3 project file. --- .gitignore | 1 + launcher.sublime-project | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 launcher.sublime-project diff --git a/.gitignore b/.gitignore index 007206a..698b0f8 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ screenshots/* .DS_Store sys.py/.* sys.py/*.db +launcher.sublime-workspace diff --git a/launcher.sublime-project b/launcher.sublime-project new file mode 100644 index 0000000..71cc383 --- /dev/null +++ b/launcher.sublime-project @@ -0,0 +1,9 @@ +{ + "folders": + [ + { + "path": ".", + "name": "GameShell launcher" + } + ], +} From b0d5517b5e341fcc97818dd72b1737f1c9a878dd Mon Sep 17 00:00:00 2001 From: Taffer Date: Sat, 28 Dec 2019 11:55:06 -0500 Subject: [PATCH 2/2] Fix shellcheck warnings. --- Menu/GameShell/30_RetroArch.sh | 3 ++- Menu/GameShell/31_CaveStory.sh | 1 + Menu/GameShell/50_PICO-8/PICO-8.sh | 3 +-- Menu/GameShell/50_PICO-8/Post-Up.sh | 1 - bluetooth_firmware.sh | 2 +- load.sh | 6 ++---- sys.py/gsnotify/Jobs/00_lowpower.sh | 14 +++++++------- update.sh | 9 ++++----- 8 files changed, 18 insertions(+), 21 deletions(-) diff --git a/Menu/GameShell/30_RetroArch.sh b/Menu/GameShell/30_RetroArch.sh index 44f0c2a..4220591 100755 --- a/Menu/GameShell/30_RetroArch.sh +++ b/Menu/GameShell/30_RetroArch.sh @@ -1 +1,2 @@ -retroarch +#!/bin/bash +retroarch diff --git a/Menu/GameShell/31_CaveStory.sh b/Menu/GameShell/31_CaveStory.sh index aed9656..44f7c3a 100755 --- a/Menu/GameShell/31_CaveStory.sh +++ b/Menu/GameShell/31_CaveStory.sh @@ -1 +1,2 @@ +#!/bin/bash retroarch -L /home/cpi/apps/emulators/nxengine_libretro.so /home/cpi/games/nxengine/cavestory/data diff --git a/Menu/GameShell/50_PICO-8/PICO-8.sh b/Menu/GameShell/50_PICO-8/PICO-8.sh index 54cc66f..be527fd 100755 --- a/Menu/GameShell/50_PICO-8/PICO-8.sh +++ b/Menu/GameShell/50_PICO-8/PICO-8.sh @@ -1,5 +1,4 @@ #!/bin/bash -#SDL_VIDEODRIVER=x11 DISPLAY=:0 ./pico-8/pico8_dyn -splore -draw_rect 32,0,256,240 -cd /home/cpi/games/PICO-8/pico-8 +cd /home/cpi/games/PICO-8/pico-8 || exit SDL_VIDEODRIVER=x11 DISPLAY=:0 ./pico8_dyn -splore -draw_rect 32,0,256,240 diff --git a/Menu/GameShell/50_PICO-8/Post-Up.sh b/Menu/GameShell/50_PICO-8/Post-Up.sh index e8c38e0..acbdf77 100755 --- a/Menu/GameShell/50_PICO-8/Post-Up.sh +++ b/Menu/GameShell/50_PICO-8/Post-Up.sh @@ -9,4 +9,3 @@ mkdir ~/.lexaloffle/pico-8/carts ln -s ~/.lexaloffle/pico-8/carts/ ~/games/PICO-8/carts touch .done - diff --git a/bluetooth_firmware.sh b/bluetooth_firmware.sh index dc9ef66..2b25e96 100755 --- a/bluetooth_firmware.sh +++ b/bluetooth_firmware.sh @@ -1,6 +1,6 @@ #!/bin/bash -FIRM=`cat /proc/driver/brcmf_fw` +FIRM=$(cat /proc/driver/brcmf_fw) if [[ $FIRM =~ .*a0.* ]] then diff --git a/load.sh b/load.sh index c3a78c9..b127f93 100755 --- a/load.sh +++ b/load.sh @@ -1,9 +1,7 @@ #!/bin/bash -BASENAME=`dirname "$0"` +BASENAME=$(dirname "$0") -cd $BASENAME/sys.py +cd "$BASENAME"/sys.py || exit python run.py - - diff --git a/sys.py/gsnotify/Jobs/00_lowpower.sh b/sys.py/gsnotify/Jobs/00_lowpower.sh index 33ff5ab..adb92b8 100755 --- a/sys.py/gsnotify/Jobs/00_lowpower.sh +++ b/sys.py/gsnotify/Jobs/00_lowpower.sh @@ -1,15 +1,15 @@ #!/bin/bash -BAT_PNT=`upower -i $(upower -e | grep 'battery') | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}' | cut -d % -f1 ` +BAT_PNT=$(upower -i "$(upower -e | grep 'battery')" | grep -E "state|to\ full|percentage" | awk '/perc/{print $2}' | cut -d % -f1 ) if [ "$BAT_PNT" -lt "20" ]; then - if [ "$BAT_PNT" -lt "5" ]; then - echo '{"type":"once","content":"Low Battery: 5% of battery remaining"}' - elif [ "$BAT_PNT" -lt "10" ]; then - echo '{"type":"once","content":"Low Battery: 10% of battery remaining"}' - fi + if [ "$BAT_PNT" -lt "5" ]; then + echo '{"type":"once","content":"Low Battery: 5% of battery remaining"}' + elif [ "$BAT_PNT" -lt "10" ]; then + echo '{"type":"once","content":"Low Battery: 10% of battery remaining"}' + fi else - echo $BAT_PNT + echo "$BAT_PNT" fi diff --git a/update.sh b/update.sh index cb2312b..358de07 100755 --- a/update.sh +++ b/update.sh @@ -1,14 +1,13 @@ #!/bin/bash -cd /home/cpi/launcher +cd /home/cpi/launcher || exit feh --bg-center /home/cpi/launcher/sys.py/gameshell/wallpaper/updating.png git pull -git reset --hard $1 +git reset --hard "$1" git submodule init git submodule update -cd ~/apps/Menu && git pull && cd - +cd ~/apps/Menu && git pull && cd - || exit -feh --bg-center /home/cpi/launcher/sys.py/gameshell/wallpaper/loading.png +feh --bg-center /home/cpi/launcher/sys.py/gameshell/wallpaper/loading.png ./load.sh -