diff --git a/mapping.ts b/mapping.ts index cfe0c37..6c8d3a2 100644 --- a/mapping.ts +++ b/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 = { hostname: "MacBook-Pro.local", install: [ @@ -92,7 +100,7 @@ const linuxHiDPI: DotOption = { }; try { - await dot(Deno.args, [common, linux, linuxHiDPI, darwin]); + await dot(Deno.args, [common, linux, linuxHiDPI, darwin, synology]); } catch (err) { console.log(err.message); } diff --git a/synology/bin/ufetch b/synology/bin/ufetch new file mode 100755 index 0000000..9a586e1 --- /dev/null +++ b/synology/bin/ufetch @@ -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 <