aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i3/.config/i3/config73
-rwxr-xr-xi3/scripts/i3/wallpaper.sh5
-rwxr-xr-xpolybar/scripts/polybar/cal.sh6
-rwxr-xr-xpolybar/scripts/polybar/date.sh23
-rw-r--r--polybar/scripts/polybar/theme.sh41
-rw-r--r--theme/.config/xressource_colors26
-rw-r--r--theme/scripts/colors.py64
7 files changed, 207 insertions, 31 deletions
diff --git a/i3/.config/i3/config b/i3/.config/i3/config
index cbed167..9611aa0 100644
--- a/i3/.config/i3/config
+++ b/i3/.config/i3/config
@@ -35,10 +35,24 @@ set_from_resource $color8 i3wm.COLOR8 #0a0a0a
set_from_resource $color7 i3wm.COLOR7 #e6e6e6
set_from_resource $color15 i3wm.COLOR15 #eeeeee
-set $Inkscape 99:Inkscape
-set $Mail 100:Mail
-set $Web 101:Web
-set $Musique 102:Musique
+# The workspaces are just the number, without label.
+# Icon will be associated with polybar
+set $workspace_1 1:
+set $workspace_2 2:
+set $workspace_3 3:
+set $workspace_4 4:
+set $workspace_5 5:
+set $workspace_6 6:
+set $workspace_7 7:
+set $workspace_8 8:
+set $workspace_9 9:
+set $workspace_10 10:
+set $workspace_11 11:
+set $workspace_12 12:
+set $Inkscape 99:
+set $Mail 100:
+set $Web 101:
+set $Musique 102:
set_from_resource $black i3wm.COLOR0 #444444
@@ -152,37 +166,38 @@ bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
+
# switch to workspace
-bindsym $modAltkey+F1 workspace 1
-bindsym $modAltkey+F2 workspace 2
-bindsym $modAltkey+F3 workspace 3
-bindsym $modAltkey+F4 workspace 4
-bindsym $modAltkey+F5 workspace 5
-bindsym $modAltkey+F6 workspace 6
-bindsym $modAltkey+F7 workspace 7
-bindsym $modAltkey+F8 workspace 8
-bindsym $modAltkey+F9 workspace 9
-bindsym $modAltkey+F10 workspace 10
-bindsym $modAltkey+F11 workspace 11
-bindsym $modAltkey+F12 workspace 12
+bindsym $modAltkey+F1 workspace $workspace_1
+bindsym $modAltkey+F2 workspace $workspace_2
+bindsym $modAltkey+F3 workspace $workspace_3
+bindsym $modAltkey+F4 workspace $workspace_4
+bindsym $modAltkey+F5 workspace $workspace_5
+bindsym $modAltkey+F6 workspace $workspace_6
+bindsym $modAltkey+F7 workspace $workspace_7
+bindsym $modAltkey+F8 workspace $workspace_8
+bindsym $modAltkey+F9 workspace $workspace_9
+bindsym $modAltkey+F10 workspace $workspace_10
+bindsym $modAltkey+F11 workspace $workspace_11
+bindsym $modAltkey+F12 workspace $workspace_12
bindsym XF86Mail exec --no-startup-id "~/scripts/i3/launch.sh $Mail thunderbird"
bindsym XF86Calculator exec --no-startup-id "~/scripts/i3/launch.sh $Musique gmpc"
bindsym XF86HomePage exec --no-startup-id "~/scripts/i3/launch.sh $Web firefox"
# move focused container to workspace
-bindsym $modAltkey+Shift+F1 move container to workspace 1
-bindsym $modAltkey+Shift+F2 move container to workspace 2
-bindsym $modAltkey+Shift+F3 move container to workspace 3
-bindsym $modAltkey+Shift+F4 move container to workspace 4
-bindsym $modAltkey+Shift+F5 move container to workspace 5
-bindsym $modAltkey+Shift+F6 move container to workspace 6
-bindsym $modAltkey+Shift+F7 move container to workspace 7
-bindsym $modAltkey+Shift+F8 move container to workspace 8
-bindsym $modAltkey+Shift+F9 move container to workspace 9
-bindsym $modAltkey+Shift+F10 move container to workspace 10
-bindsym $modAltkey+Shift+F11 move container to workspace 11
-bindsym $modAltkey+Shift+F12 move container to workspace 12
+bindsym $modAltkey+Shift+F1 move container to workspace $workspace_1
+bindsym $modAltkey+Shift+F2 move container to workspace $workspace_2
+bindsym $modAltkey+Shift+F3 move container to workspace $workspace_3
+bindsym $modAltkey+Shift+F4 move container to workspace $workspace_4
+bindsym $modAltkey+Shift+F5 move container to workspace $workspace_5
+bindsym $modAltkey+Shift+F6 move container to workspace $workspace_6
+bindsym $modAltkey+Shift+F7 move container to workspace $workspace_7
+bindsym $modAltkey+Shift+F8 move container to workspace $workspace_8
+bindsym $modAltkey+Shift+F9 move container to workspace $workspace_9
+bindsym $modAltkey+Shift+F10 move container to workspace $workspace_10
+bindsym $modAltkey+Shift+F11 move container to workspace $workspace_11
+bindsym $modAltkey+Shift+F12 move container to workspace $workspace_12
bindsym $mod+Shift+XF86HomePage move container to workspace $Web
bindsym $mod+Shift+XF86Mail move container to workspace $Mail
@@ -238,7 +253,7 @@ for_window [class="crimson"] floating enable
#exec_always --no-startup-id /home/sebastien/scripts/i3/wallpaper_root.py
# Add background, with a gradient on top
-exec_always --no-startup-id ~/scripts/i3/wallpaper.sh
+exec_always --no-startup-id ~/scripts/i3/wallpaper.sh ~/wallpaper/current.jpg
exec_always --no-startup-id xrdb .Xdefaults
exec_always --no-startup-id compton -i .8 --focus-exclude '_NET_WM_NAME@:s = "rofi"' --blur-background --blur-kern '3,3,0.1,1,1,1,1,1,1,1'
exec --no-startup-id "xrdb .Xdefaults; polybar i3"
diff --git a/i3/scripts/i3/wallpaper.sh b/i3/scripts/i3/wallpaper.sh
index cb76cef..5bc0d2b 100755
--- a/i3/scripts/i3/wallpaper.sh
+++ b/i3/scripts/i3/wallpaper.sh
@@ -1,10 +1,11 @@
#!/bin/sh
#image=$(find ~/wallpaper/wallpaper/wallpapers -type f \( -name '*.jpg' -o -name '*.png' \) -print0 | shuf -n1 -z | xargs -0)
-image=~/wallpaper/current.jpg
+image=$1
+#.virtualenvs/pywal/bin/wal -n -i "${image}" --saturate .8 -a 90
hsetroot \
-fill "${image}" \
-add "#ffffffff" \
-addd "#ffffff00" 5 \
-addd "#ffffff00" 5 \
- -add "#ffffffff" \
+ -add "#000000ff" \
-gradient 0
diff --git a/polybar/scripts/polybar/cal.sh b/polybar/scripts/polybar/cal.sh
new file mode 100755
index 0000000..96374f0
--- /dev/null
+++ b/polybar/scripts/polybar/cal.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+cal=$(ncal -3 \
+ | sed 's|_\(.\)|<span background="white" foreground="black">\1</span>|' \
+ | sed 's|_\(.\)|<span background="white" foreground="black">\1</span>|' \
+ | sed 's|\s*$||')
+rofi -markup -width -55 -lines 8 -location 3 -e "$cal"
diff --git a/polybar/scripts/polybar/date.sh b/polybar/scripts/polybar/date.sh
new file mode 100755
index 0000000..698b15f
--- /dev/null
+++ b/polybar/scripts/polybar/date.sh
@@ -0,0 +1,23 @@
+t=0
+
+draw() {
+ if [ $t -eq 0 ]; then
+ date +%H:%M
+ else
+ date +"%d %b %H:%M"
+ fi
+}
+
+toggle() {
+ t=$(((t + 1) % 2));
+ draw
+}
+
+
+trap "toggle" USR1
+
+while true; do
+ draw
+ sleep 60 &
+ wait
+done
diff --git a/polybar/scripts/polybar/theme.sh b/polybar/scripts/polybar/theme.sh
new file mode 100644
index 0000000..8822dc2
--- /dev/null
+++ b/polybar/scripts/polybar/theme.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+. "${HOME}/.cache/wal/colors.sh"
+polybar_conf=~/.config/polybar/colors.ini
+echo "color0=$color0" > "${polybar_conf}"
+echo "color1=$color1" >> "${polybar_conf}"
+echo "color2=$color2" >> "${polybar_conf}"
+echo "color3=$color3" >> "${polybar_conf}"
+echo "color4=$color4" >> "${polybar_conf}"
+echo "color5=$color5" >> "${polybar_conf}"
+echo "color6=$color6" >> "${polybar_conf}"
+echo "color7=$color7" >> "${polybar_conf}"
+echo "color8=$color8" >> "${polybar_conf}"
+echo "color9=$color9" >> "${polybar_conf}"
+echo "color10=$color10" >> "${polybar_conf}"
+echo "color11=$color11" >> "${polybar_conf}"
+echo "color12=$color12" >> "${polybar_conf}"
+echo "color13=$color13" >> "${polybar_conf}"
+echo "color14=$color14" >> "${polybar_conf}"
+echo "color15=$color15" >> "${polybar_conf}"
+
+
+xressource_conf=~/.config/xressource_colors
+echo "#define _color0 $color0" > "${xressource_conf}"
+echo "#define _color1 $color1" >> "${xressource_conf}"
+echo "#define _color2 $color2" >> "${xressource_conf}"
+echo "#define _color3 $color3" >> "${xressource_conf}"
+echo "#define _color4 $color4" >> "${xressource_conf}"
+echo "#define _color5 $color5" >> "${xressource_conf}"
+echo "#define _color6 $color6" >> "${xressource_conf}"
+echo "#define _color7 $color7" >> "${xressource_conf}"
+echo "#define _color8 $color8" >> "${xressource_conf}"
+echo "#define _color9 $color9" >> "${xressource_conf}"
+echo "#define _color10 $color10" >> "${xressource_conf}"
+echo "#define _color11 $color11" >> "${xressource_conf}"
+echo "#define _color12 $color12" >> "${xressource_conf}"
+echo "#define _color13 $color13" >> "${xressource_conf}"
+echo "#define _color14 $color14" >> "${xressource_conf}"
+echo "#define _color15 $color15" >> "${xressource_conf}"
+
+
diff --git a/theme/.config/xressource_colors b/theme/.config/xressource_colors
new file mode 100644
index 0000000..d836d23
--- /dev/null
+++ b/theme/.config/xressource_colors
@@ -0,0 +1,26 @@
+!This theme has been generated with the command
+!colors.py 90 40 60 90 70 30
+#define _color1 #b347b3
+#define _color9 #e68ae6
+XTerm*color1 : #b347b3
+XTerm*color9 : #e68ae6
+#define _color3 #b34747
+#define _color11 #e68a8a
+XTerm*color3 : #b34747
+XTerm*color11 : #e68a8a
+#define _color2 #b31147
+#define _color10 #e65c8a
+XTerm*color2 : #b31147
+XTerm*color10 : #e65c8a
+#define _color6 #7db347
+#define _color14 #b8e68a
+XTerm*color6 : #7db347
+XTerm*color14 : #b8e68a
+#define _color4 #b37d47
+#define _color12 #e6b88a
+XTerm*color4 : #b37d47
+XTerm*color12 : #e6b88a
+#define _color5 #b3b347
+#define _color13 #e6e68a
+XTerm*color5 : #b3b347
+XTerm*color13 : #e6e68a
diff --git a/theme/scripts/colors.py b/theme/scripts/colors.py
new file mode 100644
index 0000000..e78dd3a
--- /dev/null
+++ b/theme/scripts/colors.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+import colorsys
+
+def define(saturation, value):
+
+ def showColor(hue):
+ return colorsys.hsv_to_rgb(hue, saturation, value)
+
+ return showColor
+
+def showColor(theme, hue):
+
+ r, g, b = theme(hue / 360.)
+ return "#%02x%02x%02x" % (int(r*256), int(g*256), int(b*256))
+
+if __name__ == "__main__":
+
+ if len(sys.argv) < 5:
+ print "Usage :"
+ print "color.py SHIFT LIGHT_SATURATION DARK_SATURATION LIGHT_VALUE DARK_VALUE ANGLE"
+ sys.exit(1)
+
+ shift = int(sys.argv[1])
+ light_s = int(sys.argv[2])/100.
+ dark_s = int(sys.argv[3])/100.
+ light_v = int(sys.argv[4])/100.
+ dark_v = int(sys.argv[5])/100.
+ angle = 60
+ angle = int(sys.argv[6])
+
+ colors = [
+
+ 1, # red
+ 3, # yellow
+ 2, # green
+ 6, # cyan
+ 4, # blue
+ 5, # magenta
+
+ ]
+
+ print "!This theme has been generated with the command"
+ print "!colors.py %s %s %s %s %s %s" % (sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6])
+ dark_theme = define(dark_s, dark_v)
+ light_theme = define(light_s, light_v)
+ for name in colors:
+
+ value = name * angle
+
+ dark = showColor(dark_theme, value - shift)
+ light = showColor(light_theme, value - shift)
+
+ print "#define _color%s %s" % (name, dark)
+ print "#define _color%s %s" % (name+8, light)
+ #print "urxvt.color%d : %s" % (name, dark)
+ #print "urxvt.color%d : %s" % (name+8, light)
+
+ print "XTerm*color%d : %s" % (name, dark)
+ print "XTerm*color%d : %s" % (name+8, light)
+
+