Skip to content

a0405u/xrest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xrest

Simple configurable break timer for Xserver that reminds you to rest.

screenshot screenshot

Features

  • Reminds you to rest
  • Full keyboard controls
  • Sound notifications
  • Input and/or Output block
  • Wide range of configuration options
  • Idle detection

Build

Install dependencies.

Example for Ubuntu/Debian:

sudo apt update
sudo apt install libx11-dev libxft-dev libxss-dev

Example for Arch linux:

sudo pacman -S libx11 libxft libxss libao

Example for Alpine Linux:

doas apk add libx11-dev libxft-dev libxscrnsaver-dev

Build application:

make

Install

sudo make install

Configure

Put your config in $XDG_CONFIG_HOME/xrest/config.ini

Example config with defaults:

# Text on the break screen
break_title_text = "Break time!"
break_message_text = "Rest your eyes. Stretch your legs. Breathe. Relax."
break_hint_text = "^S - stop, ^Q - quit"

# Text on the warning screen
warning_message_text = "Please, take a break!"
warning_hint_text = "^Space - start, ^W - snooze, ^S - skip, ^Q - quit"

# Text on the end screen
end_title_text = "Break has ended!"
end_message_text = "Work fruitfully. Concentrate on important. Don't get distracted."
end_hint_text = "press any key to continue..."

# Enable warning before break
warning_enabled = true
# Allow break skip
skip_enabled = true
# Allow break snooze
snooze_enabled = true
# Allow break interruption
stop_enabled = true
# Enable break end screen
end_enabled = true
# Enable hints
hints_enabled = true
# Enable time output
time_enabled = true
# Enable sound
sound_enabled = true
# Block all input on break (excluding break application)
block_input = false

# Time is specified in such maner: XXh YYm ZZs
# Time between breaks
timer_duration = 28m
# Duration of a break
break_duration = 5m
# Duration before break starts
warning_duration = 1m
# Snooze duration
snooze_duration = 3m

# Restart timer on end
repeat = true

# Skip break on idle
detect_idle = true
# Idle time limit to skip break
idle_limit = 5m

# Color specifications in #rrggbb format
font_color = #ffffff
hint_font_color = #aaaaaa
background_font_color = #222222
background_color = #000000
progress_color = #161616
border_color = #333333

# Font name, example: JetBrainsMono Nerd Font
font_name = "monospace"

# Title font specification
title_font_size = 14
title_font_weight = 300
title_font_slant = 0
title_font_style = "regular"

# Message and Warning font specification
message_font_size = 12
message_font_weight = 200
message_font_slant = 0
message_font_style = "regular"

# Hint font specification
hint_font_size = 10
hint_font_weight = 100
hint_font_slant = 100
hint_font_style = "regular"

# Time font specification
time_font_size = 128
time_font_weight = 300
time_font_slant = 0
time_font_style = "regular"

# Warning window width in pt
warning_width = 320
# Warning window height in pt
warning_height = 96
# Warning window border width
border_width = 0
# Unused
progress_weight = 16
# Margin between Title and Message
margin = 12

# Screen update limit
fps = 60

# Only WAV is currently supported
# Break start sound
start_sound_path = "/usr/local/share/xrest/sounds/start.wav"
# Break end sound
end_sound_path = "/usr/local/share/xrest/sounds/end.wav"
# Sound volume from 0.0 to 1.0
volume = 0.8

Legally, this project is licensed under the MIT License. See LICENSE file for details.

Morally, the Author opposes the intentional use of the provided code or software in a harmful way. See the STATEMENT file for details.

About

Tiny and configurable break timer for Xserver written in C

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors