You are not logged in.

#1 2017-04-23 18:25:35

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Herbstluftwm Configs

Hello! I'm sharing my simple modified herbstluftwm config with anyone interested to try herbstluft window manager.
Personally left me very fine impressions with his features.

herbstluftwm a manual tiling window manager for X11 using Xlib and Glib.

AUTOSTART

#!/bin/bash
# this is a simple config for herbstluftwm

function hc() {
    herbstclient "$@"
}

hc emit_hook reload

# remove all existing keybindings
hc keyunbind --all

# keybindings
# if you have a super key you will be much happier with Mod set to Mod4
Mod=Mod1    # Use alt as the main modifier
#Mod=Mod4   # Use the super key as the main modifier

hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-x close
hc keybind $Mod-u spawn rxvt
hc keybind $Mod-Shift-p spawn dmenu_run -p '>>>' -nb rgb:11/15/1C -nf rgb:A6/A6/A6 -sb rgb:A6/A6/A6 -sf rgb:00/00/00
hc keybind $Mod-Shift-s spawn spacefm
hc keybind $Mod-Shift-d spawn deadbeef
hc keybind $Mod-Shift-i spawn palemoon
hc keybind $Mod-b pad 0 14 0 14 0
hc keybind $Mod-Shift-b pad 0 0 0 0 0
hc keybind Shift-Up spawn amixer set Master 1+
hc keybind Shift-Down spawn amixer set Master 1-

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

# splitting frames
# create an empty frame at the specified direction
hc keybind $Mod-v split vertical 0.5
hc keybind $Mod-Shift-v split vertical 0.3
hc keybind $Mod-h split horizontal 0.5
hc keybind $Mod+Shift+h split horizontal 0.3

# let the current frame explode into subframes
hc keybind $Mod-Control-space split explode

# resizing frames
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
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

# tags
TAG_NAMES=( "0000" "0001" "0010" "0011" "0100" )
TAG_KEYS=( {1..5} 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

# cycle through tags
hc keybind $Mod-period use_index +1 --skip-visible
hc keybind $Mod-comma  use_index -1 --skip-visible

# layouting
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle

# mouse
hc mouseunbind
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-i jumpto urgent

# theme
hc attr theme.tiling.reset 1
hc attr theme.floating.reset 1
hc set frame_border_width 0
hc set frame_bg_transparent 1
hc set frame_transparent_width 0
hc set frame_gap 0
hc set always_show_frame 0

hc attr theme.tiling.outer_color '#11151C'
hc attr theme.floating.outer_color '#11151C'
hc attr theme.active.outer_color '#11151C'
hc attr theme.active.color '#783e57'
hc attr theme.normal.color '#30293f'
hc attr theme.urgent.color '#c81a71'
hc attr theme.outer_width 3
hc attr theme.border_width 6

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 focus new clients
#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|DESKTOP)' manage=off

# unlock, just to be sure
hc unlock

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

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


# 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" $monitor &
done

PANEL TOP

#!/bin/bash

hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
monitor=${1:-0}
geometry=( $(herbstclient monitor_rect "$monitor") )
if [ -z "$geometry" ] ;then
    echo "Invalid monitor $monitor"
    exit 1
fi
# geometry has the format W H X Y
x=${geometry[0]}
y=${geometry[1]}
panel_width=${geometry[2]}
panel_height=14
font='Terminus-14'
bgcolor='#2a2437'
selbg='#783e57'
selfg='#101010'

####
# Try to find textwidth binary.
# In e.g. Ubuntu, this is named dzen2-textwidth.
if which textwidth &> /dev/null ; then
    textwidth="textwidth";
elif which dzen2-textwidth &> /dev/null ; then
    textwidth="dzen2-textwidth";
else
    echo "This script requires the textwidth tool of the dzen2 project."
    exit 1
fi
####
# true if we are using the svn version of dzen2
# depending on version/distribution, this seems to have version strings like
# "dzen-" or "dzen-x.x.x-svn"
if dzen2 -v 2>&1 | head -n 1 | grep -q '^dzen-\([^,]*-svn\|\),'; then
    dzen2_svn="true"
else
    dzen2_svn=""
fi

if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then
    # mawk needs "-W interactive" to line-buffer stdout correctly
    # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593504
    uniq_linebuffered() {
      awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@"
    }
else
    # other awk versions (e.g. gawk) issue a warning with "-W interactive", so
    # we don't want to use it there.
    uniq_linebuffered() {
      awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
    }
fi

hc pad $monitor $panel_height

{
    ### Event generator ###
    # based on different input data (mpc, date, hlwm hooks, ...) this generates events, formed like this:
    #   <eventname>\t<data> [...]
    # e.g.
    #   date    ^fg(#efefef)18:33^fg(#909090), 2013-10-^fg(#efefef)29

    #mpc idleloop player &
    while true ; do
        # "date" output is checked once a second, but an event is only
        # generated if the output changed compared to the previous run.
        date +$'date\t^fg(#885d50)%A %d, %I:%M %p'
        sleep 1 || break
    done > >(uniq_linebuffered) &
    childpid=$!
    hc --idle
    kill $childpid
} 2> /dev/null | {
    IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)"
    visible=true
    date=""
    windowtitle=""
    while true ; do

        ### Output ###
        # This part prints dzen data based on the _previous_ data handling run,
        # and then waits for the next event to happen.

        bordercolor="#26221C"
        separator="^bg()^fg($selbg)|"
        # draw tags
        for i in "${tags[@]}" ; do
            case ${i:0:1} in
                '#')
                    echo -n "^bg($selbg)^fg($selfg)"
                    ;;
                '+')
                    echo -n "^bg(#9CA668)^fg(#141414)"
                    ;;
                ':')
                    echo -n "^bg()^fg(#783e57)"
                    ;;
                '!')
                    echo -n "^bg(#FF0675)^fg(#141414)"
                    ;;
                *)
                    echo -n "^bg()^fg(#885d50)"
                    ;;
            esac
            if [ ! -z "$dzen2_svn" ] ; then
                # clickable tags if using SVN dzen
                echo -n "^ca(1,\"${herbstclient_command[@]:-herbstclient}\" "
                echo -n "focus_monitor \"$monitor\" && "
                echo -n "\"${herbstclient_command[@]:-herbstclient}\" "
                echo -n "use \"${i:1}\") ${i:1} ^ca()"
            else
                # non-clickable tags if using older dzen
                echo -n " ${i:1} "
            fi
        done
        echo -n "$separator"
        echo -n "^bg()^fg() ${windowtitle//^/^^}"
        # small adjustments
        right="$separator^bg() $date $separator"
        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 "^pa($(($panel_width - $width)))$right"
        echo

        ### Data handling ###
        # This part handles the events generated in the event loop, and sets
        # internal variables based on them. The event and its arguments are
        # read into the array cmd, then action is taken depending on the event
        # name.
        # "Special" events (quit_panel/togglehidepanel/reload) are also handled
        # here.

        # wait for next event
        IFS=$'\t' read -ra cmd || break
        # find out event origin
        case "${cmd[0]}" in
            tag*)
                #echo "resetting tags" >&2
                IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)"
                ;;
            date)
                #echo "resetting date" >&2
                date="${cmd[@]:1}"
                ;;
            quit_panel)
                exit
                ;;
            togglehidepanel)
                currentmonidx=$(hc list_monitors | sed -n '/\[FOCUS\]$/s/:.*//p')
                if [ "${cmd[1]}" -ne "$monitor" ] ; then
                    continue
                fi
                if [ "${cmd[1]}" = "current" ] && [ "$currentmonidx" -ne "$monitor" ] ; then
                    continue
                fi
                echo "^togglehide()"
                if $visible ; then
                    visible=false
                    hc pad $monitor 0
                else
                    visible=true
                    hc pad $monitor $panel_height
                fi
                ;;
            reload)
                exit
                ;;
            focus_changed|window_title_changed)
                windowtitle="${cmd[@]:2}"
                ;;
            #player)
            #    ;;
        esac
    done

    ### dzen2 ###
    # After the data is gathered and processed, the output of the previous block
    # gets piped to dzen2.

} 2> /dev/null | dzen2 -w $panel_width -x $x -y $y -fn 'ohsnap-9' -h $panel_height \
    -e 'button3=;button4=exec:herbstclient use_index -1;button5=exec:herbstclient use_index +1' \
    -ta l -bg "$bgcolor" -fg '#4F5E87' | "./.config/herbstluftwm/dzpanb.sh"

PANEL BOTTOM

#!/bin/sh
FONT='ohsnap-9'
conky -c "./.config/herbstluftwm/conkyrc" | dzen2 -bg "#2a2437" -ta right -w 1280 -h 14 -x 0 -y -1 -fn $FONT &
exit

CONKY-CLI

out_to_console yes
background no
update_interval 2
total_run_times 0
use_spacer none
short_units yes

TEXT
^fg(\#635365)^i($HOME/.config/herbstluftwm/xbmicons/cpu.xbm) ^ca(1,rxvt -e top -u ${exec whoami})^fg(\#885d50)${cpu cpu1}% ${cpu cpu2}%^ca() #/
^fg(\#635365)^i($HOME/.config/herbstluftwm/xbmicons/mem.xbm) ^fg(\#885d50)${memperc}% #/
^fg(\#783e57)| #/
^fg(\#635365)^i($HOME/.config/herbstluftwm/xbmicons/spkr_01.xbm)^ca(1,rxvt -e alsamixer -g) ^fg(\#885d50)${exec amixer get Master -M | grep -oE "[[:digit:]]*%"}^ca()   #/
^fg(\#783e57)^i($HOME/.config/herbstluftwm/xbmicons/arr.xbm)^bg(\#783e57)^ca(1,rxvt)^fg(\#2A282F)Term^ca()#/
^fg(\#4F5E87)^i($HOME/.config/herbstluftwm/xbmicons/arr.xbm)^bg(\#4F5E87)^ca(1,$HOME/.config/palemoon/palemoon)^fg(\#2A282F)Web^ca()#/
^fg(\#87784F)^i($HOME/.config/herbstluftwm/xbmicons/arr.xbm)^bg(\#87784F)^ca(1,spacefm)^fg(\#2A282F)Files^ca()#/
^fg(\#885d50)^i($HOME/.config/herbstluftwm/xbmicons/arr.xbm)^bg(\#885d50)^ca(1,$HOME/.dbeef/deadbeef)^fg(\#2A282F)Audio^ca()^fg(\#2a2437)^i($HOME/.config/herbstluftwm/xbmicons/arr.xbm)^ca()^bg(\#2a2437)#/
^fg(\#885d50)${exec whoami}^fg(\#635365)@^fg(\#885d50)$nodename  #/

DECORATION FOR LAUNCHERS
Note: Copy/Paste the below chars to a txt editor, rename to arr.xbm to be done an *.xbm separator icon.

#define mt2_width 30
#define mt2_height 30
static unsigned char mt2_bits[] = {
   0xff, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
   0xf8, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0xff, 0x3f,
   0xc0, 0xff, 0xff, 0x3f, 0x80, 0xff, 0xff, 0x3f, 0x00, 0xff, 0xff, 0x3f,
   0x00, 0xfe, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f,
   0x00, 0xf0, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0x3f,
   0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0xfe, 0x3f,
   0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0xf0, 0x3f,
   0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x80, 0x3f,
   0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3c,
   0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x20 };

OTHER ADDS
dzen2 panel
conky-cli
ohsnap
terminus-font
urban color palette
*.xbm icons
rxvt-unicode
ALSA
DeaDBeeF
Pale Moon
SpaceFM
procps
dmenu

DATA PROVIDED BY:
herbstluftwm panels
30 Window Managers in 30 days
dzen2-decorations

THANKS
Everyone that helped with works/code and ideas.
Users: 2ManyDogs, dkeg, PackRat - Distro's: #!/BunsenLabs/LinuxBBQ/VSIDO/Arch Wiki/

Images actions
viewtopic.php?pid=50370#p50370

Edited: RE-made a new concept/code, two panels on different view now (top/bottom)
-----------------------------------
Compars herbs vs spectrwm from my view/ short experience,
These are my findings, correct or wrong:

Herbs
PRO: herbstluftwm+dzen2 full screen feature regarding player/viewer i can now watch freely without worrying about panel focus on top.
Pads feature are managed better on this WM.
Navigating tags [1][2][3][4] with mouse wheel fulfills my wish thanks to dzen2.

CON: Float, float is not that great. For example i can't use float like i did on spectrwm i mean like this image yet in default config. Maybe i must learn to tweak it for individual window floats.
dzen2 doesn't support xft font on panel on herbswm? Asian txt/UTF-8 appears like [][][][] while SpectrWM panel xft runs just fine.
Compiling dzen2 with xft support may fix it.

Spectrwm
PRO: Very minimal tiling WM, i love his individual floats options.
Combination of conky-cli aswell baraction.sh are very good and very easy to config.
For anyone who will like entering on the tiling world. SpectrWM is a good start.

CON: Dzen2 have some issue on spectrwm panel that doesn't hide on a video / image full screen.

As they says: there is always a plus/minus from one to another WM.
I did herbstluftwm this time.

My efforts are done on a Jessie stable system.
With coming of Stretch there may be various improvements and adjustments.

Edited
1/ fixed right-click that crash bottom panel
2/ img added on screenshot thread

Last edited by Nili (2017-06-14 07:32:09)


Tumbleweed | KDE Plasma

Offline

#2 2017-06-14 08:24:57

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Herbstluftwm Configs

Hi again! I'm trying to make a different connection with herbstluftwm + tint2.
Since herbstluftwm doesn't have a default toolbar, tint2 i think is a good solution.
Sounds a bit weird, we rarely see such a combination but works miraculously. I'm really surprised by the result. So I'll use it for a while

herbstluftwm config @~/.config/herbstluftwm/autostart

sudo apt-get install herbstluftwm --no-install-recommends
#!/bin/bash
# this is a simple config for herbstluftwm

# this will append all commands to an array called $cmds
cmds=()

function hc() {
  cmds+=(";" "$@")
}

hc emit_hook reload

# remove all existing keybindings
hc keyunbind --all

# keybindings
# if you have a super key you will be much happier with Mod set to Mod4
Mod=Mod1    # Use alt as the main modifier
#Mod=Mod4   # Use the super key as the main modifier

hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-x close
hc keybind $Mod-u spawn urxvt
hc keybind $Mod-a spawn urxvt -e alsamixer -g
hc keybind $Mod-t spawn urxvt -e top
hc keybind $Mod-o spawn urxvt -e ranger /media
hc keybind $Mod-Shift-p spawn dmenu_run -p '>>>' -nb rgb:0D/15/1D -nf rgb:61/57/72 -sb rgb:9B/50/70 -sf rgb:D4/C3/BA -fn -*-Terminus-*-*-*-*-31-*-*-*-*-*-iso10646-*
hc keybind $Mod-Shift-s spawn spacefm
hc keybind $Mod-Shift-d spawn deadbeef
hc keybind $Mod-Shift-i spawn palemoon
hc keybind $Mod-b pad 0 32 0 0 0
hc keybind $Mod-Shift-b pad 0 0 0 0 0
hc keybind Shift-Up spawn amixer set Master 1+
hc keybind Shift-Down spawn amixer set Master 1-

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

# splitting frames
# create an empty frame at the specified direction
hc keybind $Mod-v split vertical 0.5
hc keybind $Mod-Shift-v split vertical 0.3
hc keybind $Mod-h split horizontal 0.5
hc keybind $Mod+Shift+h split horizontal 0.3

# let the current frame explode into subframes
hc keybind $Mod-Control-space split explode

# resizing frames
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
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

# tags
TAG_NAMES=( "0001" "1010" "0100" )
TAG_KEYS=( {1..3} 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

# cycle through tags
hc keybind $Mod-period use_index +1 --skip-visible
hc keybind $Mod-comma  use_index -1 --skip-visible

# layouting
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle

# mouse
hc mouseunbind
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-i jumpto urgent

# theme
hc attr theme.tiling.reset 1
hc attr theme.floating.reset 1
hc set frame_border_width 0
hc set frame_bg_transparent 1
hc set frame_transparent_width 0
hc set frame_gap 0
hc set always_show_frame 0

hc attr theme.tiling.outer_color '#0D151D'
hc attr theme.floating.outer_color '#0D151D'
hc attr theme.active.outer_color '#0D151D'
hc attr theme.active.color '#87404f'
hc attr theme.normal.color '#2a2437'
hc attr theme.urgent.color '#c81a71'
hc attr theme.outer_width 3
hc attr theme.border_width 6

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 focus new clients
#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|DESKTOP)' manage=off

# unlock, just to be sure
hc unlock

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

### Execute the chained commands ###
herbstclient chain "${cmds[@]}" &

#Autostart apps
(sleep 1s && tint2) & 

@~/.config/tint2/tint2rc

tint2 config

sudo apt-get install tint2 --no-install-recommends
# ID 1
rounded = 0
border_width = 0
background_color = #000000 0
border_color = #000000 0

# ID 2 - tooltip
rounded = 0
border_width = 0
background_color = #783e57 100
border_color = #783e57 90

# ID 3 - taskbar
rounded = 0
border_width = 0
background_color = #ffffff 10
border_color = #000000 0

# ID 4 - active taskbar
rounded = 0
border_width = 0
background_color = #ffffff 40
border_color = #000000 0

# ID 5 - task
rounded = 0
border_width = 0
background_color = #ffffff 10
border_color = #000000 0

# ID 6 - active task
rounded = 0
border_width = 0
background_color = #ffffff 20
border_color = #000000 0

# Panel
panel_monitor = all
panel_items = LTSC
panel_position = top center horizontal
panel_size = 100% 33
panel_margin = 0 -1
panel_padding = 1 0
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1

# Launcher
launcher_padding = 2 2
launcher_background_id = 6
launcher_icon_size = 32
launcher_icon_theme = Bee cells - white actions
launcher_item_app = /home/nili/.local/share/applications/rxvt-unicode.desktop
launcher_item_app = /home/nili/.local/share/applications/userapp-Pale Moon-2TRAXE.desktop
launcher_item_app = /usr/share/applications/spacefm.desktop
launcher_item_app = /home/nili/.local/share/applications/deadbeef-usercreated-12.desktop

# Taskbar
taskbar_mode = multi_desktop
taskbar_padding = 0 0 1
taskbar_background_id = 5
taskbar_active_background_id = 6
taskbar_name = 1
taskbar_name_background_id = 0
taskbar_name_active_background_id = 5
taskbar_name_font = Terminus 14
taskbar_name_font_color = #A1A1A1 100
taskbar_name_active_font_color = #E0E0E0 100

# Tasks
urgent_nb_of_blink = 10
task_icon = 1
task_text = 0
task_centered = 1
task_maximum_size = 40 40
task_padding = 2 2
task_background_id = 3
task_active_background_id = 6
task_urgent_background_id = 4
task_iconified_background_id = 3

# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 80 0 0

# Fonts
task_font = Terminus 06_55 6
task_font_color = #828282 60
task_active_font_color = #828282 100
task_urgent_font_color = #FFFFFF 100
task_iconified_font_color = #d8d8d8 60
font_shadow = 0

# Clock
time1_format = %H:%M
time1_font = Terminus 14
clock_font_color = #E0E0E0 100
clock_padding = 4 4
clock_background_id = 6
clock_tooltip = %A, %B %d, %Y
clock_lclick_command = urxvt -geometry 56x10-8+8 -e bash -c "ncal -3 && sleep 5"
clock_rclick_command = urxvt -geometry 56x10-8+8 -e bash -c "ncal -3 && sleep 5"

# Tooltips
tooltip = 1
tooltip_padding = 0 0
tooltip_show_timeout = 0.0
tooltip_hide_timeout = 0.0
tooltip_background_id = 2
tooltip_font_color = #FFFFFF 60
tooltip_font = YOzFontAF90 14

# System Tray
systray = 1
systray_padding = 0 1 0
systray_sort = ascending
systray_background_id = 6
systray_icon_size = 32
systray_icon_asb = 100 0 0

# Mouse
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify

# End of config

conky-std @home ~/.conkyrc

Code below optimized and well arranged by master Sector11

sudo apt-get install conky-std --no-install-recommends
# pkill -xf "conky -c /media/5/conky/NiliOstrich.conky" &
# CONKY #

#	 you use ${font Ostrich Sans:pixelsize=80} only once - first line.
#	 turn it off with ${font} and the default font takes over:
xftfont Ostrich Sans:pixelsize=40
#	 so you do not require ${font Ostrich Sans:pixelsize=40} below TEXT at all.
use_xft yes
xftalpha 0.1
update_interval 2
total_run_times 0

own_window yes
#own_window class desktop ## error: own_window_class
#	 own_window_class desktop ## See "own_window_type"
#	 own_window_class = Manually set the WM_CLASS name. Defaults to "Conky".
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
#	 minimum_size 180 15	## you have minimum_size twice
				## see just above TEXT
				## any commnd repeated and conky uses the last one.
maximum_width 180
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
alignment top_left
gap_x 20
gap_y 38
no_buffers yes
uppercase yes
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer none

#default_color FFFFFF
#color1 D4C3BA
#color2 9B5070
#color3 0D151D

default_color D4C3BA  ## you use this in every line except the first line
#color1 D4C3BA
color2 9B5070 ## this is used on the first line.
color3 0D151D

# ${colorX} like ${font XYZ} will stay constantant unless changed
# the only time you need another ${colorX} or ${font XYZ} call is
# to change the color or font turn them off ${color} ${font} which
# will then use the "default" values as seen above.

minimum_size 10 10		## S11 test S11 test S11 test S11 test ###
minimum_size 180 20		## this is the "minimum_size" that conky will use.

TEXT
${font Ostrich Sans:pixelsize=80}${color2}${voffset 15}$nodename${color}${font}
${voffset 15}Uptime: ${uptime_short}
${voffset 15}Vol: ${exec amixer get Master -M | grep -oE "[[:digit:]]*%"}
${voffset 15}Cpu: ${cpu cpu}%
${voffset 15}/: ${fs_used_perc /}%
${voffset 15}Mem: ${memperc}%

Simple preview:
35259296826_5421b15d9b_n.jpg 35133118322_38d8eb4fde_n.jpg 35139685312_e79836b173_n.jpg 35265925776_93bfa173f0_n.jpg

.xinitrc startups

# ░▒▓█ Xrandr █▓▒░
xrandr --output VGA1 --mode 1280x1024 --rate 75

# ░▒▓█ feh █▓▒░
feh --randomize --bg-fill ~/pictures/*

# ░▒▓█ turnoff screen █▓▒░
xset b off &
xset s on +dpms &

# ░▒▓█ launch conky █▓▒░
conky &

# ░▒▓█ launch herbstluftwm █▓▒░
exec herbstluftwm --locked

Additional apps:
feh - (graphics): imlib2 based image viewer
Very light image viewer, sets wallpapers in different formats. Absolutely default img viewer on my OS.

ostrich-sans font for workspaces conky.
Bee cells very nice icons packages by ZMA

So, those are my new WM settings.
Yes, there is nothing new just a simple minimal effort to do something different when having nothing else better to do smile

If you have any suggestions, ideas or complain just strike here. Thank you!

Regards!
Nili

Last edited by Nili (2017-06-14 16:42:45)


Tumbleweed | KDE Plasma

Offline

#3 2017-06-14 09:49:23

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: Herbstluftwm Configs

I might have to give this wm a try, i just wish i could pronounce  it  big_smile

Nice work Nili, thanks for sharing.

Last edited by Steve (2017-06-14 10:38:42)

Offline

#4 2017-06-14 10:09:20

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Herbstluftwm Configs

Steve wrote:

I might have to give this wm a try, i just wish i could pronunce  it  big_smile

Nice work Nili, thanks for sharing.

Hi Steve, Better start from their Index The most suitable place to enter on the game.
According to Wikipedia, You can pronunce as "hlwm", "herbstluft" or "autumn air".

Hope to looks interestingly on you. This is my 3rd WM after openbox/spectrwm. But i like as well dwm, i3, fluxbox also JWM sometimes. WM's are excellent smile

Last edited by Nili (2017-06-14 10:10:07)


Tumbleweed | KDE Plasma

Offline

#5 2017-06-15 01:52:55

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,897

Re: Herbstluftwm Configs

Think you can use JWM with tint2 as the taskbar in JWM can be hidden or removed (with some tricks). Those hlwm shots look good so might try it on an old IBM Thinkpad T42 that I use as a netbook.

Last edited by DeepDayze (2017-06-15 02:01:02)


Real Men Use Linux

Offline

#6 2017-06-15 07:43:26

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Herbstluftwm Configs

DeepDayze wrote:

Think you can use JWM with tint2 as the taskbar in JWM can be hidden or removed (with some tricks). Those hlwm shots look good so might try it on an old IBM Thinkpad T42 that I use as a netbook.

That's right, I've tried it and went for beauty.
I like JWM panelbar aswell. It's a bit hard to make it looks good but with some efforts can be reached.

My hlwm efforts are just plain and minimal without much dirty hacks, i like plain and simple things. Less is more smile


Tumbleweed | KDE Plasma

Offline

#7 2017-09-24 12:37:09

Addy
Member
From: Most populated island on Earth
Registered: 2017-07-14
Posts: 89
Website

Re: Herbstluftwm Configs

Nili wrote:

CON: Float, float is not that great. For example i can't use float like i did on spectrwm i mean like this image yet in default config. Maybe i must learn to tweak it for individual window floats.

Maybe set layout to max can solve your problem smile
The default keybind for max is mod+w
I heard individual float in herbstluftwm only work if the layout is max.


If it ain't broke, then tweak it until it breaks.

Offline

#8 2017-09-24 13:32:51

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Herbstluftwm Configs

Addy wrote:

Maybe set layout to max can solve your problem smile
The default keybind for max is mod+w
I heard individual float in herbstluftwm only work if the layout is max.

Thanks Addy, Indeed with maximize window fix that concern, i use those shortcuts already.

# layouting
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle

This feature existed but I didn't knew early when i started the topic, later learned the usage.

however, spectrwm handle way better window floats in my opinion. HLWM still on use on my desktop.

Thanks again for your adds!

Best regards!


Tumbleweed | KDE Plasma

Offline

#9 2017-10-02 15:30:16

Addy
Member
From: Most populated island on Earth
Registered: 2017-07-14
Posts: 89
Website

Re: Herbstluftwm Configs

Nili wrote:

Thanks Addy, Indeed with maximize window fix that concern, i use those shortcuts already.

# layouting
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle

This feature existed but I didn't knew early when i started the topic, later learned the usage.

however, spectrwm handle way better window floats in my opinion. HLWM still on use on my desktop.

Thanks again for your adds!

Best regards!

You are very welcome smile
Learning this WM is really interesting. I'm getting smarter everyday big_smile
I also feel that herbstluftwm is not designed to be floating.
And I just installed spectrwm, let's see what I can do with this WM  wink


If it ain't broke, then tweak it until it breaks.

Offline

#10 2017-10-03 14:29:29

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Herbstluftwm Configs

Addy wrote:

You are very welcome smile
Learning this WM is really interesting. I'm getting smarter everyday big_smile
I also feel that herbstluftwm is not designed to be floating.
And I just installed spectrwm, let's see what I can do with this WM  wink

1.Thanks smile
2.Yeah! This WM it's a bit obscure against i3, dwm or other well known window managers. I find easy to handle, and his options are not just a few.
3.Even i have that feeling, but since i'm on a oldstable system and i'm tesing from here. I do not have much to reports as I'm back in time. Most of my issue/bugs are because i have old repositories.
4.spectrwm i find the most easy tiling wm, i used almost 1/5 year. It is said to all beginners they want to experience tiling wm, spectrwm is a good start. So i did year ago on my transition stack>tile.

Thanks for your comments, Pleased to see your works aswell!

Best regards!


Tumbleweed | KDE Plasma

Offline

#11 2017-10-06 15:53:31

Addy
Member
From: Most populated island on Earth
Registered: 2017-07-14
Posts: 89
Website

Re: Herbstluftwm Configs

Nili wrote:

1.Thanks smile
2.Yeah! This WM it's a bit obscure against i3, dwm or other well known window managers. I find easy to handle, and his options are not just a few.
3.Even i have that feeling, but since i'm on a oldstable system and i'm tesing from here. I do not have much to reports as I'm back in time. Most of my issue/bugs are because i have old repositories.
4.spectrwm i find the most easy tiling wm, i used almost 1/5 year. It is said to all beginners they want to experience tiling wm, spectrwm is a good start. So i did year ago on my transition stack>tile.

Thanks for your comments, Pleased to see your works aswell!

Best regards!

1. You are very welcome!!
2. I also feel hard to get support for this WM. Most of the code I get from official Manual Book big_smile
3. Any reason to not upgrade to Stretch?
4. Yes, it's easy to learn. But I feel hard to imitate my i3-gaps behavior in spectrwm. I will try again later. I'm still learning Xfwm Standalone now. And my next target is learning Fvwm smile


If it ain't broke, then tweak it until it breaks.

Offline

#12 2017-10-06 15:54:39

Addy
Member
From: Most populated island on Earth
Registered: 2017-07-14
Posts: 89
Website

Re: Herbstluftwm Configs

And here is my current herbstluftwm config.
I hope this can be useful for everyone smile

U6GMDrCl.png
I don't know how to generate small thumbnail from Imgur sad
But don't worry, it's only 30kB thumbnail.
Click the screenshot above to see 3 more screenshoot. And I also write some descriptions in every screenshot smile

Autostart, put this to ~/.config/herbstluftwm/autostart

#!/usr/bin/env bash

hc() {
    cmds="$cmds , $@"
}
hc emit_hook reload xsetroot -solid '#292a44'
hc pad 0 28 0 0
hc keyunbind --all

## startup apps
pkill compton
compton &
feh --bg-fill ~/.wallpaper.jpg
xsettingsd &
pkill polybar
polybar -c ~/.config/herbstluftwm/polybar top &
mpd &

## use the super key as the main modifier
Mod=Mod4
## and alt button can also be useful as alternative modifier
Alternative=Mod1

## keybind for kill window
hc keybind $Mod-Control-Escape quit
hc keybind $Mod-Shift-BackSpace reload
hc keybind $Mod-Escape close

## keybind for common apps
hc keybind $Mod-d spawn dmenu_run -i -b -nb '#222222' -nf '#efefef' -sb '#222222' -sf '#cb6077' -fn 'Roboto:regular:pixelsize=12'
hc keybind $Mod-Shift+d spawn rofi -show drun
hc keybind $Mod-Return spawn termite
hc keybind $Mod-Shift-Return spawn urxvt
hc keybind $Mod-l spawn i3lock-fancy
hc keybind $Mod-Shift-w spawn chromium
hc keybind $Mod-Shift-f spawn thunar

## volume control
hc keybind XF86AudioRaiseVolume spawn amixer -D pulse sset Master '5%+'
hc keybind XF86AudioLowerVolume spawn amixer -D pulse sset Master '5%-'
hc keybind XF86AudioMute spawn amixer set Master toggle

## music control
hc keybind XF86AudioNext spawn mpc next
hc keybind XF86AudioPrev spawn mpc prev
hc keybind XF86AudioPlay spawn mpc toggle
hc keybind XF86AudioStop spawn mpc stop

## screenshot
hc keybind Print spawn scrot 'scrot_%Y-%m-%d-%S_$wx$h.png'

## change window focus
hc keybind $Mod-Left  focus left
hc keybind $Mod-Down  focus down
hc keybind $Mod-Up    focus up
hc keybind $Mod-Right focus right

## send window to another frame
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

## split the frame
hc keybind $Mod-Control-v       split   bottom  0.5
hc keybind $Mod-Control-h       split   right   0.5
hc keybind $Mod-e 				split 	explode

## resizing frame
resizestep=0.02
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

## workspaces.. eight is more than enough!
tag_names=( {1..8} )
tag_keys=( {1..8} 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_index "$i"
        hc keybind "$Mod-Shift-$key" move_index "$i"
    fi
done

## use control+alt+left/right for navigate workspace, old habit die hard :)
hc keybind $Alternative-Control-Right use_index +1 --skip-visible
hc keybind $Alternative-Control-Left  use_index -1 --skip-visible

## set the layout
hc keybind $Mod-r remove
hc keybind $Mod-space floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle
hc keybind $Mod-w set_layout max
hc keybind $Mod-g set_layout grid
hc keybind $Mod-v set_layout vertical
hc keybind $Mod-h set_layout horizontal

## now mouse keybind
hc mouseunbind --all

## mod+leftclick to drag window 
hc mousebind $Mod-Button1 move

# seriously?? dragging the trackpad while holding super & rightclick is ridiculous for a laptop user!
#hc mousebind $Mod-Button2 zoom

# this is more sane resize method ;)
hc mousebind $Alternative-Button1 zoom

# i don't have a middle click :(
#hc mousebind $Mod-Button3 resize
hc mousebind Control-Button1 resize

# theming

hc attr theme.tiling.reset 1
hc attr theme.floating.reset 1

hc set frame_border_active_color '#ef6b7b'
hc set frame_border_normal_color '#4ec2e8'
#hc set frame_bg_normal_color '#2f343f'
#hc set frame_bg_active_color '#2f343f'
hc set frame_active_opacity 40
hc set frame_normal_opacity 0
#hc keybind $Mod-o cycle_value frame_active_opacity 0 40
hc keybind $Mod-o cycle_value frame_normal_opacity 0 40
hc set frame_bg_transparent 0
#hc set frame_transparent_width 0
hc set frame_gap 32
hc keybind $Mod-g cycle_value frame_gap 32 0
hc set frame_padding 0
hc set frame_border_width 2

hc attr theme.active.color '#ef6b7b'
hc attr theme.normal.color '#2f343f'
hc attr theme.urgent.color '#f59335'
#hc attr theme.background_color '#2f343f'
#hc attr theme.inner_color black
hc attr theme.floating.outer_color '#a1d569'
#hc attr theme.active.inner_color '#a1d569'
#hc attr theme.active.outer_color '#a1d569'
hc attr theme.border_width 2
hc attr theme.floating.border_width 2
hc attr theme.floating.outer_width 0
hc attr theme.inner_width 0

hc set always_show_frame 0
hc keybind $Mod-s cycle_value always_show_frame 0 1
hc set window_gap 8
hc set smart_window_surroundings 1
hc set smart_frame_surroundings 1
hc set mouse_recenter_gap 0
hc set focus_follows_mouse 1

# make individual window can be floating. useful for popup
# but this is creating a new issue. the new window will be overlaping. set this to 0 to revert it back to default.
hc set default_frame_layout 2


hc unrule -F
hc rule focus=on # normally focus new clients
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|DESKTOP)' manage=off
hc rule class~'[Pp]olybar' manage=off

hc unlock

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

herbstclient chain $cmds&

My panel is Polybar. I put it to ~/.config/herbstluftwm/polybar
If have Polybar for i3-gaps, Bspwm, Xfwm, and Openbox. It will be messy if I put all of them in common ~/.config/polybar folder big_smile

[colors]
foreground = #474c57
background = #88ffffff
modb = #88ffffff
modb1 = #88ffffff
modb2 = #88ffffff
accent_1 = #99cd61
accent_2 = #f59335
accent_3 = #ef6b7b
accent_4 = #4ec2e8

[global/wm]
margin-top = 0
margin-bottom = 0
override-redirect = true

[bar/top]
width = 100%
height = 28
offset-x = 0
offset-y = 0

background = ${colors.background}
foreground = ${colors.foreground}

font-0 = Iosevka Nerd Font:size=8:antialias=true;1
font-1 = icomoon :size=9:;

modules-left = date volume cpu weather
modules-center = mpd
modules-right = ewmh powermenu

tray-position = right
tray-padding = 2
tray-transparent = false
tray-detached = false
tray-background = ${colors.modb}

spacing = 1
padding-left = 0
padding-right = 0
module-margin-left = 0
module-margin-right = 0

[module/volume]
type = internal/volume

format-volume = <ramp-volume><label-volume>

format-volume-background = ${colors.modb}
format-volume-padding = 2

module-margin-right = 0
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-3 =
ramp-volume-foreground = ${colors.accent_2}


label-muted =  muted

[module/date]
type = internal/date
interval = 60
;date = " %a %d // %H:%M"
date = " %H:%M"
format-prefix = 
format-prefix-foreground = ${colors.accent_1}
format-background = ${colors.modb}
format-padding = 2

[module/powermenu]
type = custom/menu

label-open =
label-open-foreground = ${colors.accent_3}
label-open-background = ${colors.modb2}
label-open-padding = 2
label-close =
label-close-padding = 1
label-close-foreground = $[colors.accent_3]
label-separator = |
label-separator-foreground = #666666

menu-0-0 =
menu-0-0-exec = menu-open-1
menu-0-1 =
menu-0-1-exec = menu-open-2
menu-0-2 =
menu-0-2-exec = menu-open-3

menu-1-0 =
menu-1-0-exec = menu-open-0
menu-1-1 =
menu-1-1-exec = systemctl reboot

menu-2-0 =
menu-2-0-exec = systemctl poweroff
menu-2-1 =
menu-2-1-exec = menu-open-0

menu-3-0 =
menu-3-0-exec = herbstclient quit
menu-3-1 =
menu-3-1-exec = menu-open-0

[module/ewmh]
type = internal/xworkspaces
enable-scroll = true
format-padding = 2
format-foreground = ${colors.accent_2}
format-background = ${colors.modb2}
label-active = "  ●"
label-occupied = "  ○"
label-urgent = "  ○"
label-empty = "  ○"

[module/hlws]
type = custom/script
exec = python3 ~/.config/herbstluftwm/hlws.py
scroll-down = exec herbstclient use_index +1
scroll-up = exec herbstclient use_index -1
interval = 0.5
format-foreground = ${colors.accent_3}
format-background = ${colors.modb2}
format-padding = 2

[module/cpu]
type = internal/cpu
label = %percentage%%
format-prefix = " "
format-prefix-foreground = ${colors.accent_3}
format-background = ${colors.modb}
format-padding = 2

[module/weather]
type = custom/script
interval = 1800
format = <label>
format-padding = 2
format-prefix = " "
;format-suffix = "°C"
format-prefix-foreground = ${colors.accent_4}
format-background = ${colors.modb}
exec = weather

[module/mpd]
type = internal/mpd
format-online = <label-time> <label-song> <icon-prev> <toggle> <icon-next>

icon-prev = 
icon-play = 
icon-pause = 
icon-next = 
icon-stop = 

label-song-maxlen = 40
label-song-ellipsis = true

bar-progress-width = 15
bar-progress-indicator = |
bar-progress-indicator-foreground = #ff
bar-progress-indicator-font = 2
bar-progress-fill = ─
bar-progress-fill-font = 2
bar-progress-fill-foreground = #ff
bar-progress-empty = ─
bar-progress-empty-font = 2
bar-progress-empty-foreground = ${colors.foreground-alt}

The Iosevka nerd font is available at Nerd Fonts official repo, It can be easily found. And the Icomoon font is available here wink
And the Polybar above is using weather module. Put this in your $PATH. In my case, I export ~/.bin folder to my $PATH using ~/.profile

# Make ~/.bin folder executable
export PATH=$PATH:~/.bin
# My default editor is nano. I don't even able to find exit button in vim :D
export EDITOR='nano'

So, put this Weather script at ~/.bin/weather

#!/bin/bash

# I take this script from Anachron's i3blocks
# I only slightly modify this script to add an option to show icon, useful for my tint2 executor
# 'weather -i' = with icon, 'weather' = text only
# Cheers!
# Addy

# Open Weather Map API code, register to http://openweathermap.org to get one ;)
API_KEY="365a6f3a274bba21cabdbee0aa44exxx"

# Check on http://openweathermap.org/find
CITY_ID="1650xxx"

URGENT_LOWER=0
URGENT_HIGHER=30

ICON_SUNNY="  Clear"
ICON_CLOUDY="  Cloudy"
ICON_RAINY="  Rainy"
ICON_STORM="  Storm"
ICON_SNOW="  Snow"
ICON_FOG="  Fog"
ICON_MISC=" "

TEXT_SUNNY="Clear"
TEXT_CLOUDY="Cloudy"
TEXT_RAINY="Rainy"
TEXT_STORM="Storm"
TEXT_SNOW="Snow"
TEXT_FOG="Fog"

SYMBOL_CELSIUS="˚C"

WEATHER_URL="http://api.openweathermap.org/data/2.5/weather?id=${CITY_ID}&appid=${API_KEY}&units=metric"

WEATHER_INFO=$(wget -qO- "${WEATHER_URL}")
WEATHER_MAIN=$(echo "${WEATHER_INFO}" | grep -o -e '\"main\":\"[a-Z]*\"' | awk -F ':' '{print $2}' | tr -d '"')
WEATHER_TEMP=$(echo "${WEATHER_INFO}" | grep -o -e '\"temp\":\-\?[0-9]*' | awk -F ':' '{print $2}' | tr -d '"')

if [[ "${WEATHER_MAIN}" = *Snow* ]]; then
	if  [[ $1 = "-i" ]]; then
    echo "${ICON_SNOW} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	else
    echo "${TEXT_SNOW} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	fi
elif [[ "${WEATHER_MAIN}" = *Rain* ]] || [[ "${WEATHER_MAIN}" = *Drizzle* ]]; then
	if  [[ $1 = "-i" ]]; then
    echo "${ICON_RAINY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	else
    echo "${TEXT_RAINY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	fi
elif [[ "${WEATHER_MAIN}" = *Cloud* ]]; then
	if  [[ $1 = "-i" ]]; then
    echo "${ICON_CLOUDY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	else
    echo "${TEXT_CLOUDY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	fi
elif [[ "${WEATHER_MAIN}" = *Clear* ]]; then
	if  [[ $1 = "-i" ]]; then
    echo "${ICON_SUNNY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	else
    echo "${TEXT_SUNNY} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	fi
elif [[ "${WEATHER_MAIN}" = *Fog* ]] || [[ "${WEATHER_MAIN}" = *Mist* ]]; then
	if  [[ $1 = "-i" ]]; then
    echo "${ICON_FOG} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	else
    echo "${TEXT_FOG} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	fi
else
	if  [[ $1 = "-i" ]]; then
    echo "${ICON_MISC} ${WEATHER_MAIN} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	else
    echo "${WEATHER_MAIN} ${WEATHER_TEMP}${SYMBOL_CELSIUS}"
	fi	
fi

if [[ "${WEATHER_TEMP}" -lt "${URGENT_LOWER}" ]] || [[ "${WEATHER_TEMP}" -gt "${URGENT_HIGHER}" ]]; then
  exit 33
fi

I share the weather script above with my tint2 executor. So, I add some icon options smile
And another stuff in the screenshoot:

Wallpaper: Yosemite by Ahmad Pastrana
Terminal: termite & URxvt, config included in my dotfiles. Both dark and light color. I use dark color (Nord) as default. I have made some instructions in the readme file to change it to light.
Terminal Font: M+ 1mn, my favourite font.
GTK Theme: Arc, slightly modified. I will share my modified version if You interested smile
Icons: Halo. You can find it easily using Google.
Music Player: ncmpcpp
Now Playing : Rage Against The Machine - Killing In The Name Of
The Rest of Dotfiles : Here. I have written a proper readme file, and some comments inside the every files. Also some descriptions in the Imgur album. Hope those will be useful.

If You have any question, don't hesitate to ask wink
Best regards,
Addy

Last edited by Addy (2017-10-06 16:17:45)


If it ain't broke, then tweak it until it breaks.

Offline

#13 2017-10-09 19:27:22

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Herbstluftwm Configs

Thanks for sharing Addy! Sure it looks too good and very minimalistic.

I'm sure will definitely come to help many interested ones. I will see to find anything interesting for me too smile

Thanks for sharing!

Best regards!


Tumbleweed | KDE Plasma

Offline

#14 2017-10-10 10:20:50

Addy
Member
From: Most populated island on Earth
Registered: 2017-07-14
Posts: 89
Website

Re: Herbstluftwm Configs

Nili wrote:

Thanks for sharing Addy! Sure it looks too good and very minimalistic.

I'm sure will definitely come to help many interested ones. I will see to find anything interesting for me too smile

Thanks for sharing!

Best regards!

Thank You very muach! smile
Glad You love it!
You are very welcome.

Btw, I also post this at r/unixporn. And many people interested with herbsluftwm smile


If it ain't broke, then tweak it until it breaks.

Offline

Board footer

Powered by FluxBB