Git Product home page Git Product logo

todofi.sh's Introduction

Todofi.sh

Todo-txt + Rofi = Todofi.sh

Handle your todo-txt tasks directly from Rofi

Todofi.sh screenshot

Features

  • Mark as done
  • Create, Edit, Delete
  • Edit priority, remove priority
  • Apply persistent filters
  • Filter from context / project
  • Run command like archive, deduplicate or report
  • Can apply filter from argument
  • Context / Project / Tag / Due highlighting (via Pango markup)

Dependencies

  • rofi
  • todo-txt

On Debian based system

sudo apt install rofi todo-txt

Installation

Copy todofi.sh where you want.

Use it

Just run /your/path/todofi.sh

With i3wm, you can bind todofi.sh like this bindsym $mod+t exec /path/to/todofi.sh

Try todofi.sh --help if you want to customize.

Customization

If you want to override Todofi.sh configuration, do not edit directly the todofi.sh script, you can do that by:

  • Add configuration in ${HOME}/.config/todofish.conf (Todofi.sh tries to source this file when it starts)
  • Open todofi.sh by specify a configuration file with the -c argument (exemple: todofi.sh -c /path/to/todofish.conf)

Because the configuration file is loaded last, you can overwrite any configuration variable.

So if you want to add arguments to Rofi, you can do so with the content of the following configuration file:

ROFI_BIN="$(command -v rofi) -theme /usr/share/rofi/themes/fancy.rasi"

todofi.sh's People

Contributors

hugokernel avatar jipok avatar jose1711 avatar phooky avatar wwalker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

todofi.sh's Issues

Use todo.txt's default config file

todo.txt uses $HOME/.todo/config as a default file for user configuration. i wonder what is the need of a separate configuration in $HOME/.config/todo-txt.cfg.

Incompatible with Arch Linux

On Arch todotxt - provided by todotxt (AUR) - exists as todo.sh. It would be nice if todofi searches for this script in addition to todo-txt.

Add docs for how to theme todofi.sh

The screenshot in the readme shows todofi.sh using the gruvbox theme.
I would like to have exactly the same theme, but I'm pretty new to rofi, and I don't see how I can theme the dialog using the todofi.sh script?

It would be good to have an example of how to manage theming for todofi.sh.

Config file not auto-loaded?

In the script there's a declaration of the default location of the todofish config: CONFIG_FILE="${HOME}/.config/todofish.conf"

But that config file never gets loaded? Only if the script is called with the -c option?

todo.sh is not run

Although there's a check for todo.sh instead of todo-txt, when the script actually runs the command it's hard-coded to todo-txt:

todo-txt -p -d "$TODOTXT_CFG_FILE" "$@"

I fixed it by changing that line to:

    $TODO_BIN -p -d "$TODOTXT_CFG_FILE" "$@"

Make check for todotxt script reliable

TODO_BIN="$(whereis -b todo-txt | awk '{print $2}')"

whereis also matches directories and this makes the test unreliable:

~ whereis -b todotxt | awk '{print $2}'
/usr/share/todotxt
~ todotxt
zsh: command not found: todotxt
~ ls -ld /usr/share/todotxt
drwxr-xr-x 2 root root 4096 jún  7 22:09 /usr/share/todotxt

I only have 33 tasks and todofi starts slow

when i open my todo.txt (which is in an alternative place so I use the -c argument) todofi opens very slow. It's something like 3 seconds. Shouldn't be that hard to open a text file, so something must be wrong.

I'm on a fully updated manjaro linux system with i3. only alternative thing I got going for todofi is the placement of my todo folder, but can't see how that should mean anything.

Strang Font Color

Thanks for your script and I love it so much. But the font color seems to be weried when I add -theme argument in todofish.conf like the following:

ROFI_BIN="$(command -v rofi) -theme ~/.config/rofi/tokyonight.rasi"

and when I run the script by ./todofi.sh, it outputs:

test

As you can see, some item's text color is not corespond with its priority, I try to change the theme file like https://github.com/newmanls/rofi-themes-collection/blob/master/themes/nord.rasi but the result is same. Here is my theme file:

* {
    font:   "JetBrainsMono Nerd Font Bold 20";
      bg0     : #1a1b26;
      bg1     : #1f2335;
      bg2     : #24283b;
      bg3     : #414868;
      fg0     : #c0caf5;
      fg1     : #a9b1d6;
      fg2     : #737aa2;
      red     : #f7768e;
      green   : #9ece6a;
      yellow  : #e0af68;
      blue    : #7aa2f7;
      magenta : #9a7ecc;
      cyan    : #4abaaf;

      accent: @blue;
      urgent: @yellow;

      background-color : transparent;
      text-color       : @fg0;

      margin  : 0;
      padding : 0;
      spacing : 0;
}

window {
    location:   center;
    width:      1000;
    height:     700;

    background-color:   @bg0;
    /*background-image:   url("/home/ch4ser/Media/Pictures/jarvis.jpg", width);*/

    border:         2px;
    border-color: @bg3;
}

inputbar {
    spacing:    8px; 
    padding:    8px;

    border:         2px;
    border-color: @blue;
    background-color:   @bg1;
}

prompt, entry, element-icon, element-text {
    vertical-align: 0.5;
}

prompt {
    text-color: @accent;
}

textbox {
    padding:            8px;
    background-color:   @bg1;
}

listview {
    padding:    4px 0;
    lines:      8;
    columns:    2;

    fixed-height:   false;
}

element {
    padding:    8px;
    spacing:    8px;
}

element normal normal {
    text-color: @fg0;
}

element normal urgent {
    text-color: @urgent;
}

element normal active {
    text-color: @accent;
}

element selected {
    text-color: @bg0;
}

element selected normal, element selected active {
    background-color:   @accent;
}

element selected urgent {
    background-color:   @urgent;
}

element-icon {
    size:   0.8em;
}

element-text {
    text-color: inherit;
}

Finally, thanks for your contribution and patience again.

Unable to change markup colors

I am using a custom solarized dark rofi theme, and some of the default markup colors are barely readable (project) or extremely bright (due date).

I tried overriding the MARKUP_xxx variables in the config file:

todofi.sh/todofi.sh

Lines 27 to 30 in c1ecf94

MARKUP_PROJECT='<span fgcolor="darkblue"><b>\1<\/b><\/span>'
MARKUP_CONTEXT='<span fgcolor="darkgreen"><b>\1<\/b><\/span>'
MARKUP_TAG='<span fgcolor="gray"><b>\1<\/b><\/span>'
MARKUP_DUE='<span fgcolor="red"><b>\1<\/b><\/span>'

However it seems the sed invocation breaks the markup code, as I am getting pango errors.

Could it be possible to add variables for the markup colors, that can be easily overriden in config file?

Thank you

Integration as mode in rofi?

Is there a way to add todofi.sh as a mode to rofi?
I tried it like this:
rofi.modi: drun,todofi:todofi.sh -c /home/hd/.config/todo/config,calc:qalc +u8,window

There is no error message, but the resulting mode just shows the output of todofi.sh --help.

No matter if I use -c / -d or no argument at all - nothing changes.

Any help is greatly appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.