From 9676f43ffad81ac477ae3989e6b2b1e129f85d98 Mon Sep 17 00:00:00 2001 From: katherine Date: Tue, 7 Mar 2017 13:41:52 -0700 Subject: preliminary support for light backgrounds haven't managed to make one that felt ok yet, but still nice to have the option --- .config/herbstluftwm/autostart | 6 +++--- .config/herbstluftwm/calc.sh | 15 +++++++-------- .config/herbstluftwm/panel.sh | 4 ++-- .config/herbstluftwm/switcher.sh | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) (limited to '.config/herbstluftwm') diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart index a2ad57d..458a2b3 100755 --- a/.config/herbstluftwm/autostart +++ b/.config/herbstluftwm/autostart @@ -163,7 +163,7 @@ hc keybind Mod4-Shift-w spawn urxvt -name "weechat" -e weechat # dmenu hc keybind Mod4-0 spawn dmenu_run -fn "${bfont}:size=${bfont_size}" \ -p "Run:" -h "$bheight" \ - -nb "$bg_normal" -nf "$fg_normal" \ + -nb "$bar_bg" -nf "$bar_fg" \ -sb "$bg_focus" -sf "$fg_focus" hc keybind Mod4-9 spawn ~/.config/herbstluftwm/switcher.sh hc keybind Mod4-8 spawn ~/.config/herbstluftwm/calc.sh @@ -211,8 +211,8 @@ done # run dunst with theme colours pkill dunst -dunst -lb $bg_normal -nb $bg_normal -cb $bg_focus \ - -lf $fg_normal -nf $fg_normal -cf $fg_focus \ +dunst -lb $bar_bg -nb $bar_bg -cb $bg_focus \ + -lf $bar_fg -nf $bar_fg -cf $fg_focus \ -frame_color $bg_focus -geom "0x3-4+$(($bheight + 4))" \ -fn "$mfont $mfont_size,$jfont $jfont_size,$cfont $cfont_size,$efont $efont_size,$bkfont $bkfont_size" \ -max_icon_size 0 diff --git a/.config/herbstluftwm/calc.sh b/.config/herbstluftwm/calc.sh index e10cfa6..7a1b9b9 100755 --- a/.config/herbstluftwm/calc.sh +++ b/.config/herbstluftwm/calc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/zsh source ~/.config/init/vars @@ -26,10 +26,10 @@ command_check() { esac } -while [ "$in" != "" ]; do +while [[ "$in" != "" ]]; do in=$(dmenu -noinput -fn "${bfont}:size=${bfont_size}" -q -h "$bheight" \ - -nb "$bg_normal" -nf "$fg_normal" \ - -sb "$bg_focus" -sf "$fg_focus" -p "$prompt" | \ + -nb "$bar_bg" -nf "$fg_normal" \ + -sb "$bar_fg" -sf "$fg_focus" -p "$prompt" | \ sed -e "s/ans/$acc/g") if [[ $(command_check "$in" "$acc") -eq 1 ]]; then break @@ -37,11 +37,11 @@ while [ "$in" != "" ]; do out=$(echo "pi=$pi; e=$e; $acc $in" | calc -p 2>&1) - if [ "${?#0}" != "" ]; then + if [[ "${?#0}" != "" ]]; then out=$(echo "$out" | tr -d "\n") - if [ "$out" = "Missing operator" ]; then + if [[ "$out" = "Missing operator" ]]; then out=$(echo "pi=$pi; e=$e; $in" | calc -p 2>&1) - if [ "${?#0}" != "" ]; then + if [[ "${?#0}" != "" ]]; then out=$(echo "$out" | tr -d "\n") prompt="calc: ($acc) err: $out" else @@ -57,4 +57,3 @@ while [ "$in" != "" ]; do prompt="calc: ($acc)" fi done - diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh index d5d5301..eb48a35 100755 --- a/.config/herbstluftwm/panel.sh +++ b/.config/herbstluftwm/panel.sh @@ -39,8 +39,8 @@ light_magenta=$(echo -n '#ff'; echo "$light_magenta" | tr -d '#') light_cyan=$(echo -n '#ff'; echo "$light_cyan" | tr -d '#') light_white=$(echo -n '#ff'; echo "$light_white" | tr -d '#') -bg_normal=$(echo -n $alpha; echo "$bg_normal" | tr -d '#') -fg_normal=$(echo -n '#ff'; echo "$fg_normal" | tr -d '#') +bg_normal=$(echo -n $alpha; echo "$bar_bg" | tr -d '#') +fg_normal=$(echo -n '#ff'; echo "$bar_fg" | tr -d '#') bg_focus=$(echo -n $alpha; echo "$bg_focus" | tr -d '#') fg_focus=$(echo -n '#ff'; echo "$fg_focus" | tr -d '#') bg_urgent=$(echo -n $alpha; echo "$bg_urgent" | tr -d '#') diff --git a/.config/herbstluftwm/switcher.sh b/.config/herbstluftwm/switcher.sh index 5430a80..e076eb3 100755 --- a/.config/herbstluftwm/switcher.sh +++ b/.config/herbstluftwm/switcher.sh @@ -15,7 +15,7 @@ while read -rA line; do done < <(wmctrl -l) echo -e "$lines" | nl -w 2 -s ") " | dmenu -fn "${bfont}:size=${bfont_size}" -i -h "$bheight" \ - -nb "$bg_normal" -nf "$fg_normal" -sb "$bg_focus" -sf "$fg_focus" \ + -nb "$bar_bg" -nf "$bar_fg" -sb "$bg_focus" -sf "$fg_focus" \ -p "Select:" -l 40 | cut -d ')' -f 1 | {read choice} herbstclient jumpto "${nums[$choice]}" -- cgit v1.2.3