Skip to content

Instantly share code, notes, and snippets.

@OKsign
Created June 16, 2020 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OKsign/9c04db86de25ee00b4d4ba9579e48c81 to your computer and use it in GitHub Desktop.
Save OKsign/9c04db86de25ee00b4d4ba9579e48c81 to your computer and use it in GitHub Desktop.
# user input
days = ['Mon','Tue','Wed','Thu']
# Monday = 'Mon' | Tuesday = 'Tue' | Wednesday = 'Wed' | Thursday = 'Thu' | Friday = 'Fri' | Saturday = 'Sat' | Sunday = 'Sun'
apps = ['gnome-calendar','audacity']
files_folders = ['/home/john/Desktop/abc','/usr/share/applications']
# end of user input
from datetime import datetime
import time
import os
date_en_today = datetime.today().strftime('%A')
first_3_chars = date_en_today[0:3]
list_done = []
for d in days:
if d != '':
if d == first_3_chars:
for a in apps:
if a != '':
os.system("%s &" % a)
list_done.append(1)
for f in files_folders:
if f != '':
os.system("xdg-open %s" % f)
list_done.append(1)
if len(list_done) >= 1:
ff = len(files_folders)
aa = len(apps)
ff_aa_and4 = 4 + ff + aa
time.sleep(ff_aa_and4)
os.system("notify-send 'Linux Mint - Python Script 3' 'Done!'")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment