From 66608e92b9f93c82c309ad6a3853f508a3b08530 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Sat, 14 Oct 2023 13:41:35 -0800 Subject: [PATCH] Add config file and install instructions --- README.md | 11 ++++++++++- hyprchan | 4 +--- hyprchan.conf | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 hyprchan.conf diff --git a/README.md b/README.md index eae202e..7bae49f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ # hyprchan -wallpaper generator \ No newline at end of file +wallpaper generator + +## Install + +1. Copy or symlink `hyprchan` to a directory in your $PATH, such as ~/.local/bin. +2. Make the directory `~/.config/hyprchan` and copy/symlink hyprchan.conf there. + +### 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. diff --git a/hyprchan b/hyprchan index 4cd19a3..10e3973 100755 --- a/hyprchan +++ b/hyprchan @@ -2,9 +2,7 @@ ":"; exec emacs --quick --script "$0" "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*- ;;; hyprchan --- Generate and set a hyprland-style background, in elisp. -(load-file "~/.config/emacs.mitch/elabiasu.el") -(elabiasu-ensure-package 'f) -(elabiasu-ensure-package 'dash) +(load-file "~/.config/hyprchan/hyprchan.conf") (require 'f) (require 'dash) diff --git a/hyprchan.conf b/hyprchan.conf new file mode 100644 index 0000000..338df23 --- /dev/null +++ b/hyprchan.conf @@ -0,0 +1,20 @@ +;; Config file for Hyprchan -*- mode: emacs-lisp -*- + +(defvar waifudir "~/.local/share/waifus/" + "Directory to search for waifus. + +All images should be transparent PNGs, preferably large. Small images will be ugly when scaled up.") +(defvar wallpapers "~/.local/share/backgrounds/" + "Directory to search for wallpapers. Images may be JPG or PNG.") +(defvar cachedir "~/.cache/hyprchan/" + "Directory to cache intermediate files - waifus and logos and such.") +(defvar logosrc "/usr/share/hyprland/hyprland.png" + "Transparent PNG logo of the window manager/system.") +(defvar splash (string-trim (shell-command-to-string "hyprctl splash")) + "Splash message, displayed at bottom center on final background.") + + +;;; Hyprchan depends on two elisp libraries, `f' and `dash'. +;;; If these are not installed system-wide, uncomment below to install them with straight.el + +(defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 6)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (straight-use-package 'f) (straight-use-package 'dash)