Skip to content

ryotaro612/wallpreview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wallpreview

Abstract

The wallpreview is an Emacs package. It allows you to preview images and set the selected one as the wallpaper in the image-dired mode.

A running example is as below.

demo

Installation

You can install it from Melpa.

Usage

Toggle wallpreview if type wallpreview-toggle-key(w is the default key) in *image-dired*. When you select an image, wallpreview pass the path of the image to wallpreview-wallpaper-cmd. You can configure wallpreview-wallpaper-cmd to make it change the wallpaper of your environment. #'wallpreview--sway-bg binds wallpreview-wallpaper-cmd as defaut, and the defintion is as below.

(defun wallpreview--set-wallpaper (&optional arg)
  "Set a background as ARG.
If arg is nil, use the forcused image."
  (interactive "fBackground image: ")
  (let ((wallpaper-path (or arg (image-dired-original-file-name))))
    (call-process-shell-command
     (concat (apply wallpreview-wallpaper-cmd (list wallpaper-path)) "&")
     nil 0)))

M-x wallpreview-open-wallpaper-directory opens wallpreview-wallpaper-directory in image-dired, and turns on wallpreview.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published