From 7a82ddd0e059c3c4d9b63b9170ebf4d5e8160ff2 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 21 Aug 2024 10:39:52 +0300 Subject: [PATCH] nheko: handle other flags than --profile too --- bash/usr-local-bin/nheko | 12 ++++++------ bash/usr-local-bin/nheko-tor | 11 ++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bash/usr-local-bin/nheko b/bash/usr-local-bin/nheko index 08cd6b9..b5cff2e 100755 --- a/bash/usr-local-bin/nheko +++ b/bash/usr-local-bin/nheko @@ -1,11 +1,11 @@ #!/usr/bin/env bash # USAGE: "nheko default" for the default profile or whatever profile is -# desired as I never run it without the profile flag - -# TODO: Handle --help & --version flags - -# In case of unexplained crashing add the --compact flag! +# desired. set -x -flatpak run --env=LANGUAGE=fi:eo:en im.nheko.Nheko//master --compact --profile "$@" +if [[ "$1" == -* ]]; then + flatpak run --env=LANGUAGE=fi:eo:en im.nheko.Nheko//master "$@" +else + flatpak run --env=LANGUAGE=fi:eo:en im.nheko.Nheko//master --compact --profile "$@" +fi set +x diff --git a/bash/usr-local-bin/nheko-tor b/bash/usr-local-bin/nheko-tor index a9ddd0b..9b79c24 100755 --- a/bash/usr-local-bin/nheko-tor +++ b/bash/usr-local-bin/nheko-tor @@ -1,10 +1,11 @@ #!/usr/bin/env bash # Nheko flatpak with Tor # USAGE: "nheko default" for the default profile or whatever profile is -# desired as I never run it without the profile flag - -# TODO: Handle --help & --version flags - +# desired set -x -flatpak run --env=LC_ALL=en_US.utf8 --env=TZ=UTC --env=all_proxy=socks5://127.0.0.1:9050/ im.nheko.Nheko//master --compact --profile "$@" +if [[ "$1" == -* ]]; then + flatpak run --env=LC_ALL=en_US.utf8 --env=TZ=UTC --env=all_proxy=socks5://127.0.0.1:9050/ im.nheko.Nheko//master "$@" +else + flatpak run --env=LC_ALL=en_US.utf8 --env=TZ=UTC --env=all_proxy=socks5://127.0.0.1:9050/ im.nheko.Nheko//master --compact --profile "$@" +fi set +x