xonecas.io
422
Ib

i3wm-background-desktop-script / files

i3wm-background-desktop-script / update_background_task.sh

596 bytes
1#!/bin/bash
2
3notify-send "Fetching the new background image..."
4
5# Absolute path to this script, e.g. /home/user/bin/foo.sh
6SCRIPT=$(readlink -f "$0")
7# Absolute path this script is in, thus /home/user/bin
8SCRIPTPATH=$(dirname "$SCRIPT")
9
10source $SCRIPTPATH/venv/bin/activate
11python $SCRIPTPATH/nasa_feed_parser.py
12
13convert /home/xonecas/.backgrounds/background.jpeg -gravity center -crop 2560x1440+0+0 /home/xonecas/.backgrounds/background.jpeg
14convert /home/xonecas/.backgrounds/background.jpeg /home/xonecas/.backgrounds/background.png
15feh --bg-scale /home/xonecas/.backgrounds/background.jpeg