feat: initial gosleep-timer implementation
Go TUI sleep timer with modular architecture. - Config: YAML-based, profile inheritance, auto WM detection - Engine: timer, executor, stage pipeline (pre→timer→post) - Modules: workspace (niri/hyprland/kde), media, lock, kill, notify, sound, brightness, mute, custom, script - TUI: bubbletea app with profiles, module toggles, progress bar - CLI: run, list-profiles, export, import, history, stats - History: JSONL log with statistics - QR: config export as ASCII QR
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package tui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
qrcode "github.com/skip2/go-qrcode"
|
||||
)
|
||||
|
||||
// GenerateQR returns a string of the QR code for the given data
|
||||
func GenerateQR(data string) (string, error) {
|
||||
qr, err := qrcode.New(data, qrcode.Medium)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("qr generate: %w", err)
|
||||
}
|
||||
// Convert to ASCII art
|
||||
art := qr.ToString(true)
|
||||
return art, nil
|
||||
}
|
||||
Reference in New Issue
Block a user