Skip to content

Commit

Permalink
Merge branch 'master' into make-badges-clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
senorprogrammer authored Jul 24, 2018
2 parents e717d61 + 7339003 commit 0f5fbe9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions _site/content/posts/configuration/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ wtf:
# that support ten line of text, one of three lines, and one of four
rows: [10, 10, 10, 10, 10, 3, 4]
# The app redraws itself once a second
openFileUtil: open
refreshInterval: 1
term: "xterm-256color"
```
Expand Down Expand Up @@ -65,6 +66,9 @@ An array that defines the heights of all the rows. <br />
Values: See <a href="https://github.com/rivo/tview/wiki/Grid">tview's
Grid</a> for details.

`openFileUtil` <br />
Command to use to open a file or URL

`refreshInterval` <br />
How often, in seconds, the UI refreshes itself. <br />
**Note:** This implementation is probably wrong and buggy and likely to
Expand Down
2 changes: 1 addition & 1 deletion docs/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ cmd The terminal command to be run, withouth the arguments. Ie: ping, whoami, cu

<guid>https://wtfutil.com/posts/configuration/attributes/</guid>
<description>The following top-level attributes are configurable in config.yml. See this example config file for more details.
wtf:colors:background:&amp;#34;red&amp;#34;border:Focusable:&amp;#34;darkslateblue&amp;#34;focused:&amp;#34;orange&amp;#34;normal:&amp;#34;gray&amp;#34;grid:# How _wide_ the columns are, in terminal characters. In this case we have# six columns, each of which are 35 characters widecolumns:[35,35,35,35,35,35]# How _high_ the rows are, in terminal lines. In this case we have five rows# that support ten line of text, one of three lines, and one of fourrows:[10,10,10,10,10,3,4]# The app redraws itself once a secondrefreshInterval:1term:&amp;#34;xterm-256color&amp;#34; Attributes colors.</description>
wtf:colors:background:&amp;#34;red&amp;#34;border:Focusable:&amp;#34;darkslateblue&amp;#34;focused:&amp;#34;orange&amp;#34;normal:&amp;#34;gray&amp;#34;grid:# How _wide_ the columns are, in terminal characters. In this case we have# six columns, each of which are 35 characters widecolumns:[35,35,35,35,35,35]# How _high_ the rows are, in terminal lines. In this case we have five rows# that support ten line of text, one of three lines, and one of fourrows:[10,10,10,10,10,3,4]# The app redraws itself once a secondopenFileUtil:openrefreshInterval:1term:&amp;#34;xterm-256color&amp;#34; Attributes colors.</description>
</item>

<item>
Expand Down
4 changes: 4 additions & 0 deletions docs/posts/configuration/attributes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ <h1>Configuration: Attributes</h1>
</span><span class="w"> </span><span class="c"># that support ten line of text, one of three lines, and one of four</span><span class="w">
</span><span class="w"> </span>rows<span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">,</span><span class="w"> </span><span class="m">4</span><span class="p">]</span><span class="w">
</span><span class="w"> </span><span class="c"># The app redraws itself once a second</span><span class="w">
</span><span class="w"> </span>openFileUtil<span class="p">:</span><span class="w"> </span>open<span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>term<span class="p">:</span><span class="w"> </span><span class="s2">&#34;xterm-256color&#34;</span></code></pre></div>
<h3 id="attributes">Attributes</h3>
Expand Down Expand Up @@ -193,6 +194,9 @@ <h3 id="attributes">Attributes</h3>
Values: See <a href="https://github.com/rivo/tview/wiki/Grid">tview&rsquo;s
Grid</a> for details.</p>

<p><code>openFileUtil</code> <br />
Command to use to open a file or URL</p>

<p><code>refreshInterval</code> <br />
How often, in seconds, the UI refreshes itself. <br />
<strong>Note:</strong> This implementation is probably wrong and buggy and likely to
Expand Down
2 changes: 1 addition & 1 deletion docs/posts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ cmd The terminal command to be run, withouth the arguments. Ie: ping, whoami, cu

<guid>https://wtfutil.com/posts/configuration/attributes/</guid>
<description>The following top-level attributes are configurable in config.yml. See this example config file for more details.
wtf:colors:background:&amp;#34;red&amp;#34;border:Focusable:&amp;#34;darkslateblue&amp;#34;focused:&amp;#34;orange&amp;#34;normal:&amp;#34;gray&amp;#34;grid:# How _wide_ the columns are, in terminal characters. In this case we have# six columns, each of which are 35 characters widecolumns:[35,35,35,35,35,35]# How _high_ the rows are, in terminal lines. In this case we have five rows# that support ten line of text, one of three lines, and one of fourrows:[10,10,10,10,10,3,4]# The app redraws itself once a secondrefreshInterval:1term:&amp;#34;xterm-256color&amp;#34; Attributes colors.</description>
wtf:colors:background:&amp;#34;red&amp;#34;border:Focusable:&amp;#34;darkslateblue&amp;#34;focused:&amp;#34;orange&amp;#34;normal:&amp;#34;gray&amp;#34;grid:# How _wide_ the columns are, in terminal characters. In this case we have# six columns, each of which are 35 characters widecolumns:[35,35,35,35,35,35]# How _high_ the rows are, in terminal lines. In this case we have five rows# that support ten line of text, one of three lines, and one of fourrows:[10,10,10,10,10,3,4]# The app redraws itself once a secondopenFileUtil:openrefreshInterval:1term:&amp;#34;xterm-256color&amp;#34; Attributes colors.</description>
</item>

<item>
Expand Down
3 changes: 2 additions & 1 deletion wtf/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ func NamesFromEmails(emails []string) []string {
// OpenFile opens the file defined in `path` via the operating system
func OpenFile(path string) {
filePath, _ := ExpandHomeDir(path)
cmd := exec.Command("open", filePath)
openFileUtil := Config.UString("wtf.openFileUtil", "open")
cmd := exec.Command(openFileUtil, filePath)

ExecuteCommand(cmd)
}
Expand Down

0 comments on commit 0f5fbe9

Please sign in to comment.