Compare commits

...

4 Commits
v1.0 ... master

Author SHA1 Message Date
675cead3c6
Fix missing colors in fifo 2025-08-21 10:45:41 +02:00
da9f6e6dbe
improve contract in upload-icon 2025-08-21 09:44:57 +02:00
5f97ca1e3c
Update README.md 2025-08-20 14:59:05 +02:00
b948055048
remove unsupported targets 2025-08-20 14:56:29 +02:00
5 changed files with 14 additions and 11 deletions

View File

@ -32,7 +32,3 @@ package:
GOARCH=386 GOOS=linux go build -o _out/kpsync_linux-386 ./cmd/cli # Linux - 32 bit
GOARCH=amd64 GOOS=linux go build -o _out/kpsync_linux-amd64 ./cmd/cli # Linux - 64 bit
GOARCH=arm64 GOOS=linux go build -o _out/kpsync_linux-arm64 ./cmd/cli # Linux - ARM
GOARCH=amd64 GOOS=openbsd go build -o _out/kpsync_openbsd-amd64 ./cmd/cli # OpenBSD - 64 bit
GOARCH=arm64 GOOS=openbsd go build -o _out/kpsync_openbsd-arm64 ./cmd/cli # OpenBSD - ARM
GOARCH=amd64 GOOS=freebsd go build -o _out/kpsync_freebsd-amd64 ./cmd/cli # FreeBSD - 64 bit
GOARCH=arm64 GOOS=freebsd go build -o _out/kpsync_freebsd-arm64 ./cmd/cli # FreeBSD - ARM

View File

@ -8,13 +8,14 @@ A small util to launch keepassXC while the database file is on a remote webDAV s
1. simply start `kpsync`
2. On first start a example config in `~/.config/kpsync.json` will be created, probably needs to be edited
3. Afterwards start it again
4. You can access the logs, functionality, state etc via the tray icon
# Functionality
kpsync starts by downloading the latest db file from the webDAV to the (configured) temp directory
(if there already exists a local file, matching with the server version (via ETag), the download will be skipped)
If teh download fails, teh user gets the option to open a local (fallback) file (e.g. if the computer has no network)
If the download fails, the user gets the option to open a local (fallback) file (e.g. if the computer has no network)
Then KeepassXC is launched.
@ -42,4 +43,8 @@ Needs `keepassxc` to be installed. duh.
"debounce": 3500,
"terminal_emulator": "konsole -e"
}
```
```
# Screenshot
<img width="539" height="406" alt="image" src="https://github.com/user-attachments/assets/283ec720-d45d-412a-9be4-b92e9008c9ee" />

View File

@ -60,10 +60,12 @@ func (app *Application) LogDebug(msg string) {
app.logInternal("[D]", msg, termext.Gray)
}
func (app *Application) logInternal(pf string, msg string, c func(_ string) string) {
func (app *Application) logInternal(pf string, msg string, cf func(_ string) string) {
app.logLock.Lock()
defer app.logLock.Unlock()
c := cf
if !termext.SupportsColors() && !app.config.ForceColors {
c = func(s string) string { return s }
}
@ -71,24 +73,24 @@ func (app *Application) logInternal(pf string, msg string, c func(_ string) stri
for i, s := range strings.Split(msg, "\n") {
if i == 0 {
println(c(pf + " " + s))
app.logList = append(app.logList, LogMessage{i, pf, s, c})
app.logList = append(app.logList, LogMessage{i, pf, s, cf})
if app.logFile != nil {
_, err := app.logFile.WriteString(pf + " " + s + "\n")
if err != nil {
app.fallbackLog("[!] Failed to write logfile: " + err.Error())
}
}
app.logBroadcaster.Publish("", LogMessage{i, pf, s, c})
app.logBroadcaster.Publish("", LogMessage{i, pf, s, cf})
} else {
println(c(langext.StrRepeat(" ", len(pf)+1) + s))
app.logList = append(app.logList, LogMessage{i, pf, s, c})
app.logList = append(app.logList, LogMessage{i, pf, s, cf})
if app.logFile != nil {
_, err := app.logFile.WriteString(langext.StrRepeat(" ", len(pf)+1) + s + "\n")
if err != nil {
app.fallbackLog("[!] Failed to write logfile: " + err.Error())
}
}
app.logBroadcaster.Publish("", LogMessage{i, pf, s, c})
app.logBroadcaster.Publish("", LogMessage{i, pf, s, cf})
}
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB