Update to dotfiles

This commit is contained in:
2025-11-12 14:23:45 +01:00
parent 73d5a0d548
commit d7b760d93e
13 changed files with 106 additions and 5 deletions
+7 -2
View File
@@ -7,6 +7,11 @@ color=#00b894
command=echo "[$USER@$HOSTNAME ~]"
interval=once
[homelab]
command=/home/agres/.config/i3/scripts/lab.sh
interval=60
label=LAB:
[batteries_mouse]
command=/home/agres/.config/i3/scripts/mouse_battery.sh
interval=60
@@ -16,7 +21,7 @@ command=/home/agres/.config/i3/scripts/keyboard_battery.sh
interval=60
[cpu]
command=sh -c 'usage=$(mpstat 1 1 | awk "/Average/ {print 100 - \$NF}"); temp=$(sensors | awk "/^Tctl:/ {gsub(/[+°]C/, \"\", \$2); print \$2; exit}"); temp=${temp#+}; printf "%s%% %s°C\n" "$usage" "$temp"'
command=/home/agres/.config/i3/scripts/cpu_usage.sh
interval=5
label=CPU:
@@ -26,7 +31,7 @@ interval=5
label=GPU:
[mem]
command=free -h | awk '/^Mem/ {print $3 "/" $2}'
command=/home/agres/.config/i3/scripts/mem_usage.sh
interval=10
label=MEM:
+4 -1
View File
@@ -77,7 +77,7 @@ bindsym $mod+space focus mode_toggle
set $ws1 "1:Code"
set $ws2 "2:Term"
set $ws3 "3"
set $ws4 "4"
set $ws4 "4:VM"
set $ws5 "5:Web"
set $ws6 "6:Mail"
set $ws7 "7:Music"
@@ -203,6 +203,9 @@ exec --no-startup-id feh --bg-scale /home/agres/.config/i3/wallpaper/wallpaper.j
# Disable screen from going black after 10 mins to 3 hours
exec --no-startup-id xset s 7200 7200
exec --no-startup-id xset dpms 7200 7200 7200
# Slight Transparency
exec --no-startup-id picom
# Window overlay theme
client.focused #00b894 #00675a #ffffff #00b894 #00675a
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
usage=$(mpstat 1 1 | awk '/Average/ {print 100 - $NF}')
temp=$(sensors | awk '/^Tctl:/ {gsub(/[+°]C/, "", $2); print $2; exit}')
temp=${temp#+}
text="${usage}% ${temp}°C"
echo "$text"
echo "$text"
if [ "$(printf "%.0f" "$usage")" -ge 90 ]; then
echo "#ffcc66"
else
echo "#ffffff"
fi
+10
View File
@@ -5,8 +5,18 @@ if command -v rocm-smi &>/dev/null; then
output=$(rocm-smi --showtemp --showuse)
temp=$(echo "$output" | awk -F': ' '/Sensor edge/ {print $3; exit}')
usage=$(echo "$output" | awk -F': ' '/GPU use/ {print $3; exit}')
echo "${usage}% ${temp}°C"
echo "${usage}% ${temp}°C"
if [ "$usage" -ge 90 ]; then
echo "#ffcc66"
else
echo "#ffffff"
fi
else
echo "N/A"
echo "N/A"
echo "#ffffff"
fi
+11
View File
@@ -4,7 +4,18 @@ KBD_PATH="/org/freedesktop/UPower/devices/keyboard_dev_D7_E8_29_FA_0F_D0"
if upower -i "$KBD_PATH" 2>/dev/null | grep -q "present:.*yes"; then
perc=$(upower -i "$KBD_PATH" | awk '/percentage:/ {print $2}')
echo "KBD:$perc"
echo "KBD:$perc"
raw=${perc%\%}
if [ "$raw" -ge 15 ]; then
echo "#ffffff"
else
echo "#ffcc66"
fi
else
echo ""
fi
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
HOST=192.168.0.200
if ping -c1 -W1 "$HOST" >/dev/null 2>&1; then
echo "UP"
echo "UP"
echo "#00b894"
else
echo "DOWN"
echo "DOWN"
echo "#ff0000"
fi
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
used=$(free -h --si | awk '/^Mem/ {print $3}')
total=$(free -h --si | awk '/^Mem/ {print $2}')
text="${used}/${total}"
echo "$text"
echo "$text"
u=$(free --si | awk '/^Mem/ {print $3}')
t=$(free --si | awk '/^Mem/ {print $2}')
u_num=${u%[A-Za-z]*}
t_num=${t%[A-Za-z]*}
pct=$(awk -v u="$u_num" -v t="$t_num" 'BEGIN {printf "%.0f", (u/t)*100}')
if [ "$pct" -ge 90 ]; then
echo "#ffcc66"
else
echo "#ffffff"
fi
+10
View File
@@ -4,7 +4,17 @@ MOUSE_PATH=$(upower -e | grep -E 'hidpp_battery_[0-9]+$' | head -n 1)
if [[ -n "$MOUSE_PATH" ]] && upower -i "$MOUSE_PATH" 2>/dev/null | grep -q "present:.*yes"; then
perc=$(upower -i "$MOUSE_PATH" | awk '/percentage:/ {print $2}')
echo "MOUSE:$perc"
echo "MOUSE:$perc"
raw=${perc%\%}
if [ "$raw" -ge 15 ]; then
echo "#ffffff"
else
echo "#ffcc66"
fi
else
echo ""
fi
Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

+10 -1
View File
@@ -12,6 +12,9 @@ case "$HOST" in
fedora-mac) source ~/.zshrc_fedora ;;
esac
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='nvim'
@@ -41,8 +44,14 @@ alias airpods='echo -e "info 80:95:3A:DC:8E:41" | bluetoothctl | grep "Connected
alias nano=nvim
# Alias quick mount network smdb drive
alias md0='sudo mount --mkdir -t cifs //192.168.0.200/MD0 /mnt/md0 -o username=agres'
alias md0='sudo mount --mkdir -t cifs //192.168.0.200/MD0 /mnt/md0 -o username=agres,uid=$(id -u),gid=$(id -g)'
# Load ssh keys in terminal
alias loadssh='eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_ed25519'
# Tmux aliases
alias ta='tmux attach -t'
alias tn='tmux new -s'
alias tl='tmux ls'
alias tk='tmux kill-session -t'