Skip to content

Textfile

Displays the contents of the specified text file in the widget.

Configuration

textfile:
  enabled: true
  filePaths:
  - "~/Desktop/notes.md"
  - "~/.config/wtf/config.yml"
  format: true
  formatStyle: "dracula"
  position:
    top: 5
    left: 4
    height: 2
    width: 1
  refreshInterval: 15s
  wrapText: true

Screenshots

textfile screenshot

Attributes

Attributes

Name Value
filePaths
An array of paths to the files to be displayed in the widget.
format
Optional Whether or not to try and format and syntax highlight the displayedtext. Default: false
true, false
formatStyle
Optional The style of syntax highlighting to format the text with. Default: vim
See Chroma styles for all valid options.
wrapText
Optional Whether or not to wrap the text when it hits the widget boundary. Default: true.
true, false

Keyboard

Key Action
/ Open/close the widget's help modal
[return] Opens the text file in whichever text editor is associated with that file type
h Select the previous file
l Select the next file
o Opens the text file in whichever text editor is associated with that file type
r Refresh the data
{{ arrowback }}Select the previous file
{{ arrowfore }}Select the next file

Source Code

https://github.com/wtfutil/wtf/tree/master/modules/textfile