guest@dotshare [~/groups/wms/herbstluft] $ ls Herbstgoesboom/ | cat

Herbstgoesboom (scrot) (+7 likes)

Shinryuu Feb 24, 2014 (wms/herbstluft)

autostart.sh(raw, dl)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/bash

# this is a simple config for herbstluftwm

hc() {
    herbstclient "$@"
}

hc emit_hook reload
#nitrogen --restore &

# remove all existing keybindings
hc keyunbind --all

# keybindings
Mod=Mod1    # Use alt as the main modifier

#herbstclient load ${TAG_NAMES[0]} '(clients max:0)'

# tags
TAG_NAMES=( term web img herb null foo )
TAG_KEYS=( {1..6} 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 "Control-$key" use_index "$i"
        hc keybind "$Mod-Shift-$key" move_index "$i"
    fi
done

# custom commands
hc keybind $Mod-p spawn dmenu_run
hc keybind $Mod-1 spawn dwb
hc keybind $Mod-2 spawn mygtkmenu /home/shn/.menu
hc keybind $Mod-3 spawn gimp
hc keybind $Mod-Shift-Return spawn termite

hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-Shift-c close

# gaps
hc keybind $Mod-section pad 0 16 0 0
hc keybind $Mod-apostrophe pad 0 0 0 0

# xcmenu aka. loliclip
hc keybind Control-adiaeresis spawn xcmenuctrl
hc keybind Control-odiaeresis spawn lolimpdnu

# herbstluftwm layout manager
hc keybind Control-section spawn ~/bin/hlwm_lm.sh load
hc keybind Control-apostrophe spawn ~/bin/hlwm_lm.sh save

# focusing clients
hc keybind $Mod-j     focus left
hc keybind $Mod-k     focus down
hc keybind $Mod-i     focus up
hc keybind $Mod-l     focus right

# moving clients
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
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

# splitting frames
# create an empty frame at the specified direction
hc keybind $Mod-w       split   bottom  0.5
hc keybind $Mod-q       split   right   0.5
# let the current frame explode into subframes
hc keybind $Mod-e split explode

# resizing frames
resizestep=0.01
hc keybind Control-j		resize left +$resizestep
hc keybind Control-k		resize down +$resizestep
hc keybind Control-i		resize up +$resizestep
hc keybind Control-l		resize right +$resizestep
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

# cycle through tags
hc keybind $Mod-adiaeresis use_index +1 --skip-visible
hc keybind $Mod-odiaeresis use_index -1 --skip-visible

# layouting
hc keybind $Mod-r remove
hc keybind $Mod-Shift-Tab cycle_layout 1
hc keybind $Mod-Shift-f floating toggle
hc keybind $Mod-Shift-m fullscreen toggle
hc keybind $Mod-Shift-p pseudotile toggle

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

# focus
hc keybind Control-period   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-u jumpto urgent

# colors
hc set frame_border_active_color '#303030'
hc set frame_border_normal_color '#1f1f22'
hc set frame_bg_active_color '#303033'
hc set frame_bg_normal_color '#1f1f22'
hc set window_border_active_color '#303033'
hc set window_border_normal_color '#1f1f22'
hc set window_border_urgent_color '#4cdcd4'
hc set frame_border_width 2
hc set window_border_width 1
hc set window_border_inner_width 0
hc set always_show_frame 0
hc set frame_gap 0
hc set frame_bg_transparent 1

# add overlapping window borders
hc set window_gap 0
hc set frame_padding 0
hc set smart_window_surroundings 0
hc set smart_frame_surroundings 1
hc set mouse_recenter_gap 0

# rules
hc unrule -F
#hc rule class=XTerm tag=3 # move all xterms to tag 3
hc rule focus=on # 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=Dwb tag=term focus=on
hc rule class=mpv tag=term focus=on
hc rule class=wine tag=term focus=on

# unlock, just to be sure
hc unlock

herbstclient set tree_style '╾│ ├└╼─┐'

# do multi monitor setup here, e.g.:
#hc set_monitors 1280x1024+0+0 1920x1080+1280+0
# or simply:
hc detect_monitors

## panel for main monitor -- ignore second monitor
# hc pad 0 14 0 0 0

# find the panel
panel=~/.config/herbstluftwm/panel.sh
[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
    # start it on each monitor
    "$panel" &
done

CLICK TO VIEW

x

panel.sh(raw, dl)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/bash

# disable path name expansion or * will be expanded in the line
# cmd=( $line )

# easter eggs
sep_m="%{B#292929}%{F#833228}  %{F-}%{B-}"
sep_v="%{B#292929}%{F#596875}  %{F-}%{B-}"
sep_d="%{B#292929}%{F#8c5b3e}  %{F-}%{B-}"
sep_c="%{B#292929}%{F#917154}  %{F-}%{B-}"

set -f

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

monitor=${1:-0}

herbstclient pad $monitor 16

funtion statusbar
{
    # events:
    mpc idleloop player | cat &
    
    # date
    while true ; do
        date +'date_min %H:%M'
        sleep 1 || break
    done > >(uniq_linebuffered) &
    date_pid=$!
    
    while true ; do
	echo "vol $(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/')%"
	sleep 1 || break
    done > >(uniq_linebuffered) &
    volume_pid=$!

    # hlwm events
    herbstclient --idle

    # exiting; kill stray event-emitting processes
    kill $date_pid $mpd_pid
} 2> /dev/null | {
    TAGS=( $(herbstclient tag_status $monitor) )
    unset TAGS[${#TAGS[@]}]
    date_min="--"
    nowplaying="nothing to see here"
    windowtitle="...what have you done?"
    visible=true

    while true ; do
        echo -n "%{l}"
        for i in "${TAGS[@]}" ; do
            case ${i:0:1} in
                '#') # current tag
                    echo -n "%{B#833228}"
                    ;;
                '+') # active on other monitor
                    echo -n "%{B#917154}"
                    ;;
                ':')
                    echo -n "%{B-}"
                    ;;
                '!') # urgent tag
                    echo -n "%{B#917154}"
                    ;;
                *)
                    echo -n "%{B-}"
                    ;;
            esac
            echo -n " ${i:1} "
        done
	
	echo -n "%{c}$sep_c%{B#292929} ${windowtitle//^/^^} %{B-}"
	
        # align right
        echo -n "%{r}"
	echo -n "$sep_m"
	echo -n " $nowplaying "
        echo -n "$sep_v"
        echo -n " $volume "
        echo -n "$sep_d"
        echo -n " $date_min "
        echo " "
        # wait for next event
        read line || break
        cmd=( $line ) 
        # find out event origin
        case "${cmd[0]}" in
            tag*)
                TAGS=( $(herbstclient tag_status $monitor) )
                unset TAGS[${#TAGS[@]}]
                ;;
            vol)
                volume="${cmd[@]:1}"
                ;;
            date_min)
                date_min="${cmd[@]:1}"
                ;;
	    mpd_player|player)
                nowplaying="$(mpc current -f '%artist% - %title%')"
                ;;
		focus_changed|window_title_changed)
                windowtitle="${cmd[@]:2}"
                ;;
            quit_panel)
                exit
                ;;
            reload)
                exit
                ;;
        esac
    done
} 2> /dev/null | bar -g x16+1280 -B "#1f1f22" -F '#a8a8a8' -f '*-stlarch-medium-r-*-*-10-*-*-*-*-*-*-*,-*-cure.se-medium-r-*-*-11-*-*-*-*-*-*-*' $1
 

x

Notes

I love to fiddle with things so I migrated from monsterwm to herbstluftwm. This is my random setup I have been working on for a while. Panel is lemonboy’s (wip branch) bar so config.def.h is not needed anymore (everyhing is dynamic). I use a layout manager (a bash script) to keep things in order and you can get it from herbstluftwm’s home page.

You can grab my terminal colors from here, http://dotshare.it/dots/737/

fonts:
stlarch (..icons), berry and cure.se

applications:
irc = weechat
text editor = vim
terminal = termite
video player = mpv
visualizer = mpdviz
file manager = ranger
panel = bar (wip branch)
music player = mpd + ncmpcpp

Comments

Alphanumerix said about 10 years ago

panel.sh: line 22: You have a typo: funtion –> function.

And small notice for arch/manjaro/etc users: bar panel is available in AUR, search for package “bar-aint-recursive”. Binary name is different, so You have to link bar-aint-recursive to bar (not very smart, imho) or edit panel.sh and change binary name in there.

@op: Great job! :) Thanks for sharing!

edited about 10 years ago

Jhin said about 8 years ago

This is the most beautiful theme i’ve ever seen.

edited about 8 years ago