diff --git a/toot/console.py b/toot/console.py index dbb681a..663aab5 100644 --- a/toot/console.py +++ b/toot/console.py @@ -348,7 +348,7 @@ POST_COMMANDS = [ }), (["-v", "--visibility"], { "type": visibility, - "default": "public", + "default": os.getenv("TOOT_VISIBILITY", "public"), "help": 'post visibility, one of: %s' % ", ".join(VISIBILITY_CHOICES), }), (["-s", "--sensitive"], { diff --git a/toot/tui/compose.py b/toot/tui/compose.py index 44b7e47..9eb742e 100644 --- a/toot/tui/compose.py +++ b/toot/tui/compose.py @@ -1,5 +1,6 @@ import urwid import logging +import os from .constants import VISIBILITY_OPTIONS from .widgets import Button, EditBox @@ -31,7 +32,7 @@ class StatusComposer(urwid.Frame): self.cw_remove_button = Button("Remove content warning", on_press=self.remove_content_warning) - self.visibility = "public" + self.visibility = os.getenv("TOOT_VISIBILITY", "public") self.visibility_button = Button("Visibility: {}".format(self.visibility), on_press=self.choose_visibility)