From 089d44c282dbda0c18649a4be201d77020b92fe8 Mon Sep 17 00:00:00 2001 From: Jisu Kim Date: Tue, 20 Apr 2021 04:24:26 +0900 Subject: [PATCH 1/3] Add synology --- mapping.ts | 10 ++++++++- synology/bin/ufetch | 54 +++++++++++++++++++++++++++++++++++++++++++++ zshrc | 7 +++++- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100755 synology/bin/ufetch 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 < Date: Tue, 20 Apr 2021 04:27:27 +0900 Subject: [PATCH 2/3] Update --- zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zshrc b/zshrc index ca20c1c..72af62d 100644 --- a/zshrc +++ b/zshrc @@ -1,7 +1,7 @@ # If you come from bash you might have to change your $PATH. export PATH=$HOME/.local/bin:/usr/local/bin:$PATH -export DENO_INSTALL="/home/vbalien/.deno" +export DENO_INSTALL="$HOME/.deno" export PATH="$DENO_INSTALL/bin:$PATH" export PATH="$PATH:$HOME/go/bin" From bee59ec71a5eec6a1188bb70cd8c96735c5e5ed4 Mon Sep 17 00:00:00 2001 From: Jisu Kim Date: Tue, 20 Apr 2021 04:29:44 +0900 Subject: [PATCH 3/3] Update --- zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index 72af62d..3307cd4 100644 --- a/zshrc +++ b/zshrc @@ -114,8 +114,8 @@ fi if [[ -f "/etc/synoinfo.conf" ]]; then export PATH="$PATH:/opt/bin" -else - ufetch fi +ufetch + [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh