aboutsummaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rwxr-xr-x.config/herbstluftwm/autostart2
-rwxr-xr-x.config/herbstluftwm/calc.sh9
-rwxr-xr-x.config/herbstluftwm/switcher.sh4
3 files changed, 9 insertions, 6 deletions
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart
index 968338c..3fe4ba3 100755
--- a/.config/herbstluftwm/autostart
+++ b/.config/herbstluftwm/autostart
@@ -138,7 +138,7 @@ hc keybind Mod4-Right spawn banshee --next
hc keybind Mod4-Down spawn banshee --toggle-playing
# dmenu
-hc keybind Mod4-0 spawn dmenu_run -fn $dfont -p "Run:" -h 18 -nb $bg_normal -nf $fg_normal \
+hc keybind Mod4-0 spawn dmenu_run -fn $efont -p "Run:" -h 18 -nb $bg_normal -nf $fg_normal \
-sb $bg_focus -sf $fg_focus
hc keybind Mod4-9 spawn ~/.config/herbstluftwm/switcher.sh
hc keybind Mod4-8 spawn ~/.config/herbstluftwm/calc.sh
diff --git a/.config/herbstluftwm/calc.sh b/.config/herbstluftwm/calc.sh
index 88d31df..3a7faba 100755
--- a/.config/herbstluftwm/calc.sh
+++ b/.config/herbstluftwm/calc.sh
@@ -29,14 +29,12 @@ command_check() {
while [ "$in" != "" ]; do
in=$(echo "" | dmenu -fn $efont -q -h $bheight \
-nb $bg_normal -nf $fg_normal \
- -sb $bg_focus -sf $fg_focus -p "$prompt")
+ -sb $bg_focus -sf $fg_focus -p "$prompt" | \
+ sed -e "s/ans/$acc/g")
if [[ $(command_check "$in" "$acc") -eq 1 ]]; then
break
fi
- # replace "ans" with the previous value
- in=$(echo $in | sed -e "s/ans/$acc/g")
-
out=$(echo "pi=$pi; e=$e; $acc $in" | calc -p 2>&1)
if [ "${?#0}" != "" ]; then
@@ -54,6 +52,9 @@ while [ "$in" != "" ]; do
out=$(echo "$out" | tr -d "\n")
prompt="calc: ($acc) err: $out"
fi
+ else
+ acc=$out
+ prompt="calc: ($acc)"
fi
done
diff --git a/.config/herbstluftwm/switcher.sh b/.config/herbstluftwm/switcher.sh
index a19fe6e..e7ed342 100755
--- a/.config/herbstluftwm/switcher.sh
+++ b/.config/herbstluftwm/switcher.sh
@@ -7,6 +7,8 @@ number=$(wmctrl -l | cut -c 20- | nl -w 2 -s ") " | \
dmenu -fn $efont -i -h $bheight -nb $bg_normal -nf $fg_normal \
-sb $bg_focus -sf $fg_focus -p "Select:" -l 40 | \
grep -oE '[0-9]' | head -1)
+
+echo ${clients[$number]}
if [ $number ]; then
- herbstclient jumpto ${clients[$(expr $number - 1)]}
+ herbstclient jumpto ${clients[$number]}
fi