diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index a4481c8..0fbbdb2 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -43,12 +43,12 @@ export XINITRC="$XDG_CONFIG_HOME/xorg/xinitrc" export XAUTHORITY="$XDG_DATA_HOME/xorg/Xauthority" # Colors -# Example: *.color0: #282a2e -> export COLOR0=#282a2e -$(awk '/^*.color/ {print "export " toupper(substr($1, 3, length($1) - 3)) "=" $2}' \ - "$XDG_CONFIG_HOME/xorg/Xresources") +# Example: *.color0: #282a2e -> export COLOR0=#282a2e # Example: Wmcolor.bgcolor: #404552 -> export BGCOLOR=#404552 -$(awk '/Wmcolor./ {print "export " toupper(substr($1, 9, length($1) - 9)) "=" $2}' \ - "$XDG_CONFIG_HOME/xorg/Xresources") +$(awk ' + /^\*.[a-zA-Z0-9]+: +#/ {print "export " toupper(substr($1, 3, length($1) - 3)) "=" $2} + /^Wmcolor./ {print "export " toupper(substr($1, 9, length($1) - 9)) "=" $2} +' "$XDG_CONFIG_HOME/xorg/Xresources") ## Login