]>
us-delaporte.pagekite.me Git - dotfiles.git/blob - files/tab/tasks.py
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}', asynchronous
=True)
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")
56 def payroll_jupyter(c
):
58 # For running the payroll scripts
59 c
.run(f
"cd {PAYROLL};{HOME}/envs/jupyter/bin/jupyter-lab")
65 browse(c
, 'https://app.screego.net/#/')
69 def show_free_space(c
):
70 c
.run('df -h | grep G') # We only care about disks measured in G
73 def free_disk_space(c
, ruthless
=False):
75 c
.run('podman container cleanup --all --rm')
76 # Dolphin Trash ...should regenerate
77 c
.run(f
'sudo rm -rf {HOME}/.local/share/Trash')
78 # c.run(f'rm {HOME}/Downloads/*.iso')
79 c
.run('sudo apt-get autoclean') # Remove useless apt cache
81 c
.run(f
'rm -rf {HOME}/Downloads/*')
82 c
.run('sudo apt-get clean') # Remove all apt cache
88 SCHOOL
= f
"{HOME}/School"
93 # c.run(f"cd {SCHOOL};{HOME}/envs/jupyter/bin/jupyter lab", asynchronous=True)
97 print("https://rubenwardy.com/minetest_modding_book/en/quality/luacheck.html")
98 term(c
, f
'{HOME}/.var/app/net.minetest.Minetest/.minetest')