]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - files/tab/tasks.py
Add luanti mod command
[dotfiles.git] / files / tab / tasks.py
index f1e6339f2b22ed7592e7d33bd19da322cda4106b..52731da3b98ee3be8ab3aa009492726a7a731ca0 100644 (file)
@@ -11,7 +11,7 @@ KIDS_ALLOWANCE_URL=os.environ.get('KIDS_CASH_URL')
 PAYROLL = os.environ.get('PAYROLL')
 
 def term(c, path):
-    c.run(f'konsole --workdir {path}')
+    c.run(f'konsole --separate --workdir {path}')
 
 def browse(c, url):
     c.run(f"librewolf {url}", asynchronous=True)
@@ -60,9 +60,24 @@ def screenshare(c):
     browse(c, 'https://app.screego.net/#/')
     c.run('dino')
 
+@task
+def show_free_space(c):
+    c.run('df -h | grep G')  # We only care about disks measured in G
+
 @task()
-def free_disk_space(c):
+def free_disk_space(c, ruthless=False):
+    show_free_space(c)
     c.run('podman container cleanup --all --rm')
+    # Dolphin Trash ...should regenerate
+    c.run(f'sudo rm -rf {HOME}/.local/share/Trash')
+    # c.run(f'rm {HOME}/Downloads/*.iso')
+    c.run('sudo apt-get autoclean') # Remove useless apt cache
+    if ruthless:
+        c.run(f'rm -rf {HOME}/Downloads/*')
+        c.run('sudo apt-get clean') # Remove all apt cache
+    show_free_space(c)
+
+
 
 
 SCHOOL = f"{HOME}/School"
@@ -72,4 +87,8 @@ def assign_school(c):
     term(c, f'{SCHOOL}')
     # c.run(f"cd {SCHOOL};{HOME}/envs/jupyter/bin/jupyter lab", asynchronous=True)
 
+@task
+def mod_luanti(c):
+    term(c, f'{HOME}/.var/app/net.minetest.Minetest/.minetest')
+