Skip to content

Commit

Permalink
Doc initialize.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanteria committed Jan 5, 2025
1 parent 96de53a commit 9040fa9
Show file tree
Hide file tree
Showing 55 changed files with 7,571 additions and 148 deletions.
148 changes: 0 additions & 148 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,154 +4,6 @@ Todo.txt TUI is a highly customizable terminal-based application for managing yo

[Preview.webm](https://github.com/Fanteria/todo-tui/assets/28980012/11ab70e3-482c-4994-ac88-198953b08e39)

## Installation

### crates.io

You can install the application directly from [crates.io](https://crates.io/crates/todotxt-tui) with the following command:

```bash
cargo install todotxt-tui
```

### Manual

1. Clone the [repository](https://github.com/Fanteria/todotxt-tui).
2. Build the application using Rust's package manager, Cargo.

```bash
cargo build --release
```

Copy the executable from the target directory to a directory included in your system's PATH.

```bash
cp target/release/todotxt-tui /usr/local/bin/
```

### Initial setup

To set up the basic configuration, create a directory called `todotxt-tui` in your configuration folder (_the default is `$HOME/.config`_), and export the default configuration to this directory:

```bash
todo-tui --export-default-config "$HOME/.config/todotxt-tui/todotxt-tui.toml"
```

Next, open the configuration file and set the `todo_path` to the full path of your `todo.txt` file.

## Basic Usage

Todo.txt TUI provides a straightforward and customizable interface for managing your tasks. The following keybindings and actions are available for basic usage, and please note that these actions can be configured according to your preferences in the configuration file:

- `j`: Move down in the list.
- `k`: Move up in the list.
- `g`: Go to the first item in the list.
- `G`: Go to the last item in the list.
- `Enter`: Select an item.
- `U`: Swap the selected item up.
- `D`: Swap the selected item down.
- `x`: Remove the selected item.
- `d`: Move a task between the pending and done lists.
- `I`: Input a new task.
- `E`: Edit the selected item.
- `J`: Move to the widget below the current one.
- `K`: Move to the widget above the current one.
- `H`: Move to the widget on the left.
- `L`: Move to the widget on the right.
- `q`: Quit the application.
- `Backspace`: Filter categories from the pending and done lists.
- `S`: Save tasks to the file.
- `u`: Update tasks from the file.
- `/`: Search within the current list.
- `n`: Jump to the next search result.
- `N`: Jump to the previous search result.
- `h`: Clear the search term for the current list.

## Configuration

Todo.txt TUI allows extensive customization through a TOML configuration file located in the `todotxt-tui/todotxt-tui.toml` directory. You can also use flags or environment variables to override configuration settings, following this priority order: Configuration file < Environment variables < Flags.

### Color Settings

In Todo.txt TUI, you can customize the colors and text styling for various elements. You have the flexibility to set foreground (`fg`) and background (`bg`) colors, as well as apply text modifiers for styling. Colors can be defined using color names, RGB values, or terminal index.

You can apply text modifiers to change the style of text within Todo.txt TUI. Available text modifiers include:

- `Bold`: Apply bold styling to the text.
- `Italic`: Apply italic styling to the text.
- `Underlined`: Apply underlined styling to the text.

Here's an example of how to configure custom color and text modifiers for project `todo-tui` in your Todo.txt TUI application's TOML configuration:

```toml
[custom_category_style."+todo-tui"]
fg = "#ff0000" # Set foreground color to red using RGB values
bg = "Black" # Set background color to black
modifiers = "Italic" # Apply italic styling
```

### Sorting Options

You can specify how tasks are sorted using the `pending_sort` and `done_sort` options. The available sorting options are:

- `None`: No specific sorting; tasks appear in the order they were added.
- `Reverse`: Reverse the order of tasks.
- `Priority`: Sort tasks by priority.
- `Alphanumeric`: Sort tasks in alphanumeric order.
- `AlphanumericReverse`: Sort tasks in reverse alphanumeric order.

### Preview Format

The `preview_format` setting allows you to define the format for the task preview. You can use placeholders enclosed in `{}` to display task information. Here are the available placeholders and their corresponding values:

- `{n}`: Number of pending tasks.
- `{N}`: Number of completed tasks.
- `{s}`: Task subject.
- `{p}`: Task priority.
- `{c}`: Task creation date.
- `{f}`: Task finish date.
- `{F}`: Task finished status (true or false).
- `{t}`: Task threshold date.
- `{d}`: Task due date.
- `{C}`: Task contexts.
- `{P}`: Task projects.
- `{H}`: Task hashtags.

### Custom Layout

The layout setting allows you to define a custom layout for the application using blocks `[]`. You can specify the orientation of the blocks as either `Direction: Vertical` or `Direction: Horizontal`, along with the size of each block as a percentage or value. Within these blocks, you can include various widgets, such as:

- `List`: The main list of tasks.
- `Preview`: The task preview section.
- `Done`: The list of completed tasks.
- `Projects`: The list of projects.
- `Contexts`: The list of contexts.
- `Hashtags`: The list of hashtags.

Here's an example of a custom layout configuration:

```
[
Direction: Horizontal,
Size: 50%,
[
List: 50%,
Preview,
],
[ Direction: Vertical,
Done,
[
Contexts,
Projects,
],
],
]
```

This example creates a layout with a horizontal split, where the list takes up 50% of the width, and the preview occupies the remaining space. On the right side, there's a vertical split with the list of completed tasks, contexts, and projects.

Feel free to adjust these settings to create a Todo.txt TUI interface that suits your workflow and preferences.

## Feedback and Bug Reporting

As this application is still in development, your feedback is greatly appreciated. If you encounter any issues or have suggestions for improvement, please open an issue on the GitHub repository to assist me in making Todo.txt TUI better.
6 changes: 6 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[book]
authors = ["Jiří Alexandrovič"]
language = "en"
multilingual = false
src = "doc"
title = "Todo.txt TUI"
1 change: 1 addition & 0 deletions book/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
1 change: 1 addition & 0 deletions book/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file makes sure that Github Pages doesn't process mdBook's output.
197 changes: 197 additions & 0 deletions book/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
<!DOCTYPE HTML>
<html lang="en" class="light sidebar-visible" dir="ltr">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Page not found - Todo.txt TUI</title>
<base href="/">


<!-- Custom HTML head -->

<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff">

<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">

<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">

<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">

<!-- Custom theme stylesheets -->


<!-- Provide site root to javascript -->
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Start loading toc.js asap -->
<script src="toc.js"></script>
</head>
<body>
<div id="body-container">
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');

if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}

if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>

<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
html.classList.remove('light')
html.classList.add(theme);
html.classList.add("js");
</script>

<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">

<!-- Hide / unhide sidebar before it is displayed -->
<script>
var sidebar = null;
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
} else {
sidebar = 'hidden';
}
sidebar_toggle.checked = sidebar === 'visible';
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>

<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<!-- populated by js -->
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
<noscript>
<iframe class="sidebar-iframe-outer" src="toc.html"></iframe>
</noscript>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
</div>
</nav>

<div id="page-wrapper" class="page-wrapper">

<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky">
<div class="left-buttons">
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</label>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>

<h1 class="menu-title">Todo.txt TUI</h1>

<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>

</div>
</div>

<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>

<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>

<div id="content" class="content">
<main>
<h1 id="document-not-found-404"><a class="header" href="#document-not-found-404">Document not found (404)</a></h1>
<p>This URL is invalid, sorry. Please use the navigation bar or search to continue.</p>

</main>

<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->


<div style="clear: both"></div>
</nav>
</div>
</div>

<nav class="nav-wide-wrapper" aria-label="Page navigation">

</nav>

</div>




<script>
window.playground_copyable = true;
</script>


<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>

<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>

<!-- Custom JS scripts -->


</div>
</body>
</html>
4 changes: 4 additions & 0 deletions book/FontAwesome/css/font-awesome.css

Large diffs are not rendered by default.

Binary file added book/FontAwesome/fonts/FontAwesome.ttf
Binary file not shown.
Binary file added book/FontAwesome/fonts/fontawesome-webfont.eot
Binary file not shown.
Loading

0 comments on commit 9040fa9

Please sign in to comment.