Maybe the conkyDateDiff or conkyDaysDiff will work for you - both are available at the Conky PitStop.
Maybe the conkyDateDiff or conkyDaysDiff will work for you - both are available at the Conky PitStop.
The mark of an honest man ... is that he means what he says and knows what he means.
A.R.
Lost cause - no not at all.
There is a LOT of historical info there. I hope when it comes back that it will be "archived" as read only, if only for a few years. If you look at the first few hundred pages they are for a conky version that is very out dated and have references to defunct commands and scripts that no longer work or have been updated or no longer necessary due to new conky commands.
In a way this is better, but it will take time to regain the wealth of knowledge. One can always refer to a specific post in the thread though.
I was thinking the same thing this morning. but that would mean a manual change every 14 days, I'm sure that's not a desirable thing. Now with a nice bash script that does a countdown from a specific "payday day" in the near past that would count downeasy enough if one knew bash scripts (or python, perl, LUA)Code:3, 2, 1, 0 13, 12, etc etc
{sigh} sadly - I don't! {sigh}
It's worth mentioning that those scripts along with the conkyLatLong and conkyText scripts are now in the conkyMisc package in the Conky Companions PPA. It has it's own thread here: http://ubuntuforums.org/showthread.php?t=1646675
Chimo
edit: and I said I wouldn't sector11
OK.
I'm in.
And since "Conky Support Scripts" thread still isn't usable then I post it there.
Feew day ago some user at my regional Ubuntu forum PM me about calendar script that is not working at his FreeBSD box.
Knowing that it's some basic differentials between Linux and BSD and I didn't seen working BSD ever, I've posted that "doubtly that I could help you", but it seems that the only problem with this BASH script was lack of SEQ command in BSD (there is SEQ2 but no go).
So, there is new BSD compatibile calendar script (parts in RED are SEQ replacements):
Code:#!/usr/local/bin/bash cd $(dirname $0) # horizontal and vertical calendar for conky by ans # Updated by: mobilediesel, dk75, Bruce, Crinos512, et al. ############################################################ # This work is licensed under the Creative Commons # # Attribution-Share Alike 3.0 Unported License. # # To view a copy of this license, visit # # http://creativecommons.org/licenses/by-sa/3.0/ # # or send a letter to Creative Commons, 171 Second Street, # # Suite 300, San Francisco, California, 94105, USA. # ############################################################ # 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 # 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:" opts; do case "$opts" in l) lang=$OPTARG;; v) orientation="$opts";; esac done if [ -f lang ]; then . lang fi COLOROLD="445566" #MidSlateGrey COLORTODAY="00BFFF" #DeepSkyBlue COLORREST="445566" #MidSlateGrey COLORNEXT="778899" #LightSlateGrey COLORSATURDAY="C6FF8E" #a light green COLORSUNDAY="C6FF8E" #a light green COLOR=("" "" "" "" "" "\${color $COLORSATURDAY}" "\${color $COLORSUNDAY}") COLOREND=("" "" "" "" "" "" "\${color}") TODAY=$(gdate +%-d) LASTDAY=$(gdate -d "-$TODAY days +1 month" +%d) FIRSTDAY=$(gdate -d "-$[$TODAY-1] days" +%u) # horizontal function h () { # Build $TOPLINE k=$FIRSTDAY for j in {1..31}; do x=$[j+LASTDAY/j] case $j in ${j/#$x}) TOPLINE="$TOPLINE ${COLOR[$[k-1]]}${DOW[$[k-1]]}${COLOREND[$[k-1]]}";; $[LASTDAY+1]) TOPLINE="$TOPLINE \${color $COLORNEXT}${DOW[$[k-1]]}";; *) TOPLINE="$TOPLINE ${DOW[$[k-1]]}";; esac k=$[${k/#7/0}+1] done BOTTOM="\${color $COLOROLD}$(a=; for (( x=1; x<=$LASTDAY; x++ )); do a="$a$(printf "%02d%s" $x ' ')"; done; printf "$a\033[1D\033[K"|sed "0,/[0-3]*$TODAY \?/s//\${color $COLORTODAY}&\${color $COLORREST}/") \${color $COLORNEXT}$(a=; for (( x=1; x<=$[31-LASTDAY]; x++ )); do a="$a$(printf "%02d%s" $x ' ')"; done; printf "$a\033[1D\033[K")" echo "${TOPLINE/# /}" echo "$BOTTOM\${color}" } #vertical function v () { for (( i=1; i<$TODAY; i++ )); do TODAYC[$i]="\${color $COLOROLD}" done TODAYC[$TODAY]="\${color $COLORTODAY}" for (( i=$[TODAY+1]; i<=$LASTDAY; i++ )); do TODAYC[$i]="\${color $COLORREST}" done k=$FIRSTDAY for (( j=1; j<=$LASTDAY; j++ )); do echo "${COLOR[$[k-1]]}${DOW[$[k-1]]} ${TODAYC[$j]}$(printf "%02d" $j)\${color}" k=$[${k/#7/0}+1] done } # call function based on "$orientation" ${orientation:-h}
Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | My Conky Pitstop corner | One4All project
Beautiful. One question does that "also" work in "Linux".
Here's another one. That calendar script you posted maintains a 31 day calendar with extra days for the following months ONLY if it is a horizontal calendar. This one does the same for horizontal or vertical (better for spacing) - can you make this good for BSD as well:
Code:#!/bin/bash cd ${0%/*} # horizontal and vertical calendar for conky by ans # Updated by: mobilediesel, dk75, Bruce, Crinos512, et al. #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 # 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 lang ]; then . lang fi COLOROLD="445566" #MidSlateGrey COLORTODAY="00BFFF" #DeepSkyBlue "FF8C00" #Darkorange COLORREST="445566" #MidSlateGrey COLORNEXT="778899" #LightSlateGrey COLORSATURDAY="C6FF8E" # a light green COLORSUNDAY="C6FF8E" #a light green ## COLORSATURDAY="FFFF00" ## COLORSUNDAY="FF8C00" COLOR=("" "" "" "" "" "\${color $COLORSATURDAY}" "\${color $COLORSUNDAY}") COLOREND="\${color}" #DAYS=( $(cal | awk 'BEGIN{FIRST= strftime( "%Y %m 01 00 00 00", systime() )}{if ($0!~/^ *$/){LAST=$NF}} END{print strftime( "%u", mktime( FIRST ) )" "strftime( "%-d" )" "LAST}') ) DAYS=( $(cal $DATE | awk 'BEGIN{ monN=split("January February March April May June July August September October November December", months) for(i=1; i<=monN; i++) { months[months[i]]=i; delete months[i]; } } { if ( NR==1 ) {MONTH=months[$1];YEAR=$2} }{if ($0!~/^ *$/){LAST=$NF}} END{print strftime( "%u", mktime( strftime( YEAR" "MONTH" 01 00 00 00" ) ) )" "strftime( "%-d" )" "LAST}') ) k=${DAYS[0]} for j in $(seq 1 ${DAYS[2]}); do days[$j]="${COLOR[k-1]}${DOW[k-1]}" k=$((${k/#7/0}+1)) done for j in $(seq $((${DAYS[2]}+1)) 31); do days[$j]="${DOW[k-1]}" k=$((${k/#7/0}+1)) done # horizontal function h () { for i in $(seq 1 ${DAYS[2]}); do echo -n "${days[$i]/${DOW[6]}/${DOW[6]}$COLOREND} " done echo -n "\${color $COLORREST}" for i in $(seq $((${DAYS[2]}+1)) 31); do echo -n "${days[$i]} " done echo $'\n'"\${color $COLOROLD}$(seq -w -s ' ' ${DAYS[2]}|sed "0,/[0-3]*${DAYS[1]} \?/s//\${color $COLORTODAY}&\${color $COLORREST}/") \${color $COLORNEXT}$(seq -w -s ' ' 0$((31-${DAYS[2]})))" } #vertical function v () { for i in $(seq 1 $((${DAYS[1]}-1))); do TODAYC[$i]="\${color $COLOROLD}" done TODAYC[${DAYS[1]}]="\${color $COLORTODAY}" for i in $(seq $((${DAYS[1]}+1)) ${DAYS[2]}); do TODAYC[$i]="\${color $COLORREST}" done for j in $(seq ${DAYS[2]}); do echo "${days[$j]} ${TODAYC[$j]}$(printf "%02d" $j)\${color}" done for j in $(seq -w $((31-${DAYS[2]}))); do echo "\${color $COLORNEXT}${days[$j]} $(printf "%02d" $j)\${color}" done } # call function based on "$orientation" - default is horizontal ${orientation:-h}
Bookmarks