Skip to content

Instantly share code, notes, and snippets.

@trojkat
Created October 22, 2018 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trojkat/50bb463a6c9a830fda7b2af23133ec20 to your computer and use it in GitHub Desktop.
Save trojkat/50bb463a6c9a830fda7b2af23133ec20 to your computer and use it in GitHub Desktop.
#!/bin/sh
# split the wallpaper for two monitors
sudo convert -crop 1200x1920 $1 /etc/lightdm/background-%d.jpg
feh --bg-scale /etc/lightdm/background-0.jpg --bg-scale /etc/lightdm/background-1.jpg
# convert wallpaper to PNG, because i3lock doesn't handle the JPG.
sudo convert $1 /etc/lightdm/background.png
# create the color scheme from wallpaper
wal -nqti $1
# restart polybar to applay the new color scheme
pkill polybar
SHELL=$(which sh) polybar -r -q left &
SHELL=$(which sh) polybar -r -q right &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment