diff --git a/boxes/phone/out-of-tree/Makefile b/boxes/phone/out-of-tree/Makefile index 66f2adc..f7ba990 100644 --- a/boxes/phone/out-of-tree/Makefile +++ b/boxes/phone/out-of-tree/Makefile @@ -1,4 +1,4 @@ -termux: termux-pkgs termux-dots utils-sh rebuild-sh st pip-pkgs git-annex.linux sssg +termux: termux-pkgs termux-dots utils-sh rebuild-sh st pip-pkgs git-annex.linux sssg statusbar-polyfill list: options # alias options: @@ -87,3 +87,6 @@ git-annex.linux: sssg: -cp ~/git/sssg/sssg.sh ~/.local/bin/sssg -chmod +x ~/.local/bin/sssg + +statusbar-polyfill: + cp ~/dot_testing/builds/statusbar/termux-statusbar-polyfill ~/.local/bin diff --git a/builds/statusbar/statusbar/statusbar.py b/builds/statusbar/statusbar/statusbar.py index df40c14..cd2e61c 100644 --- a/builds/statusbar/statusbar/statusbar.py +++ b/builds/statusbar/statusbar/statusbar.py @@ -179,17 +179,22 @@ def main(): os.mkdir("/home/usr/.cache/statusbar") except FileExistsError: pass + except FileNotFoundError: + # we're on the phone + try: + os.mkdir("/data/data/com.termux/files/home/.cache/statusbar") + except FileExistsError: + pass if argv[1] == "start_statusbars": hostname = gethostname() - print(hostname) if not hostname == "localhost": # if we're not the phone start_statusbars() else: # we are the phone - os.system("st -c statusbar -p -g {}x{}+{}+{} -e statusbar {} & disown".format( - 1920, 100, 0, 980 + os.system("/data/data/com.termux/files/usr/bin/bash -c 'st -c statusbar -p -g {}x{}+{}+{} -e termux-statusbar-polyfill {} & disown'".format( + 1920, 50, 0, 980, "VNC-0" )) diff --git a/builds/statusbar/termux-statusbar-polyfill b/builds/statusbar/termux-statusbar-polyfill new file mode 100755 index 0000000..ae8f3f1 --- /dev/null +++ b/builds/statusbar/termux-statusbar-polyfill @@ -0,0 +1,3 @@ +#!/bin/sh + +python3 ~/dot_testing/builds/statusbar/statusbar/statusbar.py $@ diff --git a/builds/utils/disp b/builds/utils/disp index 894ba8a..7b3a8a3 100755 --- a/builds/utils/disp +++ b/builds/utils/disp @@ -183,6 +183,7 @@ case "$(hostname)" in bspc config top_padding 0 bspc config bottom_padding 100 mkdir -p ~/.cache/statusbar + termux-statusbar-polyfill start_statusbars ;; esac