Skip to content

Commit

Permalink
Fixing refresh time and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
anufrievroman committed Jun 1, 2022
1 parent 1c2dcef commit e4e7988
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Modern TUI calendar and task manager with customizable interface. Manages your e
- Birthdays of your abook contacts
- Import of events and tasks from calcurse and taskwarrior
- Icons according to the name ✈ ⛷ ⛱
- Privat events and tasks •••••
- Private events and tasks •••••
- Plain text database in your folder for cloud sync
- Customizable colors, icons, and other features
- Resize and mobile friendly
Expand All @@ -30,7 +30,7 @@ Modern TUI calendar and task manager with customizable interface. Manages your e

### Arch Linux, Manjaro etc

The package `calcure` is available in AUR.
The package `calcure` is available in AUR (older version at the moment).

`yay -S calcure`

Expand Down Expand Up @@ -60,18 +60,18 @@ Run `calcure` in your terminal. You may need to restart your terminal after inst

Calcure can be started in special mods using various user arguments. Please refer [to this wiki page](https://github.com/anufrievroman/calcure/wiki/User-arguments) for the list of options.

## Key bindings
### Key bindings

List of all key bindings can be accessed [in the wiki](https://github.com/anufrievroman/calcure/wiki/Key-bindings) and via `?` key in the program.

## Settings
### Settings

On the first run, program will create a configuration file at `.config/calcure/config.ini`.
You can edit parameters and colors in the `config.ini` file.
An example of the [config.ini file is here](https://github.com/anufrievroman/calcure/wiki/Default-config.ini).
Explanations of all settings are [in the wiki](https://github.com/anufrievroman/calcure/wiki/Settings).

## Troubleshooting
### Troubleshooting

- If your terminal shows empty squares instead of icons, probably it does not support unicode. In this case, in config set: `use_unicode_icons = No`.
- Weather widget slows down launch of the program and requires internet. If that is a problem, switch weather off in config: `show_weather = No`.
Expand Down
7 changes: 5 additions & 2 deletions calcure/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python

"""This is the main module that contains views and the main logic"""

# Libraries
Expand Down Expand Up @@ -590,7 +592,7 @@ def __init__(self, stdscr, y, x, weather, user_events, holidays, birthdays, scre
def render(self):
self.screen.state = AppState.CALENDAR
if self.screen.x_max < 6 or self.screen.y_max < 3: return
curses.halfdelay(100)
curses.halfdelay(255)

# Info about the month:
month_names = MONTHS_PERSIAN if cf.USE_PERSIAN_CALENDAR else MONTHS
Expand Down Expand Up @@ -634,10 +636,11 @@ def __init__(self, stdscr, y, x, weather, user_tasks, screen):
self.weather = weather
self.user_tasks = user_tasks
self.screen = screen
self.refresh_time = 100
self.refresh_time = 255

def calculate_refresh_rate(self):
"""Check if a timer is running and change the refresh rate"""
self.refresh_time = 255
for task in self.user_tasks.items:
if task.timer.is_counting:
self.refresh_time = cf.REFRESH_INTERVAL * 10
Expand Down
Binary file added calcure/__pycache__/__main__.cpython-310.pyc
Binary file not shown.

0 comments on commit e4e7988

Please sign in to comment.