aboutsummaryrefslogtreecommitdiffstats
path: root/config/herbstluftwm/theme.sh
blob: c40f94a63e8038c8d14ce38b06e03796b5c6a511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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)