dotfiles
bugabingas dorkfiles
owned by bugabinga
cross platform java tools
6d6e1f3bf9b655934248a09c45139eb2c8edd3e4
Oliver Krylow <o.krylow@isp-insoft.de> ·
unsigned
Browse filesCompare with HEAD
Changed files (3)
alacritty/alacritty.yml
Modified 7 7 -
~/.config/alacritty/alacritty_common.yml 9 - startup_mode:
Fullscreen nushell/nu/config/nurc
Modified 6 6 let TODO_FILE = D:/Notizen/TODO.md
7 7 let NURC = (build-string (config path | path dirname) /nurc)
8 +let OS = (sys).host.name
17 18 # CUSTOM LITTLE JAVA COMMANDS
18 -alias sha = java X:/tools/sha.java
19 -alias uuid = java X:/tools/random_uuid.java
20 -alias download = java X:/tools/download.java
21 -alias download_jar = java X:/tools/download_jar.java
22 -alias file = java X:/tools/probe_content.java
19 +alias sha = java_tool sha
20 +alias uuid = java_tool random_uuid
21 +alias download = java_tool download
22 +alias download_jar = java_tool download_jar
26 +# Wrapper function to launch my custom java tool scripts.
27 +# This function handles the different paths the tools can have on different hosts.
29 + name: string # name of the custom java tool script without the .java extension
31 + # the paths are assumed to have already been linked from dotfiles
32 + if $OS == "Windows" {
33 + java (build-string X:/tools/ $name .java)
35 + java (build-string ~/.local/tools/ $name .java)
29 - if (sys).host.name == "Windows" {
42 + if $OS == "Windows" {
30 43 start (build-string https://man.cx/ $program)
tools/startup.java
Deleteddeleted file mode 100644 1 -import static java.
lang.
System.
out;
2 -import static java.
nio.
charset.
StandardCharsets.
UTF_16LE;
3 -import static java.
util.
stream.
Collectors.
joining;
8 - public static void main(
String[] __)
throws Exception {
9 - out.println(
"Map D:/Workspaces to W:.");
10 - call(
"subst.exe",
"W:",
"D:\\Workspaces");
11 - out.println(
"Map D:/Notizen to N:.");
12 - call(
"subst.exe",
"N:",
"D:\\Notizen");
13 - out.println(
"Map D:/Tools to X:.");
14 - call(
"subst.exe",
"X:",
"D:\\Tools");
15 - out.println(
"save list of installed apps in case something goes wrong and mass reinstall is necessary.");
16 - ps(
"scoop export > D:\\Tools\\scoop_installed_apps.txt");
17 - ps(
"winget export D:\\Tools\\winget_installed_apps.json");
18 - out.println(
"Upgrading the whole system.");
23 - static int call(
String... command)
throws Exception {
24 - return new ProcessBuilder()
33 - static int ps(
String command)
throws Exception {
40 - Base64.getEncoder().encodeToString(command.getBytes(
UTF_16LE)));
43 - static void pause()
throws Exception {
44 - out.println(
"pause; waiting for input...");