+ Add pfetch-like motd (admire the worst Windows ASCII logi :) )
This commit is contained in:
parent
928c35c3b2
commit
78e8ac0865
4 changed files with 38 additions and 5 deletions
|
@ -72,6 +72,7 @@ bspc rule -a Wine:photoshop.exe desktop='^8'
|
||||||
bspc rule -a File-roller:file-roller state=floating
|
bspc rule -a File-roller:file-roller state=floating
|
||||||
bspc rule -a PacketTracer7:PacketTracer7 desktop='^7' state=floating
|
bspc rule -a PacketTracer7:PacketTracer7 desktop='^7' state=floating
|
||||||
bspc rule -a discord:discord desktop='^9'
|
bspc rule -a discord:discord desktop='^9'
|
||||||
|
bspc rule -a lightcord desktop='^9'
|
||||||
bspc rule -a Ripcord:ripcord desktop='^9'
|
bspc rule -a Ripcord:ripcord desktop='^9'
|
||||||
bspc rule -a qTox:qtox desktop='^9'
|
bspc rule -a qTox:qtox desktop='^9'
|
||||||
bspc rule -a pr:pr desktop='^10'
|
bspc rule -a pr:pr desktop='^10'
|
||||||
|
|
|
@ -1,4 +1,36 @@
|
||||||
# ----- Messy function to make it looks like my zsh theme
|
function UsernameAtComputer
|
||||||
|
{
|
||||||
|
if (! "$env:ComputerName" -eq "") {
|
||||||
|
$compname = $env:ComputerName
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$compname = "unknown"
|
||||||
|
}
|
||||||
|
if (! "$env:UserName" -eq "") {
|
||||||
|
$username = $env:UserName
|
||||||
|
}
|
||||||
|
if (! "$env:USER" -eq "") {
|
||||||
|
$username = $env:USER
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$username = "unknown"
|
||||||
|
}
|
||||||
|
"`e[35;1m" + $username + "`e[0m`e[1m@" + "`e[35;1m" + $compname
|
||||||
|
}
|
||||||
|
Write-Host " `e[34;1m ,___---'‾‾‾|`e[0m " (UsernameAtComputer)
|
||||||
|
Write-Host " `e[34;1m|'‾ | | "
|
||||||
|
Write-Host " `e[34;1m| | |"
|
||||||
|
Write-Host " `e[34;1m|------|------|"
|
||||||
|
Write-Host " `e[34;1m| | |"
|
||||||
|
Write-Host " `e[34;1m|,_ | |"
|
||||||
|
Write-Host " `e[34;1m '‾‾‾---,___|"
|
||||||
|
|
||||||
|
# ----- set default color
|
||||||
|
Set-PSReadlineOption -Colors @{ Parameter = "`e[96m"}
|
||||||
|
Set-PSReadlineOption -Colors @{ Operator = "`e[96m"}
|
||||||
|
Set-PSReadlineOption -Colors @{ String = "`e[93m"}
|
||||||
|
|
||||||
|
# ----- Messy function to make it looks like my zsh theme / git support
|
||||||
function Git-Status
|
function Git-Status
|
||||||
{
|
{
|
||||||
"$([char]27)[31m"
|
"$([char]27)[31m"
|
||||||
|
@ -18,7 +50,8 @@ function Git-Branch
|
||||||
}
|
}
|
||||||
function getdir
|
function getdir
|
||||||
{
|
{
|
||||||
((Get-Location) -replace '/home/[a-zA-Z]*','~')
|
# ((Get-Location) -replace '[a-zA-Z].\\','~\') # change 'c:/' into '~' (optional)
|
||||||
|
((Get-Location) -replace '/home/[a-zA-Z]*','~') # change '/home/<username>' into '~'
|
||||||
}
|
}
|
||||||
function end_of_prompt
|
function end_of_prompt
|
||||||
{
|
{
|
||||||
|
@ -42,3 +75,4 @@ $([char]27)[34;1m" + $env:COMPUTERNAME + "" + (getdir) + (end_of_prompt)
|
||||||
|
|
||||||
# ----- Aliases
|
# ----- Aliases
|
||||||
New-Alias vim nvim
|
New-Alias vim nvim
|
||||||
|
function q{exit}
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
pfetch
|
pfetch
|
||||||
echo "--------------------------------------"
|
echo "--------------------------------------"
|
||||||
rateUSD | sed 's/^/ /g'
|
rateUSD | sed 's/^/ /g'
|
||||||
#python ~/Currency/USD2IDR/rate.py #PYTHON IS JUST TOO SLOW FOR TERMINAL
|
|
||||||
#sh ~/.scripts/motd.sh
|
|
||||||
|
|
||||||
setopt auto_cd # auto cd if directory
|
setopt auto_cd # auto cd if directory
|
||||||
# highlight on tab (completion)
|
# highlight on tab (completion)
|
||||||
|
|
|
@ -7,6 +7,6 @@ chosen=$(echo "$un_mountables" | dmenu -i -p "Devices" | awk '{print $1}')
|
||||||
|
|
||||||
prompt=$(echo -en "Yes\nNo" | dmenu -i -p "Are you sure?")
|
prompt=$(echo -en "Yes\nNo" | dmenu -i -p "Are you sure?")
|
||||||
case $prompt in
|
case $prompt in
|
||||||
"Yes") sudo umount $chosen && notify-send "Unmounting..." "$chosen";;
|
"Yes") sudo umount $chosen && notify-send "Unmounting..." "$chosen" || notify-send "Unmounting failed" "FDD is still writing or being used";;
|
||||||
"No") exit 1 ;;
|
"No") exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue