From 921a18438546b867abb7979ea04d3c5fa988bf3e Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 19 Dec 2023 08:45:02 +0100 Subject: [PATCH 01/16] increase GPU limit --- .config/WindowsAutoNightMode/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/WindowsAutoNightMode/config.yaml b/.config/WindowsAutoNightMode/config.yaml index b05b2fe..9581d4e 100644 --- a/.config/WindowsAutoNightMode/config.yaml +++ b/.config/WindowsAutoNightMode/config.yaml @@ -67,8 +67,8 @@ Tunable: UICulture: fr GPUMonitoring: Enabled: true - Threshold: 30 - Samples: 1 + Threshold: 40 + Samples: 2 ProcessBlockList: ProcessNames: [] Enabled: false From 8fd7a8ed125e926e4a73df49ec8bebe4da61e13f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 19 Dec 2023 15:20:31 +0100 Subject: [PATCH 02/16] add an empty line --- arch_wsl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch_wsl.sh b/arch_wsl.sh index 615b305..2c36378 100644 --- a/arch_wsl.sh +++ b/arch_wsl.sh @@ -54,7 +54,7 @@ main() { sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf # === Remove SU password == - echo -e "# Disable password for specific user\nanri ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers > /dev/null + echo -e "\n# Disable password for specific user\nanri ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers > /dev/null # === Paru == git clone https://aur.archlinux.org/paru.git From da5705115d35e4ce83a1bdc6b7e5ce030df17416 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 19 Dec 2023 15:21:51 +0100 Subject: [PATCH 03/16] be user agnostic --- arch_wsl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch_wsl.sh b/arch_wsl.sh index 2c36378..aeb404c 100644 --- a/arch_wsl.sh +++ b/arch_wsl.sh @@ -54,7 +54,7 @@ main() { sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf # === Remove SU password == - echo -e "\n# Disable password for specific user\nanri ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers > /dev/null + echo -e "\n# Disable password for specific user\n$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers > /dev/null # === Paru == git clone https://aur.archlinux.org/paru.git From b0eb5a444a27a043954d638a5fba7e74a256651e Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 21 Dec 2023 14:50:47 +0100 Subject: [PATCH 04/16] use pacman instead of cpanm --- arch.sh | 3 --- arch_wsl.sh | 5 +---- archinstall/user_configuration.json | 5 ++++- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/arch.sh b/arch.sh index 632411b..62aa56b 100644 --- a/arch.sh +++ b/arch.sh @@ -387,9 +387,6 @@ main() { # Add perl packages to path fish -c "fish_add_path /usr/bin/vendor_perl ||:" - # === CPAN modules == - sudo cpanm YAML::Tiny File::HomeDir File::Which # latexindent dependencies - # === Discord == # Skip update path_config_discord="$HOME"/.config/discord/settings.json diff --git a/arch_wsl.sh b/arch_wsl.sh index aeb404c..26654e6 100644 --- a/arch_wsl.sh +++ b/arch_wsl.sh @@ -39,7 +39,7 @@ main() { otf-fira-mono mingw-w64-gcc otf-font-awesome soundfont-fluid fluidsynth \ pulseaudio-alsa texlive-latexextra texlive-langfrench texlive-luatex \ noto-fonts jdk-openjdk texlive-fontsrecommended texlive-publishers sfml \ - texlive-fontsextra + texlive-fontsextra perl-yaml-tiny perl-file-homedir perl-file-which # === Rustup == @@ -201,9 +201,6 @@ main() { # Add perl packages to path fish -c "fish_add_path /usr/bin/vendor_perl ||:" - # === CPAN modules == - sudo cpanm YAML::Tiny File::HomeDir File::Which # latexindent dependencies - # === Emacs == # mkdir -p "$HOME"/.emacs.d # wget -q ${repo}/.emacs.d/init.el -O "$HOME"/.emacs.d/init.el diff --git a/archinstall/user_configuration.json b/archinstall/user_configuration.json index d1f6f07..b3c5c5b 100644 --- a/archinstall/user_configuration.json +++ b/archinstall/user_configuration.json @@ -135,7 +135,10 @@ "texlive-fontsrecommended", "texlive-fontsextra", "texlive-publishers", - "sfml" + "sfml", + "perl-yaml-tiny", + "perl-file-homedir", + "perl-file-which" ], "plugin": null, "profile": { From 41ef7a7b26ba5002ce0b60e2b639e4f1f206cecc Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 21 Dec 2023 15:37:16 +0100 Subject: [PATCH 05/16] mount Y in bg --- .config/fish/config_wsl.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/fish/config_wsl.fish b/.config/fish/config_wsl.fish index 5beca0b..b859c82 100644 --- a/.config/fish/config_wsl.fish +++ b/.config/fish/config_wsl.fish @@ -1,3 +1,3 @@ # NAS -sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 +sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2>/dev/null & From 9ccdc642f77b4dfbeafb6d57e41ed12164d540e5 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 21 Dec 2023 16:12:18 +0100 Subject: [PATCH 06/16] fix path --- windows11.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows11.bat b/windows11.bat index 5a5df1e..558d7c8 100644 --- a/windows11.bat +++ b/windows11.bat @@ -276,7 +276,7 @@ PowerShell -Command "" ^ "$exe = 'Deceive.exe';" ^ "$link = 'https://github.com/molenzwiebel/Deceive/releases/latest/download/' + $exe;" ^ "$outfile = Join-Path -Path '%ProgramFiles%\Deceive' -ChildPath $exe;" ^ - "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^ + "Invoke-WebRequest -Uri $link -OutFile '$outfile';" ^ "$WshShell = New-Object -comObject WScript.Shell;" ^ "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Deceive.lnk');" ^ "$Shortcut.TargetPath = \"%ProgramFiles%\Deceive\$exe\";" ^ From 3c4ebc476e5380855e9549dc06075863d7260c67 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 21 Dec 2023 16:18:35 +0100 Subject: [PATCH 07/16] fix download? --- windows11.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows11.bat b/windows11.bat index 558d7c8..57f8cd1 100644 --- a/windows11.bat +++ b/windows11.bat @@ -279,7 +279,7 @@ PowerShell -Command "" ^ "Invoke-WebRequest -Uri $link -OutFile '$outfile';" ^ "$WshShell = New-Object -comObject WScript.Shell;" ^ "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Deceive.lnk');" ^ - "$Shortcut.TargetPath = \"%ProgramFiles%\Deceive\$exe\";" ^ + "$Shortcut.TargetPath = $outfile;" ^ "$Shortcut.Save()" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v DisplayName /t REG_SZ /d "Deceive" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\Deceive" From 00bb66a7d91edf872b7dc8a295c221ca72225cc9 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 21 Dec 2023 16:40:39 +0100 Subject: [PATCH 08/16] fix deceive installation (finally) --- windows11.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windows11.bat b/windows11.bat index 57f8cd1..eb87d3f 100644 --- a/windows11.bat +++ b/windows11.bat @@ -271,18 +271,18 @@ REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\vry" /f /v Ins :: Install Deceive ECHO Deceive... -MKDIR "%ProgramFiles%\Deceive" 2>NUL +MKDIR "%LOCALAPPDATA%\Deceive" 2>NUL PowerShell -Command "" ^ "$exe = 'Deceive.exe';" ^ "$link = 'https://github.com/molenzwiebel/Deceive/releases/latest/download/' + $exe;" ^ - "$outfile = Join-Path -Path '%ProgramFiles%\Deceive' -ChildPath $exe;" ^ - "Invoke-WebRequest -Uri $link -OutFile '$outfile';" ^ + "$outfile = Join-Path -Path '%LOCALAPPDATA%\Deceive' -ChildPath $exe;" ^ + "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^ "$WshShell = New-Object -comObject WScript.Shell;" ^ "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Deceive.lnk');" ^ "$Shortcut.TargetPath = $outfile;" ^ "$Shortcut.Save()" REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v DisplayName /t REG_SZ /d "Deceive" -REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v InstallLocation /t REG_SZ /d "%ProgramFiles%\Deceive" +REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\Deceive" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\Deceive" :: :: Install Topgrade :: ECHO Topgrade... From f350390c3f9eedd079057f25bae891d552dec292 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 23 Dec 2023 18:21:31 +0100 Subject: [PATCH 09/16] mount condition --- .config/fish/config_wsl.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/fish/config_wsl.fish b/.config/fish/config_wsl.fish index b859c82..8942888 100644 --- a/.config/fish/config_wsl.fish +++ b/.config/fish/config_wsl.fish @@ -1,3 +1,5 @@ # NAS -sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2>/dev/null & +if ping -c 1 192.168.1.200 + sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2>/dev/null & +end From 9d9925fee2b85b5b7a84064935e943549fe10fcb Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 23 Dec 2023 18:43:28 +0100 Subject: [PATCH 10/16] hide checker --- .config/fish/config_wsl.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/fish/config_wsl.fish b/.config/fish/config_wsl.fish index 8942888..52728a9 100644 --- a/.config/fish/config_wsl.fish +++ b/.config/fish/config_wsl.fish @@ -1,5 +1,5 @@ # NAS -if ping -c 1 192.168.1.200 +if ping -c1 192.168.1.200 &>/dev/null sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2>/dev/null & end From 997162b5c176c7a93cbf910e38b06264499df229 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 23 Dec 2023 18:55:36 +0100 Subject: [PATCH 11/16] add timeout --- .config/fish/config_wsl.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/fish/config_wsl.fish b/.config/fish/config_wsl.fish index 52728a9..af4e300 100644 --- a/.config/fish/config_wsl.fish +++ b/.config/fish/config_wsl.fish @@ -1,5 +1,5 @@ # NAS -if ping -c1 192.168.1.200 &>/dev/null +if timeout 0.2 ping -c1 192.168.1.200 &>/dev/null sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2>/dev/null & end From 911094cedecf0096973a40cf7941c38689f755b8 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 25 Dec 2023 01:23:11 +0100 Subject: [PATCH 12/16] thanks microsoft --- .config/fish/config_wsl.fish | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/fish/config_wsl.fish b/.config/fish/config_wsl.fish index af4e300..09719ca 100644 --- a/.config/fish/config_wsl.fish +++ b/.config/fish/config_wsl.fish @@ -1,5 +1,10 @@ # NAS -if timeout 0.2 ping -c1 192.168.1.200 &>/dev/null +if timeout 0.2 ping -c1 192.168.1.200 > /dev/null sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2>/dev/null & end + +# Screen is lost on boot on my T1000 computer +if lscpu | grep "i7-10875H" > /dev/null + ln -sf /mnt/wslg/.X11-unix/X0 /tmp/.X11-unix/ +end From 7cc1c48e428bf6988f03658dc5c218707a3f7832 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 25 Dec 2023 18:52:53 +0100 Subject: [PATCH 13/16] disallow short fn on a single line --- dotfiles/.clang-format | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/.clang-format b/dotfiles/.clang-format index 6a9d1ce..2ad6be9 100644 --- a/dotfiles/.clang-format +++ b/dotfiles/.clang-format @@ -1,3 +1,4 @@ IndentWidth: 2 AlwaysBreakTemplateDeclarations: true InsertBraces: true +AllowShortFunctionsOnASingleLine: Empty From 71f9f9638314ac27a4cdee78c703d61d836946dd Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 26 Dec 2023 23:07:58 +0100 Subject: [PATCH 14/16] add v8 --- windows11.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows11.bat b/windows11.bat index eb87d3f..b07388c 100644 --- a/windows11.bat +++ b/windows11.bat @@ -96,7 +96,8 @@ SET ^"net_libs=^ Microsoft.DotNet.DesktopRuntime.3_1 Microsoft.DotNet.SDK.3_1 ^ Microsoft.DotNet.DesktopRuntime.5 Microsoft.DotNet.SDK.5 ^ Microsoft.DotNet.DesktopRuntime.6 Microsoft.DotNet.SDK.6 ^ - Microsoft.DotNet.DesktopRuntime.7 Microsoft.DotNet.SDK.7" + Microsoft.DotNet.DesktopRuntime.7 Microsoft.DotNet.SDK.7 ^ + Microsoft.DotNet.DesktopRuntime.8 Microsoft.DotNet.SDK.8" ECHO .NET libraries... for %%i in (!net_libs!) do ( From ef07fd287c1cf1184ad58ce2c9fbaf067fc26f01 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 27 Dec 2023 20:31:24 +0100 Subject: [PATCH 15/16] better test --- .config/fish/config_wsl.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/fish/config_wsl.fish b/.config/fish/config_wsl.fish index 09719ca..e25367d 100644 --- a/.config/fish/config_wsl.fish +++ b/.config/fish/config_wsl.fish @@ -4,7 +4,7 @@ if timeout 0.2 ping -c1 192.168.1.200 > /dev/null sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2>/dev/null & end -# Screen is lost on boot on my T1000 computer -if lscpu | grep "i7-10875H" > /dev/null +# Sometimes the screen is getting lost +if not test -e /tmp/.X11-unix/X0 ln -sf /mnt/wslg/.X11-unix/X0 /tmp/.X11-unix/ end From ee74acfa986bc64f6a51125cdb57d7947cc0f70b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 27 Dec 2023 20:34:12 +0100 Subject: [PATCH 16/16] typo --- .config/fish/config_wsl.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/fish/config_wsl.fish b/.config/fish/config_wsl.fish index e25367d..e1af4e7 100644 --- a/.config/fish/config_wsl.fish +++ b/.config/fish/config_wsl.fish @@ -1,7 +1,7 @@ # NAS if timeout 0.2 ping -c1 192.168.1.200 > /dev/null - sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2>/dev/null & + sudo mount -t drvfs 'Y:' /mnt/y -o metadata,uid=1000,gid=1000 2> /dev/null & end # Sometimes the screen is getting lost