Skip to content

akhiljalagam/go-swaywal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-swaywal

Simple Go command line tool that runs as cron job to change wallpaper on sway window manager by fetching images from Unsplash.

Whether you're coding, browsing, or just enjoying your desktop, go-swaywal adds that extra bit of joy to your day with beautiful, dynamic backgrounds.

screenshot

Supported wallpaper sources:

  • Unsplash
    Get your Unsplash API key from here.

Installation

  1. Download the latest release from the releases page.

  2. Run chmod +x on the binary and move it to /usr/local/bin.

    chmod +x ~/Downloads/swaywal-linux-amd64
    sudo mv ~/Downloads/swaywal-linux-amd64 /usr/local/bin/swaywal
  3. Add cron job to run the binary every 30 minutes or so. Update the environment variables with your values except SWAYSOCK, which is generated by the script. You may need to corrrect USER ID in the SWAYSOCK path.

    * */30 * * * bash -c "SWAYSOCK=/run/user/1000/sway-ipc.1000.$(pgrep -x sway).sock UNSPLASH_ACCESS_KEY=<your-access-key> SWAY_WIDTH=3840 SWAY_HEIGHT=2160 UNSPLASH_SEARCH=nature /usr/local/bin/swaywal"

Todo

  • Add support for Bing, Reddit wallpaper.