Go to file
2024-07-22 14:41:43 -06:00
inc Use Unix sockets instead of GlobalShortcuts portal 2024-07-22 14:41:43 -06:00
shaders Initial commit 2024-06-12 17:48:27 -06:00
src Use Unix sockets instead of GlobalShortcuts portal 2024-07-22 14:41:43 -06:00
.gitignore Initial commit 2024-06-12 17:48:27 -06:00
LICENSE Initial commit 2024-06-12 17:48:27 -06:00
Makefile Use Unix sockets instead of GlobalShortcuts portal 2024-07-22 14:41:43 -06:00
README.md Add configurable font size 2024-06-18 23:42:42 -06:00
timer.desktop Initial commit 2024-06-12 17:48:27 -06:00

Timer overlay

This is a project to display a timer overlayed on top of the rest of your desktop that is controlled with keyboard shortcuts so you can quickly start a timer any time you need with only a couple key presses

This relies on the GlobalShortcuts XDG desktop portal, which is currently only implemented on KDE Plasma. I am considering reworking it to not rely on the portal, but we'll see if I get around to that

Dependencies

This project relies on glew glfw3 freetype2 and sdbus-cpp. You will need to install these libraries to be able to build/run this project

For example, on Arch Linux:

sudo pacman -S glew glfw freetype2 sdbus-cpp

You will also need to have make and a c++ compiler to build the project For example, on Arch Linux: (you probably already have these if you are using Arch as they are dependencies of base-devel)

sudo pacman -S make gcc

Building

Once the dependencies have been installed, you can compile the project simply with:

make

Installing

Installation is likewise very simple, simply run:

sudo make install

There is also a desktop file provided that you may want to install to /usr/share/applications/, ~/.local/share/applications/, or ~/.config/autostart, but that is left up to you

Configuring

You can configure the position the window requests and the font that is used using a config file at $XDG_CONFIG_HOME/timer_overlay/config.txt or ~/.config/timer_overlay/config.txt. The syntax looks like:

POSX=300
POSY=30
FONT=/usr/share/fonts/noto/NotoSans-Bold.ttf
FONT_SIZE=48

However, when running under Wayland, the requested position of the window will not be respected, so to set the position, as well as removing window decorations, and preventing the window from stealing focus when it is opened, you will need to set window rules. You can see the rules I use below: window rules

Licensing

The MIT license attached to this project applies to most of the repo, with the exception of one file, src/character_utils.cpp. This file's core logic was copied from https://learnopengl.com/In-Practice/Text-Rendering, and is therefore licensed and copyrighted by its creator, Joey de Vries under the CC BY 4.0 license which you can read about here or here