This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32gui | |
import win32api | |
import win32con | |
import time | |
import keyboard | |
def get_window_handle(window_title): | |
def callback(hwnd, extra): | |
if window_title in win32gui.GetWindowText(hwnd): | |
extra.append(hwnd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal enum WindowCompositionAttribute | |
{ | |
WCA_UNDEFINED = 0, | |
WCA_NCRENDERING_ENABLED = 1, | |
WCA_NCRENDERING_POLICY = 2, | |
WCA_TRANSITIONS_FORCEDISABLED = 3, | |
WCA_ALLOW_NCPAINT = 4, | |
WCA_CAPTION_BUTTON_BOUNDS = 5, | |
WCA_NONCLIENT_RTL_LAYOUT = 6, | |
WCA_FORCE_ICONIC_REPRESENTATION = 7, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ChatInit { | |
param( | |
[Parameter(Mandatory = $true)][string]$Model | |
) | |
Write-Host "AI Chat Started`nModel: $Model" -ForegroundColor Blue | |
wsl -e ollama run $Model | |
} | |
function CreateMenu { | |
param( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Elevation script from StackOverflow | |
:: https://stackoverflow.com/a/28467343 | |
:: Begin Elevation script | |
@ECHO OFF | |
setlocal EnableDelayedExpansion | |
::net file to test privileges, 1>NUL redirects output, 2>NUL redirects errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
format = """ | |
[](#3B4252)\ | |
$username\ | |
[](bg:#434C5E fg:#3B4252)\ | |
$directory\ | |
[](fg:#434C5E bg:#4C566A)\ | |
$git_branch\ | |
$git_status\ | |
[](fg:#4C566A bg:#86BBD8)\ | |
$c\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V | |
IF (%adminTest%)==(Access) goto noAdmin | |
for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G") | |
echo. | |
echo All Event Logs have been cleared. | |
goto theEnd | |
:do_clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"foreground": "#45F1C2", | |
"style": "plain", | |
"template": "{{if .Root}}root{{else}}{{ .UserName }}{{end}}", |