diff --git a/src/__main__.py b/src/__main__.py index c6b0973..5053f9f 100644 --- a/src/__main__.py +++ b/src/__main__.py @@ -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() \ No newline at end of file diff --git a/src/core/controller.py b/src/core/controller.py index 2fb6781..f7edc55 100644 --- a/src/core/controller.py +++ b/src/core/controller.py @@ -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 \ No newline at end of file diff --git a/src/poop is.txt b/src/poop is.txt new file mode 100644 index 0000000..e69de29 diff --git a/user_config/bin/newton b/user_config/bin/newton index 2852326..5eed8c6 100755 --- a/user_config/bin/newton +++ b/user_config/bin/newton @@ -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 "$@";