From 7b2dae6bbe96dcad354fe8cd88bdf736e84aa19c Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Tue, 25 Aug 2015 21:40:38 +0200 Subject: Added more geeky tag names --- herbstluftwm/.config/herbstluftwm/autostart | 18 +++++++++++---- herbstluftwm/.config/herbstluftwm/panel.sh | 5 +++-- herbstluftwm/.config/herbstluftwm/theme | 35 +++++++++++++++++++++++++++++ herbstluftwm/.config/herbstluftwm/theme.sh | 35 ----------------------------- 4 files changed, 52 insertions(+), 41 deletions(-) create mode 100644 herbstluftwm/.config/herbstluftwm/theme delete mode 100644 herbstluftwm/.config/herbstluftwm/theme.sh (limited to 'herbstluftwm/.config') diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index 416c38a..7a80b1c 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -2,13 +2,16 @@ # this is a simple config for herbstluftwm +# The current directory +dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +# Herbstclient shortcut hc() { herbstclient "$@" } #Include the theming script -dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -source "$dir/theme.sh" +source "$dir/theme" #Detect monitors hc set auto_detect_monitors 1 @@ -20,8 +23,15 @@ panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $color_bg -nf $color_fg -sb $color_accent -sf $color_bg" # Tags -tag_names=( I II III IV V VI VII VIII IX X ) -tag_keys=( {1..9} 0 ) +tag_names=() +tag_keys=({1..9} 0) +for key in ${tag_keys[@]}; do + if [ $key -eq 0 ]; then key=10; fi + key=$(echo "$key - 1" | bc) + echo $key + name=$(echo "obase=2;$key" | bc | awk '{ printf "%04d", $0 }') + tag_names+=($name) +done; # Source hlwm-config-files source "$dir/hlwm-keybindings" diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/panel.sh index 41952a6..b1ecebe 100755 --- a/herbstluftwm/.config/herbstluftwm/panel.sh +++ b/herbstluftwm/.config/herbstluftwm/panel.sh @@ -1,11 +1,12 @@ #!/bin/bash +dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ; } -dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -source "$dir/theme.sh" +source "$dir/theme" source "$dir/panel_indicators.sh" monitor=${1:-0} diff --git a/herbstluftwm/.config/herbstluftwm/theme b/herbstluftwm/.config/herbstluftwm/theme new file mode 100644 index 0000000..3192abb --- /dev/null +++ b/herbstluftwm/.config/herbstluftwm/theme @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# 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/.config/herbstluftwm/poligons.png" + +# 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 5) +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) diff --git a/herbstluftwm/.config/herbstluftwm/theme.sh b/herbstluftwm/.config/herbstluftwm/theme.sh deleted file mode 100644 index 3192abb..0000000 --- a/herbstluftwm/.config/herbstluftwm/theme.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -# 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/.config/herbstluftwm/poligons.png" - -# 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 5) -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