Skip to content
/ Caffi Public

A simple widget calendar for Linux.

License

Notifications You must be signed in to change notification settings

Elvyria/Caffi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caffi

Crates.io License: MIT

Caffi is a simple desktop calendar that is in a very early stage of development.

Preview

Installation

Can be installed from crates.io with cargo:

cargo install caffi --locked --features Sass,Wayland...

Dependencies

Features

Some features can be enabled at compile time.

  • Accent - Inherits the accent color from the system's settings.
  • Sass - Allows you to use SCSS instead of CSS.
  • Wayland - Uses wlr-layer-shell to imitate window positioning.
  • X11 - Sets WM hints and properties, and repositions the window.

Usage

Usage: caffi [-1 <first>] [-a <anchor...>] [-m <margin...>] [-u <userstyle>] [-v]

Calendar

Options:
  -1, --first       first day of the week: (sun)day, (mon)day, (tue)sday...
  -a, --anchor      screen anchor point: (t)op, (b)ottom, (l)eft, (r)ight
  -m, --margin      margin distance for each anchor point
  -u, --userstyle   path to the userstyle
  -v, --version     print version
  --help            display usage information

Customization

Caffi is built with GTK4 and uses CSS to define its appearance.
You will find the style sheet in your config directory after the first launch.

${XDG_CONFIG_HOME:-$HOME/.config}/caffi/style.css

If you have enabled the Sass feature, it will also look for *.scss and *.sass files.

${XDG_CONFIG_HOME:-$HOME/.config}/caffi/style.sass
${XDG_CONFIG_HOME:-$HOME/.config}/caffi/style.scss

Tips

Anchoring

It is often desirable to be able to position widgets relatively to a screen side.
Two flags will help with this: -a --anchor and -m --margin.
Each margin value provided will match every anchor point respectively.  

caffi --anchor left --anchor bottom --margin 20 --margin 30

Toggle Window

If you want to toggle window with a click of a button, Unix way is the way:

pkill caffi | caffi

Troubleshooting

Environment

Caffi is developed and tested with:

  • Wayland (Hyprland): 0.45.2

If your setup is different and you experience issues, feel free to file a bug report.

GTK

To get GTK related messages a specific environment variable must be non empty.

GTK_DEBUG=1 caffi

Building

To build this little thing, you'll need some Rust.

git clone --depth 1 https://github.com/Elvyria/caffi
cd caffi
cargo build --locked --release --features Sass,Wayland...