All Projects → adi1090x → Dynamic Wallpaper

adi1090x / Dynamic Wallpaper

Licence: gpl-3.0
A simple bash script to set wallpapers according to current time, using cron job scheduler.

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Dynamic Wallpaper

crony
Manage remote crontabs from your terminal
Stars: ✭ 12 (-98.43%)
Mutual labels:  cron, crontab
Openvpn Install
Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.
Stars: ✭ 7,142 (+837.27%)
Mutual labels:  ubuntu, arch-linux
Battery Wallpaper
Simple bash script to set wallpaper according to battery percentage with charging animations.
Stars: ✭ 314 (-58.79%)
Mutual labels:  ubuntu, arch-linux
ChangeWallpaper
This script downloads the Bing and Nasa daily wallpaper and uses them to changes the background on the Linux and Windows os periodically.
Stars: ✭ 14 (-98.16%)
Mutual labels:  wallpaper, crontab
Wecron
✔️ 微信上的定时提醒 - Cron on WeChat
Stars: ✭ 537 (-29.53%)
Mutual labels:  cron, crontab
php-cron-expr
Ultra lightweight, Dependency free and Super Fast Cron Expression parser for PHP
Stars: ✭ 42 (-94.49%)
Mutual labels:  cron, crontab
Lively
Stars: ✭ 5,721 (+650.79%)
Mutual labels:  wallpaper, wallpapers
asparagus
An easy to use task scheduler for distributed systems
Stars: ✭ 14 (-98.16%)
Mutual labels:  cron, crontab
Mons
POSIX Shell script to quickly manage monitors on X
Stars: ✭ 457 (-40.03%)
Mutual labels:  ubuntu, arch-linux
Chronos
Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
Stars: ✭ 4,303 (+464.7%)
Mutual labels:  cron, crontab
cronitor-cli
Command line tools for Cronitor.io
Stars: ✭ 31 (-95.93%)
Mutual labels:  cron, crontab
Agendash
Agenda Dashboard
Stars: ✭ 620 (-18.64%)
Mutual labels:  cron, crontab
lambda-cron
LambdaCron - serverless cron tool
Stars: ✭ 22 (-97.11%)
Mutual labels:  cron, crontab
LiveWallpaper
A tiny win10 (dynamic) wallpaper changer | 巨应壁纸 | 动态壁纸 | Free wallpaper engine
Stars: ✭ 396 (-48.03%)
Mutual labels:  wallpaper, wallpapers
mi-cron
📆 A microscopic parser for standard cron expressions.
Stars: ✭ 16 (-97.9%)
Mutual labels:  cron, crontab
Wallpapers
Collection of wallpapers for elementary OS
Stars: ✭ 317 (-58.4%)
Mutual labels:  wallpaper, wallpapers
croncal
Utility to convert a crontab file to a list of actual events within a date range.
Stars: ✭ 37 (-95.14%)
Mutual labels:  cron, crontab
LexikCronFileGeneratorBundle
This symfony bundle provides service for generate cron file
Stars: ✭ 20 (-97.38%)
Mutual labels:  cron, crontab
Gocron
定时任务管理系统
Stars: ✭ 4,198 (+450.92%)
Mutual labels:  cron, crontab
Anlinux App
AnLinux allow you to run Linux on Android without root access.
Stars: ✭ 614 (-19.42%)
Mutual labels:  ubuntu, arch-linux

undefined undefined undefined undefined

A simple bash script to set wallpapers according to current time, using cron job scheduler.

gif

Overview

  • 25+(more) different types of wallpaper set (HD/UHD/4K/5K).
  • Added pywal support.
  • Users can add their own wallpapers.
  • With Cron, Wallpaper changes according to time, throughout the day.
  • Tested on :
    • Window Managers : Openbox, i3wm, bspwm, awesomewm, Fluxbox, Fvwm, Swaywm
    • Desktop Environments : KDE, Pantheon, Gnome, Deepin, Cinnamon, XFCE, LXDE, MATE

Dependencies

Install Following programs on your system before using dwall -

  • feh : To set wallpapers on WMs
  • cron : To set a job for dwall
  • xrandr : Only if you're using XFCE desktop
  • pywal : for pywal support (optional)

Install feh, cron and xrandr -

# On Archlinux
$ sudo pacman -Sy xorg-xrandr feh cronie

# On Ubuntu or Debian
$ sudo apt-get install x11-xserver-utils feh cron

For swaywm support users must install oguri. The oguri daemon must be started for the script to work. Oguri can be installed on Arch linux via AUR.

Installation

Follow the step below to install dwall on your system -

You can run test.sh to test it before installing it on your system.

  • Clone this repository -
$ git clone https://github.com/adi1090x/dynamic-wallpaper.git
  • Change to cloned directory and run install.sh -
$ cd dynamic-wallpaper
$ chmod +x install.sh
$ ./install.sh

Run the program

  • Open the terminal and execute dwall -
$ dwall

╺┳┓╻ ╻┏┓╻┏━┓┏┳┓╻┏━╸   ╻ ╻┏━┓╻  ╻  ┏━┓┏━┓┏━┓┏━╸┏━┓
 ┃┃┗┳┛┃┗┫┣━┫┃┃┃┃┃     ┃╻┃┣━┫┃  ┃  ┣━┛┣━┫┣━┛┣╸ ┣┳┛
╺┻┛ ╹ ╹ ╹╹ ╹╹ ╹╹┗━╸   ┗┻┛╹ ╹┗━╸┗━╸╹  ╹ ╹╹  ┗━╸╹┗╸

Dwall V2.0   : Set wallpapers according to current time.
Developed By : Aditya Shakya (@adi1090x)

Usage : test.sh [-h] [-p] [-s style]

Options:
   -h	  Show this help message
   -p	  Use pywal to set wallpaper
   -s	  Name of the style to apply
   
Available styles:  aurora  beach  bitday  chihuahuan  cliffs  colony  desert  earth  exodus
factory  firewatch  forest  gradient  home  island  lake  lakeside  market  mojave  moon
mountains  room  sahara  street  tokyo  

Examples: 
test.sh -s beach       Set wallpaper from 'beach' style
test.sh -p -s sahara   Set wallpaper from 'sahara' style using pywal
  • Select the style you like and run -
$ dwall -s firewatch
[*] Using style : firewatch

Setup cron job

This program is specifically created to use with a time-based job scheduler such as cron or systemd/Timers. So, After installing this program you need to set up a cron job using crontab on your system. Follow the step below to set a job for this program -

I'm using cronie on Arch Linux here.

  • After installing cron, enable and start the cron service -
# On Arch Linux
$ sudo systemctl enable cronie.service --now
  • Make sure the service is enabled and running -
$ systemctl status cronie.service
● cronie.service - Periodic Command Scheduler
     Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2020-12-26 14:39:31 IST; 5h 22min ago
   Main PID: 779 (crond)
  • Cron does not run under the Xorg server therefore it cannot know the environmental variable necessary to be able to start an Xorg server application so they will have to be defined. Find out the values of following environment variables - SHELL, PATH, DISPLAY, DESKTOP_SESSION, DBUS_SESSION_BUS_ADDRESS, XDG_RUNTIME_DIR
$ echo "$SHELL | $PATH | $DISPLAY | $DESKTOP_SESSION | $DBUS_SESSION_BUS_ADDRESS | $XDG_RUNTIME_DIR"

/usr/bin/zsh | /usr/local/bin:/usr/bin | :0 | Openbox | unix:path=/run/user/1000/bus | /run/user/1000
  • Now, Create an hourly cron job for dwall using crontab -
# export editor for crontab
$ export EDITOR=vim

# Edit your crontab and add a job
$ crontab -e

# Add this line replacing the values of env variable and style with yours
0 * * * * env PATH=/usr/local/bin:/usr/bin DISPLAY=:0 DESKTOP_SESSION=Openbox DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" /usr/bin/dwall -s firewatch

# check if job is created on your crontab
$ crontab -l
0 * * * * env PATH=/usr/local/bin:/usr/bin DISPLAY=:0 DESKTOP_SESSION=Openbox DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" /usr/bin/dwall -s firewatch
  • That's it, dwall added to your crontab and will change the wallpaper every hour. If you want to change the wallpaper style, just remove previous job and add new with another style.
# delete previous job
$ crontab -r

# Add new job with different style
$ crontab -e
0 * * * * env PATH=/usr/local/bin:/usr/bin DISPLAY=:0 DESKTOP_SESSION=Openbox DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" /usr/bin/dwall -s bitday

How to add own wallpapers

  • Download a wallpaper set you like.
  • Rename the wallpapers (must be jpg/png) to 0-23. If you don't have enough images, symlink them.
  • Make a directory in /usr/share/dynamic-wallpaper/images and copy your wallpapers in that.
  • Run the program, select the style and apply it.

Tips

  • You can use dwall to change between your favorite wallpapers every hour.
  • You can use dwall as picture slide, which can set your favorite photos as wallpaper every hour or every 15 minutes. Just create an appropriate cron job.

Use HEIC Images

You may also want to use wallpapers from Dynamic Wallpaper Club. To do so, you need to convert .heic image file to either png or jpg format. Download a .heic wallpaper file you like and follow the steps below to convert images.

  • First install heif-convert on your system -
# On Archlinux
$ sudo pacman -Sy libheif

# On Ubuntu or Debian
$ sudo apt-get install libheif-examples

  • Move you .heic file in a directory and run following command to convert images -
# change to directory
$ cd Downloads/heic_images

# convert to jpg images
$ for file in *.heic; do heif-convert $file ${file/%.heic/.jpg}; done
  • Now, you have the images, just follow the above steps to use these wallpapers with dwall.

More Wallpapers : I've also created a few more wallpaper sets, which are not added to this repository because of their big size. You can download these wallpapers set from here -

undefined

Available Sets : Catalina, London, Maldives, Mojave HD, Mount Fuji, Seoul, and more...

Previews

Aurora Beach Bitday Chihuahuan
gif gif gif gif
Cliffs Colony Desert Earth
gif gif gif gif
Exodus Factory Forest Gradient
gif gif gif gif
Home Island Lake Lakeside
gif gif gif gif
Market Mojave Moon Mountains
gif gif gif gif
Room Sahara Street Tokyo
gif gif gif gif

Common Issues

1. Wallpaper not changing : If your wallpaper is not changing, then open an issue and show me the output of echo $DESKTOP_SESSION.

2. Not working on XFCE : If this script is not working on xfce, then open the terminal and run xfconf-query -c xfce4-desktop -m and change the wallpaper (any) via xfce4-settings-manager.
In the terminal, xfconf-query will print lines starting with set:, which show which properties have been changed, check screen & monitor values and modify the script accordingly.

109   ## For XFCE
110   if [[ "$OSTYPE" == "linux"* ]]; then
111      SCREEN="0"
112      MONITOR="1"
113   fi

Quick FYI

  • In KDE, dwall changes the wallpaper in all the Activities.
  • While using with pywal, the color of other applications (Terminal, polybar, rofi, etc) will change the way you configured these application. It's on you.
  • You can add dwall -s style & to your WM's autostart file to set/restore wallpaper after login/reboot.
  • You can also create a @reboot crontab to set appropriate wallpaper on boot.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].