-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnapshot.ps1
63 lines (48 loc) · 1.33 KB
/
Snapshot.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# -----------------------
# Source Helper Functions
# -----------------------
# Import helper functions
Get-ChildItem -Path "$PSScriptRoot\Helpers" -Filter "*.ps1" | ForEach-Object {
. $_.FullName -Force -Verbose
}
# ----------
# GitHub CLI
# ----------
if (Find-Path gh | Test-Path) {
gh extension list > .\GitHub\gh\extensions.txt
Write-Host "Exported gh extensions! ✅"
}
# ------
# WinGet
# ------
if (Find-Path winget | Test-Path) {
winget export .\WinGet\packages.json
Write-Host "Exported winget packages! ✅"
}
# -----
# Scoop
# -----
if (Find-Path scoop | Test-Path) {
scoop export > .\Scoop\scoopfile.json
Write-Host "Exported scoop apps! ✅"
}
# ------------------
# VS Code Extensions
# ------------------
if (Find-Path code | Test-Path) {
code --list-extensions > .\VSCode\extensions.txt
Write-Host "Exported VS Code extensions! ✅"
}
# -----------------
# Oh My Posh Prompt
# -----------------
# Take a snapshot of the current Oh-My-Posh prompt
oh-my-posh config export image --cursor-padding 50 --author 'Shresht7' --output s7-prompt.png
Write-Host "Exported Oh My Posh Prompt Screenshot! ✅"
Write-Progress -Activity Snapshot -Completed
# ----------------
# GNOME Extensions
# ----------------
if (Find-Path gnome-extensions | Test-Path) {
gnome-extensions list > '.\GNOME\extensions.txt'
}