aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm
diff options
context:
space:
mode:
Diffstat (limited to '.config/herbstluftwm')
-rwxr-xr-x.config/herbstluftwm/autostart37
-rwxr-xr-x.config/herbstluftwm/calc.sh6
-rwxr-xr-x.config/herbstluftwm/panel.sh62
-rw-r--r--.config/herbstluftwm/panel/conky_stats2
-rwxr-xr-x.config/herbstluftwm/switcher.sh4
5 files changed, 66 insertions, 45 deletions
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart
index de952df..890f9c4 100755
--- a/.config/herbstluftwm/autostart
+++ b/.config/herbstluftwm/autostart
@@ -130,20 +130,20 @@ hc keybind Mod1-XF86PowerOff spawn mate-session-save --shutdown-dialog
hc keybind Print spawn mate-screenshot
# ranger
-hc keybind Mod4-Shift-Control-Return spawn urxvt -name "ranger" -e ranger /home/shmibs
-hc keybind Mod4-Shift-Control-b spawn urxvt -name "ranger" -e ranger /home/shmibs/documents/books
-hc keybind Mod4-Shift-Control-c spawn urxvt -name "ranger" -e ranger /home/shmibs/documents/comics
-hc keybind Mod4-Shift-Control-d spawn urxvt -name "ranger" -e ranger /home/shmibs/downloads
-hc keybind Mod4-Shift-Control-g spawn urxvt -name "ranger" -e ranger /home/shmibs/games
-hc keybind Mod4-Shift-Control-i spawn urxvt -name "ranger" -e ranger /home/shmibs/images
-hc keybind Mod4-Shift-Control-m spawn urxvt -name "ranger" -e ranger /home/shmibs/music
-hc keybind Mod4-Shift-Control-n spawn urxvt -name "ranger" -e ranger /home/shmibs/documents/manga
-hc keybind Mod4-Shift-Control-p spawn urxvt -name "ranger" -e ranger /home/shmibs/projects
-hc keybind Mod4-Shift-Control-s spawn urxvt -name "ranger" -e ranger /home/shmibs/desktop
-hc keybind Mod4-Shift-Control-r spawn urxvt -name "ranger" -e ranger /home/shmibs/romz
-hc keybind Mod4-Shift-Control-t spawn urxvt -name "ranger" -e ranger /home/shmibs/thcool
-hc keybind Mod4-Shift-Control-v spawn urxvt -name "ranger" -e ranger /home/shmibs/videos
-hc keybind Mod4-Shift-Control-w spawn urxvt -name "ranger" -e ranger /home/shmibs/documents/writing
+hc keybind Mod4-Shift-Control-Return spawn urxvt -name "ranger" -e ranger ~
+hc keybind Mod4-Shift-Control-b spawn urxvt -name "ranger" -e ranger ~/documents/books
+hc keybind Mod4-Shift-Control-c spawn urxvt -name "ranger" -e ranger ~/documents/comics
+hc keybind Mod4-Shift-Control-d spawn urxvt -name "ranger" -e ranger ~/downloads
+hc keybind Mod4-Shift-Control-g spawn urxvt -name "ranger" -e ranger ~/games
+hc keybind Mod4-Shift-Control-i spawn urxvt -name "ranger" -e ranger ~/images
+hc keybind Mod4-Shift-Control-m spawn urxvt -name "ranger" -e ranger ~/music
+hc keybind Mod4-Shift-Control-n spawn urxvt -name "ranger" -e ranger ~/documents/manga
+hc keybind Mod4-Shift-Control-p spawn urxvt -name "ranger" -e ranger ~/projects
+hc keybind Mod4-Shift-Control-s spawn urxvt -name "ranger" -e ranger ~/desktop
+hc keybind Mod4-Shift-Control-r spawn urxvt -name "ranger" -e ranger ~/romz
+hc keybind Mod4-Shift-Control-t spawn urxvt -name "ranger" -e ranger ~/thcool
+hc keybind Mod4-Shift-Control-v spawn urxvt -name "ranger" -e ranger ~/videos
+hc keybind Mod4-Shift-Control-w spawn urxvt -name "ranger" -e ranger ~/documents/writing
# grab colour to clipboard
hc keybind Mod4-c spawn ~/.config/herbstluftwm/colourgrab.sh
@@ -165,8 +165,10 @@ hc keybind Mod4-Shift-v spawn urxvt -name "vim" -e vim
hc keybind Mod4-Shift-w spawn urxvt -name "weechat" -e weechat
# dmenu
-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-0 spawn dmenu_run -fn "${bfont}:size=${bfont_size}" \
+ -p "Run:" -h "$bheight" \
+ -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
@@ -212,5 +214,6 @@ done
pkill dunst
dunst -lb $bg_normal -nb $bg_normal -cb $bg_focus \
-lf $fg_normal -nf $fg_normal -cf $fg_focus \
- -frame_color $bg_focus -geom "0x3-4+$(($bheight + 4))"
+ -frame_color $bg_focus -geom "0x3-4+$(($bheight + 4))" \
+ -fn "$ttfont $ttfont_size,$jfont $jfont_size"
diff --git a/.config/herbstluftwm/calc.sh b/.config/herbstluftwm/calc.sh
index ee0cc93..e10cfa6 100755
--- a/.config/herbstluftwm/calc.sh
+++ b/.config/herbstluftwm/calc.sh
@@ -27,9 +27,9 @@ 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" | \
+ 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" | \
sed -e "s/ans/$acc/g")
if [[ $(command_check "$in" "$acc") -eq 1 ]]; then
break
diff --git a/.config/herbstluftwm/panel.sh b/.config/herbstluftwm/panel.sh
index 6afe2cb..2a15462 100755
--- a/.config/herbstluftwm/panel.sh
+++ b/.config/herbstluftwm/panel.sh
@@ -21,6 +21,25 @@ source ~/.config/init/vars
# set alpha for background colours
alpha='#ff'
+
+std_black=$(echo -n '#ff'; echo "$std_black" | tr -d '#')
+std_red=$(echo -n '#ff'; echo "$std_red" | tr -d '#')
+std_green=$(echo -n '#ff'; echo "$std_green" | tr -d '#')
+std_yellow=$(echo -n '#ff'; echo "$std_yellow" | tr -d '#')
+std_blue=$(echo -n '#ff'; echo "$std_blue" | tr -d '#')
+std_magenta=$(echo -n '#ff'; echo "$std_magenta" | tr -d '#')
+std_cyan=$(echo -n '#ff'; echo "$std_cyan" | tr -d '#')
+std_white=$(echo -n '#ff'; echo "$std_white" | tr -d '#')
+
+light_black=$(echo -n '#ff'; echo "$light_black" | tr -d '#')
+light_red=$(echo -n '#ff'; echo "$light_red" | tr -d '#')
+light_green=$(echo -n '#ff'; echo "$light_green" | tr -d '#')
+light_yellow=$(echo -n '#ff'; echo "$light_yellow" | tr -d '#')
+light_blue=$(echo -n '#ff'; echo "$light_blue" | tr -d '#')
+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_focus=$(echo -n $alpha; echo "$bg_focus" | tr -d '#')
@@ -28,11 +47,8 @@ fg_focus=$(echo -n '#ff'; echo "$fg_focus" | tr -d '#')
bg_urgent=$(echo -n $alpha; echo "$bg_urgent" | tr -d '#')
fg_urgent=$(echo -n '#ff'; echo "$fg_urgent" | tr -d '#')
-fg_grey=$(echo -n '#ff'; echo "$fg_grey" | tr -d '#')
-fg_red=$(echo -n '#ff'; echo "$fg_red" | tr -d '#')
-fg_green=$(echo -n '#ff'; echo "$fg_green" | tr -d '#')
-fg_yellow=$(echo -n '#ff'; echo "$fg_yellow" | tr -d '#')
-fg_blue=$(echo -n '#ff'; echo "$fg_blue" | tr -d '#')
+# separator macro
+sep="%{F${bg_focus}}│%{F${fg_normal}}"
hc pad $monitor $bheight
@@ -53,9 +69,9 @@ update_taglist() {
-e 's/:/ /' \
-e "s/[#+\-%]\(.*\)/%{B${bg_focus} F${fg_focus}} \1%{B${bg_normal} F${fg_normal}}/" \
-e "s/!\(.*\)/%{B${bg_urgent} F${fg_urgent}} \1%{B${bg_normal} F${fg_normal}}/" \
- -e "s/\.\(.*\)/%{B${bg_normal} F${fg_grey}} \1%{B${bg_normal} F${fg_normal}}/" \
+ -e "s/\.\(.*\)/%{B${bg_normal} F${light_black}} \1%{B${bg_normal} F${fg_normal}}/" \
| tr -d '\n'
- echo "%{F${bg_focus}}|%{F${fg_normal}}"
+ echo "$sep"
}
update_winlist() {
@@ -80,14 +96,14 @@ update_winlist() {
else
echo -n "%{B${bg_normal} F${fg_normal}} "
fi
- echo -n "${line[@]:3}" | sed -r 's/(.{60}).*/\1\.\.\./'
+ echo -n "${line[@]:3}" | sed -r 's/(.{40}).*/\1\.\.\./'
echo -n " "
done
echo -n "%{B${bg_normal} F${fg_normal}}"
}
update_date() {
- echo -n "%{F${bg_focus}}|%{F${fg_normal} A:date:} \uE015 "
+ echo -n "${sep}%{A:date:} \uE015 "
date +$'%a, %b %d, %H:%M:%S' | tr -d '\n'
echo " %{A}"
}
@@ -156,7 +172,7 @@ event_mpd() {
done > >(unique_line)
}
-event_stat() {
+event_stats() {
conky -c ~/.config/herbstluftwm/panel/conky_stats
}
@@ -183,7 +199,7 @@ event_when() {
{
event_tick &
echo -e "child\t$!"
- event_stat &
+ event_stats &
echo -e "child\t$!"
event_when &
echo -e "child\t$!"
@@ -217,19 +233,19 @@ event_when() {
;;
mpd)
- fields[5]="%{F${bg_focus}}|%{A:mpd: F"
+ fields[5]="${sep}%{A:mpd: F"
case "${event[1]}" in
playing)
- fields[5]+=$(echo -n "${fg_green}} \uE0FE \uE09A")
+ fields[5]+=$(echo -n "${std_green}} \uE0FE \uE09A")
;;
paused)
- fields[5]+=$(echo -n "${fg_yellow}} \uE0FE \uE09B")
+ fields[5]+=$(echo -n "${std_yellow}} \uE0FE \uE09B")
;;
stopped)
- fields[5]+=$(echo -n "${fg_blue}} \uE0FE \uE099")
+ fields[5]+=$(echo -n "${std_blue}} \uE0FE \uE099")
;;
*)
- fields[5]+=$(echo -n "${fg_red}} \uE0FE \uE09E")
+ fields[5]+=$(echo -n "${std_red}} \uE0FE \uE09E")
;;
esac
fields[5]+=" %{F${fg_normal} A}"
@@ -239,16 +255,16 @@ event_when() {
event[1]=$(printf "%-4s" ${event[1]})
event[2]=$(printf "%-4s" ${event[2]})
fields[6]=$(
- echo -n "%{F${bg_focus}}|%{F${fg_normal} A:stats:} "
- echo -n "%{F${fg_blue}}\uE023%{F${fg_normal}} ${event[1]} "
- echo -n "%{F${fg_yellow}}\uE020%{F${fg_normal}} ${event[2]} "
+ echo -n "${sep}%{A:stats:} "
+ echo -n "%{F${std_blue}}\uE023%{F${fg_normal}} ${event[1]} "
+ echo -n "%{F${std_cyan}}\uE020%{F${fg_normal}} ${event[2]} "
echo -n "%{A}")
;;
when)
if [[ "${event[1]}" -eq 1 ]]; then
- fields[4]=$(echo -n "%{F${bg_focus}}|%{F${fg_normal} A:when:}"
- echo -n "%{F${fg_yellow}} \uE0AE %{F${fg_normal} A}")
+ fields[4]=$(echo -n "${sep}%{A:when:}"
+ echo -n "%{F${std_red}} \uE0AE %{F${fg_normal} A}")
else
fields[4]=""
fi
@@ -286,7 +302,9 @@ event_when() {
done
# pass the events into bar
-} 2> /dev/null | lemonbar -f "$bfont1" -f "$bfont2" \
+} 2> /dev/null | lemonbar -f "$ifont" -o "$ifont_off" \
+ -f "${bfont}:size=${bfont_size}" -o "$bfont_off" \
+ -f "${jfont}:size=${jfont_size}" -o "$jfont_off" \
-g${width}x${bheight}+${xpos}+${ypos} \
-B ${bg_normal} -F ${fg_normal} | \
{
diff --git a/.config/herbstluftwm/panel/conky_stats b/.config/herbstluftwm/panel/conky_stats
index ddd5edc..f5c7e58 100644
--- a/.config/herbstluftwm/panel/conky_stats
+++ b/.config/herbstluftwm/panel/conky_stats
@@ -7,4 +7,4 @@ use_spacer none
short_units yes
TEXT
-stats %%${cpu cpu0} %%${memperc}
+stats %${cpu cpu0} %${memperc}
diff --git a/.config/herbstluftwm/switcher.sh b/.config/herbstluftwm/switcher.sh
index b37ce9e..5430a80 100755
--- a/.config/herbstluftwm/switcher.sh
+++ b/.config/herbstluftwm/switcher.sh
@@ -14,8 +14,8 @@ while read -rA line; do
fi
done < <(wmctrl -l)
-echo -e "$lines" | nl -w 2 -s ") " | dmenu -fn $efont -i -h $bheight \
- -nb $bg_normal -nf $fg_normal -sb $bg_focus -sf $fg_focus \
+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" \
-p "Select:" -l 40 | cut -d ')' -f 1 | {read choice}
herbstclient jumpto "${nums[$choice]}"