ttrv.cfg (5661B)
1 ; Terminal UI for Reddit Configuration File 2 ; https://gitlab.com/ajak/ttrv 3 ; 4 ; This file should be placed in $XDG_CONFIG/ttrv/ttrv.cfg 5 ; If $XDG_CONFIG is not set, use ~/.config/ttrv/ttrv.cfg 6 7 [ttrv] 8 ################## 9 # General Settings 10 ################## 11 12 ; Turn on ascii-only mode to disable all unicode characters. 13 ; This may be necessary for compatibility with some terminal browsers. 14 ascii = False 15 16 ; Turn on monochrome mode to disable color. 17 monochrome = False 18 19 ; Data being copied is piped into this command 20 ;clipboard_cmd = xclip 21 ;clipboard_cmd = xsel -b -i 22 ;clipboard_cmd = wl-copy 23 ;clipboard_cmd = pbcopy w 24 25 ; Flash when an invalid action is executed. 26 flash = True 27 28 ; Enable debugging by logging all HTTP requests and errors to the given file. 29 ;log = /tmp/ttrv.log 30 31 ; Default subreddit that will be opened when the program launches. 32 subreddit = front 33 ;subreddit = python 34 ;subreddit = python+linux+programming 35 ;subreddit = all 36 37 ; Allow ttrv to store reddit authentication credentials between sessions. 38 persistent = True 39 40 ; Automatically log in on startup, if credentials are available. 41 autologin = True 42 43 ; Clear any stored credentials when the program starts. 44 clear_auth = False 45 46 ; Maximum number of opened links that will be saved in the history file. 47 history_size = 200 48 49 ; Open external links using programs defined in the mailcap config. 50 ; The mailcap path setting with $MAILCAPS doesn't seem to work, so just set $TTRV_BROWSER 51 enable_media = False 52 53 ; Maximum number of columns for a comment 54 max_comment_cols = 120 55 56 ; Maximum number of columns for pager 57 ;max_pager_cols = 70 58 59 ; Hide username if logged in, display "Logged in" instead 60 hide_username = True 61 62 ; Color theme, use "ttrv --list-themes" to view a list of valid options. 63 ; This can be an absolute filepath, or the name of a theme file that has 64 ; been installed into either the custom of default theme paths. 65 ;theme = molokai 66 67 ; Open a new browser window instead of a new tab in existing instance 68 force_new_browser_window = False 69 70 ################ 71 # OAuth Settings 72 ################ 73 ; This sections defines the paramaters that will be used during the OAuth 74 ; authentication process. ttrv is registered as an "installed app", 75 ; see https://github.com/reddit/reddit/wiki/OAuth2 for more information. 76 77 ; These settings are defined at https://www.reddit.com/prefs/apps and should 78 ; not be altered unless you are defining your own developer application. 79 oauth_client_id = zjyhNI7tK8ivzQ 80 oauth_client_secret = praw_gapfill 81 oauth_redirect_uri = http://127.0.0.1:65000/ 82 83 ; Port that the ttrv webserver will listen on. This should match the redirect 84 ; uri defined above. 85 oauth_redirect_port = 65000 86 87 ; Access permissions that will be requested. 88 oauth_scope = edit,history,identity,mysubreddits,privatemessages,read,report,save,submit,subscribe,vote 89 90 ; This is a separate token for the imgur api. It's used to extract images 91 ; from imgur links and albums so they can be opened with mailcap. 92 ; See https://imgur.com/account/settings/apps to generate your own key. 93 imgur_client_id = 93396265f59dec9 94 95 [bindings] 96 ############## 97 # Key Bindings 98 ############## 99 ; If you would like to define custom bindings, copy this section into your 100 ; config file with the [bindings] heading. All commands must be bound to at 101 ; least one key for the config to be valid. 102 ; 103 ; 1.) Plain keys can be represented by either uppercase/lowercase characters 104 ; or the hexadecimal numbers referring their ascii codes. For reference, see 105 ; https://en.wikipedia.org/wiki/ASCII#ASCII_printable_code_chart 106 ; e.g. Q, q, 1, ? 107 ; e.g. 0x20 (space), 0x3c (less-than sign) 108 ; 109 ; 2.) Special ascii control codes should be surrounded with <>. For reference, 110 ; see https://en.wikipedia.org/wiki/ASCII#ASCII_control_code_chart 111 ; e.g. <LF> (enter), <ESC> (escape) 112 ; 113 ; 3.) Other special keys are defined by curses, they should be surrounded by <> 114 ; and prefixed with KEY_. For reference, see 115 ; https://docs.python.org/2/library/curses.html#constants 116 ; e.g. <KEY_LEFT> (left arrow), <KEY_F5>, <KEY_NPAGE> (page down) 117 ; 118 ; Notes: 119 ; - Curses <KEY_ENTER> is unreliable and should always be used in conjunction 120 ; with <LF>. 121 ; - Use 0x20 for the space key. 122 ; - A subset of Ctrl modifiers are available through the ascii control codes. 123 ; For example, Ctrl-D will trigger an <EOT> signal. See the table above for 124 ; a complete reference. 125 126 ; Base page 127 EXIT = q 128 FORCE_EXIT = Q 129 HELP = ? 130 SORT_1 = 1 131 SORT_2 = 2 132 SORT_3 = 3 133 SORT_4 = 4 134 SORT_5 = 5 135 SORT_6 = 6 136 SORT_7 = 7 137 MOVE_UP = k, <KEY_UP> 138 MOVE_DOWN = j, <KEY_DOWN> 139 PREVIOUS_THEME = <KEY_F2> 140 NEXT_THEME = <KEY_F3> 141 PAGE_UP = m, <KEY_PPAGE>, <NAK> 142 PAGE_DOWN = n, <KEY_NPAGE>, <EOT> 143 PAGE_TOP = gg 144 PAGE_BOTTOM = G 145 UPVOTE = a 146 DOWNVOTE = z 147 LOGIN = u 148 DELETE = d 149 EDIT = e 150 INBOX = i 151 REFRESH = r, <KEY_F5> 152 PROMPT = / 153 SAVE = w 154 COPY_PERMALINK = y 155 COPY_URL = Y 156 PRIVATE_MESSAGE = C 157 SUBSCRIPTIONS = s 158 MULTIREDDITS = S 159 160 ; Submission page 161 SUBMISSION_TOGGLE_COMMENT = 0x20 162 SUBMISSION_OPEN_IN_BROWSER = o, <LF>, <KEY_ENTER> 163 SUBMISSION_POST = c 164 SUBMISSION_EXIT = h, <KEY_LEFT> 165 SUBMISSION_OPEN_IN_PAGER = l, <KEY_RIGHT> 166 SUBMISSION_OPEN_IN_URLVIEWER = U 167 SUBMISSION_GOTO_PARENT = K 168 SUBMISSION_GOTO_SIBLING = J 169 170 ; Subreddit page 171 SUBREDDIT_SEARCH = f 172 SUBREDDIT_POST = c 173 SUBREDDIT_OPEN = l, <KEY_RIGHT> 174 SUBREDDIT_OPEN_IN_BROWSER = o, <LF>, <KEY_ENTER> 175 SUBREDDIT_FRONTPAGE = p 176 SUBREDDIT_HIDE = 0x20 177 178 ; Subscription page 179 SUBSCRIPTION_SELECT = l, <LF>, <KEY_ENTER>, <KEY_RIGHT> 180 SUBSCRIPTION_EXIT = h, s, S, <ESC>, <KEY_LEFT> 181 182 ; Inbox page 183 INBOX_VIEW_CONTEXT = l, <KEY_RIGHT> 184 INBOX_OPEN_SUBMISSION = o, <LF>, <KEY_ENTER> 185 INBOX_REPLY = c 186 INBOX_MARK_READ = w 187 INBOX_EXIT = h, <ESC>, <KEY_LEFT>