make polybar scripts more portable
This commit is contained in:
parent
f5a39e348e
commit
be01e129c5
2 changed files with 15 additions and 12 deletions
|
@ -1,9 +1,11 @@
|
|||
#!/bin/sh
|
||||
profile="$HOME/.nix-profile/bin/"
|
||||
system="/run/current-system/sw/bin/"
|
||||
#!/usr/bin/env bash
|
||||
sensors=`which sensors`
|
||||
egrep=`which egrep`
|
||||
cut=`which cut`
|
||||
sort=`which sort`
|
||||
uniq=`which uniq`
|
||||
tail=`which tail`
|
||||
|
||||
sensors="$profile/sensors"
|
||||
|
||||
max_temp=`$sensors | $system/egrep -o '[0-9][0-9]\.[0-9].*\(' | $system/cut -d' ' -f 1 | $system/sort | $system/uniq | $system/tail -n 1`
|
||||
max_temp=`$sensors | $egrep -o '[0-9][0-9]\.[0-9].*\(' | $cut -d' ' -f 1 | $sort | $uniq | $tail -n 1`
|
||||
|
||||
echo "${max_temp}"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source $HOME/.open-secrets.sh
|
||||
|
||||
|
@ -9,11 +9,12 @@ SYMBOL="°"
|
|||
|
||||
API="https://api.openweathermap.org/data/2.5"
|
||||
|
||||
CURL="/run/current-system/sw/bin/curl -sf"
|
||||
CUT="/run/current-system/sw/bin/cut"
|
||||
DATE="/run/current-system/sw/bin/date"
|
||||
JQ="$HOME/.nix-profile/bin/jq"
|
||||
UNAME="/run/current-system/sw/bin/uname"
|
||||
CURL=`which curl`
|
||||
CURL="$CURL -sf"
|
||||
CUT=`which cut`
|
||||
DATE=`which date`
|
||||
JQ=`which jq`
|
||||
UNAME=`which uname`
|
||||
|
||||
get_icon() {
|
||||
case $1 in
|
||||
|
|
Loading…
Reference in a new issue