Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions wsl_tools.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import os
import pathlib
import subprocess
import time

script = None


def pat_con(path):
if "/" in path:
pt = path.split("/")
else:
pt = path.split("\\")
lin = "/mnt/" + pt[0][0].lower()
for f in pt[1:]:
lin += "/" + str(f.lower())
return lin
path = pathlib.PureWindowsPath(path)
if path.drive == '':
raise ValueError("Path must start with a drive.")
return pathlib.PurePath("/mnt/{}/{}".format(
path.drive[0].lower(),
path.relative_to(path.drive).as_posix()))


def get_themes(machine):
Expand Down