You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this will help newcomers. If I made any mistake, feel free to comment!
#!/bin/bash# Create a named pipe for howm config output
ff="/tmp/howm.fifo"# Create a logfile for howm log output
logfile="/home/harvey/.config/howm/log.txt"# Create the pipe, if not existing
[[ -p$ff ]] || mkfifo -m 666 "$ff"# Create a few workspaces and store them into an array
ws=("term""vim""www""chat""media")
# Mapping for layouts and the numbers that come from howm
lay=("▣""▦""▥""▤")
# Set background color mappings
mbg=("#333333""#5F5F87""#AFD7AF")
# Set foreground color mappings
mfg=("#DDDDDD""#333333""#333333")
# Set background color for bar (dzen)
bg="#333333"# Read howm pipe as howmout variablewhileread -t 10 -r howmout ||true;do# Check the output for a format that we can useif [[ $howmout=~ ^(([[:digit:]]+:)+[[:digit:]]+?)+$ ]]; then unset r # Read all needed howm output to seperate variables (seperated by :) IFS=':' read -r m l w s c <<< "$howmout" # Set the foreground color using the mappings r+='^fg('"${mfg[$m]}"')' # Set the background color using the mappings r+='^bg('"${mbg[$m]}"')' # Display the layout symbol for the current workspace r+=" ${lay[$l]}| " # Display the workspace name of the current workspace r+="${ws[$w - 1]}" # Brace expansion r="${r%::*}" fi # Display the collected bar string and additionally the date on the right side printf "%s%s\n" "$r" " | $(date +"%F %R") "# Pass those things to dzen and display it with specific height, background color, font and moredone < "$ff" | dzen2 -h 20 -y -20 -ta r -bg "$bg" -fn "Inconsolata-dz:size=10" &# pass output to fifo/usr/bin/howm -c ~/.config/howm/howmrc 1> "$ff" 2> "$logfile"
The text was updated successfully, but these errors were encountered:
Maybe this will help newcomers. If I made any mistake, feel free to comment!
The text was updated successfully, but these errors were encountered: