- 1. 概要
- 2. 試行錯誤
- 3. 設定
1. 概要
「antiX」では
~/.config/herbstluftwm/autostart
の
# 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
で、パネルを表示しておるようです。
「ArcoLinux」では、他のデスクトップで表示しているのと同様、「polybar」なるバーを表示しておって、なにやら表示しております。
まぁ、良しとします。
「FreeBSD」では
~/.config/herbstluftwm/autostart
に
# find the panel
panel=~/.config/herbstluftwm/panel.sh
[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
for monitor in $(hc list_monitors | cut -d: -f1) ; do
# start it on each monitor
"$panel" "$monitor" &
done
てなことを書いてありますが、起動しません。
こういうのを掲載するのもどうかとは、思いますが、きれいな背景色ではありますが、のっぺらぼうで何もなしだ。

2. 試行錯誤
グラフィックログインした状態で、端末から起動してみようとしますと
$ ~/.config/herbstluftwm/panel.sh
This script requires the textwidth tool of the dzen2 project.
と言われます。
探してみると「dzen2」というパッケージが存在するのでインストールしてみます。
pkg install -y dzen2
再度、起動してみます。
すると今度は、
$ ~/.config/herbstluftwm/panel.sh
This script requires the textwidth tool of the dzen2 project.
てなことになる。
スクリプトを調べてみると
####
# 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";
elif which xftwidth &> /dev/null ; then # For guix
textwidth="xtfwidth";
else
echo "This script requires the textwidth tool of the dzen2 project."
exit 1
fi
のところでエラーになっておるわけです。
調べてみると、「dzen2」には、「textwidth」もしくは「dzen2-textwidth」というプログラムが同梱されているはずなのにそれが内容です。
もしくは「xftwidth」というプログラムでも代用できるようですが、それもない・・・。
要は、「textwidth」に、フォントの幅を与えてやればいいのだな・・・と。
3. 設定
結構大胆なことをします。
vi ~/.config/herbstluftwm/panel.sh
font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
フォントを「MigMix 1M」へ変更します。
font="MigMix 1M"
下記の部分は、どうせないものなので、全部コメントアウトします。
if which textwidth &> /dev/null ; then
textwidth="textwidth";
elif which dzen2-textwidth &> /dev/null ; then
textwidth="dzen2-textwidth";
elif which xftwidth &> /dev/null ; then # For guix
textwidth="xtfwidth";
else
echo "This script requires the textwidth tool of the dzen2 project."
exit 1
fi
width=$($textwidth "$font" "$right_text_only ")
の部分。
大胆に、「12」で決め打ち。
width=12
ログインしなおすと、一応パネルが表示されるのです。

|