dzen
dzen
i actually have nothing to show. i was looking for a thread about dzen configs and couldn't find it so i made one in the hope that people would post theirs, because for now i do not seem to be able to figure out how to get my info properly piped into dzen. tried adapting my custom i3status script but it seems dzen is a tad more complex. so please, post your configs!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: dzen
I don't have anything to show either (I used dzen for a while with OB, but the config is lost), but take a look at the dzen section on dotshare.it until someone comes along.
Re: dzen
Also see
https://wiki.archlinux.org/index.php/Dzen
https://github.com/robm/dzen/wiki/Examples
https://bbs.archlinux.org/viewtopic.php?id=40637
you could have looked that up yourself you lazy bastard :)
https://wiki.archlinux.org/index.php/Dzen
https://github.com/robm/dzen/wiki/Examples
https://bbs.archlinux.org/viewtopic.php?id=40637
you could have looked that up yourself you lazy bastard :)
Re: dzen
hahahaha, actually i did! i just completely forgot to mention them in my first post simply because they didn't give me the answers i wanted (or, so i felt, sob sob). so disillusionment instead of laziness this time :D
what i hoped for was a nice discussion about the how and what of dzen. i am currently thorougly confused by dzen's config and attempted to use lemonbar to replace it, but it turns out lemonbar doesn't work so well when it comes to fonts, and those are too important to ignore. so i am veering back to dzen, hoping to finally be able to find a way to use a decent fucking xft font instead of all the fugly xfontsel shit. although that is probably lack of knowledge as well - i'm sure there are some nice fonts to be had. all i really want is to use a good font that supports a whole bunch of Unicode characters, and fucking misc-fixed isn't doing it for me.
what i hoped for was a nice discussion about the how and what of dzen. i am currently thorougly confused by dzen's config and attempted to use lemonbar to replace it, but it turns out lemonbar doesn't work so well when it comes to fonts, and those are too important to ignore. so i am veering back to dzen, hoping to finally be able to find a way to use a decent fucking xft font instead of all the fugly xfontsel shit. although that is probably lack of knowledge as well - i'm sure there are some nice fonts to be had. all i really want is to use a good font that supports a whole bunch of Unicode characters, and fucking misc-fixed isn't doing it for me.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: dzen
Must read:
http://blog.z3bra.org/2014/04/meeting-at-the-bar.html
Some ideas:
https://github.com/oresk/statusbar/blob ... /statusbar
https://github.com/Ksiencha/Dzen2
https://github.com/Theta91/status/blob/master/status.sh
https://github.com/de-bug/luknrun
https://github.com/cr0wbar/gumon
Generally a good idea to look that up yourself you lazy bastard :D
http://blog.z3bra.org/2014/04/meeting-at-the-bar.html
Some ideas:
https://github.com/oresk/statusbar/blob ... /statusbar
https://github.com/Ksiencha/Dzen2
https://github.com/Theta91/status/blob/master/status.sh
https://github.com/de-bug/luknrun
https://github.com/cr0wbar/gumon
Generally a good idea to look that up yourself you lazy bastard :D
..gnutella..
Re: dzen
damn. i really suck at Google. should've known z3bra had written something about it, and that git-search never even occurred to me. i was just hoping drew would post a cool example ;)
thanks, will continue my struggle!
thanks, will continue my struggle!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: dzen
earsplit has some great stuff too: https://github.com/windelicato/dotfiles ... ad/scripts and https://bbs.archlinux.org/viewtopic.php?id=40637
dzen has no support for fallback fonts so you either need to use xbm files for the icons or use a font which has the glyphs you need, this is the only part that I dislike about dzen ( and it's inactive development ) other than that gdbar and gcpubar is pretty cool !
dzen has no support for fallback fonts so you either need to use xbm files for the icons or use a font which has the glyphs you need, this is the only part that I dislike about dzen ( and it's inactive development ) other than that gdbar and gcpubar is pretty cool !
Last edited by stark on Thu Apr 30, 2015 4:58 pm, edited 1 time in total.
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
Re: dzen
Rho, what font issues are you having with bar? I'd be happy to share my status bar using lemon bar for you. Also there was a thread around fonts recently. Since then I have created a short script to do the fc-cache shit. There is a fork of lemon bar that supports xft fonts, but you shouldn't need it. We'll get it sorted.
Now, as far as dzen, never used it actually.
Let me know what I can share with you. I'm at work but can get whatever you want this evening. Hang in there.
Edit: here is the thread
http://linuxbbq.org/bbs/viewtopic.php?f ... nts#p36883
Now, as far as dzen, never used it actually.
Let me know what I can share with you. I'm at work but can get whatever you want this evening. Hang in there.
Edit: here is the thread
http://linuxbbq.org/bbs/viewtopic.php?f ... nts#p36883
Work hard; Complain less
Re: dzen
Oh and lemonbar has support for fallback fonts ( you can use 5 fonts by default, 1 is the main other four for fallback purposes, and even this number can be increased if needed )
For example this is how I setup fonts in lemonbar scripts:
For example this is how I setup fonts in lemonbar scripts:
Code: Select all
lemon="-benis-lemon-medium-r-normal--10-110-75-75-m-50-iso8859-1"
siji="-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1"
echo "blah" | lemonbar -d -f $lemon -f $siji
Last edited by stark on Fri May 08, 2015 7:49 pm, edited 1 time in total.
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
Re: dzen
i have managed to get it to work now with dzen2, indeed as stark said using icons (stlarch), in my case i used conky to pipe to dzen2 and i3bar starts dzen2 and and and... it seems a bit too complex. at least i have a result for the day that doesn't look terrible.
thanks to both of you for the tips, i will have a look and feel more confident in getting bar to work now. i suppose i was just having font misunderstandings and wrongly figured the problem was with lemonbar...
oh, while we're talking: am i right that i3 does not support docking of an external bar (dzen2 or lemonbar) without having to go through its i3bar/i3status system? i now used a quick fix where i just place dzen2 over i3status so it blocks it.. it's not great, but it works.
thanks to both of you for the tips, i will have a look and feel more confident in getting bar to work now. i suppose i was just having font misunderstandings and wrongly figured the problem was with lemonbar...
oh, while we're talking: am i right that i3 does not support docking of an external bar (dzen2 or lemonbar) without having to go through its i3bar/i3status system? i now used a quick fix where i just place dzen2 over i3status so it blocks it.. it's not great, but it works.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: dzen
Yeah, sadly you can't intergrate lemonbar or dzen2 in i3 like you can in bspwm or xmonad. You just mess with the x and y offsets to place it on top of i3bar. You can try out bspwm ( very similar to hlwm ) if you want to use lemonbar as your primary bar plus, it's a really nice wm and has some really cool features, you can do all the manual tiling that you can do in i3 and no container or layout concept and it's smaller and in many ways better than i3 in my opnion :)
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu
Re: dzen
thanks for that stark, i might look into bspwm. i really enjoy the navigation in i3 and it comes quite natural to me to do it that way, and in hlwm i find it difficult that i can't seem to move around windows in the same easy manner. this might also just be a keybinds thing, but who knows, still figuring it out.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: dzen
Rho, why not spectrwm? It does have a bar, but you can still overlay it or use a custom one. IMO, spectrwm is the most 'intuitive' tiling WM, but YMMV :)
..gnutella..
Re: dzen
good question. i'd be quicker to use spectrwm if it was still called scrotwm. i like names. however, the answer is simply that it seems i need to experiment with different WMs to get an idea for what i want and which is best. a bit late to the party i'm afraid in that regard :D
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: dzen
Definitely rho, progression will come naturally. Some to try down the line; herbstluftwm(again!, and if you like names, then this is the one!), monstser, spectrwm. In no particular order.
Work hard; Complain less
Re: dzen
indeed herbstluftwm was the first one i tried after i3 (i always liked i3 as a name as well, plus many of you guys were raving about it at some point), because of that name. wonderful. i'll give it another go. still trying to get comfortable in this whole wm-switching and ricing situation :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
Re: dzen
am currently struggling to find a way to have dzen update on the change of a value. say we take the volume for example. since i already had a script that handled volume changes, i had that script write out to a file called current_volume, and planned to have my panel.sh script check for a change every x seconds. however, the "every x seconds" thing is exactly what i do not want in this case. it seems so much simpler to simply be able to send a change to dzen directly whenever i change the volume. however, i'm not sure how to do it. in case anybody has ideas, i'm happy to hear. its probably something quite simple i'm missing.
scripts: panel.sh
volume
scripts: panel.sh
Code: Select all
#!/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=13
font='GohuFont-7'
#font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
bgcolor=$(hc get frame_border_normal_color)
selbg=$(hc get window_border_active_color)
selfg='#333333'
####
# 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 -u +$'date\t^fg(#c3c3c3)%d%m%y ^fg(#000000)^bg(#3d5a72) %H:%M '
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="#3d5a72"
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(#ffffff)"
;;
'!')
echo -n "^bg(#FF0675)^fg(#141414)"
;;
*)
echo -n "^bg()^fg(#ababab)"
;;
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"
# small adjustments
moc_running=$(pidof "mocp" > /dev/null && echo 1)
if [ $moc_running -eq 1 ]; then
muz=$(mocp -Q %file | sed -e 's_/.*/__' -e 's/\.[^\.]*$//' -e 's/_/ /g')
muz_tl=$(mocp -Q %tl)
muz_tt=$(mocp -Q %tt)
muzline="$muz ($muz_tl/$muz_tt)"
else
muzline=""
fi
vol=$(amixer get Master | awk -F'[][]' '/Mono:/ {sub(/%/, ""); print $2; exit}')
wifi=$(awk 'NR==3 {printf("%2.2d\n", ($3/70)*100)}' /proc/net/wireless)
right="^fg(#c3c3c3)$muzline ^fg($selbg)^i(.icons/sm4tik-icon-pack/xbm/phones.xbm) ^fg(#c3c3c3)$vol% ^fg($selbg)^i(.icons/sm4tik-icon-pack/xbm/wifi_02.xbm) ^fg(#c3c3c3)$wifi% $separator $date"
right_text_only=$(echo -n "$right" | sed 's.\^[^(]*([^)]*)..g')
right_text_only_icons=$(echo -n "$right_text_only" "aa")
# get width of right aligned text.. and add some space..
#width=$($textwidth "$font" "$right_text_only_icons")
width=180
echo -n "^pa($(($panel_width - $width -2)))$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 "$font" -h $panel_height \
-e 'button3=;button4=exec:herbstclient use_index -1;button5=exec:herbstclient use_index +1' \
-ta l -bg "$bgcolor" -fg '#c3c3c3'
Code: Select all
#!/bin/bash
case $1 in
+)
amixer set Master 1dB+ ;;
-)
amixer set Master 1dB- ;;
t)
amixer set Master toggle -q ;;
*)
exit;;
esac
VOLUME=$(amixer get Master | awk -F'[][]' '/Mono:/ {sub(/%/, ""); print $2; exit}')
echo "$VOLUME" 1> /home/test/.config/herbstluftwm/current_volume
$(popup-herbst.sh "Vol. $VOLUME")
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: dzen
Code: Select all
#!/bin/bash
# dzen2restarter
if [ "$(pidof dzen2)" ] ; then killall dzen2; sleep 1s; panel.sh; exit
or maybe it doesn't work :D
..gnutella..
Re: dzen
^ no problem pids :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.