diff options
Diffstat (limited to 'i3/scripts')
-rwxr-xr-x | i3/scripts/i3/wallpaper.sh | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/i3/scripts/i3/wallpaper.sh b/i3/scripts/i3/wallpaper.sh index adff385..9bf88d4 100755 --- a/i3/scripts/i3/wallpaper.sh +++ b/i3/scripts/i3/wallpaper.sh @@ -18,7 +18,7 @@ image=$1 # -addd "#ffffff00" 90 \ # -gradient 0 -if [ -z ${VNCDESKTOP} ]; then +if [ -z "${VNCDESKTOP}" ]; then hsetroot \ -fill "${image}" \ -add "#ffffff77" \ @@ -27,5 +27,19 @@ if [ -z ${VNCDESKTOP} ]; then -addd "#ffffff00" 90 \ -gradient 0 else - xsetroot -solid grey -end + #dominant=$(hexdump -n 3 -e '"%06X" 1 "\n"' /dev/urandom) + + # Traverse the chromatic circle in 5 hours + cutoff=18000 + + dominant=$(python3 -c "import colorsys ; import datetime ; now = datetime.datetime.now() ; min = datetime.datetime.min ; sec = (now - min).seconds % $cutoff ; print(''.join('%02x' % int(i*255) for i in colorsys.hsv_to_rgb(sec/$cutoff, 0.35, 1)))") + hsetroot \ + -solid "#${dominant}" \ + -add "#d8dee9ff" \ + -addd "#d8dee9ff" 5 \ + -addd "#ffffff77" 40 \ + -addd "#ffffff77" 90 \ + -addd "#F0F0F0FF" 40 \ + -addd "#F0F0F0" 5 \ + -gradient 0 +fi |