refactor: enhance TimerPage layout and functionality; update theme and tokens for improved design consistency

- Refactored TimerPage component to improve layout and user experience.
- Updated theme configuration to utilize design tokens for better maintainability.
- Introduced new tokens for colors and typography to align with design principles.
- Simplified state management and improved timer functionality.
- Enhanced accessibility and responsiveness of UI elements.
This commit is contained in:
timka123 committed 2026-10-18 23:57:36 +03:00
1 parent 17a0a3c4c9
commit 77b26757bf
84 files changed
+4501 -2682

No files matched your search

+31 -5
View File
@@ -13,7 +13,8 @@ BIN="${HOME}/.local/bin"
mkdir -p "$APPS" "$ICONS" "$BIN"
# A launcher that works whether or not the package is pip-installed.
# A launcher that works whether or not the package is pip-installed. The
# desktop entry points at this absolute path, so nothing depends on PATH.
cat > "$BIN/kadence-desktop" <<LAUNCHER
#!/usr/bin/env bash
exec python3 -m kadence_desktop "\$@"
@@ -25,11 +26,36 @@ SITE_PTH="$(python3 -c 'import site; print(site.getusersitepackages())')"
mkdir -p "$SITE_PTH"
echo "$(dirname "$HERE")" > "$SITE_PTH/kadence-desktop.pth"
install -m 0644 "$HERE/kadence.desktop" "$APPS/kadence.desktop"
# Exec/TryExec are written as absolute paths on purpose.
#
# Application launchers (KDE's Kickoff, rofi -show drun, GNOME's overview) run
# with the *session* PATH, which on most setups does not include ~/.local/bin —
# and an entry whose TryExec cannot be resolved is silently hidden. An absolute
# path cannot be hidden by a PATH that differs from your shell's.
sed -e "s|^Exec=kadence-desktop|Exec=$BIN/kadence-desktop|" \
-e "s|^TryExec=kadence-desktop|TryExec=$BIN/kadence-desktop|" \
-e "s|^Exec=kadence-desktop |Exec=$BIN/kadence-desktop |" \
"$HERE/kadence.desktop" > "$APPS/kadence.desktop"
chmod 0644 "$APPS/kadence.desktop"
install -m 0644 "$HERE/kadence.svg" "$ICONS/kadence.svg"
# Each launcher keeps its own cache; refresh all of the ones that are present.
command -v update-desktop-database >/dev/null && update-desktop-database "$APPS" || true
command -v gtk-update-icon-cache >/dev/null && gtk-update-icon-cache -f -t "${XDG_DATA_HOME:-$HOME/.local/share}/icons/hicolor" 2>/dev/null || true
command -v gtk-update-icon-cache >/dev/null && \
gtk-update-icon-cache -f -t "${XDG_DATA_HOME:-$HOME/.local/share}/icons/hicolor" 2>/dev/null || true
command -v kbuildsycoca6 >/dev/null && kbuildsycoca6 --noincremental >/dev/null 2>&1 || true
# rofi rebuilds its drun cache when the directory changes; nudge the timestamp.
touch "$APPS" 2>/dev/null || true
echo "Installed. Launch it from the menu, or run: kadence-desktop"
echo "Make sure ~/.local/bin is on your PATH."
if command -v desktop-file-validate >/dev/null; then
desktop-file-validate "$APPS/kadence.desktop" && echo "Desktop entry validates."
fi
echo
echo "Installed:"
echo " launcher $BIN/kadence-desktop"
echo " menu entry $APPS/kadence.desktop"
echo " icon $ICONS/kadence.svg"
echo
echo "It should now appear in the application menu and in \`rofi -show drun\`"
echo "as \"Kadence\" (search: pomodoro, timer, focus)."