From d0ecb2a9d770b1987e3be7cdc549d46880b89c5e Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Sun, 22 Feb 2015 17:15:39 +0100 Subject: Moved from stow to dotfiles for dotfile management --- config/herbstluftwm/theme.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 config/herbstluftwm/theme.sh (limited to 'config/herbstluftwm/theme.sh') diff --git a/config/herbstluftwm/theme.sh b/config/herbstluftwm/theme.sh new file mode 100644 index 0000000..c40f94a --- /dev/null +++ b/config/herbstluftwm/theme.sh @@ -0,0 +1,33 @@ +# Get color from ~/.Xresources +get_x_color() { + xresources=$(cat ~/.Xresources) + color=$(echo $xresources | sed "s/.*\*color$1: \(#[0-9A-Fa-f]*\).*/\1/") + echo $color +} + +# Add alpha channel to a hexadecimal color +add_alpha_channel(){ + echo "$1" | \ + sed "s/.*#\([0-9a-fA-F]*\).*/#ff\1/" +} + +# Wallpaper +wallpaper="/home/tom/Pictures/Wallpapers/snake.jpg" + +# Padding +window_p=20 + +# Panel +panel_h=24 +font="-*-fixed-medium-*-*-*-14-*-*-*-*-*-*-*" +font_sec="-*-stlarch-medium-*-*-*-10-*-*-*-*-*-*-*" + +# Colors +color_fg=$(get_x_color 15) +color_accent=$(get_x_color 10) +color_bg=$(get_x_color 0) + +# Alpha Colors for use with bar +acolor_fg=$(add_alpha_channel $color_fg) +acolor_accent=$(add_alpha_channel $color_accent) +acolor_bg=$(add_alpha_channel $color_bg) -- cgit v1.2.3