taskwarrior-tui Documentation

`taskwarrior-tui`: A terminal user interface for taskwarrior

1,990 stars Rust Rust 1 file ยท ~5,901 tokens #cli#rust#taskwarrior#tui#tui-rs
RAW Doc

1. Project Overview & Quickstart (kdheepak/taskwarrior-tui)

`taskwarrior-tui`

[!IMPORTANT]
taskwarrior v3.x may break taskwarrior-tui features in unexpected ways. Please file a bug report if you encounter a bug.

taskwarrior-tui v0.25.4 is the last version supporting taskwarrior v2.x as backend.








A Terminal User Interface (TUI) for Taskwarrior that you didn't know you wanted.

Features

  • vim-like navigation
  • live filter updates
  • add, delete, complete, log tasks
  • multiple selection
  • tab completion
  • colors based on taskwarrior

https://github.com/user-attachments/assets/a3c4f79b-3967-4904-b614-8bbd500c54c2

Documentation

See https://kdheepak.com/taskwarrior-tui for
documentation.
See https://kdheepak.com/taskwarrior-tui/installation/ for
installation instructions for your platform.
See https://kdheepak.com/taskwarrior-tui/quick_start/ to get
started.
See https://kdheepak.com/taskwarrior-tui/troubleshooting/ for
logs, timing checks, and debugging steps.
See https://kdheepak.com/taskwarrior-tui/configuration/keys
or https://kdheepak.com/taskwarrior-tui/configuration/colors/
for customization options.

Installation

Unless otherwise specified, you will need to install the latest version of taskwarrior first. See https://taskwarrior.org/download/ for more information.

Pre-compiled releases are available on the GitHub repo:

  1. Download the tar.gz file for your OS from the latest release.
  2. Unzip the tar.gz file
  3. Run with ./taskwarrior-tui.

See https://kdheepak.com/taskwarrior-tui/installation/ on instructions for using package managers on various platforms.

If you are compiling from source, you'll need the most recent stable rust compiler.

Configuration

taskwarrior-tui uses taskwarrior's .taskrc for configuration.

See the documentation for more information:

Here is an example .taskrc

.taskrc
### taskwarrior configuration options

# taskwarrior's configuration
data.location=.task
verbose=affected,blank,context,edit,header,footnote,label,new-id,project,special,sync,recur
uda.priority.values=H,M,,L
color.alternate=

# taskwarrior-tui reads color attributes from the following to display the same colors of tasks as the CLI
color.tagged=black on rgb444

# Remove age, tags from task next report.
# taskwarrior-tui reads the labels and columns from these options to display tasks the same way taskwarrior does
report.next.labels=ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Description,Urg
report.next.columns=id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description.truncated_count,urgency
report.next.filter=(status:pending or status:waiting) page:limit

### taskwarrior-tui configuration options

uda.taskwarrior-tui.keyconfig.done=x
uda.taskwarrior-tui.keyconfig.delete=d
uda.taskwarrior-tui.task-report.use-alternate-style=false
uda.taskwarrior-tui.shortcuts.1=~/local/bin/task-sync.sh
uda.taskwarrior-tui.report.next.filter=(status:pending or status:waiting)

References / Resources

If you like taskwarrior-tui, please consider donating to

Additional resources

  • [https://github.com/GothenburgBitFactory/taskwarrior](https://github.com/GothenburgBitFactory/taskwarrior)
  • [https://github.com/GothenburgBitFactory/libshared](https://github.com/GothenburgBitFactory/libshared)
  • [https://github.com/GothenburgBitFactory/timewarrior](https://github.com/GothenburgBitFactory/timewarrior)
  • [https://github.com/fdehau/tui-rs](https://github.com/fdehau/tui-rs)
  • [https://github.com/tui-rs-revival/ratatui](https://github.com/tui-rs-revival/ratatui)
  • [https://github.com/crossterm-rs/crossterm/](https://github.com/crossterm-rs/crossterm/)
  • [https://github.com/async-rs/async-std](https://github.com/async-rs/async-std)
  • [https://github.com/kkawakam/rustyline](https://github.com/kkawakam/rustyline)
  • [https://github.com/vit-project/vit](https://github.com/vit-project/vit)
  • [https://github.com/taskchampion/taskchampion/](https://github.com/taskchampion/taskchampion/)
  • 2. Official Technical Reference & Guides (kdheepak/docs)

    File: README.md

    Julia VS Code Documentation


    This repository contains the documentation for the julia VS Code extension.

    Contributing to the Documentation

    In order to contribute to the documentation, simply modify the files in the /docs/src folder and open a PR against the master branch.
    Once a PR has been opened, the CI will automatically run Documenter.jl and generate a new documentation against the PR.
    You can see the generated documentation on https://www.julia-vscode.org/docs/previews/PR##, where ## is your PR's number.

    Please refer to the VS Code contributing guide here for details on best practices and how to refer to VS Code correctly.

    Local build of the Documentation

    Although it's not necessary, if you want to check how the new documentation pages would look like in advance of opening a PR,
    you can build documentations locally and check the results generated in docs/build by the following step:

    from the root of this repository:

    sh
    $ julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path = pwd())); Pkg.instantiate()'
    $ julia --project=docs/ docs/make.jl

    File: docs/src/userguide/codenavigation.md

    Code Navigation

    Quick File Navigation

    Tip: Hold Ctrl+P (Quick Open) to open any file by its name.

    There are two commands which enable you to navigate in and across files with easy-to-use key bindings.

    • Hold Ctrl and press Tab to view a list of all files open in an editor group.
    • To open one of these files, press Tab again to pick the file you want to navigate to, then release Ctrl to open it.

    Alternatively, you can use Alt+Left and Alt+Right to navigate between files and edit locations.
    If you are jumping around between different lines of the same file, these shortcuts allow you to navigate between those locations easily.

    Open Package Directory

    Go to Definition

    You can go to the definition of a symbol by pressing F12.

    If you press Ctrl and hover over a symbol, a preview of the declaration will appear:

    Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.

    Go to Symbols

    You can navigate symbols inside a file with Ctrl+Shift+O.
    Enter : and the symbols will be grouped by category.
    Press Up or Down and navigate to the place you want.

    Open Symbol by Name

    You can open a particular symbol by its name with Ctrl+T, regardless of which file contains it. Type the name of a symbol you want to navigate to, and press Enter


    File: docs/src/userguide/compilesysimage.md

    Compiling Sysimages

    The Julia VS Code extension enables you to compile a custom sysimage for your Julia environments. The extension automatically uses sysimages for the current environment when it starts a new Julia REPL in VS Code.

    Custom sysimages can significantly reduce load times for packages.

    Creating a sysimage for the active environment

    The Julia extension adds a build task for custom sysimages to the Visual Studio Code task system. To run the build task, select the command Tasks: Run Build Task and then select Julia: Build custom sysimage for current environment.

    By default, all of the packages defined in the Project.toml file are included in the system image. However, those added by dev are excluded as they are intended for developments and often subject to changes.

    Additional options can be passed to further tweak the compilation. In particular, one may want to include script containing the precompile statements or a file to execute certain julia function, which can further reduce the first-call latency. Please read the documentation of PackageCompiler.jl for more details.

    This file should be named ./.vscode/JuliaSysimage.toml and be placed under the project root file. Its content should look like:

    text
    [sysimage]
    exclude=["Pkg1", "Pkg2"]   # Additional packages to be excluded in the system image
    statements_files=["relative/path/to/precompile_statements_file.jl", ]
    execution_files=["relative/path/to/precompile_execution_file.jl", ]

    The packages to be excluded have to be separated by commas, each with quotation marks and all inside square brackets.
    The path should be relative to the currently active folder, which can be selected by the command File: Open Folder.... The statement or execution files can be given as a single relative path, or as a list of relative paths.

    The statement files should contain precompile statements of the form precompile(Tuple{typeof(Base.sin), Float64}), and the execution files should contain function calls for which the methods should be compiled.

    The build task creates a sysimage that includes all packages in the current Julia environment. This sysimage is saved in the same folder where the Project.toml and Manifest.toml of the current Julia environment are stored. The name of the sysimage file will be JuliaSysimage.dll (Windows) or JuliaSysimage.so.

    Using custom sysimages

    When the Julia extension starts a new Julia REPL process, the extension first looks for a custom sysimage file for the current Julia environment. The extension then verifies whether the custom sysimage file is up to date by comparing the last modified date of the sysimage file to the last modified date of the Manifest.toml file. If an up to date sysimage file exists, the Julia extension automatically starts the Julia REPL process with the custom sysimage loaded.
    This requires the useCustomSysimage field to be set to true in the application settings of the extension.


    File: docs/src/userguide/debugging.md

    Debugging

    The Julia extension supports debugging of all types of Julia programs and applications.

    For general debugging features such as inspecting variables, setting breakpoints, and other activities that aren't language-dependent, review VS Code debugging.

    Example

    1. Open a Julia file in VS Code.
    2. Click the Run button. You will now see the default debugger start panel:
    3. Click Run and Debug (or select F5) to run the active Julia file in the debugger. Output is displayed in the Julia Debug terminal.

    In this example the whole program ran through in one go and finished without any problem. Lets make this example a bit more useful by setting a breakpoint on line 11. We do this by simple clicking with the mouse in the left most column of the code editor:

    The red dot shows us that we have now set a breakpoint. Next we start the program again (either by clicking on Run and Debug or pressing F5). When the program reaches line 11, it will pause:

    The yellow line shows us the location that we will execute next if we continue to run the program. We can also see where we are in the call stack and a list of all breakpoints. At the top of the text editor we now see a toolbar with commands for common debug actions: Continue, Step over, Step Into, Step Out etc. Lets click once on Step Over and then Step Into. We are now paused on the first line of the bar function:

    The Variables view now shows us what local variables we have in this function and what their current values are. As we step through the program, and eventually reach the end of the bar function, the list of local variables gets longer, i.e. we now also see the values for c and d:

    Let us set another breakpoint on line 15 and then continue the program until it hits that breakpoint. Then we click on Debug Console and see a view like this:

    In this view we can evaluate arbitrary Julia code in the context of the current function. For example, we can compute the log of x by running log(x) here:

    We can also change the value of any local variable while the program is paused. For example, to change the value of x, we can double click in the Variables section on the value 27 next to x and then enter any arbitrary Julia expression. The value this expression returns will become the new value for the variable x. In the following example We changed the value of x to a string:

    This concludes the very basic walk through. Iโ€™ll now want to highlight some other features.

    Ways to start the debugger

    There are two different ways to start the debugger.

    • The first you already learned in the walk through: you run a Julia file in the debugger.
    • The second allows you to debug code in the interactive REPL.

    Running Julia files

    In our example we started the currently active Julia file in the debugger. This is the most basic way to start debugging, but there are many more options that you can configure in a VS Code launch.json file. Examples include setting a fixed Julia file as the startup file, configuring command line arguments etc. The launch.json functionality is described in more detail in the VS Code debugger documentation.

    Debugging code from the REPL

    You can also start the debugger from the REPL. In that situation the debugger will attach to the already running REPL. To start such a debug session you use two macros in the REPL: the @enter and @run macro. Both are very simple: they will start the debugger on the code that was passed to the macro. The @run macro will run the code until a breakpoint is hit, while the @enter macro will pause the debugger on the first line of the code. For example, you can start debugging the println function from the REPL by entering @enter println("Test")

    Breakpoints

    You already learned how you can easily set breakpoints in the source code itself. There are two more options for breakpoints:
    function breakpoints and condition on breakpoints.

    Function breakpoints

    If you click on the little + sign in the BREAKPOINTS view, you can add a function breakpoint. Simply enter the name of the function you want to break on. You can also configure it to only break on specific methods by specifying a signature like foo(::String, ::Number).

    Breakpoint conditions

    If you click with the right mouse onto a breakpoint in the editor, you can select an option Edit breakpoint..., and then you can add a condition on the breakpoint. You can enter any valid Julia expression that returns a Bool value here. You have of course full access to all local variables in this expression.

    Variables viewer

    Composite variables, arrays and dictionaries have full tree drill down support in the variables viewer:

    Watch section

    The watch section allows you to enter arbitrary Julia expressions that are evaluated whenever the program pauses and the result is shown:

    Call stack

    The call stack section allows you to look at the content of any stack frame, i.e. when you click on a different function there it will show the local variables for the selected stack frame. You can also restart code execution at any stack frame by clicking the small restart icon next to a given entry here:

    Note that this last feature can be quite brittle, in particular if your functions modify any global state.

    Exceptions

    If your code throws an exception, you get a nice exception view:

    You can also configure the behavior of the debugger in the face of exceptions in the BREAKPOINTS part of the UI.

    Compile mode

    The breakpoints view has another option called Enable compile mode:

    The functionality of this option is the following:

    If you select this option, breakpoints that are set in any function that is called from the current stack frame will no longer pause code execution. In our example, if you have paused in function foo and then select this option, a breakpoint in bar would no longer pause execution. Breakpoints in foo would still pause the debugger.

    Why would you ever want to use this feature?

    Your code will run a lot faster with this option enabled.

    Troubleshooting

    If you encounter any issue when using the debugger, Please do let us know about it over at the Julia VS Code repository.


    File: docs/src/userguide/editingcode.md

    Editing Code

    Code completion (IntelliSense)

    You can use the InteliSense for completing codes,

    printing parameter information,

    listing members of a struct, and so on.

    Rename symbol

    You can rename a symbol (variable name, function name, etc) by pressing F2 or from right click -> "Rename Symbol".


    File: docs/src/userguide/env.md

    Julia Environments

    The Julia VSCode Extension provides support for managing and switching your current Julia environment. You can click the "Julia env" button as shown below to select which environment you want to use:

    If your active directory (shown on the left side of VSCode) contains a Julia environment and you try to switch to an alternate environment, you will be prompted with the message shown below:


    File: docs/src/userguide/formatter.md

    Formatting Code

    Code formatting is powered by JuliaFormatter.jl. Both the Format Document command (Ctrl-Shift-I) and Format Selection (Ctrl-K Ctrl-F) are supported.

    The default formatting is fairly conservative and unintrusive, but you can customise it with a .JuliaFormatter.toml in your workspace. Check out the relevant documentation here. Note: unlike the standard search rules for JuliaFormatter.jl, VSCode will only check for .JuliaFormatter.toml files within the workspace.

    Formatting helps to keep code readable by automatically aligning indentations and spaces.

    The Julia formatter can automatically make this code:

    julia
    f(x)=2x+3
    print(f'( 2 ))
    
    open("myfile.txt", "w") do io
    	write(io, "Hello world!")
        end;

    look like this:

    julia
    f(x) = 2x + 3
    print(f'(2))
    
    open("myfile.txt", "w") do io
    	write(io, "Hello world!")
    end;

    It's the very same code, though now it's much easier to read.

    In order to format your code press shift + cmd|windows + p to bring up the command palette and search for Format Document


    File: docs/src/userguide/grid.md

    Table Viewer

    All Tables.jl-compatible tables (and more!) can be displayed in the integrated table viewer.

    You can use the exported vscodedisplay function to display an object directly or use the Open in VS Code button in the workspace:

    vscodedisplay also takes an optional second argument that allows setting the tab title.

    Tables can be filtered and sorted in the UI, although that may be slow for medium sized tables and is disabled for big tables (with more than 1e7 elements).

    Note that not-big tables (by the above definition) are cached. As such, changes to the original data structure won't be reflected in the table viewer until you display the table again.

    A slightly hidden feature is that you can select rows and copy them into the clipboard with Ctrl-C or the context menu. Note that this will be slow when many rows are selected.


    File: docs/src/userguide/keyboard.md

    Keyboard Shortcuts

    Below are keyboard shortcut reference for three different platforms.

    Windows

    Shortcut Description
    Alt + E Julia: Change Current Environment
    Alt + O Julia: Start REPL
    Alt + K Julia: Stop REPL
    Ctrl + Enter Julia: Send Current Line or Selection to REPL
    Alt + Enter Julia: Execute Code And Move
    RightArrow, DownArrow, PageDown Julia: Show Next Plot
    LeftArrow, UpArrow, PageUp Julia: Show Previous Plot
    Home Julia: Show First Plot
    End Julia: Show Last Plot
    Shift + Delete Julia: Delete All Plots
    Shift + Enter Julia: Execute Code Cell And Move
    Ctrl + C Julia: Clear Inline Results in Editor
    Ctrl + D Julia: Clear Current Inline Result
    Alt + M Julia: Select Current Module

    Mac

    Shortcut Description
    Option + E Julia: Change Current Environment
    Option + O Julia: Start REPL
    Option + K Julia: Stop REPL
    Control + Enter Julia: Send Current Line or Selection to REPL
    Option + Enter Julia: Execute Code And Move
    RightArrow, DownArrow, PageDown Julia: Show Next Plot
    LeftArrow, UpArrow, PageUp Julia: Show Previous Plot
    Home Julia: Show First Plot
    End Julia: Show Last Plot
    Shift + Delete Julia: Delete All Plots
    Shift + Enter Julia: Execute Code Cell And Move
    Control + C Julia: Clear Inline Results in Editor
    Control + D Julia: Clear Current Inline Result
    Option + M Julia: Select Current Module

    Linux

    Shortcut Description
    Alt + E Julia: Change Current Environment
    Alt + O Julia: Start REPL
    Alt + K Julia: Stop REPL
    Ctrl + Enter Julia: Send Current Line or Selection to REPL
    Alt + Enter Julia: Execute Code And Move
    RightArrow, DownArrow, PageDown Julia: Show Next Plot
    LeftArrow, UpArrow, PageUp Julia: Show Previous Plot
    Home Julia: Show First Plot
    End Julia: Show Last Plot
    Shift + Delete Julia: Delete All Plots
    Shift + Enter Julia: Execute Code Cell And Move
    Ctrl + C Julia: Clear Inline Results in Editor
    Ctrl + D Julia: Clear Current Inline Result
    Alt + M Julia: Select Current Module