diff --git a/README.md b/README.md index 7bae49f..4531621 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,23 @@ wallpaper generator ### Dependencies hyprchan depends on `f.el` and `dash.el`. By default the config file will bootstrap straight.el to install them. If you have these packages available system-wide (EG with debian's elisp packages), you can comment it out. + +## Install - Windows + +First get the Scoop package manager https://scoop.sh and follow its instructions for adding the `extras` bucket. + +Then install the following: + +- `emacs` +- `imagemagick` +- `file` + +Put hyprchan.conf where it goes (run this in powershell while in the project root folder): + +```powershell +new-item -type directory -force -path $env:APPDATA\.config\hyprchan\ +copy-item hyprchan.conf $env:APPDATA\.config\hyprchan\hyprchan.conf +new-item -type directory -path $env:APPDATA\.cache\ +``` + +Then edit it so it actually knows where your wallpapers should be. \ No newline at end of file diff --git a/hyprchan b/hyprchan old mode 100755 new mode 100644 index e4a1cc9..ff3602e --- a/hyprchan +++ b/hyprchan @@ -7,11 +7,6 @@ (require 'f) (require 'dash) -(defvar waifudir "~/.local/share/waifus/") -(defvar wallpapers "~/.local/share/backgrounds/") -(defvar cachedir "~/.cache/hyprchan/") -(defvar logosrc "/usr/share/hyprland/hyprland.png") -(defvar splash (string-trim (shell-command-to-string "hyprctl splash"))) (defun get-dimensions (image) "Return the dimensions of IMAGE as cons `(x . y)'." @@ -78,15 +73,19 @@ (setq logo.start.y (round (- (* canvas.y 0.5) (* logo.y 0.5)))) (defvar splashthickness (/ canvas.x 50.0)) - +(defvar final-image-location (expand-file-name "~/hyprchan.jpg")) (defvar magickcmd (format - "convert %s -gravity South -pointsize %s -fill '#f0f0f0' -annotate 0 '%s' -page +%s+%s %s -page +%s+%s %s -flatten ~/.config/hypr/hyprchan.jpg" + "magick convert %s -gravity South -pointsize %s -fill '#f0f0f0' -annotate 0 '%s' -page +%s+%s %s -page +%s+%s %s -flatten %s" canvas.fullname splashthickness splash logo.start.x logo.start.y logo.cachefile waifu.position.x waifu.position.y - waifu.cachefile)) - + waifu.cachefile + final-image-location)) +(if (eq system-type 'windows-nt) + (setq magickcmd (string-replace "/" "\\" magickcmd))) +(message magickcmd) (shell-command-to-string magickcmd) +;; TODO: fix filepaths