generated from itdominator/Python-With-Gtk-Template
Change out launch approach
This commit is contained in:
parent
6fe58a39a2
commit
f897cf5e45
@ -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()
|
@ -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
0
src/poop is.txt
Normal 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 "$@";
|
||||
|
Loading…
Reference in New Issue
Block a user