You are not logged in.

#1 2012-01-14 20:46:11

kcirick
Member
Registered: 2010-06-21
Posts: 364

herbstluftwm screenshots and config

This is the screenshot and config sharing thread for herbstluftwm (HLWM/HWM).

I'm hoping people can showcase the versatility of this cool WM and get more people to try using it, at the same time I'm hoping to learn from other users on how they configure their setup.

As with any other screenshot sharing threads, do not post full resolution screenshots.

-----
So here is my SS:

2012-01-14-153720_1366x768_scrot.png

And my autostart:

#!/bin/bash

# this is a simple config for herbstluftwm

function hc() {
    herbstclient "$@"
}

#hc emit_hook reload

hc set window_gap 5

# rules
hc unrule -F
#hc rule class=XTerm tag=3 # move all xterms to tag 3
hc rule focus=off # normally do not focus new clients
# give focus to most common terminals
hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
hc rule class~'[Ss]talonetray' manage=off

#autostart
$HOME/.config/herbstluftwm/wsbar.sh
stalonetray &
#add padding for dzen2
hc pad 0 16 0 0 0

# remove all existing keybindings
hc keyunbind --all

# keybindings
Mod=Mod4
hc keybind $Mod-q quit
#hc keybind $Mod-n reload
hc keybind $Mod-c close

# Applications
hc keybind $Mod-Shift-r spawn dmenu_run
hc keybind $Mod-Shift-Return spawn urxvt 
hc keybind $Mod-Shift-w spawn chromium

# tags
TAG_NAMES=( "Eins" "Zwei" "Drei" "Vier" "Fünf" "Sechs" "Sieben" )
TAG_KEYS=( {1..7} 0 )

hc rename default "${TAG_NAMES[0]}" || true
for i in ${!TAG_NAMES[@]} ; do
    hc add "${TAG_NAMES[$i]}"
    key="${TAG_KEYS[$i]}"
    if ! [ -z "$key" ] ; then
        hc keybind "$Mod-$key" use "${TAG_NAMES[$i]}"
        hc keybind "$Mod-Shift-$key" move "${TAG_NAMES[$i]}"
    fi
done

# layouting
hc keybind $Mod-r remove
#hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-m set_layout max 
hc keybind $Mod-v set_layout vertical
hc keybind $Mod-h set_layout horizontal
hc keybind $Mod-Control-v split vertical 0.5
hc keybind $Mod-Control-h split horizontal 0.5
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle

hc keybind $Mod-j cycle 1
hc keybind $Mod-k cycle -1

# resizing
RESIZESTEP=0.05
hc keybind $Mod-Control-Left resize left +$RESIZESTEP
hc keybind $Mod-Control-Down resize down +$RESIZESTEP
hc keybind $Mod-Control-Up resize up +$RESIZESTEP
hc keybind $Mod-Control-Right resize right +$RESIZESTEP

# mouse
hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button2 resize
hc mousebind $Mod-Button3 zoom

# focus
hc keybind $Mod-BackSpace   cycle_monitor
hc keybind $Mod-Tab         cycle_all +1
hc keybind $Mod-Shift-Tab   cycle_all -1
hc keybind $Mod-c cycle
hc keybind $Mod-Left focus left
hc keybind $Mod-Down focus down
hc keybind $Mod-Up focus up
hc keybind $Mod-Right focus right
hc keybind $Mod-Shift-Left shift left
hc keybind $Mod-Shift-Down shift down
hc keybind $Mod-Shift-Up shift up
hc keybind $Mod-Shift-Right shift right

# colors
hc set frame_border_active_color '#1793D0'
hc set frame_border_normal_color '#123456'
hc set frame_bg_transparent 1
hc set frame_border_width 1
hc set window_border_width 1
hc set window_border_normal_color '#123456'
hc set window_border_active_color '#1793D0'

# dual monitor setup
hc remove monitor 1
hc move_monitor 0 1366x768+0+0
hc use "${TAG_NAMES[0]}"
hc add_monitor 1440x900+1366+0 "${TAG_NAMES[1]}"

and my wsbar.sh script:

#!/bin/bash

## dzen stuff
FG='white'
BG='black'
FONT="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"

function uniq_linebuffered() {
   awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
}

{
   conky -c ~/.conkyrc_herbstluft | while read -r; do
      echo -e "conky $REPLY";
      #break
   done > >(uniq_linebuffered) &
   childpid=$!
   herbstclient --idle
   kill $childpid
} | {
   TAGS=( $(herbstclient tag_status $monitor) ) 
      conky=""
      separator="^fg(#1793D0)^ro(1x16)^fg()"
      while true; do
         for i in "${TAGS[@]}" ; do
            echo -n "^ca(1,herbstclient use ${i:1}) "
            case ${i:0:1} in
            '#')
               echo -n "^fg(#1793D0)[^fg(#FFFFFF)${i:1}^fg(#1793D0)]"
               ;;
            ':')
               echo -n "^fg(#FFFFFF) ${i:1} "
               ;;
            *)
               echo -n "^fg(#123456) ${i:1} "
               ;;
            esac
            echo -n "^ca()"
        done
        echo -n " $separator"
        conky_text_only=$(echo -n "$conky"|sed 's.\^[^(]*([^)]*)..g')
        width=$(textwidth "$FONT" "$conky_text_only  ")
        echo -n "^p(_RIGHT)^p(-$width)$conky"
        echo
        read line || break
        cmd=( $line )
   case "$cmd[0]" in
               tag*)
                  TAGS=( $(herbstclient tag_status $monitor) ) 
                  ;;
               conky*)
                  conky="${cmd[@]:1}"
                  ;;
               esac
     done
} 2> /dev/null |dzen2 -ta l -y 0 -x 0 -h 16 -w 1286 -fg $FG -bg $BG -fn $FONT &

Offline

#2 2012-01-15 01:35:12

theGunslinger
Member
Registered: 2011-05-20
Posts: 300

Re: herbstluftwm screenshots and config

Looks very nice, tell me what benefits would i have switching from awesome?

Offline

#3 2012-01-15 04:50:45

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: herbstluftwm screenshots and config

You can read the following to understand more about HL:
http://wwwcip.cs.fau.de/~re06huxa/herbstluftwm/
https://wiki.archlinux.org/index.php/Herbstluftwm

The main difference between Awesome and HL is the way tiling of the clients is done. Awesome automatically tiles the clients depending on the layout the user wants to use (i.e. normal tiling, bottom stack, grid, etc...). In HL (Same goes for other "Manual tiling WM" such as musca/i3... Awesome/DWM are referred to as "Dynamic tiling WM"), you split the main frame into subframes, and so it's not restricted to the layout template. This means you can have arbitrary amount of rows/columns and you can group clients in each of the subframes.

There are number of other differences which are not necessarily advantage/disadvantage from other WM. You just need to try it out and see whether it fits you. I personally have used dwm for some time (dwm = barebone awesome without many of its features), but I really wanted manual tiling. I think I've tried most of the WM's listed here, and I find Herbstluft WM the best fitted for me.

Offline

#4 2012-01-15 13:39:26

Doomcide
Member
Registered: 2011-08-22
Posts: 221

Re: herbstluftwm screenshots and config

tYzl5OA


autostart.sh:

#!/bin/bash

function hc() {
    herbstclient "$@"
}

hc emit_hook reload

# keybindings
Mod=Mod4
hc keybind $Mod-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-x close
hc keybind $Mod-Return spawn urxvt

# tags
hc rename default 1 || true
for i in {1..5} ; do
    hc add "$i"
    hc keybind "$Mod-$i" use "$i"
    hc keybind "$Mod-Shift-$i" move "$i"
done

hc keybind $Mod-Right spawn nextag
hc keybind $Mod-Left  spawn prevtag

# layouting
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-u split vertical 0.5
hc keybind $Mod-o split horizontal 0.5
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-z pseudotile toggle 

# mouse
hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button3 resize
hc mousebind $Mod-Button2 zoom

# resizing
RESIZESTEP=0.05
hc keybind $Mod-Control-h resize left +$RESIZESTEP
hc keybind $Mod-Control-j resize down +$RESIZESTEP
hc keybind $Mod-Control-k resize up +$RESIZESTEP
hc keybind $Mod-Control-l resize right +$RESIZESTEP

# focus
hc keybind $Mod-BackSpace   cycle_monitor
hc keybind $Mod-Tab         cycle_all +1
hc keybind $Mod-Shift-Tab   cycle_all -1
hc keybind $Mod-c cycle
hc keybind $Mod-h focus left
hc keybind $Mod-j focus down
hc keybind $Mod-k focus up
hc keybind $Mod-l focus right
hc keybind $Mod-Shift-h shift left
hc keybind $Mod-Shift-j shift down
hc keybind $Mod-Shift-k shift up
hc keybind $Mod-Shift-l shift right

# dmenu
hc keybind $Mod-p spawn dmenu_run  -fn -*-termsyn-medium-*-*-*-14-*-*-*-*-*-*-* -nb rgb:00/00/00 -nf rgb:CC/CC/CC -sb rgb:CC/CC/CC -sf rgb:33/33/33
hc keybind $Mod-i spawn $HOME/src/herbstluftwm/scripts/herbstcommander.sh

# colors
hc set frame_border_active_color '#2B2B2B'
hc set frame_border_normal_color '#000000'
hc set frame_bg_normal_color '#CCCCCC'
hc set frame_bg_active_color '#BB4B61' 
hc set window_border_normal_color '#000000' 
hc set window_border_active_color '#BB4B61' 

# settings
hc set frame_border_width 1
hc set window_border_width 1

hc set snap_distance 7
hc set snap_gap 3
hc set window_gap 0

hc set frame_bg_transparent 1
hc set focus_follows_mouse 1
hc set focus_follows_shift 1
hc set tree_style  "╾ ╼"

# rules
hc unrule --all
hc rule focus=on

hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
# hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
# hc rule instance='sun-awt-X11-XDialogPeer' focus=on

hc rule instance='linux_64_client' fullscreen=on
hc rule instance='Dredmor-amd64' fullscreen=on
hc rule instance='desura' pseudotile=on
hc rule instance='snes9x-gtk' fullscreen=on

# load layout Tag 1
hc load 1 "(split horizontal:0.449800:0 (split vertical:0.800000:0 (split vertical:0.600000:0 (clients vertical:0) (clients vertical:0)) (clients vertical:0)) (split vertical:0.800000:1 (clients vertical:0) (clients vertical:0)))"

# call autostart-scripts
hc spawn $HOME/.scripts/autostart-daemons.sh
hc spawn $HOME/.scripts/autostart-apps.sh

Autostart-Scripts:

#!/bin/bash

RUNS=1

spawn_at() {(
    herbstclient rule once pid=$BASHPID maxage=10 index="$1"
    shift
    exec "$@"
    ) &
}

if [[ $RUNS == 0 ]]; then
	spawn_at 10 urxvt
	spawn_at 001 urxvt -e centerim
	spawn_at 11 urxvt -e ranger
	herbstclient spawn urxvt
	sed -i s/^RUNS.*/RUNS=1/ $0
	while [ ! $(pidof mpd)]; do
		sleep 1s
	done
	spawn_at 01 urxvt -e ncmpcpp
fi
#!/bin/bash

RUNS=1

if [[ $RUNS == 0 ]]; then
#	nitrogen --restore &
	xsetroot -grey
	udiskie &
	hcbar &
#	hctag
#	dzenconky
	mpd
	twmnd &
	# xcompmgr -c -t-5 -l-5 -r5.2 -o.55 &
	sed -i s/^RUNS.*/RUNS=1/ $0
fi

hcbar & hccpu

#!/bin/bash

# Geometry
monitor=${1:-0}
geometry=( $(herbstclient monitor_rect "$monitor") )
if [ -z "$geometry" ] ;then
	echo "Invalid monitor $monitor"
	exit 1
fi
# geometry has the format: WxH+X+Y
x=${geometry[0]}
y=${geometry[1]}
width=${geometry[2]}
height=16

# Dzen stuff
FG='#E8ECF2'
C2='#6C7F96'
CSEP='#3A4B61'
CURG='#BB7F61'
CFOC='#BB4B61'
BG='black'
SEPERATOR="^fg($CSEP)^ro(1x$height)^fg()"
FONT='-*-termsyn-medium-*-*-*-14-*-*-*-*-*-*-*'

function uniq_linebuffered() {
awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
}

herbstclient pad $monitor $height
{
while true ; do
	mpcshow="$(mpc status | sed -n 1p | grep '-') $(mpc status | sed -n 2p | awk {'print $3'})"
        date +'date %a %d/%m/%y %T'
	echo "mpc $mpcshow"
	sleep 1 || break
done > >(uniq_linebuffered)  &
childpid=$!
$HOME/.scripts/hccpu &
herbstclient --idle 
kill $childpid
} 2> /dev/null | {
TAGS=( $(herbstclient tag_status $monitor) )
date=""
mpcshow=""
cpu=""
mem=""
while true; do
	# draw tags
        for i in "${TAGS[@]}" ; do
            case ${i:0:1} in
                '#')
                    echo -n "^fg($CFOC)"
                    ;;
                ':')
                    echo -n "^fg($C2)"
                    ;;
                '!')
                    echo -n "^fg($CURG)"
		    ;;
                *)
                    echo -n "^bg()^fg()"
                    ;;
            esac
            echo -n "^ca(1,herbstclient focus_monitor $monitor && "'herbstclient use "'${i:1}'") '"${i:1} ^ca()"
            #echo -n "$SEPERATOR"
        done
	right="^bg()^fg($C2)$mpcshow^fg()  $cpu ^fg($C2)|^fg() $date"
        right_text_only=$(echo -n "$right"|sed 's.\^[^(]*([^)]*)..g' | sed 's/[äöüÄÖÜ]/a/')
        # get width of right aligned text.. and add some space..
        width=$(textwidth $FONT "$right_text_only  ")
        echo -n "^p(_RIGHT)^p(-$width)$right"
        echo

	read line || break
	cmd=( $line )
	case "$cmd[0]" in
		date*)
			#echo "reseting date" >&2
			date="${cmd[@]:1}"
			;;
		tag*)
			#echo "reseting tag" >&2
			TAGS=( $(herbstclient tag_status $monitor) )
			;;
		mpc*)
			mpcshow="${cmd[@]:1}"
			;;
		cpu*)
			cpu="${cmd[@]:1}"
			;;
		quit_panel)
	                exit
	                ;;
	        reload)
			exit
                        ;;
	esac
done
} 2> /dev/null  | dzen2 -ta l -y $y -x $x -w $width -fg $FG -bg $BG -fn $FONT
#!/bin/bash

{
	mpstat -P 0 1 &
       	mpstat -P 1 1 &
} 2> /dev/null | {
cpu1=""
cpu2=""
while true; do
	read line || break
	cmd="( $line )"
	case "${cmd[@]}" in
		*' 0 '*)
			cpu1=$(( 100 - $(printf "%.0f\n" $(echo "${cmd[@]}" | awk {'print $13'})) ))
			;;
		*' 1 '*) 
			cpu2=$(( 100 - $(printf "%.0f\n" $(echo "${cmd[@]}" | awk {'print $13'})) ))
			;;
	esac
	herbstclient emit_hook "cpu 1 ${cpu1}%  2 ${cpu2}%"
	sleep 1s
done
}

Last edited by Doomcide (2012-01-15 13:40:23)

Offline

#5 2012-01-15 14:41:57

theGunslinger
Member
Registered: 2011-05-20
Posts: 300

Re: herbstluftwm screenshots and config

kcirick wrote:

You can read the following to understand more about HL:
http://wwwcip.cs.fau.de/~re06huxa/herbstluftwm/
https://wiki.archlinux.org/index.php/Herbstluftwm

The main difference between Awesome and HL is the way tiling of the clients is done. Awesome automatically tiles the clients depending on the layout the user wants to use (i.e. normal tiling, bottom stack, grid, etc...). In HL (Same goes for other "Manual tiling WM" such as musca/i3... Awesome/DWM are referred to as "Dynamic tiling WM"), you split the main frame into subframes, and so it's not restricted to the layout template. This means you can have arbitrary amount of rows/columns and you can group clients in each of the subframes.

There are number of other differences which are not necessarily advantage/disadvantage from other WM. You just need to try it out and see whether it fits you. I personally have used dwm for some time (dwm = barebone awesome without many of its features), but I really wanted manual tiling. I think I've tried most of the WM's listed here, and I find Herbstluft WM the best fitted for me.

Thanks for the clarification, will give it a try soon.

Offline

#6 2012-01-15 14:55:54

guelfi
Member
From: /home/guelfi
Registered: 2011-07-01
Posts: 111

Re: herbstluftwm screenshots and config

Finally, someone created this thread.

tYzl6dQ

(The weird stuff in the bottom left corner is there because I have a dual-head setup where the two heads don't have an equal resolution).

My config(s):

autostart:

#!/bin/bash

# guelfi's config for herbstluftwm. enjoy.

function hc() {
    herbstclient "$@"
}

# colors
hc set frame_border_active_color '#005577'
hc set frame_border_normal_color '#333333'
hc set frame_bg_transparent 1
#hc set frame_bg_normal_color '#BD9768'
#hc set frame_bg_active_color '#BD8541'
hc set frame_border_width 2
hc set window_border_width 1
hc set window_gap 2
hc set window_border_normal_color '#444444'
hc set window_border_active_color '#4466AA'

# other settings
hc set focus_follows_mouse 1
hc set snap_gap 32
hc set snap_distance 35
hc set raise_on_focus 0
#hc set default_frame_layout 1

# general keybindings
Mod=Mod4
hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-Shift-c close
hc keybind $Mod-Shift-Return spawn urxvtc
hc keybind $Mod-p spawn dmenu_run -fn "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*" \
 -nb "#222222" -nf "#bbbbbb" -sb "#005577" -sf "#eeeeee" -p "Run: "
hc keybind $Mod-Shift-p spawn herbstcommander -fn "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*" \
 -nb "#222222" -nf "#bbbbbb" -sb "#005577" -sf "#eeeeee"

# layouting
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-u split vertical 0.5
hc keybind $Mod-o split horizontal 0.5
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-v pseudotile toggle

# resizing
RESIZESTEP=0.05
hc keybind $Mod-Control-h resize left +$RESIZESTEP
hc keybind $Mod-Control-j resize down +$RESIZESTEP
hc keybind $Mod-Control-k resize up +$RESIZESTEP
hc keybind $Mod-Control-l resize right +$RESIZESTEP

# mouse 1
hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button2 zoom
hc mousebind $Mod-Button3 resize

# focus
hc keybind $Mod-BackSpace   cycle_monitor
hc keybind $Mod-Tab         cycle_all +1
hc keybind $Mod-Shift-Tab   cycle_all -1
hc keybind $Mod-c cycle
hc keybind $Mod-h focus left
hc keybind $Mod-j focus down
hc keybind $Mod-k focus up
hc keybind $Mod-l focus right
hc keybind $Mod-Shift-h shift left
hc keybind $Mod-Shift-j shift down
hc keybind $Mod-Shift-k shift up
hc keybind $Mod-Shift-l shift right

# media keys
hc keybind XF86AudioPlay spawn mpc toggle
hc keybind XF86AudioNext spawn mpc next
hc keybind XF86AudioPrev spawn mpc prev
hc keybind XF86AudioStop spawn mpc stop
hc keybind XF86AudioRaiseVolume spawn dvol -i 3
hc keybind XF86AudioLowerVolume spawn dvol -d 3
hc keybind XF86AudioMute spawn dvol -t

# tags
TAG_NAMES=( 'terms' 'web' 'video' 'work' 'game' 'extra')
TAG_KEYS=( {1..6} )

hc rename default "${TAG_NAMES[0]}" || true
for i in ${!TAG_NAMES[@]} ; do
    hc add "${TAG_NAMES[$i]}"
    key="${TAG_KEYS[$i]}"
    if ! [ -z "$key" ] ; then
        hc keybind "$Mod-$key" use "${TAG_NAMES[$i]}"
        hc keybind "$Mod-Shift-$key" move "${TAG_NAMES[$i]}"
    fi
done

# monitors
hc move_monitor 0 1280x1024-0+0 0 0 0 terms
hc remove_monitor 1
hc add_monitor 1920x1080+1280+0 web
hc keybind $Mod-w focus_monitor 0
hc keybind $Mod-e focus_monitor 1
hc pad 1 0 0 37 0
hc pad 0 20

# rules regarding every layout
hc unrule -F
hc rule focus=on
#hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off

# layouts 
# these scripts also contain the rules that apply to this layout
source ~/.config/herbstluftwm/layouts/terms
source ~/.config/herbstluftwm/layouts/web

hc rule class="MPlayer" tag=video
hc rule class="net-minecraft-MinecraftLauncher" tag=game


# applications

hc emit_hook quit_panel ; ~/.config/herbstluftwm/panel.sh &
pgrep conky >/dev/null || conky -d
#pgrep tint2 >/dev/null || tint2 &
#pgrep xfce4-panel >/dev/null || xfce4-panel --disable-wm-check --sm-client-disable
pgrep trayer >/dev/null || trayer --edge top --align left \
 --widthtype pixel --width 1280 --height 10 \
 --transparent true --distance 4 --alpha 200 --tint 0x333333

panel.sh:

#!/bin/bash

monitor=1
monitor2=0
geometry=( $(herbstclient monitor_rect "$monitor") )
if [ -z "$geometry" ] ;then
    echo "Invalid monitor $monitor"
    exit 1
fi
# geometry has the format: WxH+X+Y
x=${geometry[0]}
y=${geometry[1]}
width=${geometry[2]}
height=16
font="-*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*"
bgcolor='#1c1c1c'

function uniq_linebuffered() {
    awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
}

herbstclient pad $monitor $height
{
    # events:
	while true ; do
		if ! mpc status >/dev/null; then
			sleep 5
		else
			echo "player $(mpc current)"
			mpc idleloop player
		fi
	done &
    while true ; do
        date +'date ^fg(#efefef)%H:%M^fg(#cccccc), %Y-%m-^fg(#efefef)%d'
        sleep 1 || break
    done > >(uniq_linebuffered)  &
    childpid=$!
    herbstclient --idle
    kill $childpid
} 2> /dev/null | {
    TAGS=( $(herbstclient tag_status $monitor) )
    date=""
	windowname=$(xdotool getactivewindow -- getwindowname)
    while true ; do
        bordercolor="#26221C"
        hintcolor="#427bb2"
        separator="^fg(#333333)^ro(1x$height)^fg()"
        # draw tags
        for i in "${TAGS[@]}" ; do
            case ${i:0:1} in
                '#')
                    echo -n "^bg(#427bb2)^fg(#cccccc)"
                    ;;
                '+')
                    echo -n "^bg(#ededed)^fg(#333333)"
                    ;;
                ':')
					if echo ${TAGS[@]} | grep "+" >/dev/null ; then 
						# monitor 2 is focused
						if herbstclient tag_status $monitor2 | grep "#${i:1}" >/dev/null ; then
                    		echo -n "^bg(#427bb2)^fg(#cccccc)"
						else
                    		echo -n "^bg(#cccccc)^fg(#1c1c1c)"
						fi
					else
						# monitor 1 is focused
						if herbstclient tag_status $monitor2 | grep "+${i:1}" >/dev/null ; then
                    		echo -n "^bg(#ededed)^fg(#333333)"
						else
                    		echo -n "^bg(#cccccc)^fg(#1c1c1c)"
						fi
					fi
                    ;;
                '!')
                    echo -n "^bg(#ff0675)^fg(#222222)"
                    ;;
                *)
                    echo -n "^bg()^fg()"
                    ;;
            esac
			case ${i:1} in
				'terms')
					icon="^i(/usr/share/icons/Faenza/apps/16/terminal.xpm)"
					;;
				'web')
					icon="^i(/home/guelfi/.icons/internet.xpm)"
					;;
				'video')
					icon="^i(/home/guelfi/.icons/mplayer.xpm)"
					;;
				'work')
					icon="^i(/home/guelfi/.icons/vim.xpm)"
					;;
				'game')
					icon="^i(/home/guelfi/.icons/games.xpm)"
					;;
				'extra')
					icon="^i(/home/guelfi/.icons/extra.xpm)"
					;;
			esac
            echo -n "^ca(1,herbstclient focus_monitor $monitor && "'herbstclient use "'${i:1}'") '"$icon ^ca()"
            echo -n "$separator"
        done
		echo -n "^fg()^bg() $windowname $seperator"
		center_text_only=$(echo -n "$song"| sed 's.\^[^(]*([^)]*)..g')
		center_width=$(textwidth "$font" "$center_text_only")
        echo -n "^bg()^p(_CENTER)^p(-$(( center_width / 2)))$song"
        # small adjustments
        right="$separator^bg($hintcolor) $date^bg()"
        right_text_only=$(echo -n "$right"|sed 's.\^[^(]*([^)]*)..g')
        # get width of right aligned text.. and add some space..
        width=$(textwidth "$font" "$right_text_only  ")
        echo -n "^p(_RIGHT)^p(-$width)$right"
        echo
        # wait for next event
        read line || break
        cmd=( $line )
        # find out event origin
        case "${cmd[0]}" in
            tag*)
                #echo "reseting tags" >&2
                TAGS=( $(herbstclient tag_status $monitor) )
                ;;
            date)
                #echo "reseting date" >&2
                date="${cmd[@]:1}"
                ;;
			focus_changed)
				windowname=$(xdotool getwindowname ${cmd[1]})
				;;
            quit_panel)
                exit
                ;;
            player)
				song=$(mpc current)
                ;;
        esac
        done
}  | dzen2 -w $width -x $x -y $y -fn "$font" -h $height \
    -ta l -bg "$bgcolor" -fg '#efefef'

layouts/terms:

#!/bin/bash

function hc() {
    herbstclient "$@"
}

Mod=Mod4

if ! hc tag_status | grep "terms" >/dev/null || [[ $1 = -f ]]  ; then
	TAGS=$(hc tag_status | wc -w)
	hc add "terms"
	if [[ $TAGS -ge 9 ]] ; then
		echo "$0: too many tags; will not get a keybinding" >&2
	else
		hc keybind "$Mod-$(( TAGS + 1 ))" use "terms"
		hc keybind "$Mod-Shift-$(( TAGS + 1 ))" move "terms"
	fi
fi

# layout
hc load terms '
(split horizontal:0.450000:1
  (split vertical:0.500000:0
    (split vertical:0.500000:1
	  (clients vertical:0 )
	  (clients vertical:0 ))
   	(clients horizontal:0 ))
  (split vertical:0.550000:0
    (clients vertical:0 )
   	(clients vertical:0 )))'
# rules
hc rule instance="newsbeuter" tag=terms index=000
hc rule instance="mutt" tag=terms index=001
hc rule instance="irssi" tag=terms index=10
hc rule instance="ncmpcpp" tag=terms index=01
hc rule instance="wyrd" tag=terms index=11

# autostart applications

pgrep newsbeuter >/dev/null || urxvtc -name newsbeuter -e newsbeuter &
pgrep mutt >/dev/null || urxvtc -name mutt -e mutt &
pgrep ncmpcpp >/dev/null || urxvtc -name ncmpcpp -e ncmpcpp &
screen -ls | grep "irssi[[:space:]]*(Attached)" >/dev/null || urxvtc -name irssi -e screen -S irssi -xR irssi &
pgrep wyrd >/dev/null || urxvtc -name wyrd -e wyrd &

layouts/web:

#!/bin/bash

function hc() {
    herbstclient "$@"
}

Mod=Mod4

if ! hc tag_status | grep "web" >/dev/null ; then
	TAGS=$(hc tag_status | wc -w)
	hc add "web"
	if [[ $TAGS -ge 9 ]] ; then
		echo "$0: too many tags; will not get a keybinding" >&2
	else
		hc keybind "$Mod-$(( TAGS + 1 ))" use "web"
		hc keybind "$Mod-Shift-$(( TAGS + 1 ))" move "web"
	fi
fi

# layout
hc load web '
(split horizontal:0.650000:1
  (clients vertical:0)
  (clients vertical:0))'


# rules
hc rule class="dwb" tag=web index=0

# applications
pgrep dwb >/dev/null || dwb &

layouts/gimp:

#!/bin/bash

function hc() {
    herbstclient "$@"
}

Mod=Mod4

if ! hc tag_status | grep "gimp" >/dev/null ; then
	TAGS=$(hc tag_status | wc -w)
	hc add "gimp"
	if [[ $TAGS -ge 9 ]] ; then
		echo "$0: too many tags; will not get a keybinding" >&2
	else
		hc keybind "$Mod-$(( TAGS + 1 ))" use "gimp"
		hc keybind "$Mod-Shift-$(( TAGS + 1 ))" move "gimp"
		echo "$0: added tag \"gimp\" with $Mod-(Shift)-$(( TAGS + 1 ))" >&2
	fi
fi
# gimp layout
hc add gimp
hc load gimp '
(split horizontal:0.850000:0
  (split horizontal:0.200000:1
    (clients vertical:0)
    (clients grid:0))
  (clients vertical:0))
'               # load predefined layout
# center all other gimp windows on gimp tag
hc rule class=Gimp tag=gimp index=01 pseudotile=on
hc rule class=Gimp windowrole~'gimp-(image-window|toolbox|dock)' \
    pseudotile=off
hc rule class=Gimp windowrole=gimp-toolbox focus=off index=00
hc rule class=Gimp windowrole=gimp-dock focus=off index=1
hc rule class=Gimp windowrole=gimp-text-editor focus=off index=00

Offline

#7 2012-03-29 09:32:10

Skavend
Member
Registered: 2012-01-11
Posts: 5

Re: herbstluftwm screenshots and config

Why did this thread die out? Anyway, has played around some with hlwm, or mostly trying to get used to a tiling wm for the first time smile

I am pretty satisfied of how it looks and works right now, though I may switch to a better background image or change the text color to not white^^
Next thing to ad is probably a panel on the top, but that will have to wait. Should also probably clean autostart somewhat, there is some things I don't use anymore..

xeTol.png

#!/bin/bash

function hc() {
    herbstclient "$@"
}

hc emit_hook reload

# remove all existing keybindings
hc keyunbind --all

# keybindings (Mod1 = Alt)
Mod=Mod1
hc keybind $Mod-Shift-q quit
#hc keybind $Mod-Shift-n bash -c 'herbstclient load "$(< ~/foo)"'
hc keybind $Mod-Shift-r reload
hc keybind $Mod-Shift-c close
hc keybind $Mod-Return spawn urxvt -tr -sh 85 -fg rgb:bb/bb/bb
hc keybind $Mod-Shift-o spawn opera
hc keybind $Mod-Shift-s spawn spotify
hc keybind $Mod-Shift-e spawn eric
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-y split vertical 0.5
hc keybind $Mod-x split horizontal 0.5
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle
RESIZESTEP=0.05
hc keybind $Mod-Control-w resize up +$RESIZESTEP
hc keybind $Mod-Control-a resize left +$RESIZESTEP
hc keybind $Mod-Control-s resize down +$RESIZESTEP
hc keybind $Mod-Control-d resize right +$RESIZESTEP


# tags
TAG_NAMES=( {1..9} )
TAG_KEYS=( {1..9} 0 )

hc rename default "${TAG_NAMES[0]}" || true
for i in ${!TAG_NAMES[@]} ; do
    hc add "${TAG_NAMES[$i]}"
    key="${TAG_KEYS[$i]}"
    if ! [ -z "$key" ] ; then
        hc keybind "$Mod-$key" use "${TAG_NAMES[$i]}"
        hc keybind "$Mod-Shift-$key" move "${TAG_NAMES[$i]}"
    fi
done


# focus
hc keybind $Mod-BackSpace   cycle_monitor
hc keybind $Mod-w focus up
hc keybind $Mod-a focus left
hc keybind $Mod-s focus down
hc keybind $Mod-d focus right
#hc keybind $Mod-Shift-h shift left
#hc keybind $Mod-Shift-j shift down
#hc keybind $Mod-Shift-k shift up
#hc keybind $Mod-Shift-l shift right
#hc keybind $Mod-Shift-Tab   cycle_all -1
#hc keybind $Mod-Tab         cycle_all +1
#hc keybind $Mod-c cycle

# monitor thingy
hc remove monitor 1
hc move_monitor 0 1280x800+0+0
hc add_monitor 1024x1280+1280+0

# colors
hc set frame_border_active_color '#005577'
hc set frame_border_normal_color '#333333'
#hc set frame_bg_normal_color '#BD9768'
#hc set frame_bg_active_color '#BD8541'
hc set frame_border_width 2
hc set window_border_width 2
hc set window_border_normal_color '#444444'
hc set window_border_active_color '#444444'
#xsetroot -solid '#000000'
feh --bg-fill ~/bilder/rodaTrad.jpg

# rules
hc unrule -F
#hc rule class=XTerm tag=3 # move all xterms to tag 3
hc rule focus=off # normally do not focus new clients
# give focus to most common terminals
hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off

# mouse
hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button2 resize
hc mousebind $Mod-Button3 zoom

Here is how I managed my dual monitor setup if anyone wants to now. Big thanks to the guys in #herbstluftwm who help me out with this!

xrandr --output LVDS --mode 1280x800 --output VGA-0 --rotate left --mode 1280x1024 --rate 60.0  --right-of LVDS

Offline

#8 2012-03-30 19:18:24

penguin
Member
From: Gotham City
Registered: 2010-12-31
Posts: 167

Re: herbstluftwm screenshots and config

I'm a stumpwm user, and I really like it, except it crashes every time I start gimp, and some other programs. Does anyone have a stump-like key-binding setup for herbstluft?

@kcirick
I like your color scheme. Care to share your .Xdefaults/.Xresources?

Offline

#9 2012-03-30 21:11:30

thorsten
Member
From: Germany
Registered: 2010-02-24
Posts: 168

Re: herbstluftwm screenshots and config

penguin wrote:

I'm a stumpwm user, and I really like it, except it crashes every time I start gimp, and some other programs.

Can you paste the herbstluftwm output when starting gimp? E.g. put this in your .xinitrc:

exec herbstluftwm &> ~/log
penguin wrote:

Does anyone have a stump-like key-binding setup for herbstluft?

If you want to use key chains, you have to use external tools like xchainkeys

Offline

#10 2012-03-31 09:05:32

penguin
Member
From: Gotham City
Registered: 2010-12-31
Posts: 167

Re: herbstluftwm screenshots and config

@thorsten What I meant was that I like stumpwm except it crashes (not herbstluf), which is why I'm thinking of giving herbstluft a try.thorsten

Offline

#11 2012-04-01 23:49:17

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: herbstluftwm screenshots and config

penguin wrote:

@kcirick
I like your color scheme. Care to share your .Xdefaults/.Xresources?

Thanks! I don't use that colourscheme anymore (I change it every so often), but in the previous post, this is what I had:

 ! black
 *color0:#555753
 *color8:#202020
 ! red
 *color1:#CC0000
 *color9:#EF2929
 ! green
 *color2:#6AAD2B
 *color10:#ABFD5B
 ! yellow
 *color3:#C4A000
 *color11:#FCE94F
 ! blue
 *color4:#3465A4
 *color12:#1793D0
 ! magenta
 *color5:#948696
 *color13:#BCACBB
 ! cyan
 *color6:#06989A
 *color14:#34E2E2
 ! white
 *color7:#EEEEEE
 *color15:#FFFFFF

Offline

#12 2012-04-02 23:57:41

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: herbstluftwm screenshots and config

(cross post from April SS thread) My new SS. I've hacked and customized herbstluft to the way I like it (+new bugs), so I can't really post the autostart script (I don't have one anymore). but the overall look and feel is stock herbstluft, so ...

Clean:
2012-04-02-SSClean.png

Dirty:
2012-04-02-SSDirty.png

Offline

#13 2012-04-03 07:47:07

penguin
Member
From: Gotham City
Registered: 2010-12-31
Posts: 167

Re: herbstluftwm screenshots and config

@kcirick
Nice screenshot. I wonder how unusual it is not to use dmenu as application launcher. Especially among tiling WM community. 
Thanks for the color scheme BTW, using it now. smile

Offline

#14 2012-04-10 09:37:06

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: herbstluftwm screenshots and config

I slowly drifted from Openbox to herbstluftwm.

[img]...[/img]
[img]...[/img]

# mod edit: images removed because they were hosted on a site reported as a malware vector

Last edited by jasonwryan (2013-07-22 18:04:56)


gh · da · ds

Offline

#15 2012-08-17 08:00:37

Heo Rung
Member
From: Viet Nam
Registered: 2011-08-08
Posts: 18
Website

Re: herbstluftwm screenshots and config

Is it wrong to bump this thread?

Oh well...

A super simple setup with just 5 colors for everything and no borders or padding on anything.  "Derpity" GTK theme with matched colors and dmenu_run for launching.

in ~/.gtk-3.0/settings.ini

 gtk-color-scheme="tooltip_fg_color:#d4d4d4\nbase_color:#323232\nselected_fg_color:#d4d4d4\ntext_color:#d4d4d4\nbg_color_dark:#383838\nbg_color:#191919\ntooltip_bg_color:#323232\nselected_bg_color:#646464\nfg_color:#d4d4d4\n" 

in ~/.xbindkeysrc

 #dmenu
"dmenu_run -i -fn '-*-Clean-*-*-*-*-12-*-*-*-*-*-*-*' -nb '#191919' -nf '#d4d4d4' -sb '#191919' -sf '#00c000'"
    m:0x40 + c:135
    Mod4 + Menu

Clean:

http://i1060.photobucket.com/albums/t45 … fa06b7.png

Dirty:

http://i1060.photobucket.com/albums/t45 … 7f3c49.png

autostart: http://pastebin.com/qcFBzN2b
panel.sh: http://pastebin.com/EycJBa6a


moderator edit: The images are too large. Please read Forum Etiquette: Pasting Pictures and Code and screenshot posting rules. Thanks. --fsckd

Last edited by fsckd (2012-08-17 14:45:54)

Offline

#16 2012-08-17 09:40:51

The Compiler
Member
From: Switzerland
Registered: 2011-05-01
Posts: 214
Website

Re: herbstluftwm screenshots and config

Yay for the bump!

Mine: (click for a bigger image)

http://the-compiler.org/img/screenshots … _06_25.png

Panel selfmade (mixture of conky, dzen2 and trayer), wallpaper selfmade. Configs upon request since there are quite a few of them and I'm a lazy bum.


moderator edit: The image is still too large. I have replaced it with a link for you this time. Please read Forum Etiquette: Pasting Pictures and Code and screenshot posting rules. Thanks. --fsckd

Last edited by fsckd (2012-08-17 14:48:23)


>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance

Offline

#17 2012-08-17 12:01:51

Thom
Member
Registered: 2012-05-22
Posts: 72
Website

Re: herbstluftwm screenshots and config

I like the font.
Could you share its name ?

Thanks.

Offline

#18 2012-08-17 12:27:03

The Compiler
Member
From: Switzerland
Registered: 2011-05-01
Posts: 214
Website

Re: herbstluftwm screenshots and config

Thom wrote:

I like the font.
Could you share its name ?

It's Proggy Tiny (or proggyfonts in AUR)


>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance

Offline

#19 2012-08-17 14:09:11

Thom
Member
Registered: 2012-05-22
Posts: 72
Website

Re: herbstluftwm screenshots and config

thanks.

You make my Friday.

Offline

#20 2012-09-17 12:26:48

simon.swe
Member
From: sverige
Registered: 2012-02-26
Posts: 148
Website

Re: herbstluftwm screenshots and config

http://ompldr.org/vZml2dA
mine big_smile

slightly tweaked http://ompldr.org/vZml3NQ

Last edited by simon.swe (2012-09-17 13:00:00)

Offline

#21 2012-09-17 13:16:58

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: herbstluftwm screenshots and config

simon.swe wrote:

You're Swedish but read Dutch subtitles?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#22 2012-09-17 13:30:39

Thom
Member
Registered: 2012-05-22
Posts: 72
Website

Re: herbstluftwm screenshots and config

Nice bar.

Offline

#23 2012-09-17 15:24:55

simon.swe
Member
From: sverige
Registered: 2012-02-26
Posts: 148
Website

Re: herbstluftwm screenshots and config

Unia wrote:
simon.swe wrote:

You're Swedish but read Dutch subtitles?

swedish subtitles are just luxury smile

Offline

#24 2012-09-17 19:40:26

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: herbstluftwm screenshots and config

simon.swe wrote:
Unia wrote:
simon.swe wrote:

You're Swedish but read Dutch subtitles?

swedish subtitles are just luxury smile

Knulla i röven cool

Offline

#25 2012-09-18 13:00:42

simon.swe
Member
From: sverige
Registered: 2012-02-26
Posts: 148
Website

Re: herbstluftwm screenshots and config

Shinryuu wrote:
simon.swe wrote:
Unia wrote:

You're Swedish but read Dutch subtitles?

swedish subtitles are just luxury smile

Knulla i röven cool

Böga i skitan. big_smile

Offline

Board footer

Powered by FluxBB