Browse Source

Simplify color export sed command

master
Riyyi 4 years ago
parent
commit
eb0aed00d7
  1. 14
      .config/zsh/.zprofile

14
.config/zsh/.zprofile

@ -89,11 +89,11 @@ touch "$XDG_DATA_HOME/xorg/Xauthority"
# Example: *.color0: #282a2e -> COLOR0=#282a2e # Example: *.color0: #282a2e -> COLOR0=#282a2e
# Example: WmColor.bgcolor: #404552 -> BGCOLOR=#404552 # Example: WmColor.bgcolor: #404552 -> BGCOLOR=#404552
# Example: WmWorkSpace.ws0: "10" -> WS0="10" # Example: WmWorkSpace.ws0: "10" -> WS0="10"
EXPORTS=$(sed -nE \ exports=$(sed -nE "
-e 's/^\*.(\w+): *#/\U\1=#/p' \ s/^\*.(\w+): *#/\U\1=#/p;
-e 's/^WmColor.(\w+): */\U\1=/p' \ s/^WmColor.(\w+): */\U\1=/p;
-e 's/^WmWorkSpace.(\w+): */\U\1=/p' \ s/^WmWorkSpace.(\w+): */\U\1=/p;
"$XDG_CONFIG_HOME/xorg/Xresources") " "$XDG_CONFIG_HOME/xorg/Xresources")
echo "$EXPORTS" | while read -r line; do echo "$exports" | while read -r export; do
export $line export $export
done done

Loading…
Cancel
Save