#1 Le 24/05/2018, à 22:15
- charlie_02
lemonbar xft: "Invalid geometry for the clickable area"
bonjour,
j'utilise i3, et récemment, j'ai essayé de passer à la barre de statu lemonbar (en choisissant xft, pour les polices). cependant, en essyant de faire tourner le script qui est censé afficher cette barre, je me suis heurté à l'erreur citée dans le titre.
voici pour commencer le script que j'utilise, appelé par la commande :
$HOME/.config/i3/lemonbarshow.sh | lemonbar -a 33 -B "#3B4252" -F "#E5E9F0" -f "Liberation Mono for Powerline-11" -g x18 -p | sh
le script en question est:
#!/bin/bash
lefthard=""
leftsoft=""
righthard=""
rightsoft=""
while true; do
color0=$(xrdb -query -all | grep "*color0:" | sed "s/\*color0:\t//")
color1=$(xrdb -query -all | grep "*color1:" | sed "s/\*color1:\t//")
color2=$(xrdb -query -all | grep "*color2:" | sed "s/\*color2:\t//")
color3=$(xrdb -query -all | grep "*color3:" | sed "s/\*color3:\t//")
color4=$(xrdb -query -all | grep "*color4:" | sed "s/\*color4:\t//")
color5=$(xrdb -query -all | grep "*color5:" | sed "s/\*color5:\t//")
color6=$(xrdb -query -all | grep "*color6:" | sed "s/\*color6:\t//")
color7=$(xrdb -query -all | grep "*color7:" | sed "s/\*color7:\t//")
color8=$(xrdb -query -all | grep "*color8:" | sed "s/\*color8:\t//")
wrkspc=$(i3-msg -t get_workspaces | jq '.[].name' | sed s/\"// | sed s/\"//)
echo -n "%{A5:i3-msg -q workspace next:}%{A4:i3-msg -q workspace prev:}"
for i in $wrkspc ; do
focused=$(i3-msg -t get_workspaces | jq ".[] | select(.name==\"$i\").focused")
urgent=$(i3-msg -t get_workspaces | jq ".[] | select(.name==\"$i\").urgent")
if $focused ; then
echo -n "%{B$color4 F$color7} $i %{B$color0 F$color7}"
else
if $urgent ; then
echo -n "%{B$color7 F$color0}"
echo -n "%{A:i3-msg -q workspace number $i:} $i %{A}"
echo -n "%{B$color0 F$color7}"
else
echo -n "%{B$color0 F$color4}"
echo -n "%{A:"i3-msg -q workspace number $i":} $i %{A}"
echo -n "%{B$color0 F$color7}"
fi
fi
done
echo -n "%{A}%{A}%{r}"
for i in $(mpc --format ""); do
a=$i
break
done
if [ $a = "[playing]" ]; then
echo -n "%{A4:mpc volume +2 &:}"
echo -n "%{A5:mpc volume -2 &:}"
echo -n "%{A2:mpc prev:}"
echo -n "%{A3:mpc next &:}"
echo -n "%{A:mpc toggle & :}"
echo -n "%{F$color7}$righthard%{B$color0}%{R}"
echo -n " $(mpc current | cut -c 1-65) "
echo -n "%{A}%{A}%{A}%{A}%{A}"
echo -n "%{A:i3-msg \"workspace 5; exec urxvt -e ncmpcpp\":}"
echo -n "%{A3:killall ncmpcpp:}"
echo -n "%{A2:mpc stop:}"
echo -n "%{F$color2}"
echo -n "$righthard"
echo -n "%{R} "
echo -n "%{B$color2}"
echo -n "%{A}%{A}%{A}"
echo -n "%{F$color4}$righthard%{RF$color0}"
elif [ $a = "[paused]" ]; then
echo -n "%{A:mpc toggle & :}"
echo -n "%{F$color4}$righthard%{RF$color0}"
echo -n " $(mpc current | cut -c 1-65) "
echo -n "%{A}"
echo -n "%{A:i3-msg \"workspace 5; exec urxvt -e ncmpcpp\":}"
echo -n "%{A3:killall ncmpcpp:}"
echo -n "%{A2:mpc stop:}"
echo -n "%{F$color2}"
echo -n "$righthard"
echo -n "%{R} "
echo -n "%{B$color2}"
echo -n "%{A}%{A}%{A}"
echo -n "%{F$color4}$righthard%{RF$color0}"
else
echo -n "%{A:i3-msg \"workspace 5; exec urxvt -e ncmpcpp\":}"
echo -n "%{A3:killall ncmpcpp:}"
echo -n "%{F$color2}"
echo -n "$righthard"
echo -n "%{R} "
echo -n "%{B$color2}"
echo -n "%{A}%{A}"
echo -n "%{F$color4}$righthard%{RF$color0}"
fi
echo -n "%{A4:pactl set-sink-volume 0 +2%:}"
echo -n "%{A5:pactl set-sink-volume 0 -2%:}"
echo -n "%{A:pactl set-sink-mute 0 toggle:}"
echo -n "%{A3:pavucontrol &:}"
echo -n " VOL: $(/usr/share/i3blocks/volume 5) "
echo -n "%{A}%{A}%{A}%{A}"
b=$(acpi -b | cut -d' ' -f 3 | cut -d, -f 1)
if [ $b = "Discharging" ]; then
echo -n "%{F$color7}$righthard%{B$color0 R}"
else
echo -n "%{F$color2}$righthard%{B$color0 R}"
fi
echo -n " BAT: $(/usr/share/i3blocks/battery | head -n 1)"
echo -n " %{F$color4}$righthard%{R}%{F$color0 B$color4}"
echo -n " $(date +%Y-%m-%d) "
echo -n "%{F$color2}${righthard}%{B$color0}%{R}"
echo -n " $(date +%H:%M:%S)"
echo " %{B$color0 F$color7}"
wait
done
cela semble venir de la version xft, parceque, quand je la retire, l'erreur disparaît. cependant, la bar n'est pas bien affichée( mauvaise de police, et les icones qui n’apparaissent plus).
quand je lance la commande en version xft en mode débug, j’obtiens ça:
+ lefthard=
+ leftsoft=
+ righthard=
+ rightsoft=
+ true
+ + xrdb -query -all
grep *color0:
+ sed s/\*color0:\t//
+ color0=#3B4252
+ xrdb -query -all
+ sed s/\*color1:\t//
+ grep *color1:
+ color1=#BF616A
+ xrdb -query -all
+ grep *color2:
+ sed s/\*color2:\t//
+ color2=#A3BE8C
+ xrdb -query -all
+ + sedgrep *color3:
+ color3=#EBCB8B
+ xrdb -query -all
+ sed s/\*color4:\t//
+ grep *color4:
+ color4=#81A1C1
+ xrdb -query -all+
sed s/\*color5:\t//
+ grep *color5:
+ color5=#B48EAD
+ xrdb -query -all
+ grep *color6:
sed s/\*color6:\t//
+ color6=#88C0D0
+ xrdb -query -all
+ sed s/\*color7:\t//
+ grep *color7:
+ color7=#E5E9F0
+ grep *color8:
+ xrdb -query -all
+ sed s/\*color8:\t//
+ color8=#4C566A
+ i3-msg -t get_workspaces
+ jq .[].name
+ sed s/"//
+ sed s/"//
+ wrkspc=4
5
+ echo -n %{A5:i3-msg -q workspace next:}%{A4:i3-msg -q workspace prev:}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="4").focused
+ focused=true
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="4").urgent
+ urgent=false
+ true
+ echo -n %{B#81A1C1 F#E5E9F0} 4 %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="5").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="5").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number 5:} 5 %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number :} %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number :} %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number :} %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number :} %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ echo -n %{A}%{A}%{r}
+ mpc --format
Invalid geometry for the clickable area
+ a=volume:
+ break
+ [ volume: = [playing] ]
+ [ volume: = [paused] ]
+ echo -n %{A:i3-msg "workspace 5; exec urxvt -e ncmpcpp":}
+ echo -n %{A3:killall ncmpcpp:}
+ echo -n %{F#A3BE8C}
+ echo -n
+ echo -n %{R}
+ echo -n %{B#A3BE8C}
+ echo -n %{A}%{A}
+ Invalid geometry for the clickable area
-n %{F#81A1C1}%{RF#3B4252}
+ echo -n %{A4:pactl set-sink-volume 0 +2%:}
+ echo -n %{A5:pactl set-sink-volume 0 -2%:}
+ echo -n %{A:pactl set-sink-mute 0 toggle:}
+ echo -n %{A3:pavucontrol &:}
+ /usr/share/i3blocks/volume 5
+ echo -n VOL: 33%
+ echo -n %{A}%{A}%{A}%{A}
+ acpi -b
Invalid geometry for the clickable area
+ cut -d -f 3
+ cut -d, -f 1
+ b=Full
+ [ Full = Discharging ]
+ echo -n %{F#A3BE8C}%{B#3B4252 R}
+ /usr/share/i3blocks/battery
+ head -n 1
+ echo -n BAT: 100%
+ echo -n %{F#81A1C1}%{R}%{F#3B4252 B#81A1C1}
+ date +%Y-%m-%d
+ echo -n 2018-05-24
+ echo -n %{F#A3BE8C}%{B#3B4252}%{R}
+ date +%H:%M:%S
+ echo -n 23:07:51
+ echo %{B#3B4252 F#E5E9F0}
+ wait
+ true
+ xrdb -query -all
+ sed s/\*color0:\t//
+ grep *color0:
+ color0=#3B4252
+ xrdb -query -all
+ grep *color1:
+ sed s/\*color1:\t//
+ color1=#BF616A
+ xrdb -query -all
+ grep *color2:
+ sed s/\*color2:\t//
+ color2=#A3BE8C
+ xrdb -query -all
+ grep *color3:
+ sed s/\*color3:\t//
+ color3=#EBCB8B
+ xrdb -query -all
+ grep *color4:
+ sed s/\*color4:\t//
+ color4=#81A1C1
+ xrdb -query -all
+ sed s/\*color5:\t//
+ grep *color5:
+ color5=#B48EAD
+ xrdb -query -all
+ grep *color6:
+ sed s/\*color6:\t//
+ color6=#88C0D0
+ xrdb -query -all
+ grep *color7:
+ sed s/\*color7:\t//
+ color7=#E5E9F0
+ xrdb -query -all
+ grep *color8:
+ sed s/\*color8:\t//
+ color8=#4C566A
+ i3-msg -t get_workspaces
+ jq .[].name
+ sed s/"//
+ sed s/"//
+ wrkspc=4
5
+ echo -n %{A5:i3-msg -q workspace next:}%{A4:i3-msg -q workspace prev:}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="4").focused
+ focused=true
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="4").urgent
+ urgent=false
+ true
+ echo -n %{B#81A1C1 F#E5E9F0} 4 %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="5").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="5").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number 5:} 5 %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number :} %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number :} %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ + i3-msg -tjq .[] | select(.name=="").focused
get_workspaces
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number :} %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").focused
+ focused=false
+ i3-msg -t get_workspaces
+ jq .[] | select(.name=="").urgent
+ urgent=false
+ false
+ false
+ echo -n %{B#3B4252 F#81A1C1}
+ echo -n %{A:i3-msg -q workspace number :} %{A}
+ echo -n %{B#3B4252 F#E5E9F0}
+ echo -n %{A}%{A}%{r}
+ mpc --format
Invalid geometry for the clickable area
+ a=volume:
+ break
+ [ volume: = [playing] ]
+ [ volume: = [paused] ]
+ echo -n %{A:i3-msg "workspace 5; exec urxvt -e ncmpcpp":}
+ echo -n %{A3:killall ncmpcpp:}
+ echo -n %{F#A3BE8C}
+ echo -n
+ echo -n %{R}
+ echo -n %{B#A3BE8C}
+ echo -n %{A}%{A}
+ echo -n %{F#81A1C1}%{RF#3B4252}
+ echo -n %{A4:pactl set-sink-volume 0 +2%:}
+ echo -n %{A5:pactl set-sink-volume 0 -2%:}
+ echo -n %{A:pactl set-sink-mute 0 toggle:}
+ echo -n %{A3:pavucontrol &:}
+ /usr/share/i3blocks/volume 5
Invalid geometry for the clickable area
+ echo -n VOL: 33%
+ echo -n %{A}%{A}%{A}%{A}
Invalid geometry for the clickable area
+ acpi -b
+ cut -d, -f 1
+ cut -d -f 3
+ b=Full
+ [ Full = Discharging ]
+ echo -n %{F#A3BE8C}%{B#3B4252 R}
+ /usr/share/i3blocks/battery
+ head -n 1
+ echo -n BAT: 100%
+ echo -n %{F#81A1C1}%{R}%{F#3B4252 B#81A1C1}
+ date +%Y-%m-%d
+ echo -n 2018-05-24
+ echo -n %{F#A3BE8C}%{B#3B4252}%{R}
+ date +%H:%M:%S
+ echo -n 23:07:51
+ echo %{B#3B4252 F#E5E9F0}
+ wait
(j'ai mis deux répétitions car le nombre d'éreur obtenues change entre la première et les autres.)
comme ceci, les éléments de la barre semblent s'afficher mieux indépendamment, mais en fait ils se superposent les uns aux autres...
savez vous comment ce problème pourrait être réglé?
merci!
Dernière modification par charlie_02 (Le 25/05/2018, à 13:37)
Hors ligne