diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bee8a64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__ diff --git a/defaults/main.yaml b/defaults/main.yaml index f84faab..ca62cf4 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -1,4 +1,5 @@ --- +home_base_color_hue: 219 home_xft_dpi: 96 home_copy_pulseaudio_cookie: false home_desktop: false diff --git a/filter_plugins/colors.py b/filter_plugins/colors.py new file mode 100644 index 0000000..09179cf --- /dev/null +++ b/filter_plugins/colors.py @@ -0,0 +1,12 @@ +#!/usr/bin/python + +import colorsys + +class FilterModule(object): + def filters(self): + return {'hsv2rgb': self.hsv2rgb} + + def hsv2rgb(self, hue, saturation, value): + rgb = colorsys.hsv_to_rgb(hue/360., saturation/100., value/100.) + rgb = tuple(map(lambda x: round(x*255), rgb)) + return '#%02x%02x%02x' % rgb diff --git a/templates/i3/i3.config.j2 b/templates/i3/i3.config.j2 index d24055f..88dfcaa 100644 --- a/templates/i3/i3.config.j2 +++ b/templates/i3/i3.config.j2 @@ -351,18 +351,7 @@ bar { separator #666666 # - {% if home_profile == "desktop" %} - # lila: Farbton 274 - focused_workspace #774C99 #552877 #ffffff - {% endif %} - {% if home_profile == "vdesk" %} - # grün: Farbton 110 - focused_workspace #4D994C #357728 #ffffff - {% endif %} - {% if home_profile == "presentation" %} - # gelb: Farbton 60 - focused_workspace #99994C #777728 #ffffff - {% endif %} + focused_workspace {{home_base_color_hue|hsv2rgb(50,60)}} {{home_base_color_hue|hsv2rgb(66,47)}} #ffffff active_workspace #333333 #696969 #ffffff inactive_workspace #333333 #222222 #888888 urgent_workspace #2f343a #900000 #ffffff @@ -375,18 +364,7 @@ bar { ### Design # class border backgr. text indicator child_border -{% if home_profile == "desktop" %} -# lila: Farbton 274 -client.focused #784C99 #552877 #ffffff #9E2EF4 #552877 -{% endif %} -{% if home_profile == "vdesk" %} -# grün: Farbton 110 -client.focused #59994C #357728 #ffffff #4FF42E #357728 -{% endif %} -{% if home_profile == "presentation" %} -# gelb: Farbton 60 -client.focused #99994C #777728 #ffffff #F4F42E #777728 -{% endif %} +client.focused {{home_base_color_hue|hsv2rgb(50,60)}} {{home_base_color_hue|hsv2rgb(66,47)}} #ffffff {{home_base_color_hue|hsv2rgb(81,91)}} {{home_base_color_hue|hsv2rgb(66,47)}} client.focused_inactive #333333 #6A6A6A #ffffff #505050 #6A6A6A client.unfocused #333333 #222222 #888888 #2E2E2E #222222 client.urgent #2f343a #900000 #ffffff #900000 #900000 diff --git a/templates/rofi/rofi.theme.j2 b/templates/rofi/rofi.theme.j2 index ddd00bb..72adbab 100644 --- a/templates/rofi/rofi.theme.j2 +++ b/templates/rofi/rofi.theme.j2 @@ -24,18 +24,8 @@ active-background: #6A6A6A; selected-urgent-background: #2f343a; - {% if home_profile == "desktop" %} - selected-normal-background: #552877; - selected-active-background: #784C99; - {% endif %} - {% if home_profile == "vdesk" %} - selected-normal-background: #357728; - selected-active-background: #59994C; - {% endif %} - {% if home_profile == "presentation" %} - selected-normal-background: #99994C; - selected-active-background: #777728; - {% endif %} + selected-normal-background: {{home_base_color_hue|hsv2rgb(66,47)}}; + selected-active-background: {{home_base_color_hue|hsv2rgb(50,60)}}; spacing: 2;