From be19c4ea3392e1f1e8bbc6167f1d467d14e80e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20=C3=87olako=C4=9Flu?= Date: Wed, 31 Mar 2021 19:10:40 +0300 Subject: [PATCH] Install script replace fix --- install.sh | 2 +- local/bin/status-bar/mpc | 2 +- local/bin/status-bar/weather | 96 +++++++++++++++++----------------- suckless/dwmblocks/dwmblocks.c | 2 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/install.sh b/install.sh index 47542793..35a939ca 100755 --- a/install.sh +++ b/install.sh @@ -11,7 +11,7 @@ mvie(){ # Configuring for your username if [ ! "$username" = "yigit" ]; then - grep -rl "yigit" | xargs sed -i "s/yigit/$username/g" + grep -rl "/home/yigit" | grep -v ".git" | xargs sed -i "s/\/home\/yigit/\/home\/$username/g" fi # Don't prompt for a password for the rest of the script diff --git a/local/bin/status-bar/mpc b/local/bin/status-bar/mpc index f21ca483..fdc5e38a 100755 --- a/local/bin/status-bar/mpc +++ b/local/bin/status-bar/mpc @@ -8,7 +8,7 @@ if [ ! "$online" = "" ]; then if [ "$(echo "$online" | wc -l)" -le 1 ]; then echo -n "^c#a48ead^ ^d^" else - echo -n "^c#a48ead^ ^d^ ${title:0:30} - ${artist:0:30}" + echo -n "^c#a48ead^ ^d^ ${title:0:20} - ${artist:0:20}" fi else echo -n "^c#a48ead^ﳌ ^d^" diff --git a/local/bin/status-bar/weather b/local/bin/status-bar/weather index b7d53555..a3068fbe 100755 --- a/local/bin/status-bar/weather +++ b/local/bin/status-bar/weather @@ -9,51 +9,51 @@ WCODES=( ["113"]="^c#ebcb8b^ " ["116"]="^c#ebcb8b^杖" ["119"]="^c#ffffff^摒" - ["122"]="^c#ffffff^ " - ["143"]="^c#ffffff^ " - ["176"]="^c#81a1c1^ " - ["179"]="^c#81a1c1^ " - ["182"]="^c#81a1c1^ " - ["185"]="^c#81a1c1^ " - ["200"]="^c#81a1c1^ " - ["227"]="^c#ffffff^ " - ["230"]="^c#ffffff^ " - ["248"]="^c#ffffff^ " - ["260"]="^c#ffffff^ " - ["263"]="^c#81a1c1^ " - ["266"]="^c#81a1c1^ " - ["281"]="^c#81a1c1^ " - ["284"]="^c#81a1c1^ " - ["293"]="^c#81a1c1^ " - ["296"]="^c#81a1c1^ " - ["299"]="^c#81a1c1^ " - ["302"]="^c#81a1c1^ " - ["305"]="^c#81a1c1^ " - ["308"]="^c#81a1c1^ " - ["311"]="^c#81a1c1^ " - ["314"]="^c#81a1c1^ " - ["317"]="^c#81a1c1^ " - ["320"]="^c#ffffff^ " - ["323"]="^c#81a1c1^ " - ["326"]="^c#81a1c1^ " - ["329"]="^c#ffffff^ " - ["332"]="^c#ffffff^ " - ["335"]="^c#81a1c1^ " - ["338"]="^c#ffffff^ " - ["350"]="^c#81a1c1^ " - ["353"]="^c#81a1c1^ " - ["356"]="^c#81a1c1^ " - ["359"]="^c#81a1c1^ " - ["362"]="^c#81a1c1^ " - ["365"]="^c#81a1c1^ " - ["368"]="^c#81a1c1^ " - ["371"]="^c#81a1c1^ " - ["374"]="^c#81a1c1^ " - ["377"]="^c#81a1c1^ " - ["386"]="^c#81a1c1^ " - ["389"]="^c#81a1c1^ " - ["392"]="^c#81a1c1^ " - ["395"]="^c#81a1c1^ " + ["122"]="^c#ffffff^ " + ["143"]="^c#ffffff^ " + ["176"]="^c#81a1c1^ " + ["179"]="^c#81a1c1^ " + ["182"]="^c#81a1c1^ " + ["185"]="^c#81a1c1^ " + ["200"]="^c#81a1c1^ " + ["227"]="^c#ffffff^ " + ["230"]="^c#ffffff^ " + ["248"]="^c#ffffff^ " + ["260"]="^c#ffffff^ " + ["263"]="^c#81a1c1^ " + ["266"]="^c#81a1c1^ " + ["281"]="^c#81a1c1^ " + ["284"]="^c#81a1c1^ " + ["293"]="^c#81a1c1^ " + ["296"]="^c#81a1c1^ " + ["299"]="^c#81a1c1^ " + ["302"]="^c#81a1c1^ " + ["305"]="^c#81a1c1^ " + ["308"]="^c#81a1c1^ " + ["311"]="^c#81a1c1^ " + ["314"]="^c#81a1c1^ " + ["317"]="^c#81a1c1^ " + ["320"]="^c#ffffff^ " + ["323"]="^c#81a1c1^ " + ["326"]="^c#81a1c1^ " + ["329"]="^c#ffffff^ " + ["332"]="^c#ffffff^ " + ["335"]="^c#81a1c1^ " + ["338"]="^c#ffffff^ " + ["350"]="^c#81a1c1^ " + ["353"]="^c#81a1c1^ " + ["356"]="^c#81a1c1^ " + ["359"]="^c#81a1c1^ " + ["362"]="^c#81a1c1^ " + ["365"]="^c#81a1c1^ " + ["368"]="^c#81a1c1^ " + ["371"]="^c#81a1c1^ " + ["374"]="^c#81a1c1^ " + ["377"]="^c#81a1c1^ " + ["386"]="^c#81a1c1^ " + ["389"]="^c#81a1c1^ " + ["392"]="^c#81a1c1^ " + ["395"]="^c#81a1c1^ " ) getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;} @@ -67,11 +67,11 @@ showweather() { data=$(echo -ne $(echo $data | cut -d' ' -f 1-4)" ${WCODES[$(echo $data | cut -d' ' -f 5)]}") echo $data | awk -F' ' '{ if ($4 > 30) - print "^c#ffffff^ ^d^" $4 "kh "$5 " ^d^" $1 "°C" + print "^c#ffffff^ ^d^" $4 "kh / "$5 " ^d^ " $1 "°C" else if ($2 < $3) - print "^c#ffffff^ ^d^" $3 "% "$5 " ^d^" $1 "°C" + print "^c#ffffff^ ^d^" $3 "% / "$5 " ^d^ " $1 "°C" else - print "^c#81a1c1^ ^d^" $2 "% " $5 " ^d^" $1 "°C"}' + print "^c#81a1c1^ ^d^" $2 "% / " $5 " ^d^ " $1 "°C"}' } case $BLOCK_BUTTON in diff --git a/suckless/dwmblocks/dwmblocks.c b/suckless/dwmblocks/dwmblocks.c index ad675ae9..67cec26f 100644 --- a/suckless/dwmblocks/dwmblocks.c +++ b/suckless/dwmblocks/dwmblocks.c @@ -5,7 +5,7 @@ #include #include #define LENGTH(X) (sizeof(X) / sizeof (X[0])) -#define CMDLENGTH 50 +#define CMDLENGTH 75 typedef struct { char* icon;