A straight-forward & user-friendly wrapper originally meant for feh, but works with any other wallpaper engine too!
written with โค๏ธ in Python :)
- A wallpaper history , allows you to move forward or backward in history
- Highly customizable
- Allows users to fetch wallpapers from unsplash and wallhaven
- Also works in wayland but uses swww instead of feh by default
- Users can use any other wallpaper engine if they don't want to use swww or feh
- It can generated palettes from the current wallpaper
- It can now apply effects to your wallpaper such as dim, grayscale, blur,etc!
- Better outputs, coloured output is beautiful isn't it?
- An effects section in the config file, more power to the users :)
The dependencies include:
-
swww (Optional, only if you're on wayland)
-
pillow (Optional, only if you need wallpaper effects feature)
-
colorthief (Optional, only if you want color palette generation)
Note
I know colorthief isn't maintained anymore, Its just there temporarily, and I will implement something of my own when i get the time for it
Although the dependencies will be automatically installed while installing the application, if you still want to install these dependencies manually, you can checkout the requirements.txt file. and run pip install -r requirements.txt
If you want to use something other than feh or swww, you can do that by enabling other in the configuration file, and setting the cmd parameter
If you're on Arch Linux, like me, then you can install it from the AUR:
paru -S easyfehThere's also a development version to check out the latest changes:
paru -S easyfeh-gitMake sure to replace paru with whatever AUR helper you use.
For other distros try (installs locally to the user):
python setup.py install --userif you want to install it systemwide, you can try:
sudo python setup.py installIf your distro allows python package installation directly using pip, You can install EasyFeh by cloning this repository locally. Here's the command:
git clone https://github.com/ShibamRoy9826/easyfeh.git
cd easyfeh
pip install .That's it! read the usage of the commands and enjoy!
The configuration file for EasyFeh can be found at $HOME/.config/easyfeh/config.toml
Note
Its recommended to configure the wallpaper_directory so that its easier to set your desired wallpapers
Its well-commented with explaination of each parameter. Here's the default configuration file of EasyFeh
[wallpaper]
wallpaper_directory= "/home/{username}/Pictures"
remember_wallpaper = true # Saves to history
wallpaper_history_limit = 50 # history limit, history resets automatically once this limit exceeds
[internet]
use_from_internet = false
image_source = "wallhaven" # "wallhaven"(default) or "unsplash"
wallpaper_save_directory = "/home/{username}/Pictures/easyfeh"
image_query = "landscape" # Search for images you want, default is "landscape"
shuffle_results = true # Recommended, else, it will always lead to the same result(The first search result) , only valid for unsplash results
wallhaven_purity = "sfw" # Only if wallhaven is selected as image source. Options: "sfw", "nsfw"
use_saved = true # Also includes already downloaded images from the internet when -random is called
use_api = false # Not recommended, but is an option if you have an api key (Only for wallhaven)
wallhaven_api_key = "" # Only required if "use_api" is set to true
[triggers]
notify_on_change = false # sends a notification on wallpaper change
command_on_change = false # runs a command on wallpaper change, you can use it to run scripts
notif_message = "Wallpaper Changed!" # Notification heading (only if notify_on_change is turned on)
notif_body = "Wallpaper has been set to :f: " # Notification body (only if notify_on_change is turned on), :f: get's replaced by the image's path
command = "" # Set only if command_on_change is turned on
[palette]
save_palette = true # Saves the requested palette from -gc command, to a txt file, where each line is in the format: (R,G,B) #hex
palette_path = "/home/{username}/.config/easyfeh/palette.txt" # Where to keep the newly generated palette?
dominant_color_quality = 6 # (10 is highest, and 1 is the least, smaller values take less time, but at a cost of quality)
general_palette_copy = true # Generates another copy of the palette with values like fg, bg, primary, and secondary
complete_palette_path = "/home/{username}/.config/easyfeh/full_palette.txt" # Where to store the newly generated complete palette?
autogenerate_palette = false # Automatically create a palette on wallpaper change
[effects]
enabled= false
type="gaussian_blur" # Available options include "gaussian_blur", "blur","grayscale","rank_filter","sharpen","contour","detail","emboss","min_filter","max_filter","smooth","smooth_more","box_blur","median_filter"
## No need to change if you're not using any of these effects
gaussian_blur_radius = 8
rank_filter_size = 3
rank_filter_rank = 1
min_filter_size = 3
max_filter_size = 3
box_blur_radius = 8
median_blur_size = 5
dim_amount = 0.5
edited_wallpaper_directory = "/home/{username}/Pictures/easyfeh"
[feh]
options = "--bg-fill" # Feh options
[swww]
# Only if you're using wayland
options = ""
[other]
enabled = false
# If you want to use something other than feh or swww
cmd = ""
# Example: command -options :f:
# :f: get's replaced by the image path
[internal]
# Current Wallpaper index in the history
wall_index = -1
Here's a list of all the commands (Updated as of the latest commit)
EasyFeh
__________
Typical Usage: easyfeh -[option] [img_path(if required)]
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ easyfeh -h -> Prints this help message โ
โ or easyfeh --help โ
โ โ
โ easyfeh -v -> Prints out app version โ
โ or easyfeh --version โ
โ โ
โ easyfeh <some_image_path> -> Sets the wallpaper which was last used (Sets random if no history is saved, needs random to be enabled in โ
โ that case) โ
โ โ
โ easyfeh -res -> Sets the wallpaper which was last used (Sets random if no history is saved, needs random to be enabled in that case) โ
โ or easyfeh --restore โ
โ โ
โ easyfeh -p -> Sets previous wallpaper (Requires wallpaper history to be turned on) โ
โ or easyfeh --prev โ
โ โ
โ easyfeh -n -> Sets next wallpaper (requires wallpaper history to be turned on) โ
โ or easyfeh --next โ
โ โ
โ easyfeh -r -> Sets a random wallpaper (directory for random wallpaper must be configured or internet wallpapers should be turned on) โ
โ or easyfeh --random โ
โ โ
โ easyfeh -r -ui -> Sets a random wallpaper from the internet โ
โ or easyfeh --random --use-internet โ
โ โ
โ easyfeh -r -ud -> Sets a random wallpaper which is already downloaded from the internet โ
โ or easyfeh --random --use-internet โ
โ โ
โ easyfeh -rh -> WARNING Resets the wallpaper history (Keeps the last used wallpaper,Take backups before running this!) โ
โ or easyfeh --reset-hist โ
โ โ
โ easyfeh -rw -> WARNING Deletes the wallpapers downloaded from internet (Take backups before running this!) โ
โ or easyfeh --reset-walls โ
โ โ
โ easyfeh -rc -> WARNING Deletes existing configuration and resets to default (Take backups before running this!) โ
โ or easyfeh --reset-conf โ
โ โ
โ easyfeh -dl -> WARNING Deletes last used wallpaper (Wallpaper before current, Take backups before running this!) โ
โ or easyfeh --delete-last โ
โ โ
โ easyfeh -sh -> Prints out history โ
โ or easyfeh --show-hist โ
โ โ
โ easyfeh -sd -> Prints out all the wallpapers downloaded from internet (If any) โ
โ or easyfeh --show-down โ
โ โ
โ easyfeh -sc -> Prints out the path to the current wallpaper (last used, requires wallpaper history to be turned on) โ
โ or easyfeh --show-curr โ
โ โ
โ easyfeh -gc <amount> -> Prints out dominant colors from an image (RGB values) โ
โ โ
โ easyfeh -gd -> Prints out the most dominant from an image (RGB values) โ
โ or easyfeh --get-dominant โ
โ โ
โ easyfeh -d -> Download wallpapers(Doesn't set them) โ
โ or easyfeh --download โ
โ โ
โ easyfeh -d <amount> -q <query> -s <source> -> Download wallpapers (Doesn't set them) โ
โ or easyfeh --query <query> --source <source> โ
โ โ
โ (Optional arguments: -q, -s ; If not specified, it will check configuration)(Source options: wallhaven(default), unsplash) โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
The configuration file for easyfeh can be found at $HOME/.config/easyfeh/config.toml
- Fix Wallhaven API usage(It does'nt work well atm)
- Configuration verifier
- Easy to switch wallpaper collections/themes
- A rust variant of the same project :) (Might take some time, I am learning about rust now)
- Get's the same wallpaper sometimes when it tries to set random wallpapers
Everyone is welcome to contribute to the code!
You can also raise an issue, or suggest any features that you think would be great :)
โจ Please star this repository if you liked this project ๐
