-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡️ perf: more efficient code and matched as a bash
- Loading branch information
Showing
3 changed files
with
33 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,25 @@ | ||
# Maintainer: Eshan Roy <[email protected]> | ||
# Contributor: d3v1l0n <[email protected]> | ||
|
||
pkgname=snigdhaos-powershell | ||
org="Snigdha-OS" | ||
branch="master" | ||
pkgver=r75.ba4f5f5 | ||
pkgver=r$(git rev-list --count HEAD).$(git rev-parse --short HEAD) | ||
pkgrel=1 | ||
pkgdesc="Snigdha OS PowerShell Config!" | ||
pkgdesc="Snigdha OS PowerShell Config" | ||
arch=('any') | ||
license=('MIT') | ||
depends=( | ||
'powershell-bin' | ||
) | ||
depends=('powershell-bin') | ||
source=( | ||
"$pkgname.tar.xz" | ||
"${pkgname}.desktop" | ||
) | ||
sha256sums=( | ||
'SKIP' | ||
) | ||
sha256sums=('SKIP' 'SKIP') | ||
install=$pkgname.install | ||
|
||
pkgver(){ | ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | ||
} | ||
|
||
package(){ | ||
mkdir -p "${pkgdir}/etc/skel" | ||
cp -rf "${srcdir}/etc/skel/.config" "${pkgdir}/etc/skel/" | ||
|
||
# rm "${pkgdir}/usr/share/applications/snigdhaos-powershell.desktop" | ||
# install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" | ||
package() { | ||
mkdir -p "${pkgdir}/etc/skel/.config" | ||
cp -r "${srcdir}/etc/skel/.config"/* "${pkgdir}/etc/skel/.config/" | ||
|
||
install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" | ||
} |
17 changes: 13 additions & 4 deletions
17
snigdhaos-powershell/etc/skel/.config/powershell/Microsoft.PowerShell_profile.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
$Host.UI.RawUI.WindowTitle = "SNIGDHA OS > PowerShell🔥" | ||
function prompt() | ||
{ | ||
$ESC=$([char]27) | ||
"$ESC[0;36m┌──I'm $(whoami)➜ $ESC[0;31m$($executionContext.SessionState.Path.CurrentLocation)$("`r`n$ESC[0;36m└──eshanized PowerShell🔥>$ESC[00m" * ($nestedPromptLevel + 1)) "; | ||
|
||
function prompt { | ||
$ESC = [char]27 | ||
$user = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name | ||
$currentLocation = $executionContext.SessionState.Path.CurrentLocation | ||
$gitBranch = "" | ||
if (Test-Path .git -or (Get-Command git -ErrorAction SilentlyContinue)) { | ||
$gitBranch = $(git rev-parse --abbrev-ref HEAD 2>$null) | ||
if ($gitBranch) { | ||
$gitBranch = " ($gitBranch)" | ||
} | ||
} | ||
"$ESC[0;36m┌── $user $gitBranch ➜ $ESC[0;31m$currentLocation$($([char]13))`n$ESC[0;36m└── 🌟 SnigdhaOS PowerShell 🔥 > $ESC[00m" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Desktop Entry] | ||
Version=1.0 | ||
Name=Snigdha OS PowerShell | ||
Comment=PowerShell Configuration for Snigdha OS | ||
Exec=pwsh -NoExit -Command "& {if (Test-Path '$HOME/.config/powershell/Microsoft.PowerShell_profile.ps1') { . '$HOME/.config/powershell/Microsoft.PowerShell_profile.ps1' } }" | ||
Icon=/usr/share/pixmaps/snigdhaos-powershell.png | ||
Terminal=true | ||
Type=Application | ||
Categories=Utility;System;Development; | ||
StartupNotify=true |