Results 1 to 10 of 15

Thread: How to change conky font size?

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Europe-Austria
    Beans
    1,047
    Distro
    Ubuntu 10.04 Lucid Lynx

    How to change conky font size?

    Hi,
    i use this simple conky script, but i like font and want to add the clock and the date with the bigger fonts-but i can not do it.

    Code:
    # UBUNTU-CONKY
    # A comprehensive conky script, configured for use on
    # Ubuntu / Debian Gnome, without the need for any external scripts.
    #
    # Based on conky-jc and the default .conkyrc.
    # INCLUDES:
    # - tail of /var/log/messages 
    # - netstat connections to your computer
    #
    # -- Pengo (conky@pengo.us)
    #
    
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # fiddle with window
    use_spacer yes
    use_xft no
    
    # Update interval in seconds
    update_interval 1.0
    
    # Minimum size of text area
    minimum_size 186 0
    maximum_width 220 0
    
    # Draw shades?
    draw_shades no
    
    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    #use_xft yes
    xftfont Samanata
    uppercase no # set to yes if you want all text to be in uppercase
    
    # Stippled borders?
    stippled_borders 3
    
    # border margins
    border_margin 9
    
    # border width
    border_width 10
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color ace770
    
    own_window_colour black
    own_window_transparent yes
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    
    # Gap between borders of screen and text
    gap_x 10
    gap_y 20
    
    
    #${color blue}FORTUNE ${hr 2}$color
    #${execi 120 fortune -s | fold -w50}
    
    
    #${color blue}LOGGING ${hr 2}$color
    #${execi 30 tail -n3 /var/log/messages | fold -w50}
    
    
    
    # stuff after 'TEXT' will be formatted on screen
    
    TEXT
    $color
    ${color #5397d6}SYSTEM ${hr 2}$color
    ${voffset 4}UpTime: ${alignr}${color }$uptime
    ${voffset 2}Kern: ${alignr}$kernel
    ${voffset 2}CPU: ${cpu}% ${alignr 1}${cpubar 6,80}
    ${cpugraph 000000 ffffff}
    Intel Atom N270 ${alignr} ${alignr}${freq}MHz   ${acpitemp}C
    ${voffset 2}RAM: $memperc% ${alignc} $mem${alignr 7} ${membar 6,80}
    ${voffset 2}${alignc -44}CPU%	${alignr}MEM%
    ${voffset 2}${top_mem name 1}${alignr}${top_mem cpu 1}   ${top_mem mem 1}
    ${voffset 2}${top_mem name 2}${alignr}${top_mem cpu 2}   ${top_mem mem 2}
    ${voffset 2}${top_mem name 3}${alignr}${top_mem cpu 3}   ${top_mem mem 3}
    ${voffset 2}${top_mem name 4}${alignr}${top_mem cpu 4}   ${top_mem mem 4}
    ${voffset 6}${color #5397d6}STORAGE ${hr 2}$color
    ${voffset 2}HD: ${voffset 0}${fs_free /home}/${fs_size /home} ${alignr 1}${fs_bar 6,50 /home}
    ${if_mounted /media/DATA}${voffset 2}SD/USB: ${voffset 0}${fs_free /media/DATA}/${fs_size /media/DATA} ${alignr}${fs_bar 6,50 /media/DATA}${endif}
    ${color #5397d6}NETWORK ${hr 2}$color
    ${voffset 2}Upload: ${alignr}${upspeedf eth2} KB/s
    ${voffset 2}Download: ${alignr}${downspeedf eth2} KB/s
    If i uncheck
    Code:
    #use_xft yes
    then i have bigger fonts-i can change size, but that some totally different font, and i want default one. Is something like this possible?

  2. #2
    Join Date
    Oct 2008
    Beans
    3,509

    Re: How to change conky font size?

    Conky defaults to a font size of 8, unless you specify in your config.

    Change
    Code:
    xftfont Samanata
    to
    Code:
    xftfont Samanata:size=10
    or whatever size you want.

    You can also change different parts of your conky to use different fonts by using for example
    Code:
    ${font LCDMono:bold:size=12}
    or
    ${font GE Inspira:size=10}
    in front of the part you want change.
    It will continue using that font until you change to another font or you
    go back to your xftfont by adding
    Code:
    ${font}
    Last edited by stinkeye; February 10th, 2010 at 05:17 PM.

  3. #3
    Join Date
    Jan 2009
    Location
    Europe-Austria
    Beans
    1,047
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to change conky font size?

    Default size is ok, but i want to add these two lines with bigger fonts:

    Code:
    ${alignc 60}${font Arial Black:size=26}${time %H:%M:%S}${font}
    ${alignc}${time %A, %d.%m.%Y}
    But no metter what i do the font size is not changed. As soon as i change
    Code:
    #use_xft yes
    to
    Code:
    use_xft yes
    i got bigger fonts, but also totally another font.

  4. #4
    Join Date
    Oct 2008
    Beans
    3,509

    Re: How to change conky font size?

    Try
    Code:
    ${alignc 60}${font Samanata:size=26}${time %H:%M:%S}${font}
    ${alignc}${time %A, %d.%m.%Y}
    What I gave you previously was examples of how to change font and sizes.
    You have to have those fonts for them to display.
    A google search "font xxxxx" will find most fonts or go to dafont.

    Put any downloaded fonts in your home directory in a folder named ".fonts"
    *Note the dot at the front makes it a hidden file.
    Create a .fonts folder if you don't have one.
    When in nautilus file browser ctrl + h will show hidden files and folders.
    Last edited by stinkeye; February 10th, 2010 at 05:40 PM.

  5. #5
    Join Date
    Jan 2009
    Location
    Europe-Austria
    Beans
    1,047
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to change conky font size?

    Quote Originally Posted by stinkeye View Post
    Try
    Code:
    ${alignc 60}${font Samanata:size=26}${time %H:%M:%S}${font}
    ${alignc}${time %A, %d.%m.%Y}
    Unfortunately-nothing happens-no size change.

  6. #6
    Join Date
    Oct 2008
    Beans
    3,509

    Re: How to change conky font size?

    This is how your conky looks on my computer using
    Code:
    # UBUNTU-CONKY
    # A comprehensive conky script, configured for use on
    # Ubuntu / Debian Gnome, without the need for any external scripts.
    #
    # Based on conky-jc and the default .conkyrc.
    # INCLUDES:
    # - tail of /var/log/messages 
    # - netstat connections to your computer
    #
    # -- Pengo (conky@pengo.us)
    #
    
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # fiddle with window
    use_spacer yes
    
    
    # Update interval in seconds
    update_interval 1.0
    
    # Minimum size of text area
    minimum_size 186 0
    maximum_width 220 0
    
    # Draw shades?
    draw_shades no
    
    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    use_xft yes
    xftfont Samanata
    uppercase no # set to yes if you want all text to be in uppercase
    
    # Stippled borders?
    stippled_borders 3
    
    # border margins
    border_margin 9
    
    # border width
    border_width 10
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color ace770
    
    own_window_colour black
    own_window_transparent yes
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    
    # Gap between borders of screen and text
    gap_x 10
    gap_y 20
    
    
    #${color blue}FORTUNE ${hr 2}$color
    #${execi 120 fortune -s | fold -w50}
    
    
    #${color blue}LOGGING ${hr 2}$color
    #${execi 30 tail -n3 /var/log/messages | fold -w50}
    
    
    
    # stuff after 'TEXT' will be formatted on screen
    
    TEXT
    $color
    ${color #5397d6}SYSTEM ${hr 2}$color
    ${voffset 4}UpTime: ${alignr}${color }$uptime
    ${voffset 2}Kern: ${alignr}$kernel
    ${voffset 2}CPU: ${cpu}% ${alignr 1}${cpubar 6,80}
    ${cpugraph 000000 ffffff}
    Intel Atom N270 ${alignr} ${alignr}${freq}MHz   ${acpitemp}C
    ${voffset 2}RAM: $memperc% ${alignc} $mem${alignr 7} ${membar 6,80}
    ${voffset 2}${alignc -44}CPU%	${alignr}MEM%
    ${voffset 2}${top_mem name 1}${alignr}${top_mem cpu 1}   ${top_mem mem 1}
    ${voffset 2}${top_mem name 2}${alignr}${top_mem cpu 2}   ${top_mem mem 2}
    ${voffset 2}${top_mem name 3}${alignr}${top_mem cpu 3}   ${top_mem mem 3}
    ${voffset 2}${top_mem name 4}${alignr}${top_mem cpu 4}   ${top_mem mem 4}
    ${voffset 6}${color #5397d6}STORAGE ${hr 2}$color
    ${voffset 2}HD: ${voffset 0}${fs_free /home}/${fs_size /home} ${alignr 1}${fs_bar 6,50 /home}
    ${if_mounted /media/DATA}${voffset 2}SD/USB: ${voffset 0}${fs_free /media/DATA}/${fs_size /media/DATA} ${alignr}${fs_bar 6,50 /media/DATA}${endif}
    ${color #5397d6}NETWORK ${hr 2}$color
    ${voffset 2}Upload: ${alignr}${upspeedf eth2} KB/s
    ${voffset 2}Download: ${alignr}${downspeedf eth2} KB/s
    ${alignc 60}${font Samanata:size=26}${time %H:%M:%S}${font}
    ${alignc}${time %A, %d.%m.%Y}
    The Samanata font is in the package
    Code:
    ttf-devanagari-fonts
    Which you can download through synaptic package manager.
    Once downloaded enter
    Code:
    fc-cache -vf
    in the terminal to refresh the font cache.
    Attached Images Attached Images
    Last edited by stinkeye; February 10th, 2010 at 06:06 PM.

  7. #7
    Join Date
    Jan 2009
    Location
    Europe-Austria
    Beans
    1,047
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to change conky font size?

    Quote Originally Posted by stinkeye View Post
    Try
    Code:
    ${alignc 60}${font Samanata:size=26}${time %H:%M:%S}${font}
    ${alignc}${time %A, %d.%m.%Y}
    What I gave you previously was examples of how to change font and sizes.
    You have to have those fonts for them to display.
    A google search "font xxxxx" will find most fonts or go to dafont.

    Put any downloaded fonts in your home directory in a folder named ".fonts"
    *Note the dot at the front makes it a hidden file.
    Create a .fonts folder if you don't have one.
    When in nautilus file browser ctrl + h will show hidden files and folders.
    Well, i have those fonts-i said-if i change
    Code:
    #use_xft yes
    to
    Code:
    use_xft yes

    i can manage font sizes as here described-but i have no more this default font. And have no ide what is
    Code:
    use_xft yes
    and why it allows me to change font (but not to use defaulr samanata)

  8. #8
    Join Date
    Jan 2009
    Location
    Europe-Austria
    Beans
    1,047
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to change conky font size?

    Picture one with this code:

    Code:
    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    #use_xft yes
    xftfont Samanata
    uppercase no # set to yes if you want all text to be in uppercase
    
    # Stippled borders?
    stippled_borders 3
    
    # border margins
    border_margin 9
    
    # border width
    border_width 10
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color ace770
    
    own_window_colour black
    own_window_transparent yes
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    
    # Gap between borders of screen and text
    gap_x 10
    gap_y 20
    
    
    #${color blue}FORTUNE ${hr 2}$color
    #${execi 120 fortune -s | fold -w50}
    
    
    #${color blue}LOGGING ${hr 2}$color
    #${execi 30 tail -n3 /var/log/messages | fold -w50}
    
    
    
    # stuff after 'TEXT' will be formatted on screen
    
    TEXT
    ${alignc}${font times:size=26}${time %H:%M:%S}${font}
    ${alignc}${time %A, %d.%m.%Y}
    $color
    ${color #5397d6}SYSTEM ${hr 2}$color
    ${voffset 4}UpTime: ${alignr}${color }$uptime
    ${voffset 2}Kern: ${alignr}$kernel
    ${voffset 2}CPU: ${cpu}% ${alignr 1}${cpubar 6,80}
    ${cpugraph 000000 ffffff}
    Intel Atom N270 ${alignr} ${alignr}${freq}MHz   ${acpitemp}C
    ${voffset 2}RAM: $memperc% ${alignc} $mem${alignr 7} ${membar 6,80}
    ${voffset 2}${alignc -44}CPU%	${alignr}MEM%
    ${voffset 2}${top_mem name 1}${alignr}${top_mem cpu 1}   ${top_mem mem 1}
    ${voffset 2}${top_mem name 2}${alignr}${top_mem cpu 2}   ${top_mem mem 2}
    ${voffset 2}${top_mem name 3}${alignr}${top_mem cpu 3}   ${top_mem mem 3}
    ${voffset 2}${top_mem name 4}${alignr}${top_mem cpu 4}   ${top_mem mem 4}
    ${voffset 6}${color #5397d6}STORAGE ${hr 2}$color
    ${voffset 2}HD: ${voffset 0}${fs_free /home}/${fs_size /home} ${alignr 1}${fs_bar 6,50 /home}
    ${if_mounted /media/DATA}${voffset 2}SD/USB: ${voffset 0}${fs_free /media/DATA}/${fs_size /media/DATA} ${alignr}${fs_bar 6,50 /media/DATA}${endif}
    ${color #5397d6}NETWORK ${hr 2}$color
    ${voffset 2}Upload: ${alignr}${upspeedf eth2} KB/s
    ${voffset 2}Download: ${alignr}${downspeedf eth2} KB/s
    The i only change in picture two:
    Code:
    #use_xft yes
    to
    Code:
    use_xft yes
    Code:
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # fiddle with window
    use_spacer yes
    use_xft no
    
    # Update interval in seconds
    update_interval 1.0
    
    # Minimum size of text area
    minimum_size 186 0
    maximum_width 220 0
    
    # Draw shades?
    draw_shades no
    
    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    use_xft yes
    xftfont Samanata
    uppercase no # set to yes if you want all text to be in uppercase
    
    # Stippled borders?
    stippled_borders 3
    
    # border margins
    border_margin 9
    
    # border width
    border_width 10
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color ace770
    
    own_window_colour black
    own_window_transparent yes
    
    # Text alignment, other possible values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    
    # Gap between borders of screen and text
    gap_x 10
    gap_y 20
    
    
    #${color blue}FORTUNE ${hr 2}$color
    #${execi 120 fortune -s | fold -w50}
    
    
    #${color blue}LOGGING ${hr 2}$color
    #${execi 30 tail -n3 /var/log/messages | fold -w50}
    
    
    
    # stuff after 'TEXT' will be formatted on screen
    
    TEXT
    ${alignc}${font times:size=26}${time %H:%M:%S}${font}
    ${alignc}${time %A, %d.%m.%Y}
    $color
    ${color #5397d6}SYSTEM ${hr 2}$color
    ${voffset 4}UpTime: ${alignr}${color }$uptime
    ${voffset 2}Kern: ${alignr}$kernel
    ${voffset 2}CPU: ${cpu}% ${alignr 1}${cpubar 6,80}
    ${cpugraph 000000 ffffff}
    Intel Atom N270 ${alignr} ${alignr}${freq}MHz   ${acpitemp}C
    ${voffset 2}RAM: $memperc% ${alignc} $mem${alignr 7} ${membar 6,80}
    ${voffset 2}${alignc -44}CPU%	${alignr}MEM%
    ${voffset 2}${top_mem name 1}${alignr}${top_mem cpu 1}   ${top_mem mem 1}
    ${voffset 2}${top_mem name 2}${alignr}${top_mem cpu 2}   ${top_mem mem 2}
    ${voffset 2}${top_mem name 3}${alignr}${top_mem cpu 3}   ${top_mem mem 3}
    ${voffset 2}${top_mem name 4}${alignr}${top_mem cpu 4}   ${top_mem mem 4}
    ${voffset 6}${color #5397d6}STORAGE ${hr 2}$color
    ${voffset 2}HD: ${voffset 0}${fs_free /home}/${fs_size /home} ${alignr 1}${fs_bar 6,50 /home}
    ${if_mounted /media/DATA}${voffset 2}SD/USB: ${voffset 0}${fs_free /media/DATA}/${fs_size /media/DATA} ${alignr}${fs_bar 6,50 /media/DATA}${endif}
    ${color #5397d6}NETWORK ${hr 2}$color
    ${voffset 2}Upload: ${alignr}${upspeedf eth2} KB/s
    ${voffset 2}Download: ${alignr}${downspeedf eth2} KB/s
    See: in picture two-times (clock) is recognized, but i lost default font and size is too big
    Attached Images Attached Images

  9. #9
    Join Date
    Jan 2009
    Location
    Europe-Austria
    Beans
    1,047
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to change conky font size?

    Quote Originally Posted by stinkeye View Post
    Conky defaults to a font size of 8, unless you specify in your config.

    Change
    Code:
    xftfont Samanata
    to
    Code:
    xftfont Samanata:size=10
    or whatever size you want.

    You can also change different parts of your conky to use different fonts by using for example
    Code:
    ${font LCDMono:bold:size=12}
    or
    ${font GE Inspira:size=10}
    in front of the part you want change.
    It will continue using that font until you change to another font or you
    go back to your xftfont by adding
    Code:
    ${font}
    I added this line:
    Code:
    ${font LCDMono:bold:size=12}${time %H:%M:%S}${font}
    but no changes are visable

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •