Initial Red Hat laptop config commit

This commit is contained in:
2020-10-27 16:50:13 -04:00
parent 59794e9bdf
commit 15fad27d78
22 changed files with 320 additions and 75 deletions

View File

@@ -15,12 +15,12 @@ color=#cbe4ff
# volume/spotify [[[ #
{{ if eq .chezmoi.fullHostname "nzxt" }}
[volume]
interval=once
signal=1
interval=60
{{ if eq .chezmoi.fullHostname "nzxt" }}
[spotify]
label=
LONG_NAME=
@@ -32,9 +32,9 @@ interval=5
# laptop [[[ #
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
{{ if or (eq .chezmoi.fullHostname "x1-carbon") (eq .linux_os "fedora") }}
[battery]
label=⚡
label=⚡
interval=30
[wifi]
@@ -43,7 +43,7 @@ instance=wlp3s0
interval=10
[backlight]
label=
label=
interval=5
{{ end }}
@@ -54,12 +54,8 @@ interval=5
[calendar]
interval=30
label=
{{ if eq .chezmoi.fullHostname "nzxt" }}
DATEFMT=+%H:%M
{{ else }}
DATEFMT=+%H:%M.%a-%m-%d
{{ end }}
# SHORTFMT=+%H:%M:%S
# DATEFMT=+%H:%M.%a-%m-%d
HEIGHT=180
WIDTH=220
@@ -85,10 +81,9 @@ interval=5
{{ end }}
[cpu_usage]
label=
label=
interval=5
{{ if eq .chezmoi.fullHostname "nzxt" }}
[memory]
label=
# color=#3da061
@@ -98,6 +93,7 @@ interval=5
# name [[[ #
{{ if eq .chezmoi.fullHostname "nzxt" }}
[name]
label=
interval=30

View File

@@ -5,7 +5,7 @@ round()
echo $(printf %.$2f $(echo "scale=$2;(((10^$2)*$1)+0.5)/(10^$2)" | bc))
};
. "/home/kevin/.cache/wal/colors.sh"
. "/home/$USER/.cache/wal/colors.sh"
cur_bl=$(xbacklight -get)
# echo "$(round "$cur_bl" 0)%"
printf "$(round "$cur_bl" 0)\n\n%s\n" "$color7"
printf " $(round "$cur_bl" 0)\n\n%s\n" "$color7"

View File

@@ -37,7 +37,7 @@ case "$BLOCK_BUTTON" in
> /dev/null"
# --close-on-unfocus \
esac
. "/home/kevin/.cache/wal/colors.sh"
. "/home/$USER/.cache/wal/colors.sh"
echo "$LABEL$(date "$DATEFMT")"
echo "$LABEL$(date "$SHORTFMT")"
echo "$color7"

View File

@@ -1,8 +1,7 @@
#!/bin/bash
. "/home/kevin/.cache/wal/colors.sh"
. "/home/$USER/.cache/wal/colors.sh"
idle="$(mpstat 1 1 -P ALL | sed -n -e '4{p;q}' | awk '{print $NF}')"
used=$(echo 100 - "$idle" | bc)
used_rounded=$(printf %.0f "$used")
printf "%s%%\n\n%s\n" "$used_rounded" "$color7"
printf " %s%%\n\n%s\n" "$used_rounded" "$color7"

View File

@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
TYPE="${BLOCK_INSTANCE:-mem}"
. "/home/kevin/.cache/wal/colors.sh"
. "/home/$USER/.cache/wal/colors.sh"
awk -v type=$TYPE '
/^MemTotal:/ {

View File

@@ -1,6 +1,5 @@
#!/bin/bash
. "/home/kevin/.cache/wal/colors.sh"
printf "$(date '+%H:%M.%a-%m-%d')\n\n%s\n" "$color7"
# echo "<span foreground=\"%s\">$(date '+%H:%M.%a-%m-%d')%s</span>" "$color2"
# printf "%s" "$color2"

View File

@@ -17,7 +17,7 @@ AUDIO_LOW_SYMBOL=${AUDIO_LOW_SYMBOL:-''}
AUDIO_MUTED_SYMBOL=${AUDIO_MUTED_SYMBOL:-''}
. "/home/kevin/.cache/wal/colors.sh"
. "/home/$USER/.cache/wal/colors.sh"
# DEFAULT_COLOR=${DEFAULT_COLOR:-"#ffffff"}
DEFAULT_COLOR="$color7"
MUTED_COLOR=${MUTED_COLOR:-"#a0a0a0"}

View File

@@ -39,7 +39,7 @@ W_name=$(nmcli d | grep "$W_inter" | awk '{print $4}')
echo $QUALITY% # full text
echo $QUALITY% # short text
. "/home/kevin/.cache/wal/colors.sh"
. "/home/$USER/.cache/wal/colors.sh"
# color
if [[ $QUALITY -lt 50 ]]; then
echo "#FF0000"