aboutsummaryrefslogtreecommitdiff
path: root/i3/scripts
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2023-12-19 21:25:42 +0100
committerSébastien Dailly <sebastien@dailly.me>2023-12-19 21:25:42 +0100
commit7ddeeb2ebb2f1da415f9a93482f2ec1225ee4290 (patch)
tree65c35fa33b499313f71a1c0c6e6428e8feb70494 /i3/scripts
parent7074d007fa16eeb62148f18746e3f2893741dd00 (diff)
Removed the i3 stuff
Diffstat (limited to 'i3/scripts')
-rwxr-xr-xi3/scripts/i3/gaps.sh4
-rw-r--r--i3/scripts/i3/negate_color.py25
-rwxr-xr-xi3/scripts/i3/wallpaper.sh45
3 files changed, 0 insertions, 74 deletions
diff --git a/i3/scripts/i3/gaps.sh b/i3/scripts/i3/gaps.sh
deleted file mode 100755
index d1f1a6f..0000000
--- a/i3/scripts/i3/gaps.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-i3-msg gaps inner all set 15
-i3-msg gaps outer all set 0
-
diff --git a/i3/scripts/i3/negate_color.py b/i3/scripts/i3/negate_color.py
deleted file mode 100644
index a7f985c..0000000
--- a/i3/scripts/i3/negate_color.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import sys
-
-def RGBToHTMLColor(rgb_tuple):
- """ convert an (R, G, B) tuple to #RRGGBB """
- hexcolor = '#%02x%02x%02x' % rgb_tuple
- # that's it! '%02x' means zero-padded, 2-digit hex values
- return hexcolor
-
-def HTMLColorToRGB(colorstring):
- """ convert #RRGGBB to an (R, G, B) tuple """
- colorstring = colorstring.strip()
- if colorstring[0] == '#': colorstring = colorstring[1:]
- if len(colorstring) != 6:
- raise ValueError, "input #%s is not in #RRGGBB format" % colorstring
- r, g, b = colorstring[:2], colorstring[2:4], colorstring[4:]
- r, g, b = [int(n, 16) for n in (r, g, b)]
- return (r, g, b)
-
-
-if __name__ == "__main__":
- r, g, b = HTMLColorToRGB(sys.argv[1])
- print RGBToHTMLColor((255 -r, 255-g, 255-b))
diff --git a/i3/scripts/i3/wallpaper.sh b/i3/scripts/i3/wallpaper.sh
deleted file mode 100755
index 9bf88d4..0000000
--- a/i3/scripts/i3/wallpaper.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-#image=$(find ~/wallpaper/wallpaper/wallpapers -type f \( -name '*.jpg' -o -name '*.png' \) -print0 | shuf -n1 -z | xargs -0)
-image=$1
-
-#height=$(identify -format '%[fx:h/1.11]' ${image})
-#convert -crop %100x10+0+${height} ${image} out.jpg
-#color=$(.virtualenvs/pywal/bin/colorz -n 1 --no-preview out.jpg | cut -d' ' -f1)
-#rm out.jpg
-#echo $color
-#neg=$(python ~/scripts/i3/negate_color.py "${color}")
-
-#.virtualenvs/pywal/bin/wal -n -i "${image}" --saturate .8 -a 90
-#hsetroot \
-# -fill "${image}" \
-# -add "#ffffffff" \
-# -addd "#77777700" 5 \
-# -addd "#ffffff00" 10 \
-# -addd "#ffffff00" 90 \
-# -gradient 0
-
-if [ -z "${VNCDESKTOP}" ]; then
- hsetroot \
- -fill "${image}" \
- -add "#ffffff77" \
- -addd "#ffffff77" 2 \
- -addd "#ffffff00" 0 \
- -addd "#ffffff00" 90 \
- -gradient 0
-else
- #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