Eureka!!! I found my calendar event displayer!

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: Eureka!!! I found my calendar event displayer!

Post by Koentje »

From what i see in the other post, if you change this:

Code: Select all

${voffset 31}${execpi 60 ./previousmonth.sh}
${voffset -123}${execpi 60 ./currentmonth.sh}
${voffset -105}${execpi 60 ./nextmonth.sh}
to this:

Code: Select all

${voffset 31}${execpi 60 ./currentmonth.sh}
That should do the trick!
It places the current month on the place of the previous month.
Image
User avatar
Logansfury
Level 6
Level 6
Posts: 1237
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

Re: Eureka!!! I found my calendar event displayer!

Post by Logansfury »

Koentje wrote: Sun Jan 28, 2024 12:03 am From what i see in the other post, if you change this:

Code: Select all

${voffset 31}${execpi 60 ./previousmonth.sh}
${voffset -123}${execpi 60 ./currentmonth.sh}
${voffset -105}${execpi 60 ./nextmonth.sh}
to this:

Code: Select all

${voffset 31}${execpi 60 ./currentmonth.sh}
That should do the trick!
It places the current month on the place of the previous month.
That is exactly what I tried. I made a duplicate .conf named single.conf and removed the two lines referring to the previous and next but the current didnt display when I enabled it.
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
User avatar
Logansfury
Level 6
Level 6
Posts: 1237
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

Re: Eureka!!! I found my calendar event displayer!

Post by Logansfury »

Logansfury wrote: Sun Jan 28, 2024 12:11 am That is exactly what I tried. I made a duplicate .conf named single.conf and removed the two lines referring to the previous and next but the current didnt display when I enabled it.
Holy crap!

I just made another copy of the .conf, named it single.conf, eliminated the prev/next calls and made sure to set the voffset to 31. It displayed just the current month perfectly!

I guess I handn't had the voffset edited in the last attempt and left it at its default 120 or 123 setting.

This is nice, but I'm going to go ahead and keep the 3 cals visible to balance out the width of the google events display.
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: Eureka!!! I found my calendar event displayer!

Post by Koentje »

Just edited the conky a little and got a nice centered calendar! So for the people who follow this topic or come across this topic and want to have a single month calendar, here's the scripts.

conky config

Code: Select all

-- needs package cal (provided by ncal) - sudo apt install ncal
conky.config = {
  own_window = true,
  own_window_type = 'desktop',
  own_window_transparent = true,
  own_window_colour = '000000',
  own_window_argb_visual = true,
    own_window_hints = 'skip_taskbar,skip_pager,undecorated,below',
  own_window_class = 'Conky',
  own_window_argb_visual = true,
  background = false,
  update_interval = 5,
  double_buffer = true,
  alignment = 'top_left',
  gap_x = 10,
  gap_y = 10,
    minimum_width = 200,
    minimum_height = 100,
    maximum_width = 200,
  use_xft = true,
  draw_outline = false,
  draw_shades = true,
  font = 'Monaco:size=9',
  default_color = 'e82127',
};
conky.text = [[
${voffset 11}${execp ./currentmonth.sh}
]];

Bash script currentmonth.sh

Code: Select all

#!/bin/bash
YEAR=`date +%_Y`
TDY=`date +%_d`
MTH=`date +%_B`
cal | sed s/"\([^a-zA-Z]\)$MTH"'\b'/'${color white}${font Neon 80s:bold:size=11} '"    $MTH"'${color}'/ | sed s/"\([^0-9]\)$YEAR"'\b'/'${color white}'" $YEAR"'${color}${font}'/ | sed s/"\([^0-9]\)$TDY"'\b'/'${color white}'" $TDY"'${color}'/ | sed s/^/'${alignc}'/
Image
User avatar
zcot
Level 9
Level 9
Posts: 2838
Joined: Wed Oct 19, 2016 6:08 pm

Re: Eureka!!! I found my calendar event displayer!

Post by zcot »

You can just remove the voffset stuff and correct the main width and height to where it's not 3 times wide, which you can actually just say minimum 0, you don't have to hardcode a value, and plus those values change when you are changing fonts/sizes anyway.
User avatar
Logansfury
Level 6
Level 6
Posts: 1237
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

Re: Eureka!!! I found my calendar event displayer!

Post by Logansfury »

zcot wrote: Sun Jan 28, 2024 12:51 am You can just remove the voffset stuff and correct the main width and height to where it's not 3 times wide, which you can actually just say minimum 0, you don't have to hardcode a value, and plus those values change when you are changing fonts/sizes anyway.
I found that I had to edit down the 800+ width value listed to get better control of positioning the current month as a single display.
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
Post Reply

Return to “Compiz, Conky, Docks & Widgets”