2022-08-15 12:23:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
function mkuserdirs {
|
|
|
|
|
2022-09-10 13:26:51 +00:00
|
|
|
local PKG_DIR i IFS=$'\n'
|
|
|
|
for i in $( reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" \
|
|
|
|
| grep "^ [A-Za-z ]\+" \
|
|
|
|
| tr -d '\r' \
|
|
|
|
| sed -e "s/.\+REG_EXPAND_SZ[ ]\+//g"
|
|
|
|
); do
|
|
|
|
|
|
|
|
if [[ "$i" =~ .*"\\AppData\\".* ]]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$i" =~ "%USERPROFILE".* ]]; then
|
|
|
|
i=$USERPROFILE${i/\%USERPROFILE\%/}
|
|
|
|
fi
|
|
|
|
|
|
|
|
ln -vs "$( cygpath "$i" )" $HOME/
|
2022-08-15 12:23:00 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# Package Directory
|
2022-09-10 13:26:51 +00:00
|
|
|
PKG_DIR=$( cygpath "$APPDATA/../Local/Packages" )
|
2022-08-15 12:23:00 +00:00
|
|
|
if [ -d "$PKG_DIR" ]; then
|
|
|
|
ln -vs "$PKG_DIR" $HOME/
|
|
|
|
fi
|
2022-09-10 13:26:51 +00:00
|
|
|
|
2022-08-15 12:23:00 +00:00
|
|
|
}
|
2022-09-21 09:05:26 +00:00
|
|
|
|
|
|
|
function init-mintty {
|
|
|
|
cat <<___MINTTY___ > $HOME/.minttyrc
|
|
|
|
BoldAsFont=no
|
|
|
|
CursorType=block
|
|
|
|
Columns=120
|
|
|
|
Rows=30
|
|
|
|
ForegroundColour=131,148,150
|
|
|
|
BackgroundColour=0,20,43
|
|
|
|
CursorColour=220,50,47
|
|
|
|
Black=7,54,66
|
|
|
|
BoldBlack=0,43,54
|
|
|
|
Red=220,50,47
|
|
|
|
BoldRed=203,75,22
|
|
|
|
Green=133,153,0
|
|
|
|
BoldGreen=88,110,117
|
|
|
|
Yellow=181,137,0
|
|
|
|
BoldYellow=101,123,131
|
|
|
|
Blue=38,139,210
|
|
|
|
BoldBlue=131,148,150
|
|
|
|
Magenta=211,54,130
|
|
|
|
BoldMagenta=108,113,196
|
|
|
|
Cyan=42,161,152
|
|
|
|
BoldCyan=147,161,161
|
|
|
|
White=238,232,213
|
|
|
|
BoldWhite=253,246,227
|
|
|
|
Transparency=low
|
|
|
|
Locale=C
|
|
|
|
Charset=UTF-8
|
|
|
|
Font=Consolas
|
|
|
|
Scrollbar=none
|
|
|
|
FontHeight=14
|
|
|
|
___MINTTY___
|
|
|
|
}
|