Browse Source
* bump version * rename window to pane * Add internal editor * show chars left * don't assume xdg-open, use open on iOS and start on Windows * remove leaders and fix "switch" * support multiple accounts * update title on named feeds * terminal-title=3, no top bar and no terminal title * remove ini package * add commands-in-new-pane and dynamic-timeline-name * add delete-temp-files * add lang to toots * update docs * update modules * add clear-temp * upgrade modules * add gruvbox lightpull/256/head 2.0.0
51 changed files with 7406 additions and 4276 deletions
@ -1,826 +0,0 @@ |
|||||||
# Configuration file for tut |
|
||||||
|
|
||||||
[general] |
|
||||||
# Shows a confirmation view before actions such as favorite, delete toot, boost |
|
||||||
# etc. |
|
||||||
# default=true |
|
||||||
confirmation=true |
|
||||||
|
|
||||||
# Enable support for using the mouse in tut to select items. |
|
||||||
# default=false |
|
||||||
mouse-support=false |
|
||||||
|
|
||||||
# Timelines adds windows of feeds. You can customize the number of feeds, what |
|
||||||
# they should show and the key to activate them. |
|
||||||
# |
|
||||||
# Available timelines: home, direct, local, federated, special, bookmarks, |
|
||||||
# saved, favorited, notifications, lists, mentions, tag |
|
||||||
# |
|
||||||
# The one named special are the home timeline with only boosts and/or replies. |
|
||||||
# |
|
||||||
# Tag is special as you need to add the tag after, see the example below. |
|
||||||
# |
|
||||||
# The syntax is: |
|
||||||
# timelines=feed,[name],[keys...],[showBoosts],[showReplies] |
|
||||||
# |
|
||||||
# Tha values in brackets are optional. You can see the syntax for keys under the |
|
||||||
# [input] section. |
|
||||||
# |
|
||||||
# showBoosts and showReplies must be formated as bools. So either true or false. |
|
||||||
# They always defaults to true. |
|
||||||
# |
|
||||||
# Some examples: |
|
||||||
# |
|
||||||
# home timeline with the name Home |
|
||||||
# timelines=home,Home |
|
||||||
# |
|
||||||
# local timeline with the name Local and it gets focus when you press 2. It will |
|
||||||
# also hide boosts in the timeline, but show toots that are replies. |
|
||||||
# timelines=local,Local,'2',false,true |
|
||||||
# |
|
||||||
# notification timeline with the name [N]otifications and it gets focus when you |
|
||||||
# press n or N |
|
||||||
# timelines=notifications,[N]otifications,'n','N' |
|
||||||
# |
|
||||||
# tag timeline for #linux with the name Linux and it gets focus when you press |
|
||||||
# timelines=tag linux,Linux,"F2" |
|
||||||
# |
|
||||||
# |
|
||||||
# If you don't set any timelines it will default to this: |
|
||||||
# timelines=home |
|
||||||
# timelines=notifications,[N]otifications,'n','N' |
|
||||||
# |
|
||||||
|
|
||||||
|
|
||||||
# The date format to be used. See https://godoc.org/time#Time.Format |
|
||||||
# default=2006-01-02 15:04 |
|
||||||
date-format=2006-01-02 15:04 |
|
||||||
|
|
||||||
# Format for dates the same day. See date-format for more info. |
|
||||||
# default=15:04 |
|
||||||
date-today-format=15:04 |
|
||||||
|
|
||||||
# This displays relative dates instead for statuses that are one day or older |
|
||||||
# the output is 1y2m1d (1 year 2 months and 1 day) |
|
||||||
# |
|
||||||
# The value is an integear |
|
||||||
# -1 = don't use relative dates |
|
||||||
# 0 = always use relative dates, except for dates < 1 day |
|
||||||
# 1 - ∞ = number of days to use relative dates |
|
||||||
# |
|
||||||
# Example: date-relative=28 will display a relative date for toots that are |
|
||||||
# between 1-28 days old. Otherwhise it will use the short or long format. |
|
||||||
# default=-1 |
|
||||||
date-relative=-1 |
|
||||||
|
|
||||||
# The max width of text before it wraps when displaying toots. |
|
||||||
# 0 = no restriction. |
|
||||||
# default=0 |
|
||||||
max-width=0 |
|
||||||
|
|
||||||
# Where do you want the list of toots to be placed? |
|
||||||
# Valid values: left, right, top, bottom. |
|
||||||
# default=left |
|
||||||
list-placement=left |
|
||||||
|
|
||||||
# If you have notification-feed set to true you can display it under the main |
|
||||||
# list of toots (row) or place it to the right of the main list of toots |
|
||||||
# (column). |
|
||||||
# default=row |
|
||||||
list-split=row |
|
||||||
|
|
||||||
# You can change the proportions of the list view in relation to the content |
|
||||||
# view list-proportion=1 and content-proportoin=3 will result in the content |
|
||||||
# taking up 3 times more space. |
|
||||||
# Must be n > 0 |
|
||||||
# default=1 |
|
||||||
list-proportion=1 |
|
||||||
|
|
||||||
# See list-proportion |
|
||||||
# default=2 |
|
||||||
content-proportion=2 |
|
||||||
|
|
||||||
# Hide notifications of this type. If you have multiple you separate them with a |
|
||||||
# comma. Valid types: mention, status, boost, follow, follow_request, favorite, |
|
||||||
# poll, edit. |
|
||||||
# default= |
|
||||||
notifications-to-hide= |
|
||||||
|
|
||||||
# If you always want to quote original message when replying. |
|
||||||
# default=false |
|
||||||
quote-reply=false |
|
||||||
|
|
||||||
# If you want to show icons in the list of toots. |
|
||||||
# default=true |
|
||||||
show-icons=true |
|
||||||
|
|
||||||
# If you've learnt all the shortcut keys you can remove the help text and only |
|
||||||
# show the key in tui. So it gets less cluttered. |
|
||||||
# default=false |
|
||||||
short-hints=false |
|
||||||
|
|
||||||
# If you want to display the filter that filtered a toot. |
|
||||||
# default=true |
|
||||||
show-filter-phrase=true |
|
||||||
|
|
||||||
# If you want to show a message in the cmdbar on how to access the help text. |
|
||||||
# default=true |
|
||||||
show-help=true |
|
||||||
|
|
||||||
# If you always want tut to jump to the newest post. May ruin your reading |
|
||||||
# experience. |
|
||||||
# default=false |
|
||||||
stick-to-top=false |
|
||||||
|
|
||||||
# If you want to display the username of the person being boosted instead of the |
|
||||||
# person that boosted. |
|
||||||
# default=false |
|
||||||
show-boosted-user=false |
|
||||||
|
|
||||||
# 0 = No terminal title |
|
||||||
# 1 = Show title in terminal and top bar |
|
||||||
# 2 = Only show terminal title, and no top bar in tut. |
|
||||||
# default=0 |
|
||||||
terminal-title=0 |
|
||||||
|
|
||||||
# If you don't want the whole UI to update, and only the text content you can |
|
||||||
# set this option to true. This will lead to some artifacts being left on the |
|
||||||
# screen when emojis are present. But it will keep the UI from flashing on every |
|
||||||
# single toot in some terminals. |
|
||||||
# default=true |
|
||||||
redraw-ui=true |
|
||||||
|
|
||||||
# The leader is used as a shortcut to run commands as you can do in Vim. By |
|
||||||
# default this is disabled and you enable it by setting a leader-key. It can |
|
||||||
# only consist of one char and I like to use comma as leader key. So to set it |
|
||||||
# you write leader-key=, |
|
||||||
# default= |
|
||||||
leader-key= |
|
||||||
|
|
||||||
# Number of milliseconds before the leader command resets. So if you tap the |
|
||||||
# leader-key by mistake or are to slow it empties all the input after X |
|
||||||
# milliseconds. |
|
||||||
# default=1000 |
|
||||||
leader-timeout=1000 |
|
||||||
|
|
||||||
# You set actions for the leader-key with one or more leader-action. It consists |
|
||||||
# of two parts first the action then the shortcut. And they're separated by a |
|
||||||
# comma. |
|
||||||
# |
|
||||||
# Available commands: blocking, bookmarks, boosts, clear-notifications, |
|
||||||
# close-window, compose, direct, edit, favorited, favorites, federated, |
|
||||||
# followers, following, history, home, list-placement, list-split, lists, local, |
|
||||||
# mentions, move-window-left, move-window-right, move-window-up, |
|
||||||
# move-window-down, move-window-home, move-window-end, muting, newer, |
|
||||||
# notifications, preferences, profile, proportions, refetch, saved, special-all, |
|
||||||
# special-boosts, special-replies, stick-to-top, switch, tag, tags, window |
|
||||||
# |
|
||||||
# The ones named special-* are the home timeline with only boosts and/or |
|
||||||
# replies. All contains both, -boosts only boosts and -replies only replies. |
|
||||||
# |
|
||||||
# The shortcuts are up to you, but keep them quite short and make sure they |
|
||||||
# don't collide. If you have one shortcut that is "f" and an other one that is |
|
||||||
# "fav", the one with "f" will always run and "fav" will never run. |
|
||||||
# |
|
||||||
# Some special leaders: |
|
||||||
# tag is special as you need to add the tag after, e.g. tag linux |
|
||||||
# window is special as it's a shortcut for switching between the timelines |
|
||||||
# you've set under general and they are zero indexed. window 0 = your first |
|
||||||
# timeline, window 1 = your second and so on. |
|
||||||
# list-placement as it takes the argument top, right, bottom or left |
|
||||||
# list-split as it takes the argument column or row |
|
||||||
# proportions takes the arguments [int] [int], where the first integer is the |
|
||||||
# list and the other content, e.g. proportions 1 3. See list-proportion above |
|
||||||
# for more information. |
|
||||||
# switch let's you go to a timeline if it already exists, if it doesn't it will |
|
||||||
# open the timeline in a new window. The syntax is almost the same as in |
|
||||||
# timelines= and is displayed under the examples. |
|
||||||
# |
|
||||||
# Some examples: |
|
||||||
# leader-action=local,lo |
|
||||||
# leader-action=lists,li |
|
||||||
# leader-action=federated,fed |
|
||||||
# leader-action=direct,d |
|
||||||
# leader-action=history,h |
|
||||||
# leader-action=tag linux,tl |
|
||||||
# leader-action=window 0,h |
|
||||||
# leader-action=list-placement bottom,b |
|
||||||
# leader-action=list-split column,c |
|
||||||
# leader-action=proportions 1 3,3 |
|
||||||
# |
|
||||||
# Syntax for switch: |
|
||||||
# leader-action=switch feed,shortcut,[name],[showBoosts],[showReplies] |
|
||||||
# showBoosts can be either true or false and they are both optional. Here are |
|
||||||
# some examples: |
|
||||||
# |
|
||||||
# leader-action=switch home,h,false,true |
|
||||||
# leader-action=switch tag tut,tt |
|
||||||
# |
|
||||||
|
|
||||||
|
|
||||||
[media] |
|
||||||
# Your image viewer. |
|
||||||
# default=xdg-open |
|
||||||
image-viewer=xdg-open |
|
||||||
|
|
||||||
# Open the image viewer in the same terminal as toot. Only for terminal based |
|
||||||
# viewers. |
|
||||||
# default=false |
|
||||||
image-terminal=false |
|
||||||
|
|
||||||
# If images should open one by one e.g. "imv image.png" multiple times. If set |
|
||||||
# to false all images will open at the same time like this "imv image1.png |
|
||||||
# image2.png image3.png". Not all image viewers support this, so try it first. |
|
||||||
# default=true |
|
||||||
image-single=true |
|
||||||
|
|
||||||
# If you want to open the images in reverse order. In some image viewers this |
|
||||||
# will display the images in the "right" order. |
|
||||||
# default=false |
|
||||||
image-reverse=false |
|
||||||
|
|
||||||
# Your video viewer. |
|
||||||
# default=xdg-open |
|
||||||
video-viewer=xdg-open |
|
||||||
|
|
||||||
# Open the video viewer in the same terminal as toot. Only for terminal based |
|
||||||
# viewers. |
|
||||||
# default=false |
|
||||||
video-terminal=false |
|
||||||
|
|
||||||
# If videos should open one by one. See image-single. |
|
||||||
# default=true |
|
||||||
video-single=true |
|
||||||
|
|
||||||
# If you want your videos in reverse order. In some video apps this will play |
|
||||||
# the files in the "right" order. |
|
||||||
# default=false |
|
||||||
video-reverse=false |
|
||||||
|
|
||||||
# Your audio viewer. |
|
||||||
# default=xdg-open |
|
||||||
audio-viewer=xdg-open |
|
||||||
|
|
||||||
# Open the audio viewer in the same terminal as toot. Only for terminal based |
|
||||||
# viewers. |
|
||||||
# default=false |
|
||||||
audio-terminal=false |
|
||||||
|
|
||||||
# If audio should open one by one. See image-single. |
|
||||||
# default=true |
|
||||||
audio-single=true |
|
||||||
|
|
||||||
# If you want to play the audio files in reverse order. In some audio apps this |
|
||||||
# will play the files in the "right" order. |
|
||||||
# default=false |
|
||||||
audio-reverse=false |
|
||||||
|
|
||||||
# Your web browser. |
|
||||||
# default=xdg-open |
|
||||||
link-viewer=xdg-open |
|
||||||
|
|
||||||
# Open the browser in the same terminal as toot. Only for terminal based |
|
||||||
# browsers. |
|
||||||
# default=false |
|
||||||
link-terminal=false |
|
||||||
|
|
||||||
[open-custom] |
|
||||||
# This sections allows you to set up to five custom programs to open URLs with. |
|
||||||
# If the url points to an image, you can set c1-name to img and c1-use to imv. |
|
||||||
# If the program runs in a terminal and you want to run it in the same terminal |
|
||||||
# as tut. Set cX-terminal to true. The name will show up in the UI, so keep it |
|
||||||
# short so all five fits. |
|
||||||
# |
|
||||||
# c1-name=name |
|
||||||
# c1-use=program |
|
||||||
# c1-terminal=false |
|
||||||
# |
|
||||||
# c2-name=name |
|
||||||
# c2-use=program |
|
||||||
# c2-terminal=false |
|
||||||
# |
|
||||||
# c3-name=name |
|
||||||
# c3-use=program |
|
||||||
# c3-terminal=false |
|
||||||
# |
|
||||||
# c4-name=name |
|
||||||
# c4-use=program |
|
||||||
# c4-terminal=false |
|
||||||
# |
|
||||||
# c5-name=name |
|
||||||
# c5-use=program |
|
||||||
# c5-terminal=false |
|
||||||
|
|
||||||
[open-pattern] |
|
||||||
# Here you can set your own glob patterns for opening matching URLs in the |
|
||||||
# program you want them to open up in. You could for example open Youtube videos |
|
||||||
# in your video player instead of your default browser. |
|
||||||
# |
|
||||||
# You must name the keys foo-pattern, foo-use and foo-terminal, where use is the |
|
||||||
# program that will open up the URL. To see the syntax for glob pattern you can |
|
||||||
# follow this URL https://github.com/gobwas/glob#syntax. foo-terminal is if the |
|
||||||
# program runs in the terminal and should open in the same terminal as tut |
|
||||||
# itself. |
|
||||||
# |
|
||||||
# Example for youtube.com and youtu.be to open up in mpv instead of the browser. |
|
||||||
# |
|
||||||
# y1-pattern=*youtube.com/watch* |
|
||||||
# y1-use=mpv |
|
||||||
# y1-terminal=false |
|
||||||
# |
|
||||||
# y2-pattern=*youtu.be/* |
|
||||||
# y2-use=mpv |
|
||||||
# y2-terminal=false |
|
||||||
|
|
||||||
[desktop-notification] |
|
||||||
# Notification when someone follows you. |
|
||||||
# default=false |
|
||||||
followers=false |
|
||||||
|
|
||||||
# Notification when someone favorites one of your toots. |
|
||||||
# default=false |
|
||||||
favorite=false |
|
||||||
|
|
||||||
# Notification when someone mentions you. |
|
||||||
# default=false |
|
||||||
mention=false |
|
||||||
|
|
||||||
# Notification when someone edits their toot. |
|
||||||
# default=false |
|
||||||
update=false |
|
||||||
|
|
||||||
# Notification when someone boosts one of your toots. |
|
||||||
# default=false |
|
||||||
boost=false |
|
||||||
|
|
||||||
# Notification of poll results. |
|
||||||
# default=false |
|
||||||
poll=false |
|
||||||
|
|
||||||
# Notification when there is new posts in current timeline. |
|
||||||
# default=false |
|
||||||
posts=false |
|
||||||
|
|
||||||
[style] |
|
||||||
# All styles can be represented in their HEX value like #ffffff or with their |
|
||||||
# name, so in this case white. The only special value is "default" which equals |
|
||||||
# to transparent, so it will be the same color as your terminal. |
|
||||||
# |
|
||||||
# You can also use xrdb colors like this xrdb:color1 The program will use colors |
|
||||||
# prefixed with an * first then look for URxvt or XTerm if it can't find any |
|
||||||
# color prefixed with an asterisk. If you don't want tut to guess the prefix you |
|
||||||
# can set the prefix yourself. If the xrdb color can't be found a preset color |
|
||||||
# will be used. You'll have to set theme=none for this to work. |
|
||||||
|
|
||||||
# The xrdb prefix used for colors in .Xresources. |
|
||||||
# default=guess |
|
||||||
xrdb-prefix=guess |
|
||||||
|
|
||||||
# You can use some themes that comes bundled with tut. Check out the themes |
|
||||||
# available on the URL below. If a theme is named "nord.ini" you just write |
|
||||||
# theme=nord |
|
||||||
# |
|
||||||
# https://github.com/RasmusLindroth/tut/tree/master/config/themes |
|
||||||
# |
|
||||||
# You can also create a theme file in your config directory e.g. |
|
||||||
# ~/.config/tut/themes/foo.ini and then set theme=foo. |
|
||||||
# |
|
||||||
# If you want to use your own theme but don't want to create a new file, set |
|
||||||
# theme=none and then you can create your own theme below. |
|
||||||
# default=default |
|
||||||
theme=default |
|
||||||
|
|
||||||
# The background color used on most elements. |
|
||||||
# default= |
|
||||||
background= |
|
||||||
|
|
||||||
# The text color used on most of the text. |
|
||||||
# default= |
|
||||||
text= |
|
||||||
|
|
||||||
# The color to display subtle elements or subtle text. Like lines and help text. |
|
||||||
# default= |
|
||||||
subtle= |
|
||||||
|
|
||||||
# The color for errors or warnings |
|
||||||
# default= |
|
||||||
warning-text= |
|
||||||
|
|
||||||
# This color is used to display username. |
|
||||||
# default= |
|
||||||
text-special-one= |
|
||||||
|
|
||||||
# This color is used to display username and key hints. |
|
||||||
# default= |
|
||||||
text-special-two= |
|
||||||
|
|
||||||
# The color of the bar at the top |
|
||||||
# default= |
|
||||||
top-bar-background= |
|
||||||
|
|
||||||
# The color of the text in the bar at the top. |
|
||||||
# default= |
|
||||||
top-bar-text= |
|
||||||
|
|
||||||
# The color of the bar at the bottom |
|
||||||
# default= |
|
||||||
status-bar-background= |
|
||||||
|
|
||||||
# The color of the text in the bar at the bottom. |
|
||||||
# default= |
|
||||||
status-bar-text= |
|
||||||
|
|
||||||
# The color of the bar at the bottom in view mode. |
|
||||||
# default= |
|
||||||
status-bar-view-background= |
|
||||||
|
|
||||||
# The color of the text in the bar at the bottom in view mode. |
|
||||||
# default= |
|
||||||
status-bar-view-text= |
|
||||||
|
|
||||||
# The color of the text in the command bar at the bottom. |
|
||||||
# default= |
|
||||||
command-text= |
|
||||||
|
|
||||||
# Background of selected list items. |
|
||||||
# default= |
|
||||||
list-selected-background= |
|
||||||
|
|
||||||
# The text color of selected list items. |
|
||||||
# default= |
|
||||||
list-selected-text= |
|
||||||
|
|
||||||
# The background color of selected list items that are out of focus. |
|
||||||
# default= |
|
||||||
list-selected-inactive-background= |
|
||||||
|
|
||||||
# The text color of selected list items that are out of focus. |
|
||||||
# default= |
|
||||||
list-selected-inactive-text= |
|
||||||
|
|
||||||
# The main color of the text for key hints |
|
||||||
# default= |
|
||||||
controls-text= |
|
||||||
|
|
||||||
# The highlight color of for key hints |
|
||||||
# default= |
|
||||||
controls-highlight= |
|
||||||
|
|
||||||
# The background color in dropdowns and autocompletions |
|
||||||
# default= |
|
||||||
autocomplete-background= |
|
||||||
|
|
||||||
# The text color in dropdowns at autocompletions |
|
||||||
# default= |
|
||||||
autocomplete-text= |
|
||||||
|
|
||||||
# The background color for selected value in dropdowns and autocompletions |
|
||||||
# default= |
|
||||||
autocomplete-selected-background= |
|
||||||
|
|
||||||
# The text color for selected value in dropdowns and autocompletions |
|
||||||
# default= |
|
||||||
autocomplete-selected-text= |
|
||||||
|
|
||||||
# The background color on selected button and the text color of unselected |
|
||||||
# buttons |
|
||||||
# default= |
|
||||||
button-color-one= |
|
||||||
|
|
||||||
# The text color on selected button and the background color of unselected |
|
||||||
# buttons |
|
||||||
# default= |
|
||||||
button-color-two= |
|
||||||
|
|
||||||
# The background on named timelines. |
|
||||||
# default= |
|
||||||
timeline-name-background= |
|
||||||
|
|
||||||
# The text color on named timelines |
|
||||||
# default= |
|
||||||
timeline-name-text= |
|
||||||
|
|
||||||
[input] |
|
||||||
# You can edit the keys for tut below. |
|
||||||
# |
|
||||||
# The syntax is a bit weird, but it works. And I'll try to explain it as well as |
|
||||||
# I can. |
|
||||||
# |
|
||||||
# Example: |
|
||||||
# status-favorite="[F]avorite","Un[F]avorite",'f','F' |
|
||||||
# status-delete="[D]elete",'d','D' |
|
||||||
# |
|
||||||
# status-favorite and status-delete differs because favorite can be in two |
|
||||||
# states, so you will have to add two key hints. |
|
||||||
# Most keys will only have on key hint. Look at the default value for reference. |
|
||||||
# |
|
||||||
# Key hints must be in some of the following formats. Remember the quotation |
|
||||||
# marks. |
|
||||||
# "" = empty |
|
||||||
# "[D]elete" = Delete with a highlighted D |
|
||||||
# "Un[F]ollow" = UnFollow with a highlighted F |
|
||||||
# "[Enter]" = Enter where everything is highlighted |
|
||||||
# "Yan[K]" = YanK with a highlighted K |
|
||||||
# |
|
||||||
# After the hint (or hints) you must set the keys. You can do this in two ways, |
|
||||||
# with single quotation marks or double ones. |
|
||||||
# |
|
||||||
# The single ones are for single chars like 'a', 'b', 'c' and double marks are |
|
||||||
# for special keys like "Enter". Remember that they are case sensitive. |
|
||||||
# |
|
||||||
# To find the names of special keys you have to go to the following site and |
|
||||||
# look for "var KeyNames = map[Key]string{" |
|
||||||
# |
|
||||||
# https://github.com/gdamore/tcell/blob/master/key.go |
|
||||||
|
|
||||||
# Keys for moving down |
|
||||||
# default="",'j','J',"Down" |
|
||||||
global-down="",'j','J',"Down" |
|
||||||
|
|
||||||
# Keys for moving up |
|
||||||
# default="",'k','K',"Up" |
|
||||||
global-up="",'k','K',"Up" |
|
||||||
|
|
||||||
# To select items |
|
||||||
# default="","Enter" |
|
||||||
global-enter="","Enter" |
|
||||||
|
|
||||||
# To go back |
|
||||||
# default="[Esc]","Esc" |
|
||||||
global-back="[Esc]","Esc" |
|
||||||
|
|
||||||
# To go back and exit Tut |
|
||||||
# default="[Q]uit",'q','Q' |
|
||||||
global-exit="[Q]uit",'q','Q' |
|
||||||
|
|
||||||
# Move to the top |
|
||||||
# default="",'g',"Home" |
|
||||||
main-home="",'g',"Home" |
|
||||||
|
|
||||||
# Move to the bottom |
|
||||||
# default="",'G',"End" |
|
||||||
main-end="",'G',"End" |
|
||||||
|
|
||||||
# Go to previous feed |
|
||||||
# default="",'h','H',"Left" |
|
||||||
main-prev-feed="",'h','H',"Left" |
|
||||||
|
|
||||||
# Go to next feed |
|
||||||
# default="",'l','L',"Right" |
|
||||||
main-next-feed="",'l','L',"Right" |
|
||||||
|
|
||||||
# Focus on the previous feed window |
|
||||||
# default="","Backtab" |
|
||||||
main-prev-window="","Backtab" |
|
||||||
|
|
||||||
# Focus on the next feed window |
|
||||||
# default="","Tab" |
|
||||||
main-next-window="","Tab" |
|
||||||
|
|
||||||
# Focus on the notification list |
|
||||||
# default="[N]otifications",'n','N' |
|
||||||
main-notification-focus="[N]otifications",'n','N' |
|
||||||
|
|
||||||
# Compose a new toot |
|
||||||
# default="",'c','C' |
|
||||||
main-compose="",'c','C' |
|
||||||
|
|
||||||
# Open avatar |
|
||||||
# default="[A]vatar",'a','A' |
|
||||||
status-avatar="[A]vatar",'a','A' |
|
||||||
|
|
||||||
# Boost a toot |
|
||||||
# default="[B]oost","Un[B]oost",'b','B' |
|
||||||
status-boost="[B]oost","Un[B]oost",'b','B' |
|
||||||
|
|
||||||
# Edit a toot |
|
||||||
# default="[E]dit",'e','E' |
|
||||||
status-edit="[E]dit",'e','E' |
|
||||||
|
|
||||||
# Delete a toot |
|
||||||
# default="[D]elete",'d','D' |
|
||||||
status-delete="[D]elete",'d','D' |
|
||||||
|
|
||||||
# Favorite a toot |
|
||||||
# default="[F]avorite","Un[F]avorite",'f','F' |
|
||||||
status-favorite="[F]avorite","Un[F]avorite",'f','F' |
|
||||||
|
|
||||||
# Open toots media files |
|
||||||
# default="[M]edia",'m','M' |
|
||||||
status-media="[M]edia",'m','M' |
|
||||||
|
|
||||||
# Open links |
|
||||||
# default="[O]pen",'o','O' |
|
||||||
status-links="[O]pen",'o','O' |
|
||||||
|
|
||||||
# Open poll |
|
||||||
# default="[P]oll",'p','P' |
|
||||||
status-poll="[P]oll",'p','P' |
|
||||||
|
|
||||||
# Reply to toot |
|
||||||
# default="[R]eply",'r','R' |
|
||||||
status-reply="[R]eply",'r','R' |
|
||||||
|
|
||||||
# Save/bookmark a toot |
|
||||||
# default="[S]ave","Un[S]ave",'s','S' |
|
||||||
status-bookmark="[S]ave","Un[S]ave",'s','S' |
|
||||||
|
|
||||||
# View thread |
|
||||||
# default="[T]hread",'t','T' |
|
||||||
status-thread="[T]hread",'t','T' |
|
||||||
|
|
||||||
# Open user profile |
|
||||||
# default="[U]ser",'u','U' |
|
||||||
status-user="[U]ser",'u','U' |
|
||||||
|
|
||||||
# Open the view mode |
|
||||||
# default="[V]iew",'v','V' |
|
||||||
status-view-focus="[V]iew",'v','V' |
|
||||||
|
|
||||||
# Yank the url of the toot |
|
||||||
# default="[Y]ank",'y','Y' |
|
||||||
status-yank="[Y]ank",'y','Y' |
|
||||||
|
|
||||||
# Show the content in a content warning |
|
||||||
# default="Press [Z] to toggle cw",'z','Z' |
|
||||||
status-toggle-cw="Press [Z] to toggle cw",'z','Z' |
|
||||||
|
|
||||||
# Show the content of a filtered toot |
|
||||||
# default="Press [Z] to view filtered toot",'z','Z' |
|
||||||
status-show-filtered="Press [Z] to view filtered toot",'z','Z' |
|
||||||
|
|
||||||
# View avatar |
|
||||||
# default="[A]vatar",'a','A' |
|
||||||
user-avatar="[A]vatar",'a','A' |
|
||||||
|
|
||||||
# Block the user |
|
||||||
# default="[B]lock","Un[B]lock",'b','B' |
|
||||||
user-block="[B]lock","Un[B]lock",'b','B' |
|
||||||
|
|
||||||
# Follow user |
|
||||||
# default="[F]ollow","Un[F]ollow",'f','F' |
|
||||||
user-follow="[F]ollow","Un[F]ollow",'f','F' |
|
||||||
|
|
||||||
# Follow user |
|
||||||
# default="Follow [R]equest","Follow [R]equest",'r','R' |
|
||||||
user-follow-request-decide="Follow [R]equest","Follow [R]equest",'r','R' |
|
||||||
|
|
||||||
# Mute user |
|
||||||
# default="[M]ute","Un[M]ute",'m','M' |
|
||||||
user-mute="[M]ute","Un[M]ute",'m','M' |
|
||||||
|
|
||||||
# Open links |
|
||||||
# default="[O]pen",'o','O' |
|
||||||
user-links="[O]pen",'o','O' |
|
||||||
|
|
||||||
# View user profile |
|
||||||
# default="[U]ser",'u','U' |
|
||||||
user-user="[U]ser",'u','U' |
|
||||||
|
|
||||||
# Open view mode |
|
||||||
# default="[V]iew",'v','V' |
|
||||||
user-view-focus="[V]iew",'v','V' |
|
||||||
|
|
||||||
# Yank the user URL |
|
||||||
# default="[Y]ank",'y','Y' |
|
||||||
user-yank="[Y]ank",'y','Y' |
|
||||||
|
|
||||||
# Open list |
|
||||||
# default="[O]pen",'o','O' |
|
||||||
list-open-feed="[O]pen",'o','O' |
|
||||||
|
|
||||||
# List all users in a list |
|
||||||
# default="[U]sers",'u','U' |
|
||||||
list-user-list="[U]sers",'u','U' |
|
||||||
|
|
||||||
# Add user to list |
|
||||||
# default="[A]dd",'a','A' |
|
||||||
list-user-add="[A]dd",'a','A' |
|
||||||
|
|
||||||
# Delete user from list |
|
||||||
# default="[D]elete",'d','D' |
|
||||||
list-user-delete="[D]elete",'d','D' |
|
||||||
|
|
||||||
# Open URL |
|
||||||
# default="[O]pen",'o','O' |
|
||||||
link-open="[O]pen",'o','O' |
|
||||||
|
|
||||||
# Yank the URL |
|
||||||
# default="[Y]ank",'y','Y' |
|
||||||
link-yank="[Y]ank",'y','Y' |
|
||||||
|
|
||||||
# Open tag feed |
|
||||||
# default="[O]pen",'o','O' |
|
||||||
tag-open-feed="[O]pen",'o','O' |
|
||||||
|
|
||||||
# Toggle follow on tag |
|
||||||
# default="[F]ollow","Un[F]ollow",'f','F' |
|
||||||
tag-follow="[F]ollow","Un[F]ollow",'f','F' |
|
||||||
|
|
||||||
# Edit content warning text on new toot |
|
||||||
# default="[C]W text",'c','C' |
|
||||||
compose-edit-cw="[C]W text",'c','C' |
|
||||||
|
|
||||||
# Edit the text on new toot |
|
||||||
# default="[E]dit text",'e','E' |
|
||||||
compose-edit-text="[E]dit text",'e','E' |
|
||||||
|
|
||||||
# Include a quote when replying |
|
||||||
# default="[I]nclude quote",'i','I' |
|
||||||
compose-include-quote="[I]nclude quote",'i','I' |
|
||||||
|
|
||||||
# Focus on adding media to toot |
|
||||||
# default="[M]edia",'m','M' |
|
||||||
compose-media-focus="[M]edia",'m','M' |
|
||||||
|
|
||||||
# Post the new toot |
|
||||||
# default="[P]ost",'p','P' |
|
||||||
compose-post="[P]ost",'p','P' |
|
||||||
|
|
||||||
# Toggle content warning on toot |
|
||||||
# default="[T]oggle CW",'t','T' |
|
||||||
compose-toggle-content-warning="[T]oggle CW",'t','T' |
|
||||||
|
|
||||||
# Edit the visibility on new toot |
|
||||||
# default="[V]isibility",'v','V' |
|
||||||
compose-visibility="[V]isibility",'v','V' |
|
||||||
|
|
||||||
# Edit the language of a toot |
|
||||||
# default="[L]ang",'l','L' |
|
||||||
compose-language="[L]ang",'l','L' |
|
||||||
|
|
||||||
# Switch to creating a poll |
|
||||||
# default="P[O]ll",'o','O' |
|
||||||
compose-poll="P[O]ll",'o','O' |
|
||||||
|
|
||||||
# Delete media file |
|
||||||
# default="[D]elete",'d','D' |
|
||||||
media-delete="[D]elete",'d','D' |
|
||||||
|
|
||||||
# Edit the description on media file |
|
||||||
# default="[E]dit desc",'e','E' |
|
||||||
media-edit-desc="[E]dit desc",'e','E' |
|
||||||
|
|
||||||
# Add a new media file |
|
||||||
# default="[A]dd",'a','A' |
|
||||||
media-add="[A]dd",'a','A' |
|
||||||
|
|
||||||
# Vote on poll |
|
||||||
# default="[V]ote",'v','V' |
|
||||||
vote-vote="[V]ote",'v','V' |
|
||||||
|
|
||||||
# Select item to vote on |
|
||||||
# default="[Enter] to select",' ', "Enter" |
|
||||||
vote-select="[Enter] to select",' ', "Enter" |
|
||||||
|
|
||||||
# Add a new poll option |
|
||||||
# default="[A]dd",'a','A' |
|
||||||
poll-add="[A]dd",'a','A' |
|
||||||
|
|
||||||
# Edit a poll option |
|
||||||
# default="[E]dit",'e','E' |
|
||||||
poll-edit="[E]dit",'e','E' |
|
||||||
|
|
||||||
# Delete a poll option |
|
||||||
# default="[D]elete",'d','D' |
|
||||||
poll-delete="[D]elete",'d','D' |
|
||||||
|
|
||||||
# Toggle voting on multiple options |
|
||||||
# default="Toggle [M]ultiple",'m','M' |
|
||||||
poll-multi-toggle="Toggle [M]ultiple",'m','M' |
|
||||||
|
|
||||||
# Change the expiration of poll |
|
||||||
# default="E[X]pires",'x','X' |
|
||||||
poll-expiration="E[X]pires",'x','X' |
|
||||||
|
|
||||||
# Change display name |
|
||||||
# default="[N]ame",'n','N' |
|
||||||
preference-name="[N]ame",'n','N' |
|
||||||
|
|
||||||
# Change default visibility of toots |
|
||||||
# default="[V]isibility",'v','V' |
|
||||||
preference-visibility="[V]isibility",'v','V' |
|
||||||
|
|
||||||
# Change bio in profile |
|
||||||
# default="[B]io",'b','B' |
|
||||||
preference-bio="[B]io",'b','B' |
|
||||||
|
|
||||||
# Save your preferences |
|
||||||
# default="[S]ave",'s','S' |
|
||||||
preference-save="[S]ave",'s','S' |
|
||||||
|
|
||||||
# Edit profile fields |
|
||||||
# default="[F]ields",'f','F' |
|
||||||
preference-fields="[F]ields",'f','F' |
|
||||||
|
|
||||||
# Add new field |
|
||||||
# default="[A]dd",'a','A' |
|
||||||
preference-fields-add="[A]dd",'a','A' |
|
||||||
|
|
||||||
# Edit current field |
|
||||||
# default="[E]dit",'e','E' |
|
||||||
preference-fields-edit="[E]dit",'e','E' |
|
||||||
|
|
||||||
# Delete current field |
|
||||||
# default="[D]elete",'d','D' |
|
||||||
preference-fields-delete="[D]elete",'d','D' |
|
||||||
@ -1,28 +0,0 @@ |
|||||||
background=#272822 |
|
||||||
text=#f8f8f2 |
|
||||||
subtle=#808080 |
|
||||||
warning-text=#f92672 |
|
||||||
text-special-one=#ae81ff |
|
||||||
text-special-two=#a6e22e |
|
||||||
top-bar-background=#f92672 |
|
||||||
top-bar-text=#f8f8f2 |
|
||||||
status-bar-background=#f92672 |
|
||||||
status-bar-text=#f8f8f2 |
|
||||||
status-bar-view-background=#ae81ff |
|
||||||
status-bar-view-text=#f8f8f2 |
|
||||||
command-text=#f8f8f2 |
|
||||||
list-selected-background=#f92672 |
|
||||||
list-selected-text=#f8f8f2 |
|
||||||
list-selected-inactive-background=#ae81ff |
|
||||||
list-selected-inactive-text=#f8f8f2 |
|
||||||
controls-text=#f8f8f2 |
|
||||||
controls-highlight=#a6e22e |
|
||||||
autocomplete-background=#272822 |
|
||||||
autocomplete-text=#f8f8f2 |
|
||||||
autocomplete-selected-background=#ae81ff |
|
||||||
autocomplete-selected-text=#f8f8f2 |
|
||||||
button-color-one=#f92672 |
|
||||||
button-color-two=#272822 |
|
||||||
timeline-name-background=#272822 |
|
||||||
timeline-name-text=#808080 |
|
||||||
|
|
||||||
@ -0,0 +1,28 @@ |
|||||||
|
background="#272822" |
||||||
|
text="#f8f8f2" |
||||||
|
subtle="#808080" |
||||||
|
warning-text="#f92672" |
||||||
|
text-special-one="#ae81ff" |
||||||
|
text-special-two="#a6e22e" |
||||||
|
top-bar-background="#f92672" |
||||||
|
top-bar-text="#f8f8f2" |
||||||
|
status-bar-background="#f92672" |
||||||
|
status-bar-text="#f8f8f2" |
||||||
|
status-bar-view-background="#ae81ff" |
||||||
|
status-bar-view-text="#f8f8f2" |
||||||
|
command-text="#f8f8f2" |
||||||
|
list-selected-background="#f92672" |
||||||
|
list-selected-text="#f8f8f2" |
||||||
|
list-selected-inactive-background="#ae81ff" |
||||||
|
list-selected-inactive-text="#f8f8f2" |
||||||
|
controls-text="#f8f8f2" |
||||||
|
controls-highlight="#a6e22e" |
||||||
|
autocomplete-background="#272822" |
||||||
|
autocomplete-text="#f8f8f2" |
||||||
|
autocomplete-selected-background="#ae81ff" |
||||||
|
autocomplete-selected-text="#f8f8f2" |
||||||
|
button-color-one="#f92672" |
||||||
|
button-color-two="#272822" |
||||||
|
timeline-name-background="#272822" |
||||||
|
timeline-name-text="#808080" |
||||||
|
|
||||||
@ -0,0 +1,27 @@ |
|||||||
|
background="#fbf1c7" |
||||||
|
text="#654735" |
||||||
|
subtle="#b47109" |
||||||
|
warning-text="#c14a4a" |
||||||
|
text-special-one="#45707a" |
||||||
|
text-special-two="#945e80" |
||||||
|
top-bar-background="#654735" |
||||||
|
top-bar-text="#fbf1c7" |
||||||
|
status-bar-background="#654735" |
||||||
|
status-bar-text="#fbf1c7" |
||||||
|
status-bar-view-background="#4c7a5d" |
||||||
|
status-bar-view-text="#fbf1c7" |
||||||
|
list-selected-background="#654735" |
||||||
|
list-selected-text="#fbf1c7" |
||||||
|
command-text="#654735" |
||||||
|
list-selected-inactive-background="#945e80" |
||||||
|
list-selected-inactive-text="#fbf1c7" |
||||||
|
controls-text="#654735" |
||||||
|
controls-highlight="#945e80" |
||||||
|
autocomplete-background="#fbf1c7" |
||||||
|
autocomplete-text="#654735" |
||||||
|
autocomplete-selected-background="#4c7a5d" |
||||||
|
autocomplete-selected-text="#fbf1c7" |
||||||
|
button-color-one="#654735" |
||||||
|
button-color-two="#fbf1c7" |
||||||
|
timeline-name-background="#fbf1c7" |
||||||
|
timeline-name-text="#654735" |
||||||
@ -1,14 +0,0 @@ |
|||||||
background=#2E3440 |
|
||||||
text=#ECEFF4 |
|
||||||
subtle=#4C566A |
|
||||||
warning-text=#BF616A |
|
||||||
text-special-one=#8FBCBB |
|
||||||
text-special-two=#81A1C1 |
|
||||||
top-bar-background=#5E81AC |
|
||||||
top-bar-text=#ECEFF4 |
|
||||||
status-bar-background=#5E81AC |
|
||||||
status-bar-text=#ECEFF4 |
|
||||||
status-bar-view-background=#8FBCBB |
|
||||||
status-bar-view-text=#f8f8f2 |
|
||||||
list-selected-background=#5E81AC |
|
||||||
list-selected-text=#ECEFF4 |
|
||||||
@ -0,0 +1,14 @@ |
|||||||
|
background="#2E3440" |
||||||
|
text="#ECEFF4" |
||||||
|
subtle="#4C566A" |
||||||
|
warning-text="#BF616A" |
||||||
|
text-special-one="#8FBCBB" |
||||||
|
text-special-two="#81A1C1" |
||||||
|
top-bar-background="#5E81AC" |
||||||
|
top-bar-text="#ECEFF4" |
||||||
|
status-bar-background="#5E81AC" |
||||||
|
status-bar-text="#ECEFF4" |
||||||
|
status-bar-view-background="#8FBCBB" |
||||||
|
status-bar-view-text="#f8f8f2" |
||||||
|
list-selected-background="#5E81AC" |
||||||
|
list-selected-text="#ECEFF4" |
||||||
@ -1,22 +0,0 @@ |
|||||||
; This is an adaption of NLKNguyen (https://github.com/NLKNguyen)'s |
|
||||||
; PaperColor Light theme for tut (https://github.com/RasmusLindroth/tut). |
|
||||||
; |
|
||||||
; @author: stoerdebegga <stoerdebegga@mailbox.org> |
|
||||||
; @source: https://codeberg.org/stoerdebegga/papercolor-light-contrib |
|
||||||
; @source99: https://github.com/stoerdebegga/papercolor-light-contrib |
|
||||||
; |
|
||||||
background=#EEEEEE |
|
||||||
text=#4D4D4C |
|
||||||
subtle=#4271AE |
|
||||||
warning-text=#D7005F |
|
||||||
text-special-one=#969694 |
|
||||||
text-special-two=#D7005F |
|
||||||
top-bar-background=#4271AE |
|
||||||
top-bar-text=#EEEEEE |
|
||||||
status-bar-background=#4271AE |
|
||||||
status-bar-text=#EEEEEE |
|
||||||
status-bar-view-background=#718C00 |
|
||||||
status-bar-view-text=#f5f5f5 |
|
||||||
command-text=#4D4D4C |
|
||||||
list-selected-background=#D7005F |
|
||||||
list-selected-text=#f5f5f5 |
|
||||||
@ -0,0 +1,22 @@ |
|||||||
|
# This is an adaption of NLKNguyen (https://github.com/NLKNguyen)'s |
||||||
|
# PaperColor Light theme for tut (https://github.com/RasmusLindroth/tut). |
||||||
|
# |
||||||
|
# @author: stoerdebegga <stoerdebegga@mailbox.org> |
||||||
|
# @source: https://codeberg.org/stoerdebegga/papercolor-light-contrib |
||||||
|
# @source99: https://github.com/stoerdebegga/papercolor-light-contrib |
||||||
|
# |
||||||
|
background="#EEEEEE" |
||||||
|
text="#4D4D4C" |
||||||
|
subtle="#4271AE" |
||||||
|
warning-text="#D7005F" |
||||||
|
text-special-one="#969694" |
||||||
|
text-special-two="#D7005F" |
||||||
|
top-bar-background="#4271AE" |
||||||
|
top-bar-text="#EEEEEE" |
||||||
|
status-bar-background="#4271AE" |
||||||
|
status-bar-text="#EEEEEE" |
||||||
|
status-bar-view-background="#718C00" |
||||||
|
status-bar-view-text="#f5f5f5" |
||||||
|
command-text="#4D4D4C" |
||||||
|
list-selected-background="#D7005F" |
||||||
|
list-selected-text="#f5f5f5" |
||||||
@ -0,0 +1,27 @@ |
|||||||
|
background="#ffffff" |
||||||
|
text="#000000" |
||||||
|
subtle="#000000" |
||||||
|
warning-text="#d7005f" |
||||||
|
text-special-one="#000000" |
||||||
|
text-special-two="#d7005f" |
||||||
|
top-bar-background="#4271ae" |
||||||
|
top-bar-text="#ffffff" |
||||||
|
status-bar-background="#f0f0f0" |
||||||
|
status-bar-text="#000000" |
||||||
|
status-bar-view-background="#505050" |
||||||
|
status-bar-view-text="#ffffff" |
||||||
|
list-selected-background="#4271ae" |
||||||
|
list-selected-text="#ffffff" |
||||||
|
command-text="#000000" |
||||||
|
list-selected-inactive-background="#6d6d6d" |
||||||
|
list-selected-inactive-text="#ffffff" |
||||||
|
controls-text="#000000" |
||||||
|
controls-highlight="#f92672" |
||||||
|
autocomplete-background="#fafafa" |
||||||
|
autocomplete-text="#000000" |
||||||
|
autocomplete-selected-background="#4271ae" |
||||||
|
autocomplete-selected-text="#ffffff" |
||||||
|
button-color-one="#4271ae" |
||||||
|
button-color-two="#fafafa" |
||||||
|
timeline-name-background="#f0f0f0" |
||||||
|
timeline-name-text="#000000" |
||||||
@ -0,0 +1,258 @@ |
|||||||
|
package config |
||||||
|
|
||||||
|
type ConfigTOML struct { |
||||||
|
General GeneralTOML `toml:"general"` |
||||||
|
Style StyleTOML `toml:"style"` |
||||||
|
Media MediaTOML `toml:"media"` |
||||||
|
OpenPattern OpenPatternTOML `toml:"open-pattern"` |
||||||
|
OpenCustom OpenCustomTOML `toml:"open-custom"` |
||||||
|
NotificationConfig NotificationsTOML `toml:"desktop-notification"` |
||||||
|
Input InputTOML `toml:"input"` |
||||||
|
} |
||||||
|
|
||||||
|
type GeneralTOML struct { |
||||||
|
Editor *string `toml:"editor"` |
||||||
|
Confirmation *bool `toml:"confirmation"` |
||||||
|
MouseSupport *bool `toml:"mouse-support"` |
||||||
|
DateFormat *string `toml:"date-format"` |
||||||
|
DateTodayFormat *string `toml:"date-today-format"` |
||||||
|
DateRelative *int `toml:"date-relative"` |
||||||
|
MaxWidth *int `toml:"max-width"` |
||||||
|
QuoteReply *bool `toml:"quote-reply"` |
||||||
|
ShortHints *bool `toml:"short-hints"` |
||||||
|
ShowFilterPhrase *bool `toml:"show-filter-phrase"` |
||||||
|
ListPlacement *string `toml:"list-placement"` |
||||||
|
ListSplit *string `toml:"list-split"` |
||||||
|
ListProportion *int `toml:"list-proportion"` |
||||||
|
ContentProportion *int `toml:"content-proportion"` |
||||||
|
TerminalTitle *int `toml:"terminal-title"` |
||||||
|
ShowIcons *bool `toml:"show-icons"` |
||||||
|
ShowHelp *bool `toml:"show-help"` |
||||||
|
RedrawUI *bool `toml:"redraw-ui"` |
||||||
|
LeaderKey *string `toml:"leader-key"` |
||||||
|
LeaderTimeout *int64 `toml:"leader-timeout"` |
||||||
|
Timelines *[]TimelineTOML `toml:"timelines"` |
||||||
|
LeaderActions *[]LeaderActionTOML `toml:"leader-actions"` |
||||||
|
StickToTop *bool `toml:"stick-to-top"` |
||||||
|
NotificationsToHide *[]string `toml:"notifications-to-hide"` |
||||||
|
ShowBoostedUser *bool `toml:"show-boosted-user"` |
||||||
|
DynamicTimelineName *bool `toml:"dynamic-timeline-name"` |
||||||
|
CommandsInNewPane *bool `toml:"commands-in-new-pane"` |
||||||
|
} |
||||||
|
|
||||||
|
type TimelineTOML struct { |
||||||
|
Name *string `toml:"name"` |
||||||
|
Type *string `toml:"type"` |
||||||
|
Data *string `toml:"data"` |
||||||
|
Keys *[]string `toml:"keys"` |
||||||
|
SpecialKeys *[]string `toml:"special-keys"` |
||||||
|
Shortcut *string `toml:"shortcut"` |
||||||
|
HideBoosts *bool `toml:"hide-boosts"` |
||||||
|
HideReplies *bool `toml:"hide-replies"` |
||||||
|
|
||||||
|
Closed *bool `toml:"closed"` |
||||||
|
OnCreationClosed *string `toml:"on-creation-closed"` |
||||||
|
OnFocus *string `toml:"on-focus"` |
||||||
|
} |
||||||
|
|
||||||
|
type LeaderActionTOML struct { |
||||||
|
Type *string `toml:"type"` |
||||||
|
Data *string `toml:"data"` |
||||||
|
Shortcut *string `toml:"shortcut"` |
||||||
|
} |
||||||
|
|
||||||
|
type StyleTOML struct { |
||||||
|
Theme *string `toml:"theme"` |
||||||
|
|
||||||
|
XrdbPrefix *string `toml:"xrdb-prefix"` |
||||||
|
|
||||||
|
Background *string `toml:"background"` |
||||||
|
Text *string `toml:"text"` |
||||||
|
|
||||||
|
Subtle *string `toml:"subtle"` |
||||||
|
WarningText *string `toml:"warning-text"` |
||||||
|
|
||||||
|
TextSpecial1 *string `toml:"text-special-one"` |
||||||
|
TextSpecial2 *string `toml:"text-special-two"` |
||||||
|
|
||||||
|
TopBarBackground *string `toml:"top-bar-background"` |
||||||
|
TopBarText *string `toml:"top-bar-text"` |
||||||
|
|
||||||
|
StatusBarBackground *string `toml:"status-bar-background"` |
||||||
|
StatusBarText *string `toml:"status-bar-text"` |
||||||
|
|
||||||
|
StatusBarViewBackground *string `toml:"status-bar-view-background"` |
||||||
|
StatusBarViewText *string `toml:"status-bar-view-text"` |
||||||
|
|
||||||
|
ListSelectedBackground *string `toml:"list-selected-background"` |
||||||
|
ListSelectedText *string `toml:"list-selected-text"` |
||||||
|
|
||||||
|
ListSelectedInactiveBackground *string `toml:"list-selected-inactive-background"` |
||||||
|
ListSelectedInactiveText *string `toml:"list-selected-inactive-text"` |
||||||
|
|
||||||
|
ControlsText *string `toml:"controls-text"` |
||||||
|
ControlsHighlight *string `toml:"controls-highlight"` |
||||||
|
|
||||||
|
AutocompleteBackground *string `toml:"autocomplete-background"` |
||||||
|
AutocompleteText *string `toml:"autocomplete-text"` |
||||||
|
|
||||||
|
AutocompleteSelectedBackground *string `toml:"autocomplete-selected-background"` |
||||||
|
AutocompleteSelectedText *string `toml:"autocomplete-selected-text"` |
||||||
|
|
||||||
|
ButtonColorOne *string `toml:"button-color-one"` |
||||||
|
ButtonColorTwo *string `toml:"button-color-two"` |
||||||
|
|
||||||
|
TimelineNameBackground *string `toml:"timeline-name-background"` |
||||||
|
TimelineNameText *string `toml:"timeline-name-text"` |
||||||
|
|
||||||
|
IconColor *string `toml:"icon-color"` |
||||||
|
|
||||||
|
CommandText *string `toml:"command-text"` |
||||||
|
} |
||||||
|
|
||||||
|
type ViewerTOML struct { |
||||||
|
Program *string `toml:"program"` |
||||||
|
Args *string `toml:"args"` |
||||||
|
Terminal *bool `toml:"terminal"` |
||||||
|
Single *bool `toml:"single"` |
||||||
|
Reverse *bool `toml:"reverse"` |
||||||
|
} |
||||||
|
|
||||||
|
type MediaTOML struct { |
||||||
|
DeleteTmpFiles *bool `toml:"delete-temp-files"` |
||||||
|
Image *ViewerTOML `toml:"image"` |
||||||
|
Video *ViewerTOML `toml:"video"` |
||||||
|
Audio *ViewerTOML `toml:"audio"` |
||||||
|
Link *ViewerTOML `toml:"link"` |
||||||
|
} |
||||||
|
|
||||||
|
type PatternTOML struct { |
||||||
|
Matching *string `toml:"matching"` |
||||||
|
Program *string `toml:"program"` |
||||||
|
Args *string `toml:"args"` |
||||||
|
Terminal *bool `toml:"terminal"` |
||||||
|
} |
||||||
|
|
||||||
|
type OpenPatternTOML struct { |
||||||
|
Patterns *[]PatternTOML `toml:"patterns"` |
||||||
|
} |
||||||
|
|
||||||
|
type CustomTOML struct { |
||||||
|
Program *string `toml:"program"` |
||||||
|
Args *string `toml:"args"` |
||||||
|
Terminal *bool `toml:"terminal"` |
||||||
|
Hint *string `toml:"hint"` |
||||||
|
Keys *[]string `toml:"keys"` |
||||||
|
SpecialKeys *[]string `toml:"special-keys"` |
||||||
|
} |
||||||
|
|
||||||
|
type OpenCustomTOML struct { |
||||||
|
Programs *[]CustomTOML `toml:"programs"` |
||||||
|
} |
||||||
|
|
||||||
|
type NotificationsTOML struct { |
||||||
|
Followers *bool `toml:"followers"` |
||||||
|
Favorite *bool `toml:"favorite"` |
||||||
|
Mention *bool `toml:"mention"` |
||||||
|
Update *bool `toml:"update"` |
||||||
|
Boost *bool `toml:"boost"` |
||||||
|
Poll *bool `toml:"poll"` |
||||||
|
Posts *bool `toml:"posts"` |
||||||
|
} |
||||||
|
|
||||||
|
type KeyHintTOML struct { |
||||||
|
Hint *string `toml:"hint"` |
||||||
|
HintAlt *string `toml:"hint-alt"` |
||||||
|
Keys *[]string `toml:"keys"` |
||||||
|
SpecialKeys *[]string `toml:"special-keys"` |
||||||
|
} |
||||||
|
|
||||||
|
type InputTOML struct { |
||||||
|
GlobalDown *KeyHintTOML `toml:"global-down"` |
||||||
|
GlobalUp *KeyHintTOML `toml:"global-up"` |
||||||
|
GlobalEnter *KeyHintTOML `toml:"global-enter"` |
||||||
|
GlobalBack *KeyHintTOML `toml:"global-back"` |
||||||
|
GlobalExit *KeyHintTOML `toml:"global-exit"` |
||||||
|
|
||||||
|
MainHome *KeyHintTOML `toml:"main-home"` |
||||||
|
MainEnd *KeyHintTOML `toml:"main-end"` |
||||||
|
MainPrevFeed *KeyHintTOML `toml:"main-prev-feed"` |
||||||
|
MainNextFeed *KeyHintTOML `toml:"main-next-feed"` |
||||||
|
MainPrevPane *KeyHintTOML `toml:"main-prev-pane"` |
||||||
|
MainNextPane *KeyHintTOML `toml:"main-next-pane"` |
||||||
|
MainCompose *KeyHintTOML `toml:"main-compose"` |
||||||
|
MainNextAccount *KeyHintTOML `toml:"main-next-account"` |
||||||
|
MainPrevAccount *KeyHintTOML `toml:"main-prev-account"` |
||||||
|
|
||||||
|
StatusAvatar *KeyHintTOML `toml:"status-avatar"` |
||||||
|
StatusBoost *KeyHintTOML `toml:"status-boost"` |
||||||
|
StatusDelete *KeyHintTOML `toml:"status-delete"` |
||||||
|
StatusEdit *KeyHintTOML `toml:"status-edit"` |
||||||
|
StatusFavorite *KeyHintTOML `toml:"status-favorite"` |
||||||
|
StatusMedia *KeyHintTOML `toml:"status-media"` |
||||||
|
StatusLinks *KeyHintTOML `toml:"status-links"` |
||||||
|
StatusPoll *KeyHintTOML `toml:"status-poll"` |
||||||
|
StatusReply *KeyHintTOML `toml:"status-reply"` |
||||||
|
StatusBookmark *KeyHintTOML `toml:"status-bookmark"` |
||||||
|
StatusThread *KeyHintTOML `toml:"status-thread"` |
||||||
|
StatusUser *KeyHintTOML `toml:"status-user"` |
||||||
|
StatusViewFocus *KeyHintTOML `toml:"status-view-focus"` |
||||||
|
StatusYank *KeyHintTOML `toml:"status-yank"` |
||||||
|
StatusToggleCW *KeyHintTOML `toml:"status-toggle-cw"` |
||||||
|
StatusShowFiltered *KeyHintTOML `toml:"status-show-filtered"` |
||||||
|
|
||||||
|
UserAvatar *KeyHintTOML `toml:"user-avatar"` |
||||||
|
UserBlock *KeyHintTOML `toml:"user-block"` |
||||||
|
UserFollow *KeyHintTOML `toml:"user-follow"` |
||||||
|
UserFollowRequestDecide *KeyHintTOML `toml:"user-follow-request-decide"` |
||||||
|
UserMute *KeyHintTOML `toml:"user-mute"` |
||||||
|
UserLinks *KeyHintTOML `toml:"user-links"` |
||||||
|
UserUser *KeyHintTOML `toml:"user-user"` |
||||||
|
UserViewFocus *KeyHintTOML `toml:"user-view-focus"` |
||||||
|
UserYank *KeyHintTOML `toml:"user-yank"` |
||||||
|
|
||||||
|
ListOpenFeed *KeyHintTOML `toml:"list-open-feed"` |
||||||
|
ListUserList *KeyHintTOML `toml:"list-user-list"` |
||||||
|
ListUserAdd *KeyHintTOML `toml:"list-user-add"` |
||||||
|
ListUserDelete *KeyHintTOML `toml:"list-user-delete"` |
||||||
|
|
||||||
|
TagOpenFeed *KeyHintTOML `toml:"tag-open-feed"` |
||||||
|
TagFollow *KeyHintTOML `toml:"tag-follow"` |
||||||
|
|
||||||
|
LinkOpen *KeyHintTOML `toml:"link-open"` |
||||||
|
LinkYank *KeyHintTOML `toml:"link-yank"` |
||||||
|
|
||||||
|
ComposeEditCW *KeyHintTOML `toml:"compose-edit-cw"` |
||||||
|
ComposeEditText *KeyHintTOML `toml:"compose-edit-text"` |
||||||
|
ComposeIncludeQuote *KeyHintTOML `toml:"compose-include-quote"` |
||||||
|
ComposeMediaFocus *KeyHintTOML `toml:"compose-media-focus"` |
||||||
|
ComposePost *KeyHintTOML `toml:"compose-post"` |
||||||
|
ComposeToggleContentWarning *KeyHintTOML `toml:"compose-toggle-content-warning"` |
||||||
|
ComposeVisibility *KeyHintTOML `toml:"compose-visibility"` |
||||||
|
ComposeLanguage *KeyHintTOML `toml:"compose-language"` |
||||||
|
ComposePoll *KeyHintTOML `toml:"compose-poll"` |
||||||
|
|
||||||
|
MediaDelete *KeyHintTOML `toml:"media-delete"` |
||||||
|
MediaEditDesc *KeyHintTOML `toml:"media-edit-desc"` |
||||||
|
MediaAdd *KeyHintTOML `toml:"media-add"` |
||||||
|
|
||||||
|
VoteVote *KeyHintTOML `toml:"vote-vote"` |
||||||
|
VoteSelect *KeyHintTOML `toml:"vote-select"` |
||||||
|
|
||||||
|
PollAdd *KeyHintTOML `toml:"poll-add"` |
||||||
|
PollEdit *KeyHintTOML `toml:"poll-edit"` |
||||||
|
PollDelete *KeyHintTOML `toml:"poll-delete"` |
||||||
|
PollMultiToggle *KeyHintTOML `toml:"poll-multi-toggle"` |
||||||
|
PollExpiration *KeyHintTOML `toml:"poll-expiration"` |
||||||
|
|
||||||
|
PreferenceName *KeyHintTOML `toml:"preference-name"` |
||||||
|
PreferenceVisibility *KeyHintTOML `toml:"preference-visibility"` |
||||||
|
PreferenceBio *KeyHintTOML `toml:"preference-bio"` |
||||||
|
PreferenceSave *KeyHintTOML `toml:"preference-save"` |
||||||
|
PreferenceFields *KeyHintTOML `toml:"preference-fields"` |
||||||
|
PreferenceFieldsAdd *KeyHintTOML `toml:"preference-fields-add"` |
||||||
|
PreferenceFieldsEdit *KeyHintTOML `toml:"preference-fields-edit"` |
||||||
|
PreferenceFieldsDelete *KeyHintTOML `toml:"preference-fields-delete"` |
||||||
|
|
||||||
|
EditorExit *KeyHintTOML `toml:"editor-exit"` |
||||||
|
} |
||||||
@ -0,0 +1,446 @@ |
|||||||
|
package config |
||||||
|
|
||||||
|
var tvar = true |
||||||
|
var fvar = false |
||||||
|
|
||||||
|
var bt = &tvar |
||||||
|
var bf = &fvar |
||||||
|
|
||||||
|
func sp(s string) *string { |
||||||
|
return &s |
||||||
|
} |
||||||
|
func ip(i int) *int { |
||||||
|
return &i |
||||||
|
} |
||||||
|
|
||||||
|
func ip64(i int64) *int64 { |
||||||
|
return &i |
||||||
|
} |
||||||
|
|
||||||
|
var ConfigDefault = ConfigTOML{ |
||||||
|
General: GeneralTOML{ |
||||||
|
Editor: sp("TUT_USE_INTERNAL"), |
||||||
|
Confirmation: bt, |
||||||
|
MouseSupport: bf, |
||||||
|
DateFormat: sp("2006-01-02 15:04"), |
||||||
|
DateTodayFormat: sp("15:04"), |
||||||
|
DateRelative: ip(-1), |
||||||
|
QuoteReply: bf, |
||||||
|
MaxWidth: ip(0), |
||||||
|
ShortHints: bf, |
||||||
|
ShowFilterPhrase: bt, |
||||||
|
ShowIcons: bt, |
||||||
|
ShowHelp: bt, |
||||||
|
RedrawUI: bt, |
||||||
|
StickToTop: bf, |
||||||
|
ShowBoostedUser: bf, |
||||||
|
DynamicTimelineName: bt, |
||||||
|
CommandsInNewPane: bt, |
||||||
|
ListPlacement: sp("left"), |
||||||
|
ListSplit: sp("row"), |
||||||
|
ListProportion: ip(1), |
||||||
|
ContentProportion: ip(2), |
||||||
|
TerminalTitle: ip(0), |
||||||
|
LeaderKey: sp(""), |
||||||
|
LeaderTimeout: ip64(1000), |
||||||
|
NotificationsToHide: &[]string{}, |
||||||
|
Timelines: &[]TimelineTOML{ |
||||||
|
{ |
||||||
|
Name: sp("Home"), |
||||||
|
Type: sp("home"), |
||||||
|
HideBoosts: bf, |
||||||
|
HideReplies: bf, |
||||||
|
}, |
||||||
|
{ |
||||||
|
Name: sp("Notifications"), |
||||||
|
Type: sp("notifications"), |
||||||
|
Keys: &[]string{"n", "N"}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
Style: StyleTOML{ |
||||||
|
Theme: sp("none"), |
||||||
|
XrdbPrefix: sp("guess"), |
||||||
|
Background: sp("#272822"), |
||||||
|
Text: sp("#f8f8f2"), |
||||||
|
Subtle: sp("#808080"), |
||||||
|
WarningText: sp("#f92672"), |
||||||
|
TextSpecial1: sp("#ae81ff"), |
||||||
|
TextSpecial2: sp("#a6e22e"), |
||||||
|
TopBarBackground: sp("#f92672"), |
||||||
|
TopBarText: sp("#f8f8f2"), |
||||||
|
StatusBarBackground: sp("#f92672"), |
||||||
|
StatusBarText: sp("#f8f8f2"), |
||||||
|
StatusBarViewBackground: sp("#ae81ff"), |
||||||
|
StatusBarViewText: sp("#f8f8f2"), |
||||||
|
CommandText: sp("#f8f8f2"), |
||||||
|
ListSelectedBackground: sp("#f92672"), |
||||||
|
ListSelectedText: sp("#f8f8f2"), |
||||||
|
ListSelectedInactiveBackground: sp("#ae81ff"), |
||||||
|
ListSelectedInactiveText: sp("#f8f8f2"), |
||||||
|
ControlsText: sp("#f8f8f2"), |
||||||
|
ControlsHighlight: sp("#a6e22e"), |
||||||
|
AutocompleteBackground: sp("#272822"), |
||||||
|
AutocompleteText: sp("#f8f8f2"), |
||||||
|
AutocompleteSelectedBackground: sp("#ae81ff"), |
||||||
|
AutocompleteSelectedText: sp("#f8f8f2"), |
||||||
|
ButtonColorOne: sp("#f92672"), |
||||||
|
ButtonColorTwo: sp("#272822"), |
||||||
|
TimelineNameBackground: sp("#272822"), |
||||||
|
TimelineNameText: sp("#808080"), |
||||||
|
}, |
||||||
|
Media: MediaTOML{ |
||||||
|
DeleteTmpFiles: bt, |
||||||
|
Image: &ViewerTOML{ |
||||||
|
Program: sp("TUT_OS_DEFAULT"), |
||||||
|
Args: sp(""), |
||||||
|
Terminal: bf, |
||||||
|
Single: bt, |
||||||
|
Reverse: bf, |
||||||
|
}, |
||||||
|
Video: &ViewerTOML{ |
||||||
|
Program: sp("TUT_OS_DEFAULT"), |
||||||
|
Args: sp(""), |
||||||
|
Terminal: bf, |
||||||
|
Single: bt, |
||||||
|
Reverse: bf, |
||||||
|
}, |
||||||
|
Audio: &ViewerTOML{ |
||||||
|
Program: sp("TUT_OS_DEFAULT"), |
||||||
|
Args: sp(""), |
||||||
|
Terminal: bf, |
||||||
|
Single: bt, |
||||||
|
Reverse: bf, |
||||||
|
}, |
||||||
|
Link: &ViewerTOML{ |
||||||
|
Program: sp("TUT_OS_DEFAULT"), |
||||||
|
Args: sp(""), |
||||||
|
Terminal: bf, |
||||||
|
Single: bt, |
||||||
|
Reverse: bf, |
||||||
|
}, |
||||||
|
}, |
||||||
|
NotificationConfig: NotificationsTOML{ |
||||||
|
Followers: bf, |
||||||
|
Favorite: bf, |
||||||
|
Mention: bf, |
||||||
|
Update: bf, |
||||||
|
Boost: bf, |
||||||
|
Poll: bf, |
||||||
|
Posts: bf, |
||||||
|
}, |
||||||
|
Input: InputTOML{ |
||||||
|
GlobalDown: &KeyHintTOML{ |
||||||
|
Keys: &[]string{"j", "J"}, |
||||||
|
SpecialKeys: &[]string{"Down"}, |
||||||
|
}, |
||||||
|
GlobalUp: &KeyHintTOML{ |
||||||
|
Keys: &[]string{"k", "K"}, |
||||||
|
SpecialKeys: &[]string{"Up"}, |
||||||
|
}, |
||||||
|
GlobalEnter: &KeyHintTOML{ |
||||||
|
SpecialKeys: &[]string{"Enter"}, |
||||||
|
}, |
||||||
|
GlobalBack: &KeyHintTOML{ |
||||||
|
Hint: sp("[Esc]"), |
||||||
|
SpecialKeys: &[]string{"Esc"}, |
||||||
|
}, |
||||||
|
GlobalExit: &KeyHintTOML{ |
||||||
|
Hint: sp("[Q]uit"), |
||||||
|
Keys: &[]string{"q", "Q"}, |
||||||
|
}, |
||||||
|
MainHome: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
Keys: &[]string{"g"}, |
||||||
|
SpecialKeys: &[]string{"Home"}, |
||||||
|
}, |
||||||
|
MainEnd: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
Keys: &[]string{"G"}, |
||||||
|
SpecialKeys: &[]string{"End"}, |
||||||
|
}, |
||||||
|
MainPrevFeed: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
Keys: &[]string{"h", "H"}, |
||||||
|
SpecialKeys: &[]string{"Left"}, |
||||||
|
}, |
||||||
|
MainNextFeed: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
Keys: &[]string{"l", "L"}, |
||||||
|
SpecialKeys: &[]string{"Right"}, |
||||||
|
}, |
||||||
|
MainPrevPane: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
SpecialKeys: &[]string{"Backtab"}, |
||||||
|
}, |
||||||
|
MainNextPane: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
SpecialKeys: &[]string{"Tab"}, |
||||||
|
}, |
||||||
|
MainCompose: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
Keys: &[]string{"c", "C"}, |
||||||
|
}, |
||||||
|
MainNextAccount: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
SpecialKeys: &[]string{"Ctrl-N"}, |
||||||
|
}, |
||||||
|
MainPrevAccount: &KeyHintTOML{ |
||||||
|
Hint: sp(""), |
||||||
|
SpecialKeys: &[]string{"Ctrl-P"}, |
||||||
|
}, |
||||||
|
StatusAvatar: &KeyHintTOML{ |
||||||
|
Hint: sp("[A]vatar"), |
||||||
|
Keys: &[]string{"a", "A"}, |
||||||
|
}, |
||||||
|
StatusBoost: &KeyHintTOML{ |
||||||
|
Hint: sp("[B]oost"), |
||||||
|
HintAlt: sp("Un[B]oost"), |
||||||
|
Keys: &[]string{"b", "B"}, |
||||||
|
}, |
||||||
|
StatusEdit: &KeyHintTOML{ |
||||||
|
Hint: sp("[E]dit"), |
||||||
|
Keys: &[]string{"e", "E"}, |
||||||
|
}, |
||||||
|
StatusDelete: &KeyHintTOML{ |
||||||
|
Hint: sp("[D]elete"), |
||||||
|
Keys: &[]string{"d", "D"}, |
||||||
|
}, |
||||||
|
StatusFavorite: &KeyHintTOML{ |
||||||
|
Hint: sp("[F]avorite"), |
||||||
|
HintAlt: sp("Un[F]avorite"), |
||||||
|
Keys: &[]string{"f", "F"}, |
||||||
|
}, |
||||||
|
StatusMedia: &KeyHintTOML{ |
||||||
|
Hint: sp("[M]edia"), |
||||||
|
Keys: &[]string{"m", "M"}, |
||||||
|
}, |
||||||
|
StatusLinks: &KeyHintTOML{ |
||||||
|
Hint: sp("[O]pen"), |
||||||
|
Keys: &[]string{"o", "O"}, |
||||||
|
}, |
||||||
|
StatusPoll: &KeyHintTOML{ |
||||||
|
Hint: sp("[P]oll"), |
||||||
|
Keys: &[]string{"p", "P"}, |
||||||
|
}, |
||||||
|
StatusReply: &KeyHintTOML{ |
||||||
|
Hint: sp("[R]eply"), |
||||||
|
Keys: &[]string{"r", "R"}, |
||||||
|
}, |
||||||
|
StatusBookmark: &KeyHintTOML{ |
||||||
|
Hint: sp("[S]ave"), |
||||||
|
HintAlt: sp("Un[S]ave"), |
||||||
|
Keys: &[]string{"s", "S"}, |
||||||
|
}, |
||||||
|
StatusThread: &KeyHintTOML{ |
||||||
|
Hint: sp("[T]hread"), |
||||||
|
Keys: &[]string{"t", "T"}, |
||||||
|
}, |
||||||
|
StatusUser: &KeyHintTOML{ |
||||||
|
Hint: sp("[U]ser"), |
||||||
|
Keys: &[]string{"u", "U"}, |
||||||
|
}, |
||||||
|
StatusViewFocus: &KeyHintTOML{ |
||||||
|
Hint: sp("[V]iew"), |
||||||
|
Keys: &[]string{"v", "V"}, |
||||||
|
}, |
||||||
|
StatusYank: &KeyHintTOML{ |
||||||
|
Hint: sp("[Y]ank"), |
||||||
|
Keys: &[]string{"y", "Y"}, |
||||||
|
}, |
||||||
|
StatusToggleCW: &KeyHintTOML{ |
||||||
|
Hint: sp("Press [Z] to toggle cw"), |
||||||
|
Keys: &[]string{"z", "Z"}, |
||||||
|
}, |
||||||
|
StatusShowFiltered: &KeyHintTOML{ |
||||||
|
Hint: sp("Press [Z] to view filtered toot"), |
||||||
|
Keys: &[]string{"z", "Z"}, |
||||||
|
}, |
||||||
|
UserAvatar: &KeyHintTOML{ |
||||||
|
Hint: sp("[A]vatar"), |
||||||
|
Keys: &[]string{"a", "A"}, |
||||||
|
}, |
||||||
|
UserBlock: &KeyHintTOML{ |
||||||
|
Hint: sp("[B]lock"), |
||||||
|
HintAlt: sp("Un[B]lock"), |
||||||
|
Keys: &[]string{"b", "B"}, |
||||||
|
}, |
||||||
|
UserFollow: &KeyHintTOML{ |
||||||
|
Hint: sp("[F]ollow"), |
||||||
|
HintAlt: sp("Un[F]ollow"), |
||||||
|
Keys: &[]string{"f", "F"}, |
||||||
|
}, |
||||||
|
UserFollowRequestDecide: &KeyHintTOML{ |
||||||
|
Hint: sp("Follow [R]equest"), |
||||||
|
HintAlt: sp("Follow [R]equest"), |
||||||
|
Keys: &[]string{"r", "R"}, |
||||||
|
}, |
||||||
|
UserMute: &KeyHintTOML{ |
||||||
|
Hint: sp("[M]ute"), |
||||||
|
HintAlt: sp("Un[M]ute"), |
||||||
|
Keys: &[]string{"m", "M"}, |
||||||
|
}, |
||||||
|
UserLinks: &KeyHintTOML{ |
||||||
|
Hint: sp("[O]pen"), |
||||||
|
Keys: &[]string{"o", "O"}, |
||||||
|
}, |
||||||
|
UserUser: &KeyHintTOML{ |
||||||
|
Hint: sp("[U]ser"), |
||||||
|
Keys: &[]string{"u", "U"}, |
||||||
|
}, |
||||||
|
UserViewFocus: &KeyHintTOML{ |
||||||
|
Hint: sp("[V]iew"), |
||||||
|
Keys: &[]string{"v", "V"}, |
||||||
|
}, |
||||||
|
UserYank: &KeyHintTOML{ |
||||||
|
Hint: sp("[Y]ank"), |
||||||
|
Keys: &[]string{"y", "Y"}, |
||||||
|
}, |
||||||
|
ListOpenFeed: &KeyHintTOML{ |
||||||
|
Hint: sp("[O]pen"), |
||||||
|
Keys: &[]string{"o", "O"}, |
||||||
|
}, |
||||||
|
ListUserList: &KeyHintTOML{ |
||||||
|
Hint: sp("[U]sers"), |
||||||
|
Keys: &[]string{"u", "U"}, |
||||||
|
}, |
||||||
|
ListUserAdd: &KeyHintTOML{ |
||||||
|
Hint: sp("[A]dd"), |
||||||
|
Keys: &[]string{"a", "A"}, |
||||||
|
}, |
||||||
|
ListUserDelete: &KeyHintTOML{ |
||||||
|
Hint: sp("[D]elete"), |
||||||
|
Keys: &[]string{"d", "D"}, |
||||||
|
}, |
||||||
|
LinkOpen: &KeyHintTOML{ |
||||||
|
Hint: sp("[O]pen"), |
||||||
|
Keys: &[]string{"o", "O"}, |
||||||
|
}, |
||||||
|
LinkYank: &KeyHintTOML{ |
||||||
|
Hint: sp("[Y]ank"), |
||||||
|
Keys: &[]string{"y", "Y"}, |
||||||
|
}, |
||||||
|
TagOpenFeed: &KeyHintTOML{ |
||||||
|
Hint: sp("[O]pen"), |
||||||
|
Keys: &[]string{"o", "O"}, |
||||||
|
}, |
||||||
|
TagFollow: &KeyHintTOML{ |
||||||
|
Hint: sp("[F]ollow"), |
||||||
|
HintAlt: sp("Un[F]ollow"), |
||||||
|
Keys: &[]string{"f", "F"}, |
||||||
|
}, |
||||||
|
ComposeEditCW: &KeyHintTOML{ |
||||||
|
Hint: sp("[C]W text"), |
||||||
|
Keys: &[]string{"c", "C"}, |
||||||
|
}, |
||||||
|
ComposeEditText: &KeyHintTOML{ |
||||||
|
Hint: sp("[E]dit text"), |
||||||
|
Keys: &[]string{"e", "E"}, |
||||||
|
}, |
||||||
|
ComposeIncludeQuote: &KeyHintTOML{ |
||||||
|
Hint: sp("[I]nclude quote"), |
||||||
|
Keys: &[]string{"i", "I"}, |
||||||
|
}, |
||||||
|
ComposeMediaFocus: &KeyHintTOML{ |
||||||
|
Hint: sp("[M]edia"), |
||||||
|
Keys: &[]string{"m", "M"}, |
||||||
|
}, |
||||||
|
ComposePost: &KeyHintTOML{ |
||||||
|
Hint: sp("[P]ost"), |
||||||
|
Keys: &[]string{"p", "P"}, |
||||||
|
}, |
||||||
|
ComposeToggleContentWarning: &KeyHintTOML{ |
||||||
|
Hint: sp("[T]oggle CW"), |
||||||
|
Keys: &[]string{"t", "T"}, |
||||||
|
}, |
||||||
|
ComposeVisibility: &KeyHintTOML{ |
||||||
|
Hint: sp("[V]isibility"), |
||||||
|
Keys: &[]string{"v", "V"}, |
||||||
|
}, |
||||||
|
ComposeLanguage: &KeyHintTOML{ |
||||||
|
Hint: sp("[L]ang"), |
||||||
|
Keys: &[]string{"l", "L"}, |
||||||
|
}, |
||||||
|
ComposePoll: &KeyHintTOML{ |
||||||
|
Hint: sp("P[O]ll"), |
||||||
|
Keys: &[]string{"o", "O"}, |
||||||
|
}, |
||||||
|
MediaDelete: &KeyHintTOML{ |
||||||
|
Hint: sp("[D]elete"), |
||||||
|
Keys: &[]string{"d", "D"}, |
||||||
|
}, |
||||||
|
MediaEditDesc: &KeyHintTOML{ |
||||||
|
Hint: sp("[E]dit desc"), |
||||||
|
Keys: &[]string{"e", "E"}, |
||||||
|
}, |
||||||
|
MediaAdd: &KeyHintTOML{ |
||||||
|
Hint: sp("[A]dd"), |
||||||
|
Keys: &[]string{"a", "A"}, |
||||||
|
}, |
||||||
|
VoteVote: &KeyHintTOML{ |
||||||
|
Hint: sp("[V]ote"), |
||||||
|
Keys: &[]string{"v", "V"}, |
||||||
|
}, |
||||||
|
VoteSelect: &KeyHintTOML{ |
||||||
|
Hint: sp("[Enter] to select"), |
||||||
|
Keys: &[]string{" "}, |
||||||
|
SpecialKeys: &[]string{"Enter"}, |
||||||
|
}, |
||||||
|
PollAdd: &KeyHintTOML{ |
||||||
|
Hint: sp("[A]dd"), |
||||||
|
Keys: &[]string{"a", "A"}, |
||||||
|
}, |
||||||
|
PollEdit: &KeyHintTOML{ |
||||||
|
Hint: sp("[E]dit"), |
||||||
|
Keys: &[]string{"e", "E"}, |
||||||
|
}, |
||||||
|
PollDelete: &KeyHintTOML{ |
||||||
|
Hint: sp("[D]elete"), |
||||||
|
Keys: &[]string{"d", "D"}, |
||||||
|
}, |
||||||
|
PollMultiToggle: &KeyHintTOML{ |
||||||
|
Hint: sp("Toggle [M]ultiple"), |
||||||
|
Keys: &[]string{"m", "M"}, |
||||||
|
}, |
||||||
|
PollExpiration: &KeyHintTOML{ |
||||||
|
Hint: sp("E[X]pires"), |
||||||
|
Keys: &[]string{"x", "X"}, |
||||||
|
}, |
||||||
|
PreferenceName: &KeyHintTOML{ |
||||||
|
Hint: sp("[N]ame"), |
||||||
|
Keys: &[]string{"n", "N"}, |
||||||
|
}, |
||||||
|
PreferenceVisibility: &KeyHintTOML{ |
||||||
|
Hint: sp("[V]isibility"), |
||||||
|
Keys: &[]string{"v", "V"}, |
||||||
|
}, |
||||||
|
PreferenceBio: &KeyHintTOML{ |
||||||
|
Hint: sp("[B]io"), |
||||||
|
Keys: &[]string{"b", "B"}, |
||||||
|
}, |
||||||
|
PreferenceSave: &KeyHintTOML{ |
||||||
|
Hint: sp("[S]ave"), |
||||||
|
Keys: &[]string{"s", "S"}, |
||||||
|
}, |
||||||
|
PreferenceFields: &KeyHintTOML{ |
||||||
|
Hint: sp("[F]ields"), |
||||||
|
Keys: &[]string{"f", "F"}, |
||||||
|
}, |
||||||
|
PreferenceFieldsAdd: &KeyHintTOML{ |
||||||
|
Hint: sp("[A]dd"), |
||||||
|
Keys: &[]string{"a", "A"}, |
||||||
|
}, |
||||||
|
PreferenceFieldsEdit: &KeyHintTOML{ |
||||||
|
Hint: sp("[E]dit"), |
||||||
|
Keys: &[]string{"e", "E"}, |
||||||
|
}, |
||||||
|
PreferenceFieldsDelete: &KeyHintTOML{ |
||||||
|
Hint: sp("[D]elete"), |
||||||
|
Keys: &[]string{"d", "D"}, |
||||||
|
}, |
||||||
|
EditorExit: &KeyHintTOML{ |
||||||
|
Hint: sp("[Esc] when done"), |
||||||
|
SpecialKeys: &[]string{"Esc"}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
} |
||||||
@ -0,0 +1,94 @@ |
|||||||
|
package ui |
||||||
|
|
||||||
|
import ( |
||||||
|
"fmt" |
||||||
|
|
||||||
|
"github.com/gdamore/tcell/v2" |
||||||
|
"github.com/rivo/tview" |
||||||
|
"github.com/rivo/uniseg" |
||||||
|
) |
||||||
|
|
||||||
|
type EditorView struct { |
||||||
|
tutView *TutView |
||||||
|
shared *Shared |
||||||
|
View *tview.Flex |
||||||
|
editor *tview.TextArea |
||||||
|
controls *tview.Flex |
||||||
|
info *tview.TextView |
||||||
|
limit int |
||||||
|
prevPage string |
||||||
|
prevFocus tview.Primitive |
||||||
|
prevInput func(event *tcell.EventKey) *tcell.EventKey |
||||||
|
exitFunc func(string) |
||||||
|
} |
||||||
|
|
||||||
|
func NewEditorView(tv *TutView) *EditorView { |
||||||
|
e := &EditorView{ |
||||||
|
tutView: tv, |
||||||
|
shared: tv.Shared, |
||||||
|
editor: NewTextArea(tv.tut.Config), |
||||||
|
controls: NewControlView(tv.tut.Config), |
||||||
|
info: NewTextView(tv.tut.Config), |
||||||
|
} |
||||||
|
item := NewControl(tv.tut.Config, tv.tut.Config.Input.EditorExit, true) |
||||||
|
e.controls.AddItem( |
||||||
|
NewControlButton(tv, item), item.Len, 0, false) |
||||||
|
e.View = editorViewUI(e) |
||||||
|
return e |
||||||
|
} |
||||||
|
|
||||||
|
func editorViewUI(e *EditorView) *tview.Flex { |
||||||
|
r := tview.NewFlex().SetDirection(tview.FlexRow) |
||||||
|
if e.tutView.tut.Config.General.TerminalTitle < 2 { |
||||||
|
r.AddItem(e.shared.Top.View, 1, 0, false) |
||||||
|
} |
||||||
|
if e.limit > 0 { |
||||||
|
r.AddItem(e.info, 1, 0, false). |
||||||
|
AddItem(e.editor, 0, 1, false). |
||||||
|
AddItem(e.controls, 1, 0, false). |
||||||
|
AddItem(e.shared.Bottom.View, 2, 0, false) |
||||||
|
} else { |
||||||
|
r.AddItem(e.editor, 0, 1, false). |
||||||
|
AddItem(e.controls, 1, 0, false). |
||||||
|
AddItem(e.shared.Bottom.View, 2, 0, false) |
||||||
|
} |
||||||
|
return r |
||||||
|
} |
||||||
|
|
||||||
|
func (e *EditorView) Init(text string, textLimit int, setReturn bool, exit func(string)) { |
||||||
|
e.editor.SetText(text, true) |
||||||
|
e.limit = textLimit |
||||||
|
*e.View = *editorViewUI(e) |
||||||
|
e.exitFunc = exit |
||||||
|
if setReturn { |
||||||
|
e.prevPage, _ = e.tutView.View.GetFrontPage() |
||||||
|
e.prevFocus = e.tutView.tut.App.GetFocus() |
||||||
|
e.prevInput = e.tutView.tut.App.GetInputCapture() |
||||||
|
} |
||||||
|
e.info.SetText("") |
||||||
|
e.editor.SetChangedFunc(e.updateInfo) |
||||||
|
e.updateInfo() |
||||||
|
e.tutView.View.HidePage(e.prevPage) |
||||||
|
e.tutView.View.ShowPage("editor") |
||||||
|
e.tutView.tut.App.SetInputCapture(e.tutView.InputEditorView) |
||||||
|
e.tutView.tut.App.SetFocus(e.editor) |
||||||
|
} |
||||||
|
|
||||||
|
func (e *EditorView) updateInfo() { |
||||||
|
if e.limit > 0 { |
||||||
|
content := e.editor.GetText() |
||||||
|
charCount := uniseg.GraphemeClusterCount(content) |
||||||
|
charsLeft := e.limit - charCount |
||||||
|
e.info.SetText( |
||||||
|
fmt.Sprintf("Chars left: %d", charsLeft), |
||||||
|
) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
func (e *EditorView) ExitTextAreaInput() { |
||||||
|
e.tutView.View.HidePage("editor") |
||||||
|
e.tutView.View.ShowPage(e.prevPage) |
||||||
|
e.tutView.tut.App.SetInputCapture(e.prevInput) |
||||||
|
e.tutView.tut.App.SetFocus(e.prevFocus) |
||||||
|
e.exitFunc(e.editor.GetText()) |
||||||
|
} |
||||||
@ -1,7 +1,26 @@ |
|||||||
package util |
package util |
||||||
|
|
||||||
import "os/exec" |
import ( |
||||||
|
"os/exec" |
||||||
|
"runtime" |
||||||
|
) |
||||||
|
|
||||||
|
func GetDefaultForOS() (program string, args []string) { |
||||||
|
switch runtime.GOOS { |
||||||
|
case "windows": |
||||||
|
program = "start" |
||||||
|
args = []string{"/wait"} |
||||||
|
case "darwin": |
||||||
|
program = "open" |
||||||
|
args = []string{"-W"} |
||||||
|
default: |
||||||
|
program = "xdg-open" |
||||||
|
} |
||||||
|
return program, args |
||||||
|
} |
||||||
|
|
||||||
func OpenURL(url string) { |
func OpenURL(url string) { |
||||||
exec.Command("xdg-open", url).Start() |
program, args := GetDefaultForOS() |
||||||
|
args = append(args, url) |
||||||
|
exec.Command(program, args...).Start() |
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue