Last active
August 26, 2023 06:28
-
-
Save Linhieng/092192b87a23e9c53f77249f14e267dd to your computer and use it in GitHub Desktop.
Revisions
-
Linhieng revised this gist
Aug 26, 2023 . 2 changed files with 74 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ function prompt { $identity = [Security.Principal.WindowsIdentity]::GetCurrent() $principal = [Security.Principal.WindowsPrincipal] $identity $adminRole = [Security.Principal.WindowsBuiltInRole]::Administrator $fullpath = (Get-Location) -replace "\\", "/" if($principal.IsInRole($adminRole)) { ([System.Environment]::NewLine) + "[Admin] " + "$([char]0x1b)[92m" + "$fullpath" + "$([char]0x1b)[91m" + ([System.Environment]::NewLine) + "> " } else { ([System.Environment]::NewLine) + "$([char]0x1b)[92m" + "$fullpath" + "$([char]0x1b)[91m" + ([System.Environment]::NewLine) + "> " } } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,62 @@ { "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "alignment": "left", "newline": true, "segments": [ { "foreground": "#FFFF00", "style": "plain", "template": "\u256d\u2500", "type": "text" }, { "foreground": "#ffffff", "style": "plain", "properties": { "folder_separator_icon": "/", "style": "full" }, "template": " {{ .Path }} ", "type": "path" } ], "type": "prompt" }, { "alignment": "right", "segments": [ { "background": "#e4e4e4", "foreground": "#585858", "properties": { "style": "austin", "always_enabled": true }, "invert_powerline": true, "style": "powerline", "powerline_symbol": "\ue0b2", "template": " \uf0e7 {{ .FormattedMs }} ", "type": "executiontime" } ], "type": "prompt" }, { "alignment": "left", "newline": true, "segments": [ { "foreground": "#FFFF00", "style": "plain", "template": "\u2570\u2500\ue285", "type": "text" } ], "type": "prompt" } ], "final_space": true, "version": 2 } -
Linhieng renamed this gist
Aug 26, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Linhieng created this gist
Aug 26, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,68 @@ { "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "alignment": "left", "newline": true, "segments": [ { "background": "#ffffff", "foreground": "#61AFEF", "leading_diamond": "\u256d\u2500\ue0b2", "style": "diamond", "template": " \uf007 {{ .HostName }} ", "trailing_diamond": "\ue0b0", "type": "session" }, { "background": "#91ddff", "foreground": "#100e23", "powerline_symbol": "\ue0b0", "properties": { "folder_icon": "\uf115", "folder_separator_icon": " \ue0b1 ", "style": "full" }, "style": "powerline", "template": " {{ .Path }} ", "type": "path" } ], "type": "prompt" }, { "alignment": "right", "segments": [ { "background": "#e4e4e4", "foreground": "#585858", "properties": { "style": "austin", "always_enabled": true }, "invert_powerline": true, "style": "powerline", "powerline_symbol": "\ue0b2", "template": " \ueba2 {{ .FormattedMs }} ", "type": "executiontime" } ], "type": "prompt" }, { "alignment": "left", "newline": true, "segments": [ { "foreground": "#FFFF00", "style": "plain", "template": "\u2570\u2500\ue285", "type": "text" } ], "type": "prompt" } ], "final_space": true, "version": 2 }