]>
apps.delaporte.us Git - dotfiles.git/blob - files/tab/tasks.py
52731da3b98ee3be8ab3aa009492726a7a731ca0
1 # This file is meant to sit in ~ for use from all shells.
2 from invoke
import task
4 from datetime
import datetime
as dt
7 HOME
= os
.path
.expanduser('~')
8 TODAY
= dt
.now().strftime('%Y.%m.%d')
10 KIDS_ALLOWANCE_URL
=os
.environ
.get('KIDS_CASH_URL')
11 PAYROLL
= os
.environ
.get('PAYROLL')
14 c
.run(f
'konsole --separate --workdir {path}')
17 c
.run(f
"librewolf {url}", asynchronous
=True)
21 c
.run(f
"codium {path}")
25 c
.run(f
'dolphin {path}', asynchronous
=True)
26 # c.run(f"nemo {path}")
31 result
= c
.run('which minetest')
37 browse(c
, KIDS_ALLOWANCE_URL
)
46 # For copying the latest file in
47 folder(c
, f
"{HOME}/pixel7adocuments")
48 folder(c
, f
"{PAYROLL}/data/payroll_inbox")
53 # For running the payroll scripts
54 c
.run(f
"cd {PAYROLL};{HOME}/envs/jupyter/bin/jupyter-lab")
60 browse(c
, 'https://app.screego.net/#/')
64 def show_free_space(c
):
65 c
.run('df -h | grep G') # We only care about disks measured in G
68 def free_disk_space(c
, ruthless
=False):
70 c
.run('podman container cleanup --all --rm')
71 # Dolphin Trash ...should regenerate
72 c
.run(f
'sudo rm -rf {HOME}/.local/share/Trash')
73 # c.run(f'rm {HOME}/Downloads/*.iso')
74 c
.run('sudo apt-get autoclean') # Remove useless apt cache
76 c
.run(f
'rm -rf {HOME}/Downloads/*')
77 c
.run('sudo apt-get clean') # Remove all apt cache
83 SCHOOL
= f
"{HOME}/School"
88 # c.run(f"cd {SCHOOL};{HOME}/envs/jupyter/bin/jupyter lab", asynchronous=True)
92 term(c
, f
'{HOME}/.var/app/net.minetest.Minetest/.minetest')