Alinhamento de barra de apoio à esquerda e à direita

1

Eu quero construir um infobar simples usando o conky. Tome o seguinte exemplo:

dropboxzoterodeveestaralinhadoàesquerda.

SSID:HierVolume...deveestaralinhadoàdireita.

Atualmente,estoutrabalhandocom{offset800}paramoverasegundasaídaparaadireita.Noentanto,issoémuitoinflexívelquandoasaídacorretaéalterada.Àsvezesexcedeminhatela.

.conkyrc:

backgroundyesuse_xftyesxftfontNotoSans:size=10xftalpha1update_interval1total_run_times0#Runinownwindowown_windowyesown_window_transparentyesown_window_typedesktop#Don'tshowinwindowlistsandonalldesktopsown_window_hintsundecorated,below,sticky,skip_taskbar,skip_pagerown_window_colourwhitedouble_bufferyesdraw_shadesnodraw_outlinenodraw_bordersnodraw_graph_bordersnodefault_colorblackalignmenttlmaximum_width1280minimum_size1280gap_x0gap_y2no_buffersyesuppercasenocpu_avg_samples2override_utf8_localeno###############################################Output##############################################TEXT${execbasename$(ps-efa|grepdropbox|grep-v'grep'|awk'{print$NF}')}\${execbasename$(ps-efa|grepzotero|grep-v'grep'|awk'{print$NF}')}\${offset800}${batteryBAT0}\SSID:${wireless_essidwls1}\Volume:${execamixer-c0getMaster|grepMono:|awk'{print$(NF-2)}'}${execamixer-c0getMaster|grepMono:|awk'{print$NF}'}\Keyboard:${execsetxkbmap-print|awk-F"+" '/xkb_symbols/ {print $2}'} \
  ${time %H:%M} \
  ${time %a %d %b %Y} 
    
por orschiro 19.11.2013 / 12:58

1 resposta

2

Como Ash disse nos comentários, a maneira de fazer isso é $alignr / $alignl . Algo como:

TEXT
  ${exec basename $(ps -efa | grep dropbox |grep -v 'grep ' | awk '{print $NF}')} \
  ${exec basename $(ps -efa | grep firefox |grep -v 'grep ' | awk '{print $NF}')} \
  $alignr  ${battery BAT0}   SSID: ${wireless_essid wlan0} Volume: ${exec amixer -c 0 get Master | grep Mono: | awk '{print $(NF-2)}'} ${exec amixer -c 0 get Master | grep Mono: | awk '{print $NF}'} \
  Keyboard: ${exec setxkbmap -print | awk -F"+" '/xkb_symbols/ {print $2}'} \
  ${time %H:%M} \
  ${time %a %d %b %Y} 
    
por 19.11.2013 / 15:23

Tags