View Single Post
  #4   (View Single Post)  
Old 18th October 2019
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,325
Default

x11/yad Tricks - scripting tint2/clock/calendars and abook sub-menu entries.

Tint2 does not provide a popup calendar but does have the capability to launch one. Most of the Linux based Openbox/tint2 distributions use productivity/gsimplecal which was just ported to OpenBSD. The project continues to use x11/yad to generate a calendar largely because BareGUI tries to avoid redundant applications. Yad is utilized for additional scripts.

The ~/scripts/calendar.sh script positions the calendar under the panel clock The code to run the calendar script is in the clock section of ~/.config/tint2/tint2rc.

Sylpheed comes with a functional address book but if you use mutt/neomutt/alpine, mail/abook is good for contact management. One challenge was that I like separate address books. It made bulk emails easier although I still have to manually copy/paste the recipients to Bcc:.

Here is the yad script that itemizes my abook addressbooks:
~/scripts/yad_abook.sh
Code:
#!/bin/sh

GTK_THEME=Adwaita:dark \
yad --form --width=256 --text="Choose an Addressbook:" --title="Abook" \
--field="AirPark":fbtn 'xterm +sb -g 72x26 -T "Airpark AddressBook" -e abook --datafile /home/YOUR_USER/.abook/airparkaddress' \
--field="BlockWatch":fbtn 'xterm +sb -g 72x44 -T "Block AddressBook" -e abook --datafile /home/YOUR_USER/.abook/blockaddress' \
--field="Business":fbtn 'xterm +sb -g 72x44 -T "Business AddressBook" -e abook --datafile /home/YOUR_USER/.abook/bizaddress' \
--field="Family":fbtn 'xterm +sb -g 72x20 -T "Family AddressBook" -e abook --datafile /home/YOUR_USER/.abook/familyaddress' \
--field="Friends":fbtn 'xterm +sb -g 72x22 -T "Friends AddressBook" -e abook --datafile /home/YOUR_USER/.abook/friendsaddress' \
--window-icon=contact-new --button=gtk-cancel:6
and the desktop entry:
~/.local/share/applications/abook.desktop
Code:
[Desktop Entry]
Name=Abook
GenericName=Contacts
Comment=Manage Contacts
Exec=/home/YOUR_USER/scripts/yad_abook.sh
Icon=x-office-address-book
Terminal=false
Type=Application
StartupNotify=false
Categories=Office;ContactManagement;
You can add/delete --field lines as needed.

Last edited by shep; 31st December 2019 at 06:02 PM.
Reply With Quote