Changed install documentation to include dwm links

This commit is contained in:
Luke Else 2022-09-20 20:54:10 +01:00
parent 0222d48734
commit b89c5f1a76
13 changed files with 135 additions and 4 deletions

View File

@ -0,0 +1,25 @@
#!/bin/bash
bat_capacity=$(</sys/class/power_supply/BAT0/capacity)
bat_status=$(</sys/class/power_supply/BAT0/status)
if [ $bat_status == "Charging" ]
then
battery_icon=""
elif [ $bat_capacity -lt 15 ]
then
battery_icon=" "
elif [ $bat_capacity -lt 35 ] && [ $bat_capacity -ge 15 ]
then
battery_icon=" "
elif [ $bat_capacity -lt 60 ] && [ $bat_capacity -ge 35 ]
then
battery_icon=" "
elif [ $bat_capacity -lt 90 ] && [ $bat_capacity -ge 60 ]
then
battery_icon=" "
else
battery_icon=" "
fi
printf "$battery_icon ^c#f7ca88^$bat_capacity%%^d^"

View File

@ -0,0 +1,5 @@
#!/bin/bash
icon=""
printf "$icon ^c#f7ca88^$(/usr/bin/brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}')%%^d^"

View File

@ -0,0 +1,4 @@
#!/bin/bash
icon=""
printf "$icon ^c#f7ca88^$(date '+%I:%M %p')^d^"

View File

@ -0,0 +1,6 @@
#!/bin/bash
icon=""
temp=$(echo "scale=0; $(sort -nr /sys/class/thermal/thermal_zone*/temp | head -n1) / 1000" | bc)
printf "$icon ^c#f7ca88^$((temp))^c#d75f5f^°C^d^"

View File

@ -0,0 +1,4 @@
#!/bin/bash
icon=""
printf "$icon ^c#f7ca88^$(date '+%a, %B %d')^d^"

View File

@ -0,0 +1,7 @@
#!/bin/bash
icon=""
kernel_v="$(uname -r)"
kernel_v="${kernel_v%-*}"
printf "$icon ^c#f7ca88^$kernel_v^d^"

View File

@ -0,0 +1,6 @@
#!/bin/bash
k_layout_icon=
k_layout=$(setxkbmap -query | grep layout | awk '{print $NF}')
printf "$k_layout_icon ^c#f7ca88^$k_layout^d^"

View File

@ -0,0 +1,4 @@
#!/bin/bash
icon=""
printf "$icon $(free -m | awk '/^Mem:/ {print "^c#87af5f^"$3 "mb^d^/" "^c#87afd7^"$2 "mb"}')^d^"

View File

@ -0,0 +1,14 @@
#! /bin/bash
if [[ $(tail -n+3 /proc/net/wireless 2>/dev/null) ]]; then
ssid=$(nmcli -t -f name connection show --active | head -n 1)
wireless_icon=" ^c#f7ca88^$ssid^d^"
elif [[ $(grep "" /sys/class/net/eth0/* 2>/dev/null) ]]; then
wired_icon=" ^c#f7ca88^LAN^d^"
fi
if [[ $(nmcli con show --active | grep -i vpn 2>/dev/null) ]]; then
vpn_icon="旅 "
fi
printf "$vpn_icon$wired_icon$wireless_icon"

View File

@ -0,0 +1,23 @@
#!/bin/bash
cache_path=~/.cache/.traffic
old_rx=$(head -n 1 $cache_path)
old_tx=$(tail -1 $cache_path)
printf "0\n0\n" > $cache_path
NETWORK_INTERFACE=$(ip route get 1.1.1.1 | grep -Po '(?<=dev\s)\w+' | cut -f1 -d ' ')
new_rx=`</sys/class/net/$NETWORK_INTERFACE/statistics/rx_bytes`
new_tx=`</sys/class/net/$NETWORK_INTERFACE/statistics/tx_bytes`
sed -i "1s/^.*$/$new_rx/" $cache_path
sed -i "2s/^.*$/$new_tx/" $cache_path
tx_bytes=`expr $new_tx - $old_tx`
rx_bytes=`expr $new_rx - $old_rx`
tx_kbs=`expr $tx_bytes / 1024`
rx_kbs=`expr $rx_bytes / 1024`
printf " ^c#87af5f^$rx_kbs"kb^d^"  ^c#87afd7^$tx_kbs"kb^d^""

View File

@ -0,0 +1,4 @@
#!/bin/bash
icon=""
printf "$icon ^c#d75f5f^$(uptime -p | cut -d " " -f2- | awk '{print $1 substr($2,1,1) " " $3 substr($4,1,1)}')^d^"

View File

@ -0,0 +1,23 @@
#!/bin/bash
vol=$(pactl list sinks | perl -000ne 'if(/#1/){/(Volume:.*)/; print "$1\n"}' | tr ' ' '\n' | grep -m1 '%' | tr -d '%')
if [ -z "$vol" ]; then
vol=$(pactl list sinks | tr ' ' '\n' | grep -m1 '%' | tr -d '%')
fi
vol_status=$(pactl list sinks | grep 'Mute: yes')
if [ -n "$vol_status" ]
then
vol_icon=" "
elif [ ${vol::-1} -eq 0 ]
then
vol_icon=" "
elif [ ${vol::-1} -lt 50 ]
then
vol_icon=" "
else
vol_icon=" "
fi
printf "$vol_icon^c#f7ca88^$vol%%^d^"

14
Install
View File

@ -1,8 +1,14 @@
Install List: Install List:
Arch Base Arch Base
Install Script + fish
DWM + DMenu
https://github.com/mihirlad55/polybar-dwm-module
install https://github.com/fairyglade/ly
SSH Keys SSH Keys
Install Script + fish
DWM + DMenu + DWMBlocks
ssh://git@git.luke-else.co.uk:222/luke-else/dwm.git
ssh://git@git.luke-else.co.uk:222/luke-else/dmenu.git
ssh://git@git.luke-else.co.uk:222/luke-else/dwmblocks.git
install https://github.com/fairyglade/ly