Add synology
This commit is contained in:
10
mapping.ts
10
mapping.ts
@@ -14,6 +14,14 @@ const common: DotOption = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const synology: DotOption = {
|
||||||
|
hostname: "nas",
|
||||||
|
link: {
|
||||||
|
...common.link,
|
||||||
|
".local/bin/ufetch": "synology/bin/ufetch",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
const darwin: DotOption = {
|
const darwin: DotOption = {
|
||||||
hostname: "MacBook-Pro.local",
|
hostname: "MacBook-Pro.local",
|
||||||
install: [
|
install: [
|
||||||
@@ -92,7 +100,7 @@ const linuxHiDPI: DotOption = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await dot(Deno.args, [common, linux, linuxHiDPI, darwin]);
|
await dot(Deno.args, [common, linux, linuxHiDPI, darwin, synology]);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.message);
|
console.log(err.message);
|
||||||
}
|
}
|
||||||
|
|||||||
54
synology/bin/ufetch
Executable file
54
synology/bin/ufetch
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# ufetch-arch - tiny system info for arch
|
||||||
|
|
||||||
|
## INFO
|
||||||
|
|
||||||
|
# user is already defined
|
||||||
|
host="$(cat /etc/hostname)"
|
||||||
|
os='Synology'
|
||||||
|
kernel="$(uname -sr)"
|
||||||
|
uptime="$(uptime -p | sed 's/up //')"
|
||||||
|
packages="$(opkg list-installed | wc -l)"
|
||||||
|
shell="$(basename "$SHELL")"
|
||||||
|
|
||||||
|
## UI DETECTION
|
||||||
|
|
||||||
|
ui='DSM'
|
||||||
|
uitype='UI'
|
||||||
|
|
||||||
|
## DEFINE COLORS
|
||||||
|
|
||||||
|
# probably don't change these
|
||||||
|
if [ -x "$(command -v tput)" ]; then
|
||||||
|
bold="$(tput bold)"
|
||||||
|
black="$(tput setaf 0)"
|
||||||
|
red="$(tput setaf 1)"
|
||||||
|
green="$(tput setaf 2)"
|
||||||
|
yellow="$(tput setaf 3)"
|
||||||
|
blue="$(tput setaf 4)"
|
||||||
|
magenta="$(tput setaf 5)"
|
||||||
|
cyan="$(tput setaf 6)"
|
||||||
|
white="$(tput setaf 7)"
|
||||||
|
reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# you can change these
|
||||||
|
lc="${reset}${bold}${blue}" # labels
|
||||||
|
nc="${reset}${bold}${blue}" # user and hostname
|
||||||
|
ic="${reset}" # info
|
||||||
|
c0="${reset}${blue}" # first color
|
||||||
|
|
||||||
|
## OUTPUT
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
${c0} _____ ${reset}
|
||||||
|
${c0} / ____| ${nc}${USER}${ic}@${nc}${host}${reset}
|
||||||
|
${c0}| (___ _ _ ${lc}OS: ${ic}${os}${reset}
|
||||||
|
${c0} \___ \| | | | ${lc}KERNEL: ${ic}${kernel}${reset}
|
||||||
|
${c0} ____) | |_| | ${lc}UPTIME: ${ic}${uptime}${reset}
|
||||||
|
${c0}|_____/ \__, | ${lc}PACKAGES: ${ic}${packages}${reset}
|
||||||
|
${c0} __/ | ${lc}SHELL: ${ic}${shell}${reset}
|
||||||
|
${c0} |___/ ${lc}${uitype}: ${ic}${ui}${reset}
|
||||||
|
|
||||||
|
EOF
|
||||||
7
zshrc
7
zshrc
@@ -111,6 +111,11 @@ export GPG_TTY=$(tty)
|
|||||||
if [[ `uname` != "Darwin" ]]; then
|
if [[ `uname` != "Darwin" ]]; then
|
||||||
alias open=xdg-open
|
alias open=xdg-open
|
||||||
fi
|
fi
|
||||||
ufetch
|
|
||||||
|
if [[ -f "/etc/synoinfo.conf" ]]; then
|
||||||
|
export PATH="$PATH:/opt/bin"
|
||||||
|
else
|
||||||
|
ufetch
|
||||||
|
fi
|
||||||
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
|||||||
Reference in New Issue
Block a user