TOOT_VISIBILITY controls default visibility
This commit is contained in:
parent
f91bfa0c62
commit
8582c8ed62
2 changed files with 3 additions and 2 deletions
|
@ -348,7 +348,7 @@ POST_COMMANDS = [
|
||||||
}),
|
}),
|
||||||
(["-v", "--visibility"], {
|
(["-v", "--visibility"], {
|
||||||
"type": visibility,
|
"type": visibility,
|
||||||
"default": "public",
|
"default": os.getenv("TOOT_VISIBILITY", "public"),
|
||||||
"help": 'post visibility, one of: %s' % ", ".join(VISIBILITY_CHOICES),
|
"help": 'post visibility, one of: %s' % ", ".join(VISIBILITY_CHOICES),
|
||||||
}),
|
}),
|
||||||
(["-s", "--sensitive"], {
|
(["-s", "--sensitive"], {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import urwid
|
import urwid
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
from .constants import VISIBILITY_OPTIONS
|
from .constants import VISIBILITY_OPTIONS
|
||||||
from .widgets import Button, EditBox
|
from .widgets import Button, EditBox
|
||||||
|
@ -31,7 +32,7 @@ class StatusComposer(urwid.Frame):
|
||||||
self.cw_remove_button = Button("Remove content warning",
|
self.cw_remove_button = Button("Remove content warning",
|
||||||
on_press=self.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),
|
self.visibility_button = Button("Visibility: {}".format(self.visibility),
|
||||||
on_press=self.choose_visibility)
|
on_press=self.choose_visibility)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue