init
This commit is contained in:
121 files changed
+17641
No files matched your search
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
# Installs Kadence's launcher entry and icon for the current user.
|
||||
#
|
||||
# The app itself runs straight from the checkout (`python3 -m kadence_desktop`)
|
||||
# or from a pip install; this just makes it appear in the application menu with
|
||||
# a proper icon and the right-click actions.
|
||||
set -euo pipefail
|
||||
|
||||
HERE="$(dirname "$(readlink -f "$0")")"
|
||||
APPS="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
|
||||
ICONS="${XDG_DATA_HOME:-$HOME/.local/share}/icons/hicolor/scalable/apps"
|
||||
BIN="${HOME}/.local/bin"
|
||||
|
||||
mkdir -p "$APPS" "$ICONS" "$BIN"
|
||||
|
||||
# A launcher that works whether or not the package is pip-installed.
|
||||
cat > "$BIN/kadence-desktop" <<LAUNCHER
|
||||
#!/usr/bin/env bash
|
||||
exec python3 -m kadence_desktop "\$@"
|
||||
LAUNCHER
|
||||
chmod +x "$BIN/kadence-desktop"
|
||||
|
||||
# Make the package importable from wherever this checkout lives.
|
||||
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"
|
||||
install -m 0644 "$HERE/kadence.svg" "$ICONS/kadence.svg"
|
||||
|
||||
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
|
||||
|
||||
echo "Installed. Launch it from the menu, or run: kadence-desktop"
|
||||
echo "Make sure ~/.local/bin is on your PATH."
|
||||
@@ -0,0 +1,34 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Kadence
|
||||
GenericName=Pomodoro timer
|
||||
Comment=Pomodoro timer, task list from Jira/Todoist/Google Tasks, and a focus guard
|
||||
Exec=kadence-desktop
|
||||
TryExec=kadence-desktop
|
||||
Icon=kadence
|
||||
Terminal=false
|
||||
Categories=Utility;Office;ProjectManagement;
|
||||
Keywords=pomodoro;timer;focus;tasks;productivity;
|
||||
StartupNotify=true
|
||||
StartupWMClass=kadence
|
||||
SingleMainWindow=true
|
||||
X-GNOME-UsesNotifications=true
|
||||
|
||||
# Right-click the icon in the launcher or the task manager for these.
|
||||
Actions=StartFocus;StartBreak;Toggle;Report;
|
||||
|
||||
[Desktop Action StartFocus]
|
||||
Name=Start a pomodoro
|
||||
Exec=kadence-desktop --start
|
||||
|
||||
[Desktop Action StartBreak]
|
||||
Name=Start a break
|
||||
Exec=kadence-desktop --break
|
||||
|
||||
[Desktop Action Toggle]
|
||||
Name=Start / pause
|
||||
Exec=kadence-desktop --toggle
|
||||
|
||||
[Desktop Action Report]
|
||||
Name=Send today's report
|
||||
Exec=kadence-desktop --report
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Kadence: a tomato as a timer ring — the pomodoro and the countdown in one mark. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
||||
<defs>
|
||||
<linearGradient id="leaf" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#4caf50"/>
|
||||
<stop offset="1" stop-color="#2e7d32"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<circle cx="32" cy="36" r="22" fill="#e8502f"/>
|
||||
<path d="M32 14 A22 22 0 0 1 54 36" fill="none" stroke="#ffffff" stroke-width="5"
|
||||
stroke-linecap="round" opacity="0.92"/>
|
||||
<path d="M26 13c3-4 9-4 12 0 2-3 6-4 9-2-2 4-6 6-10 6h-10c-4 0-8-2-10-6 3-2 7-1 9 2z"
|
||||
fill="url(#leaf)"/>
|
||||
<rect x="30.5" y="8" width="3" height="8" rx="1.5" fill="#2e7d32"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 781 B |
Reference in new issue
Block a user