Change out launch approach

This commit is contained in:
itdominator 2023-10-28 00:50:06 -05:00
parent 6fe58a39a2
commit f897cf5e45
4 changed files with 13 additions and 15 deletions

View File

@ -38,6 +38,8 @@ if __name__ == "__main__":
# Read arguments (If any...)
args, unknownargs = parser.parse_known_args()
print(args)
print(unknownargs)
if args.debug == "true":
settings_manager.set_debug(True)
@ -50,4 +52,4 @@ if __name__ == "__main__":
Gtk.main()
except Exception as e:
traceback.print_exc()
quit()
quit()

View File

@ -20,6 +20,7 @@ class Controller(SignalsMixins, ControllerData):
def __init__(self, args, unknownargs):
messages = []
for arg in unknownargs + [args.new_tab,]:
logger.debug(f"{arg}")
# NOTE: If passing line number with file split against :
if os.path.isfile(arg.replace("file://", "").split(":")[0]):
messages.append(f"FILE|{arg.replace('file://', '')}")
@ -65,4 +66,4 @@ class Controller(SignalsMixins, ControllerData):
settings_manager.register_signals_to_builder([self, self.core_widget])
def get_core_widget(self):
return self.core_widget
return self.core_widget

0
src/poop is.txt Normal file
View File

View File

@ -9,21 +9,16 @@
function main() {
call_path=`pwd`
path=""
if [[ ! "${1::1}" == /* ]]; then
path="${call_path}/${1}"
else
path="${1}"
fi
# NOTE: Remove if you want to pass file(s) besides directories...
if [ ! -f "${path}" ]; then
echo "Newton: Path given not a file..."
exit 1
fi
files=()
for f in "$@"; do
target=$(readlink -f "${f}")
i="${#files[@]}"
size=$(($i + 1))
files[$size]="${target}"
done
cd "/opt/"
python /opt/newton.zip "$@"
python /opt/newton.zip "${files[@]}"
}
main "$@";