Page 2175 of 2348 FirstFirst ... 1175167520752125216521732174217521762177218522252275 ... LastLast
Results 21,741 to 21,750 of 23480

Thread: Post your .conkyrc files w/ screenshots

  1. #21741
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    I've got an interesting one. I can't seem to get the size of the output of time %Y to change sizes. tried everything I can think of but it remains the same size

    Here is the offending code. any help is appreciated
    Code:
    #USAZ0233
    # WARNING: Change name and passwords on e-mail code if posting!!
    # Conky, a system monitor, based on torsmo
    #
    # Any original torsmo code is licensed under the BSD license
    #
    # All code written since the fork of torsmo is licensed under the GPL
    #
    # Please see COPYING for details
    #
    # Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
    # Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
    # All rights reserved.
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    # You should have received a copy of the GNU General Public License
    # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    #
    
    background yes
    own_window no
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    use_xft yes
    xftfont DejaVu Sans Mono:bold:size=8
    xftalpha 1.0 #0.2
    override_utf8_locale yes
    update_interval 1
    total_run_times 0
    double_buffer yes
    no_buffers yes
    cpu_avg_samples 2
    net_avg_samples 2
    use_spacer none
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    alignment tm
    uppercase no
    imlib_cache_size 0
    # minimum_size 1280 1024 # minimum_size width & height
    gap_x 0 # left-right
    gap_y 20 # up-down
    border_inner_margin 0
    border_outer_margin 0
    border_width 0
    text_buffer_size 512 # Default
    short_units yes
    pad_percents 2
    maximum_width 3000
    minimum_size 20
    imlib_cache_size 0
    # Colors
    default_color DCDCDC #Gainsboro
    color0 FFD700 #Gold  #7FFFD4 #Aquamarine
    color1 FFA07A #LightSalmon #CD5C5C IndianRed #00CED1 DarkTurquoise #00FFFF Cyan
    color2 FF8C00 #Darkorange
    color3 7FFF00 #Chartreuse
    color4 778899 #LightSlateGrey
    color5 FFDEAD #NavajoWhite
    color6 00BFFF #DeepSkyBlue
    #	colours below used by colorize script
    color7 48D1CC #MediumTurquoise
    color8 FFFF00 #Yellow
    color9 FF0000 #Red
    
    
    #${goto 1230}${voffset -15}${font DejaVu Sans Mono:size=10}${exec tail -n 2 /var/log/messages | fold -sw 85}
    #${exec netstat -n --tcp --udp --raw --programs}
    
    # WARNING: Change name and passwords on e-mail code if posting!!
    
    TEXT
    ${goto 75}${voffset 10}${font Helvetica:size=32}${time %b}${font}
    ${voffset -40}${font DejaVu Sans Mono:size=15}${goto -40}${execpi 60 /media/Storage2/conky/horizcal/conky_calhoriz.sh |sed 's/^/\${goto 150}/'}${font}
    ${goto 1275}${color white}${voffset -22}${font Helvetica:size=32}${time %Y}
    ${voffset 235}${execpi 3600 /media/Storage2/conky/conkyversion/conkyversion.sh}
    I'm a super power user

  2. #21742
    Join Date
    Apr 2013
    Beans
    12

    Re: Post your .conkyrc files w/ screenshots

    Might be font name, try:
    Code:
    ${font Helvetica LT Std:size=32}

  3. #21743
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    I've tried different fonts and different sizes but it doesn't seem to change. I thought it might have to do with what is above TEXT and I couldn't see it
    I'm a super power user

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

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by djyoung4 View Post
    I've tried different fonts and different sizes but it doesn't seem to change. I thought it might have to do with what is above TEXT and I couldn't see it
    try using...
    Code:
    background no
    own_window yes
    When testing with own_window no the conky output remains on screen
    even after killall conky.
    Last edited by stinkeye; April 11th, 2013 at 01:03 AM.

  5. #21745
    Join Date
    Apr 2013
    Beans
    0

    Re: Post your .conkyrc files w/ screenshots

    Can some one help me out, i'm making my first conky setup but i'm struggling to get the system sound volume properly. (i'm on linux mint 14, cinnamon)

    The script that i use: (works perfectly)
    Code:
    #!/bin/bash
    amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "mute" } else { print $2"%" }}'
    It shows me a percentage (or mute) BUT when i lookup the sound volume in cinnamon it shows me another percentage.
    So i googled it, it seems like this is the issue: http://us.generation-nt.com/answer/b...206703092.html

    I just want the "normal" percentage but how can i get it?
    (this one is useless since 50% "real" volume shows as 73% on amixer/conky and i'm not planning on getting used to a new scale)
    Last edited by N4E; April 11th, 2013 at 10:14 PM.

  6. #21746
    Join Date
    Aug 2012
    Location
    Florida
    Beans
    185
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Today I noticed after installing "Disk Utility" that it had the Temp of my CPU in celcius and fahrenheit. Didn't know my old old machine could do this. Cool!

    The Question is: How can I display the info in the Conky? I've tried copying another code line for CPU Temperature from another conky.rc listed here, but no go. Do I need to run something in the CLi to display the sensor info I need to put into that line of my conky?
    Last edited by AndyOpie150; April 12th, 2013 at 12:55 AM.

  7. #21747
    Join Date
    Apr 2013
    Beans
    12

    Re: Post your .conkyrc files w/ screenshots

    I use lm-sensor's output for CPU Temperature.
    Page back I've posted my .conkyrc, you can see how it's piped, there.

  8. #21748
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by AndyOpie150 View Post
    Today I noticed after installing "Disk Utility" that it had the Temp of my CPU in celcius and fahrenheit. Didn't know my old old machine could do this. Cool!

    The Question is: How can I display the info in the Conky? I've tried copying another code line for CPU Temperature from another conky.rc listed here, but no go. Do I need to run something in the CLi to display the sensor info I need to put into that line of my conky?
    The code you use in conky depends on your output from sensors.

    Install lm-sensors
    Code:
    sudo apt-get install lm-sensors
    Run...
    Code:
    sudo sensors-detect
    answering yes at each prompt.


    Run...
    Code:
    sensors
    and paste the output here for help displaying in conky.

  9. #21749
    Join Date
    Sep 2007
    Location
    house
    Beans
    79
    Distro
    Lubuntu Development Release

    Re: Post your .conkyrc files w/ screenshots

    Took Windows 8 Conky and Adjusted it to my liking. I like this style cause i can move the blocks anywhere with out being stuck just moving a whole conky strip.



    Conky. I am only posting one as the rest you just change position and details. Original is here http://kant-o.deviantart.com/art/Met...onky-260230653

    Code:
    # 
    # Name: Metro Style Conky
    #
    # Author: Kant-o (feedback via gnome-look).
    
    alignment top_left
    background yes
    border_width 0
    cpu_avg_samples 2
    default_color ffffff
    draw_outline no
    draw_borders no
    draw_shades no
    use_xft yes
    xftfont Ubuntu:size=12
    gap_x 1700
    gap_y 50
    
    # size of text area
    minimum_size 260 70
    maximum_width 240
    max_text_width 240
    
    net_avg_samples 2
    no_buffers yes
    out_to_console no
    out_to_stderr no
    extra_newline no
    own_window yes
    own_window_transparent no
    own_window_class Conky
    own_window_type normal
    own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
    stippled_borders 0
    update_interval 1.0
    uppercase no
    use_spacer none
    show_graph_scale no
    show_graph_range no
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    own_window_colour f64949
    #####
    ## Load Lua for shading (optional)
    ## Set the path to your script here.
    #
    lua_load /home/you/.lua/wtest.lua
    lua_draw_hook_pre draw_lua
    
    TEXT
    ${time %A} ${time %B %d, %Y}
    ${font Ubuntu:size=30}${time %H:%M}${font Ubuntu:size=10}${time %S}$font
    #${voffset -33}${offset 147}${execbar /etc/conky/./bar.sh %H 23}
    #${voffset -13}${offset 147}${execbar /etc/conky/./bar.sh %M 59}
    #${voffset -13}${offset 147}${execbar /etc/conky/./bar.sh %S 59}
    #${offset 2}${time %A}
    #${offset 2}${time %B} ${time %d}, ${time %Y}
    #${voffset -5}${execbar /etc/conky/./bar.sh %w 7}
    #${voffset -13}${execbar /etc/conky/./bar.sh %W 56}
    #${voffset -13}${execbar /etc/conky/./bar.sh %m 12}
    #${offset 2}Computer info $hr
    #${offset 2}CPU${top cpu 1}% ${top name 1}
    #${voffset -5}$cpubar
    #${offset 2}RAM${top mem 1}% ${top_mem name 1}
    #${voffset -5}$membar
    #${offset 2}Swap 
    #${voffset -5}$swapbar
    #${offset 2}HD   ${fs_used /}/${fs_size /}
    #${voffset -5}$fs_bar
    #${offset 2}Networking
    #${voffset -5}${downspeedgraph wlan0 6,120}${upspeedgraph wlan0 6,119}
    #${voffset -13}${downspeedgraph eth0 6,120}${upspeedgraph eth0 6,119}
    And Lua in CPU and Memory block

    Code:
    --[[ this script combines the background drawing lua (originally by londonali1010, modified by VinDSL)
    with a script that emulates only the gradient bars portion of the script by wlourf
    call in conkyrc above TEXT like so
    lua_load /path to file/filename.lua
    lua_draw_hook_pre draw_lua
    ]]
    require 'cairo'
    function conky_draw_lua()
    if conky_window == nil then return end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>5 then
    --#########################################################################################################
    --#########################################################################################################
    --background setup -- make sure this comes first-----------
    settings={--CONKY BACKGROUND
    corner_r=0,--corner radius
    bg_color={0x6652a2,0.9},--color and alpha inside {}
    bg_height=-42,--negative number reduces height of bg
    w=conky_window.width,
    h=conky_window.height,
    };background(settings)
    --end background setup-------------------------------------
    
    bar_adjust=-22
    
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU1
    number=tonumber(conky_parse("${cpu cpu1}")),--conky object to read
    number_max=100,--max value of conky object
    bar_startx=20,--x coordinate
    bar_starty=112+bar_adjust,--y coordinate
    divisions=38,--number of blocks
    div_width=3,--horizontal size
    div_height=10,--vertical size
    div_gap=2,--space between bits
    bg_color={0xFFFFFF,0.25},--background color, color and alpha inside {}
    st_color={0xFFFFFF,1},
    mid_color={0x808080,1},
    end_color={0x000000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU2
    number=tonumber(conky_parse("${cpu cpu2}")),
    number_max=100,
    bar_startx=20,
    bar_starty=146+bar_adjust,
    divisions=38,
    div_width=3,
    div_height=10,
    div_gap=2,
    bg_color={0xFFFFFF,0.25},
    st_color={0xFFFFFF,1},
    mid_color={0x808080,1},
    end_color={0x000000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU2
    number=tonumber(conky_parse("${cpu cpu3}")),
    number_max=100,
    bar_startx=20,
    bar_starty=184+bar_adjust,
    divisions=38,
    div_width=3,
    div_height=10,
    div_gap=2,
    bg_color={0xFFFFFF,0.25},
    st_color={0xFFFFFF,1},
    mid_color={0x808080,1},
    end_color={0x000000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU2
    number=tonumber(conky_parse("${cpu cpu4}")),
    number_max=100,
    bar_startx=20,
    bar_starty=217+bar_adjust,
    divisions=38,
    div_width=3,
    div_height=10,
    div_gap=2,
    bg_color={0xFFFFFF,0.25},
    st_color={0xFFFFFF,1},
    mid_color={0x808080,1},
    end_color={0x000000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    function rgb_to_r_g_b(col_a)
    return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
    end
    function bars(t)
    local bar_startx=t.bar_startx
    local bar_starty=t.bar_starty
    local divisions=t.divisions
    local div_width=t.div_width
    local div_height=t.div_height
    local div_gap=t.div_gap
    local br,bg,bb,ba=rgb_to_r_g_b(t.bg_color)
    local sr,sg,sb,sa=rgb_to_r_g_b(t.st_color)
    local mr,mg,mb,ma=rgb_to_r_g_b(t.mid_color)
    local er,eg,eb,ea=rgb_to_r_g_b(t.end_color)
    if t.number==nil then number=0 else number=t.number end
    local number_max=t.number_max
    local number_divs=(number/number_max)*divisions
    cairo_set_line_width (cr,div_width)
    for i=1,divisions do
    if i<(divisions/2) and i<=number_divs then
    colr=((mr-sr)*(i/(divisions/2)))+sr
    colg=((mg-sg)*(i/(divisions/2)))+sg
    colb=((mb-sb)*(i/(divisions/2)))+sb
    cola=((ma-sa)*(i/(divisions/2)))+sa
    elseif i>=(divisions/2) and i<=number_divs then
    colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
    colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
    colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
    cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
    else
    colr=br
    colg=bg
    colb=bb
    cola=ba
    end
    cairo_set_source_rgba (cr,colr,colg,colb,cola)
    cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
    cairo_rel_line_to (cr,0,div_height)
    cairo_stroke (cr)
    end
    end--function bars
    function background(t)
    local corner_r=t.corner_r
    local br,bg,bb,ba=rgb_to_r_g_b(t.bg_color)
    local v=t.bg_height
    local h=t.h
    local w=t.w
    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h+v-corner_r)
    cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
    cairo_line_to(cr,corner_r,h+v)
    cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)
    cairo_set_source_rgba(cr,br,bg,bb,ba)
    cairo_fill(cr)
    end--function background
    Geek by nature, Linux by choice

  10. #21750
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by djyoung4 View Post
    I've tried different fonts and different sizes but it doesn't seem to change. I thought it might have to do with what is above TEXT and I couldn't see it
    WOW!!!!!!!!! That conky looks really familiar ... it's one of mine modified ... there is enough left to know that.
    Just as I was about to reply ... blink ... lost internet - just got it back.

    It is not your font, it's works fine, did what stinkeye say have any affect? Good one stinyeye, have to make note of that too.

    I tried your code "verbatim" (changed the path to my horizontal calendar) and it started my whole screen blinking .... so ... I rebuilt it. You may or may not want it, but I have reduced what is below TEXT to two lines not three ... and changed:

    Code:
    # Default and Minimum size is 256 - needs more for single commands that
    # "call" a lot of text IE: bash scripts
    text_buffer_size 1028

    The conky:
    Code:
    ### killall conky && conky -c /media/5/conky/djyoung4/djyoung4.conky &
    ###  Begin Window Settings  ##################################################
    # 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,sticky,below,skip_taskbar,skip_pager
    own_window_colour gray
    own_window_class Conky
    own_window_title djyoung4.conky
    
    # Use the Xdbe extension? (eliminates flicker)
    # It is highly recommended to use own window with this one
    # so double buffer won't be so big.
    double_buffer yes
    
    ### ARGB can be used for real transparency
    ### NOTE that a composite manager is required for real transparency.
    ### This option will not work as desired (in most cases) in conjunction with
    ### own_window_type normal
    # own_window_argb_visual yes
    
    ### When ARGB visuals are enabled, this use this to modify the alpha value
    ### Use: own_window_type normal
    ### Use: own_window_transparent no
    ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
    # own_window_argb_value 0
    
    #minimum_size 1900 0     ## width, height
    #maximum_width 1900     ## width, usually a good idea to equal minimum width
    
    gap_x 10	# left-right
    gap_y 0	# up-down
    
    alignment top_left  #bottom_left
    ###################################################  End Window Settings  ###
    ###  Font Settings  #########################################################
    # Use Xft (anti-aliased font and stuff)
    use_xft yes
    xftfont DejaVu Sans Mono:bold:size=8
    
    # Alpha of Xft font. Must be a value at or between 1 and 0 ###
    xftalpha 1
    # Force UTF8? requires XFT ###
    override_utf8_locale yes
    
    uppercase no
    ######################################################  End Font Settings  ###
    ###  Color Settings  #########################################################
    
    draw_shades yes
    default_shade_color black
    
    draw_outline no # amplifies text if yes
    default_outline_color black
    
    default_color FFDEAD #255 222 173	NavajoWhite	DCDCDC #220 220 220	Gainsboro
    color0 8FBC8F #143 188 143	DarkSeaGreen
    color1 778899 #119 136 153	LightSlateGray
    color2 FF8C00 #255 140   0	DarkOrange
    color3 62C2C2 #098 194 194	S11 Light Green #7FFF00 #127 255   0	Chartreuse
    color4 FFA07A #255 160 122	LightSalmon
    color5 FFDEAD #255 222 173	NavajoWhite
    color6 00BFFF #  0 191 255	DeepSkyBlue
    color7 00FFFF #  0 255 255	Cyan
    color8 FFFF00 #255 255   0	Yellow
    color9 B22222 #178  34  34	FireBrick
    #####################################################  End Color Settings  ###
    ###  Borders Section  ########################################################
    draw_borders no
    # Stippled borders?
    stippled_borders 0
    # border margins
    border_inner_margin 5
    border_outer_margin 0
    # border width
    border_width 0
    # graph borders
    draw_graph_borders no #yes
    #default_graph_size 15 40
    #####################################################  End Borders Secton  ###
    ###  Miscellaneous Section  ##################################################
    # Boolean value, if true, Conky will be forked to background when started.
    background yes
    
    # Adds spaces around certain objects to stop them from moving other things
    # around, this only helps if you are using a mono font
    # Options: right, left or none
    use_spacer none
    
    # Default and Minimum size is 256 - needs more for single commands that
    # "call" a lot of text IE: bash scripts
    text_buffer_size 1028
    
    # Subtract (file system) buffers from used memory?
    no_buffers yes
    
    # change GiB to G and MiB to M
    short_units yes
    
    # Like it says, ot pads the decimals on % values
    # doesn't seem to work since v1.7.1
    pad_percents 2
    
    #   Maximum size of user text buffer, i.e. layout below TEXT line in config file
    #  (default is 16384 bytes)
    # max_user_text 16384
    
    # Desired output unit of all objects displaying a temperature. Parameters are
    # either "fahrenheit" or "celsius". The default unit is degree Celsius.
    # temperature_unit Fahrenheit
    
    ##############################################  End Miscellaneous Section  ###
    update_interval 1
    
    
    ## ${goto 75}${voffset 10}${font Helvetica:size=32}${time %b}${font}
    ## ${voffset -40}${font DejaVu Sans Mono:size=15}${goto -40}${execpi 60 /media/5/Conky/scripts/conky-calhoriz.sh |sed 's/^/\${goto 150}/'}${font}
    ## ${goto 1275}${color white}${voffset -22}${font Helvetica:size=32}${time %Y}
    
    
    
    TEXT
    ${goto 75}${color white}${font Helvetica:size=32}${time %b}${goto 1275}${time %Y}${font}${color}
    ${voffset -35}${font DejaVu Sans Mono:size=15}${execpi 60 /media/5/Conky/scripts/conkycal.sh|sed 's/^/\${goto 150}/'}${font}
    and conkycal.sh
    Code:
    #!/bin/bash
    cd ${0%/*}
    
    # horizontal and vertical calendar for conky by ans
    # Updated by: mobilediesel, dk75, Bruce, Crinos512, et al.
    # This update by dk75 - 15 Feb 2011
    
    #This program is free software: you can redistribute it and/or modify
    #it under the terms of the GNU General Public License as published by
    #the Free Software Foundation, either version 3 of the License, or
    #(at your option) any later version.
    
    #This program is distributed in the hope that it will be useful,
    #but WITHOUT ANY WARRANTY; without even the implied warranty of
    #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #GNU General Public License for more details.
    
    #You should have received a copy of the GNU General Public License
    #along with this program.  If not, see <http://www.gnu.org/licenses/>.
    # locale depend week day names
    # The 'lang' file must be in the same directory as this script.
    # Horizontal and English are the defaults:
    #   conkycal.sh
    # Make it vertical:
    #   conkycal.sh -v
    # Change the language to Spanish:
    #   conkycal.sh -l es
    # Or both at once:
    #   conkycal.sh -v -l es
    # The order of the arguments doesn't matter:
    #   conkycal.sh -l es -v
    # Test other year and/or month, eg. February 2000
    #   conkycal.sh -d "2000 2"
    # Need to use a goto:
    #   conkycal.sh -l es|sed 's/^/\${goto 240}/'
    # or a goto and a tab:
    #   conkycal.sh |sed -e 's/^/\${goto 240}/' -e 's/$/\${tab 20}/'
    
    DOW=("Mo" "Tu" "We" "Th" "Fr" "Sa" "Su")
    
    while getopts ":vl:d:" opts; do
    case "$opts" in
    l) lang=$OPTARG;;
    v) orientation="$opts";;
    d) DATE=$OPTARG;;
    esac
    done
    if [ -f conkycal.lang ]; then
        . conkycal.lang
    fi
    
    COLOROLD="445566" #MidSlateGrey
    COLORTODAY="00BFFF" #DeepSkyBlue
    COLORREST="445566" #MidSlateGrey
    COLORNEXT="778899" #LightSlateGrey
    COLORSATURDAY="00BFFF" #DeepSkyBlue
    COLORSUNDAY="00BFFF" #DeepSkyBlue
    
    COLOR=("" "" "" "" "" "\${color $COLORSATURDAY}" "\${color $COLORSUNDAY}")
    COLOREND="\${color}"
    
    DAYS=( $(echo "" |gawk -v dateS="$DATE" 'END{
    if (dateS) {
    	print strftime("%-u",mktime(dateS" 1 0 0 0")),strftime("%-d",mktime(dateS" 1 0 0 0")),strftime("%-d",mktime(strftime("%Y %m 0 0 0 0",mktime(dateS" 32 0 0 0"))))
    	}
    else {
    	print strftime("%-u",mktime(strftime("%Y %m 1 0 0 0"))),strftime("%-d"),strftime("%-d",mktime(strftime("%Y %m 0 0 0 0",mktime(strftime("%Y %m 32 0 0 0")))))
    	}
    }') )
    
    k=${DAYS[0]}
    for ((j=1; j<=${DAYS[2]}; j++)); do
      days[$j]="${COLOR[k-1]}${DOW[k-1]}"
      k=$((${k/#7/0}+1))
    done
    for ((j=$((${DAYS[2]}+1)); j<=31; j++)); do
      days[$j]="${DOW[k-1]}"
      k=$((${k/#7/0}+1))
    done
    
    # horizontal function
    h () {
    for ((i=1; i<=${DAYS[2]}; i++)); do
      echo -n "${days[$i]/${DOW[6]}/${DOW[6]}$COLOREND} "
    done
    echo -n "\${color $COLORREST}"
    for ((i=$((${DAYS[2]}+1)); i<=31; i++)); do
      echo -n "${days[$i]} "
    done
    echo $'\n'"\${color $COLOROLD}$(a=; for ((x=1; x<=$[${DAYS[1]}-1]; x++));do printf "%02d " $x; done)\${color $COLORTODAY}$(printf "%02d" ${DAYS[1]})\${color $COLORREST} $(a=; for ((x=$[${DAYS[1]}+1];x<=${DAYS[2]};x++)); do printf "%02d " $x; done)\${color $COLORNEXT}$(a=; for ((x=1; x<=$((31-${DAYS[2]})); x++)); do printf "%02d " $x; done)" |sed -e 's/ *$//'
    }
    
    #vertical function
    v () {
    for ((i=1; i<=$((${DAYS[1]}-1)); i++)); do
        TODAYC[$i]="\${color $COLOROLD}"
    done
    TODAYC[${DAYS[1]}]="\${color $COLORTODAY}"
    for ((i=$((${DAYS[1]}+1)); i<=${DAYS[2]}; i++)); do
        TODAYC[$i]="\${color $COLORREST}"
    done
    for ((j=1; j<=${DAYS[2]}; j++)); do
        echo  "${days[$j]} ${TODAYC[$j]}$(printf "%02d" $j)\${color}"
    done
    for ((j=1; j<=$((31-${DAYS[2]})); j++)); do
        echo  "\${color $COLORNEXT}${days[$j]} $(printf "%02d" $j)\${color}"
    done
    }
    # call function based on "$orientation" - default is horizontal
    ${orientation:-h}
    Note: The 'lang' file must be in the same directory as this script.
    lang
    Code:
    case ${lang:-$LANG} in
    	af* )  DOW=("Ma" "Di" "Wo" "Do" "Vr" "Sa" "So");;				# Afrikaans (Afrikaans)
    	be* )  DOW=("Па" "Аў" "Се" "Ча" "Пя" "Су" "Ня");;				# Belarusian (Беларуская)
    	bs* )  DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");;				# Bosnian (Bosanac)
    	bg* )  DOW=("По" "Вт" "Ср" "Че" "Пе" "Съ" "Не");;				# Bulgarian (Български)
    	zh* )  DOW=("周一" "周二" "周三" "周四" "周五" "周六" "周天");;	# Chinese (中文)
    	hr* )  DOW=("Po" "Ut" "Ut" "Sr" "Če" "Su" "Ne");;				# Croatian (Hrvatska)
    	cs* )  DOW=("Po" "Út" "St" "Čt" "Pá" "So" "Ne");;				# Czech (Čeština)
    	da* )  DOW=("Ma" "Ti" "On" "To" "Fr" "Lø" "Sø");;				# Danish (Dánština)
    	nl* )  DOW=("Ma" "Di" "Wo" "Do" "Vr" "Za" "Zo");;				# Dutch (Nederlandse)
    	de* )  DOW=("Mo" "Di" "Mi" "Do" "Fr" "Sa" "So");;				# German (Deutche)
    	el* )  DOW=("Δε" "Τρ" "Τε" "Πέ" "Πα" "Σά" "Κυ");;				# Greek (Ελληνικά)
    	et* )  DOW=("Es" "Te" "Ko" "Ne" "Re" "La" "Pü");;				# Estonian (Eesti)
    	tl* )  DOW=("Lu" "Ma" "Mi" "Hu" "Bi" "Sa" "Li");;				# Filipino (Filipino)
    	fi* )  DOW=("Ma" "Ti" "Ke" "To" "Pe" "La" "Su");;				# Finnish (Suomen)
    	fr* )  DOW=("Lu" "Ma" "Me" "Je" "Ve" "Sa" "Di");;				# French (Français)
    	gl* )  DOW=("Lu" "Ma" "Mé" "Xo" "Ve" "Sá" "Do");;				# Galician (Galego)
    	hi* )  DOW=("सोम" "मंगल" "बुध" "गुरु" "शुक्र" "शनि" "सूर्य")	;;		# Hindi (हिन्दी)
    	hu* )  DOW=("Hé" "Ke" "Se" "Cü" "Pé" "So" "Va");;				# Hungarian (Magyar)
    	is* )  DOW=("Má" "Þr" "Mi" "Fi" "Fö" "La" "Su");;				# Icelandic (Íslenska)
    	id* )  DOW=("Se" "Se" "Ra" "Ka" "Ju" "Sa" "Mi");;				# Indonesian (Indonesia)
    	it* )  DOW=("Lu" "Ma" "Me" "Gi" "Ve" "Sa" "Do");;				# Italian (Italiano)
    	ja* )  DOW=("月曜" "火曜" "水曜" "木曜" "金曜" "土曜" "日曜");;	# Japanese (日本語) x
    	ko* )  DOW=("월요" "화요" "수요" "목요" "금요" "토요" "일요");;	# Korean (한국어) x
    	lv* )  DOW=("Pr" "Ot" "Tr" "Ce" "Pe" "Se" "Sv");;				# Latvian (Latviešu)
    	lt* )  DOW=("pi" "an" "tr" "ke" "pe" "še" "se");;				# Lithuanian (Lietuviškai)
    	mk* )  DOW=("По" "Вт" "Ср" "Че" "Пе" "Са" "Не");;				# Macedonian (Македонски)
    	ml* )  DOW=("Is" "Se" "Ra" "Ra" "Ju" "Sa" "Mi");;				# Malayam (Bahasa Melayu)
    	nb* )  DOW=("ma" "ti" "on" "to" "fr" "lø" "sø");;				# Norwegian (Norsk)
    	pl* )  DOW=("Po" "Wt" "Śr" "Cz" "Pt" "So" "Nd");;				# Polish (Polska)
    	pt* )  DOW=("Sq" "Te" "Qa" "Qi" "Se" "Sá" "Do");;				# Portuguese (Português)
    	ro* )  DOW=("Lu" "Ma" "Mi" "Jo" "Vi" "Sa" "Du");;				# Romanian (Român)
    	ru* )  DOW=("По" "Вт" "Ср" "Че" "Пя" "Су" "Во");;				# Russian (Русский)
    	sr* )  DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");;				# Serbian (Српски)
    	sk* )  DOW=("Po" "Ut" "St" "Št" "Pi" "So" "Ne");;				# Slovak (Slovenčina)
    	sl* )  DOW=("Po" "To" "Sr" "Če" "Pe" "So" "Ne");;				# Slovenian (Slovenski)
    	es* )  DOW=("Lu" "Ma" "Mi" "Ju" "Vi" "Sá" "Do");;				# Spanish (Español)
    	sv* )  DOW=("Må" "Ti" "On" "To" "Fr" "Lö" "Sö");;				# Swedish (Svenska)
    	tr* )  DOW=("Pa" "Sa" "Ça" "Pe" "Cu" "Cu" "Pa");;				# Turkish (Türkçe)
    	uk* )  DOW=("По" "Ві" "Се" "Че" "Пя" "Су" "Не");;				# Ukrainian (Українська)
            * ) DOW=("Mo" "Tu" "We" "Th" "Fr" "Sa" "Su") ;;
    esac

Page 2175 of 2348 FirstFirst ... 1175167520752125216521732174217521762177218522252275 ... LastLast

Tags for this Thread

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
  •