]> git.rmz.io Git - dotfiles.git/blobdiff - dwb/userstyles/update
dwb: update styles
[dotfiles.git] / dwb / userstyles / update
diff --git a/dwb/userstyles/update b/dwb/userstyles/update
new file mode 100755 (executable)
index 0000000..79b1abc
--- /dev/null
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+declare -A sites
+
+sites[github.com.css]="https://github.com/StylishThemes/GitHub-Dark/raw/master/github-dark.css"
+sites[wikipedia.org.css]="https://github.com/StylishThemes/Wikipedia-Dark/raw/master/wikipedia-dark.css"
+sites[stackoverflow.org.css]="https://github.com/StylishThemes/StackOverflow-Dark/raw/master/stackoverflow-dark.css"
+
+for file in "${!sites[@]}"; do
+    wget "${sites[$file]}" -O "$DIR/$file"
+    sed '/@-moz-document/d;/^}/d' -i "$DIR/$file"
+done