waycrate / swhkd

Sxhkd clone for Wayland (works on TTY and X11 too)
https://git.sr.ht/~shinyzenith/swhkd
BSD 2-Clause "Simplified" License
676 stars 47 forks source link

[fix] default `swhks` logpath now references `HOME` environment variable instead of `~` #158

Closed ajanon closed 2 years ago

ajanon commented 2 years ago

If XDG_DATA_HOME is not set, swhks defaults to ~/.local/share/swhks/swhks-{time}.log for its log files. Unfortunately, ~ is not translated dynamically to the HOME user directory path at runtime.

This PR fixes this issue by replacing ~ with a reference to the HOME environment variable. If this variable is not set too, the application exits with an error message, as there does not seem to be a way to recover properly in this case.

Closes #157.

Shinyzenith commented 2 years ago

Waiting for CI to run, after pass I'll merge it.