mirror of
https://github.com/StepanovPlaton/dotfiles.git
synced 2026-04-03 20:30:46 +04:00
050125
This commit is contained in:
11
.scripts/dwmblocks/cpu
Executable file
11
.scripts/dwmblocks/cpu
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/env bash
|
||||
colors_path=$HOME/.cache/wal/colors.sh
|
||||
cpu_usage=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}')
|
||||
|
||||
# cpu_usage=$(echo "$cpu_usage" | cut -c1-1)
|
||||
cpu_usage=$(printf "%.0f" "$cpu_usage")
|
||||
|
||||
if [ -f "$colors_path" ]; then
|
||||
source $colors_path
|
||||
echo "^b$color1^^c$color0^ ^d^^b$color8^^c$color0^ $cpu_usage% ^d^"
|
||||
fi
|
||||
6
.scripts/dwmblocks/date
Executable file
6
.scripts/dwmblocks/date
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/env bash
|
||||
colors_path=$HOME/.cache/wal/colors.sh
|
||||
if [ -f "$colors_path" ]; then
|
||||
source $colors_path
|
||||
echo "^c$color0^^b$color1^$(date +" %d") ^d^^c$color0^^b$color8^$(date +" %I:%M%p") ^d^ ^d^ "
|
||||
fi
|
||||
9
.scripts/dwmblocks/memory
Executable file
9
.scripts/dwmblocks/memory
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/env bash
|
||||
colors_path=$HOME/.cache/wal/colors.sh
|
||||
|
||||
memory_usage=$(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)
|
||||
|
||||
if [ -f "$colors_path" ]; then
|
||||
source $colors_path
|
||||
echo "^b$color1^^c$color0^ ^d^^b$color8^^c$color0^ $memory_usage ^d^"
|
||||
fi
|
||||
18
.scripts/dwmblocks/volume_mic
Executable file
18
.scripts/dwmblocks/volume_mic
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/env bash
|
||||
|
||||
colors_path=$HOME/.cache/wal/colors.sh
|
||||
|
||||
vol=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk -F "Volume: " '{print $2}')
|
||||
vol=$(echo "$vol * 100" | bc)
|
||||
vol=$(printf "%.0f" "$vol")
|
||||
|
||||
mic=$(wpctl get-volume @DEFAULT_SOURCE@ | awk -F "Volume: " '{print $2}')
|
||||
mic=$(echo "$mic * 100" | bc)
|
||||
mic=$(printf "%.0f" "$mic")
|
||||
|
||||
|
||||
if [ -f "$colors_path" ]; then
|
||||
source $colors_path
|
||||
echo "^b$color1^^c$color0^ $vol ^d^^b$color8^^c$color0^ $mic ^d^"
|
||||
fi
|
||||
|
||||
3
.scripts/dwmblocks/weather
Executable file
3
.scripts/dwmblocks/weather
Executable file
@@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
curl -s -H "Accept-language: ru" wttr.in/Samara?Mm
|
||||
Reference in New Issue
Block a user