From d98a551f084146d011c2374f018289ad633cd497 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Thu, 1 Nov 2018 18:03:38 +0800 Subject: [PATCH 1/6] Fix URxvt borders not respecting background opacity --- pywal/sequences.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywal/sequences.py b/pywal/sequences.py index 8d92252..18aa6eb 100644 --- a/pywal/sequences.py +++ b/pywal/sequences.py @@ -54,7 +54,7 @@ def create_sequences(colors): set_special(13, colors["special"]["foreground"], "l"), set_special(17, colors["special"]["foreground"], "l"), set_special(19, colors["special"]["background"], "l"), - set_special(708, colors["special"]["background"], "l"), + set_special(708, colors["special"]["background"], "l", alpha), set_color(232, colors["special"]["background"]), set_color(256, colors["special"]["foreground"]) ]) From 37e96eca3b6aeccb0052e30cf6ec80eac0510df1 Mon Sep 17 00:00:00 2001 From: sraysmith Date: Thu, 20 Dec 2018 15:55:11 -0500 Subject: [PATCH 2/6] I added the xmonad export_type. --- pywal/export.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pywal/export.py b/pywal/export.py index 357656e..7873557 100644 --- a/pywal/export.py +++ b/pywal/export.py @@ -47,6 +47,7 @@ def get_export_type(export_type): "tty": "colors-tty.sh", "xresources": "colors.Xresources", "yaml": "colors.yml", + "xmonad": "colors.hs", }.get(export_type, export_type) From fd6820db832ab7b859536b9871dd0d9b00a50627 Mon Sep 17 00:00:00 2001 From: sraysmith Date: Thu, 20 Dec 2018 15:57:09 -0500 Subject: [PATCH 3/6] I added the haskell template for xmonad users. --- pywal/templates/colors.hs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pywal/templates/colors.hs diff --git a/pywal/templates/colors.hs b/pywal/templates/colors.hs new file mode 100644 index 0000000..6ffa1a6 --- /dev/null +++ b/pywal/templates/colors.hs @@ -0,0 +1,37 @@ +--Place this file in your .xmonad/lib directory and import module Colors into .xmonad/xmonad.hs config +--The easy way is to create a soft link from this file to the file in .xmonad/lib using ln -s +--Then recompile and restart xmonad. + +module Colors + ( wallpaper + , background, foreground, cursor + , color0, color1, color2, color3, color4, color5, color6, color7 + , color8, color9, color10, color11, color12, color13, color14, color15 + ) where + +-- Shell variables +-- Generated by 'wal' +wallpaper="{wallpaper}" + +-- Special +background="{background}" +foreground="{foreground}" +cursor="{cursor}" + +-- Colors +color0="{color0}" +color1="{color1}" +color2="{color2}" +color3="{color3}" +color4="{color4}" +color5="{color5}" +color6="{color6}" +color7="{color7}" +color8="{color8}" +color9="{color9}" +color10="{color10}" +color11="{color11}" +color12="{color12}" +color13="{color13}" +color14="{color14}" +color15="{color15}" From 041fe0643f9a31079cdf641a7f8227e97dba9696 Mon Sep 17 00:00:00 2001 From: Younes Khoudli Date: Sun, 30 Dec 2018 03:40:11 +0100 Subject: [PATCH 4/6] template: add dmenu template --- pywal/export.py | 1 + pywal/templates/colors-wal-dmenu.h | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 pywal/templates/colors-wal-dmenu.h diff --git a/pywal/export.py b/pywal/export.py index 357656e..833912d 100644 --- a/pywal/export.py +++ b/pywal/export.py @@ -31,6 +31,7 @@ def get_export_type(export_type): """Convert template type to the right filename.""" return { "css": "colors.css", + "dmenu": "colors-wal-dmenu.h", "dwm": "colors-wal-dwm.h", "st": "colors-wal-st.h", "tabbed": "colors-wal-tabbed.h", diff --git a/pywal/templates/colors-wal-dmenu.h b/pywal/templates/colors-wal-dmenu.h new file mode 100644 index 0000000..aeab7a5 --- /dev/null +++ b/pywal/templates/colors-wal-dmenu.h @@ -0,0 +1,6 @@ +static const char *colors[SchemeLast][2] = {{ + /* fg bg */ + [SchemeNorm] = {{ "{color15}", "{color0}" }}, + [SchemeSel] = {{ "{color15}", "{color1}" }}, + [SchemeOut] = {{ "{color15}", "{color14}" }}, +}}; From 30af3d0d5c9b8c5e712b571ec605102895f2e06b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 4 Jan 2019 21:40:16 +0200 Subject: [PATCH 5/6] settings: Added ENVAR PYWAL_CACHE_DIR to change cache dir. Closes #343 --- pywal/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywal/settings.py b/pywal/settings.py index 18c6dd6..2a862bf 100644 --- a/pywal/settings.py +++ b/pywal/settings.py @@ -18,7 +18,7 @@ __cache_version__ = "1.1.0" HOME = os.getenv("HOME", os.getenv("USERPROFILE")) -CACHE_DIR = os.path.join(HOME, ".cache", "wal") +CACHE_DIR = os.getenv("PYWAL_CACHE_DIR", os.path.join(HOME, ".cache", "wal")) MODULE_DIR = os.path.dirname(__file__) CONF_DIR = os.path.join(HOME, ".config", "wal") OS = platform.uname()[0] From 1e416a18a853159f3473d80c831322630d006bb1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 4 Jan 2019 21:56:49 +0200 Subject: [PATCH 6/6] export: Added rgba support. Closes #352 --- pywal/util.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pywal/util.py b/pywal/util.py index 0557cc4..de8eb09 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -29,6 +29,12 @@ class Color: """Convert a hex color to xrdb rgba.""" return hex_to_xrgba(self.hex_color) + @property + def rgba(self): + """Convert a hex color to rgba.""" + return "rgba(%s,%s,%s,%s)" % (*hex_to_rgb(self.hex_color), + int(self.alpha_num)/100) + @property def alpha(self): """Add URxvt alpha value to color."""