initial commit

This commit is contained in:
Murteza Yesil 2022-12-18 22:09:28 -07:00
commit 51892217d8
99 changed files with 91 additions and 0 deletions

BIN
00h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
00h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
00h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
00h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
01h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
01h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
01h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
01h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
02h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
02h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
02h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
02h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
03h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
03h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
03h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
03h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
04h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
04h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
04h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
04h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
05h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
05h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
05h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
05h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
06h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
06h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
06h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
06h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
07h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
07h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
07h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
07h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
08h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
08h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
08h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
08h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
09h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
09h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
09h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
09h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
10h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
10h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
10h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
10h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
11h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
11h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
11h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
11h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
12h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
12h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
12h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
12h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
13h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
13h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
13h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
13h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
14h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
14h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
14h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
14h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
15h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
15h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
15h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
15h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
16h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
16h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
16h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
16h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
17h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
17h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
17h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
17h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
18h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
18h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
18h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
18h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
19h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
19h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
19h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
19h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
20h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
20h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
20h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
20h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
21h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
21h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
21h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
21h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
22h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
22h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
22h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
22h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
23h00m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
23h15m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
23h30m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
23h45m.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

7
LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright © 2022 Ali Murteza Yesil
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

26
README.md Normal file
View File

@ -0,0 +1,26 @@
# XKCD-clock
---
XKCD comics shared a [world map as clock](https://xkcd.com/now) that would show roughly what time it is everywhere in the world. Then that inspired J15R to make the [xkclock](https://j15r.com/projects/xkclock/). I always wanted to have a dynamic wallpaper that wouldn't be heavy on the processor. I found J15R's xkclock and decided to turn it XKCD's world clock into wallpaper.
## Licensing
Original artwork belongs to XKCD comics and is licensed under [CC BY-NC 2.5](https://creativecommons.org/licenses/by-nc/2.5/ "Creative Commons Attribution-NonCommercial 2.5 Generic") License.
Included artwork is upscaled using [Upscaler](https://gitlab.com/TheEvilSkeleton/Upscaler "GUI frontend for Real-ESRGAN ncnn Vulkan project") and preserve the license from its original source.
Code (bg-setter.sh) is licensed under MIT License.
## Implemented Desktop Environments and Window Managers
1. GNOME (This is what I use)
## Instructions
0. Download and extract the repo (I recommend ~/Pictures/Wallpapers/xkcd-clock)
1. Open bg_setter.sh and uncomment the command(s) for the DE you are using
2. Open the crontab file for your user (probably using `EDITOR=nano crontab -e` command) and add the cronjob for your desktop environment
3. Replace "$PATH_TO_XKCD-CLOCK/bg-setter.sh" part with the PATH to bg-setter.sh script that is in wherever you pulled the repo.
### GNOME
```
* * * * * DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/`pgrep -u $USER gnome-session-c`/environ|cut -d= -f2-) $PATH_TO_XKCD-CLOCK/bg-setter.sh
```

58
bg_setter.sh Executable file
View File

@ -0,0 +1,58 @@
#!/bin/bash
#
# This script is licensed under MIT License
# You are encouraged to learn from it by tinkering.
#
# Artwork used for this project was originally taken from https://xkcd.com/now
# and is licensed under CC BY-NC 2.5 and I decided to preserve that license
# for their upscaled versions.
#
# Upscaling original artwork was done using Upscaler by Hari Rana. Upscaler is a
# frontend for "Real-ESRGAN ncnn Vulkan" project which is a neural engine for
# restoring old images to higher quality using Vulkan.
# Hari Rana: https://theevilskeleton.gitlab.io/
# Upscaler: https://gitlab.com/TheEvilSkeleton/Upscaler
# Real-ESRGAN ncnn Vulkan: https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan
### How to use this
#
## Set this script to run minutely as unprivileged user (not root)
# below path is an example and you may need to change it for it to work right
# This example assumes that you extracted the tarball or pulled the git repo to
# ~/Pictures/Wallpapers
# * * * * * $HOME/Pictures/Wallpapers/xkcd-clock/wallpaper_setter.sh
#
# You might have issues like stretched, squised or tiled image
# below commands may help solving those issues
# GNOME
# gsettings set org.gnome.desktop.background picture-options "scaled" 2> /dev/null
# locate where the images are
BG_REPO=$(dirname -- $(readlink -fn -- "$0"))
# Find out which image should be set as wallpaper
TimeZone='Pacific/Fiji' # I don't care where you are. Don't change this.
HOUR=$(TZ=$TimeZone date +%H) #; echo $HOUR
MINUTE=$(TZ=$TimeZone date +%M) #; echo $MINUTE
Remainder=$(( $MINUTE % 15 )) #; echo $Remainder
MINUTE=$(( $MINUTE - $Remainder )) #; echo $MINUTE
# If Minute is single digit at this point, add a zero before it to match file
# naming scheme
if [ $MINUTE -le 9 ];
then
MINUTE=`echo 0$MINUTE`
fi
# Finally generate new background's complete path
BG_PATH="$BG_REPO/$(echo $HOUR)h$(echo $MINUTE)m.png" #; echo $BG_PATH
# Set the new background
# GNOME
# There are 2 commands because GNOME can set different wallpapers for light
# and dark themes.
gsettings set org.gnome.desktop.background picture-uri "$BG_PATH" 2> /dev/null
gsettings set org.gnome.desktop.background picture-uri-dark "$BG_PATH" 2> /dev/null
#