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

View File

@ -20,6 +20,7 @@ class Controller(SignalsMixins, ControllerData):
def __init__(self, args, unknownargs): def __init__(self, args, unknownargs):
messages = [] messages = []
for arg in unknownargs + [args.new_tab,]: for arg in unknownargs + [args.new_tab,]:
logger.debug(f"{arg}")
# NOTE: If passing line number with file split against : # NOTE: If passing line number with file split against :
if os.path.isfile(arg.replace("file://", "").split(":")[0]): if os.path.isfile(arg.replace("file://", "").split(":")[0]):
messages.append(f"FILE|{arg.replace('file://', '')}") 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]) settings_manager.register_signals_to_builder([self, self.core_widget])
def get_core_widget(self): 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() { function main() {
call_path=`pwd` call_path=`pwd`
path=""
if [[ ! "${1::1}" == /* ]]; then files=()
path="${call_path}/${1}" for f in "$@"; do
else target=$(readlink -f "${f}")
path="${1}" i="${#files[@]}"
fi size=$(($i + 1))
files[$size]="${target}"
# NOTE: Remove if you want to pass file(s) besides directories... done
if [ ! -f "${path}" ]; then
echo "Newton: Path given not a file..."
exit 1
fi
cd "/opt/" cd "/opt/"
python /opt/newton.zip "$@" python /opt/newton.zip "${files[@]}"
} }
main "$@"; main "$@";