mirror of
https://github.com/The-Repo-Club/DotFiles.git
synced 2024-11-24 16:28:41 -05:00
Update
This commit is contained in:
parent
1ac6862320
commit
3db60c1a9d
@ -1 +1,3 @@
|
||||
/home/repo
|
||||
/home/repo/Downloads/GiveMeDaBadge
|
||||
/home/repo
|
||||
|
Binary file not shown.
@ -5,5 +5,5 @@ function chris
|
||||
end
|
||||
|
||||
function sshme
|
||||
ssh opc@129.151.81.219
|
||||
ssh ubuntu@129.151.81.74
|
||||
end
|
||||
|
@ -1,2 +1,2 @@
|
||||
LastUsed=1695238476
|
||||
LastUsed=1696088482
|
||||
Message='Fully Updated'
|
||||
|
@ -1,40 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
network() {
|
||||
# load colors
|
||||
. $HOME/.config/flexiflow_bar/bar_themes/minimal-mistakes
|
||||
drive=enp0s20f0u2
|
||||
# load colors
|
||||
. $HOME/.config/flexiflow_bar/bar_themes/minimal-mistakes
|
||||
|
||||
R1=$(cat /sys/class/net/wlan0/statistics/rx_bytes)
|
||||
T1=$(cat /sys/class/net/wlan0/statistics/tx_bytes)
|
||||
sleep 1
|
||||
R2=$(cat /sys/class/net/wlan0/statistics/rx_bytes)
|
||||
T2=$(cat /sys/class/net/wlan0/statistics/tx_bytes)
|
||||
TBPS=$(expr $T2 - $T1)
|
||||
RBPS=$(expr $R2 - $R1)
|
||||
TKBPS=$(echo "$TBPS / 1024" | bc)
|
||||
RKBPS=$(echo "$RBPS / 1024" | bc)
|
||||
icon_up=" "
|
||||
icon_down=" "
|
||||
if [[ "$RKBPS" -gt "1024" ]]; then
|
||||
RKBPS=$(echo "scale=2; $RKBPS / 1024" | bc)
|
||||
RKBPS=" $RKBPS mb"
|
||||
else
|
||||
RKBPS=" $RKBPS kb"
|
||||
fi
|
||||
R1=$(cat /sys/class/net/"${drive}"/statistics/rx_bytes)
|
||||
T1=$(cat /sys/class/net/"${drive}"/statistics/tx_bytes)
|
||||
sleep 1
|
||||
R2=$(cat /sys/class/net/"${drive}"/statistics/rx_bytes)
|
||||
T2=$(cat /sys/class/net/"${drive}"/statistics/tx_bytes)
|
||||
TBPS=$(expr $T2 - $T1)
|
||||
RBPS=$(expr $R2 - $R1)
|
||||
TKBPS=$(echo "$TBPS / 1024" | bc)
|
||||
RKBPS=$(echo "$RBPS / 1024" | bc)
|
||||
icon_up=" "
|
||||
icon_down=" "
|
||||
if [[ "$RKBPS" -gt "1024" ]]; then
|
||||
RKBPS=$(echo "scale=2; $RKBPS / 1024" | bc)
|
||||
RKBPS=" $RKBPS mb"
|
||||
else
|
||||
RKBPS=" $RKBPS kb"
|
||||
fi
|
||||
|
||||
if [[ "$TKBPS" -gt "1024" ]]; then
|
||||
TKBPS=$(echo "scale=2; $TKBPS / 1024" | bc)
|
||||
TKBPS=" $TKBPS mb"
|
||||
else
|
||||
TKBPS=" $TKBPS kb"
|
||||
fi
|
||||
if [[ "$TKBPS" -gt "1024" ]]; then
|
||||
TKBPS=$(echo "scale=2; $TKBPS / 1024" | bc)
|
||||
TKBPS=" $TKBPS mb"
|
||||
else
|
||||
TKBPS=" $TKBPS kb"
|
||||
fi
|
||||
|
||||
case "$(cat /sys/class/net/wl*/operstate 2>/dev/null)" in
|
||||
up) printf " %s %s \n" "^c$Foreground^^b$Purple^$icon_up" "^c$Foreground^^b$Purple_Bright^ Connected" ;;
|
||||
down) printf " %s %s \n" "^c$Foreground^^b$Purple^$icon_down" "^c$Foreground^^b$Purple_Bright^ Disconnected" ;;
|
||||
esac
|
||||
|
||||
# printf " %s %s %s %s \n" "^c$Foreground^^b$Purple^$icon_down" "^c$Foreground^^b$Purple_Bright^ ${RKBPS^^}" "^c$Foreground^^b$Purple^$icon_up" "^c$Foreground^^b$Purple_Bright^ ${TKBPS^^}"
|
||||
case "$(cat /sys/class/net/"${drive}"/operstate 2>/dev/null)" in
|
||||
up) printf " %s %s \n" "^c$Foreground^^b$Purple^$icon_up" "^c$Foreground^^b$Purple_Bright^ Connected" ;;
|
||||
down) printf " %s %s \n" "^c$Foreground^^b$Purple^$icon_down" "^c$Foreground^^b$Purple_Bright^ Disconnected" ;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,36 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
get_updates() {
|
||||
configFile=$HOME/.config/flexiflow/flexiflow_bar/bar_updates.ini
|
||||
configFile=$HOME/.config/flexiflow/flexiflow_bar/bar_updates.ini
|
||||
|
||||
# load colors
|
||||
. $HOME/.config/flexiflow_bar/bar_themes/minimal-mistakes
|
||||
# load colors
|
||||
. $HOME/.config/flexiflow_bar/bar_themes/minimal-mistakes
|
||||
|
||||
updates=$(yay -Qu | wc -l)
|
||||
timestamp=$(date +%s)
|
||||
icon=""
|
||||
updates=$(yay -Qu | wc -l)
|
||||
timestamp=$(date +%s)
|
||||
icon=""
|
||||
|
||||
if [ "$updates" -ge "0" ]; then
|
||||
updatecount="Fully Updated"
|
||||
elif [ "$updates" -ge "1" ]; then
|
||||
updatecount="$updates Update"
|
||||
else
|
||||
updatecount="$updates Updates"
|
||||
fi
|
||||
[[ -f $configFile ]] && . $configFile
|
||||
if [[ -z "$LastUsed" ]] || [[ -z "$Message" ]]; then
|
||||
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
|
||||
newtime=$(expr $timestamp + 900)
|
||||
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
|
||||
else
|
||||
if [[ "$timestamp" -ge "$LastUsed" ]]; then
|
||||
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
|
||||
newtime=$(expr $timestamp + 900)
|
||||
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
|
||||
if [ "$updates" -eq 0 ]; then
|
||||
updatecount="Fully Updated"
|
||||
elif [ "$updates" -eq 1 ]; then
|
||||
updatecount="$updates Update"
|
||||
else
|
||||
updatecount="$Message"
|
||||
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
|
||||
updatecount="$updates Updates"
|
||||
fi
|
||||
|
||||
[[ -f $configFile ]] && . $configFile
|
||||
if [[ -z "$LastUsed" ]] || [[ -z "$Message" ]]; then
|
||||
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
|
||||
newtime=$(expr $timestamp + 900)
|
||||
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
|
||||
else
|
||||
if [[ "$timestamp" -ge "$LastUsed" ]]; then
|
||||
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
|
||||
newtime=$(expr $timestamp + 900)
|
||||
echo -e "LastUsed=${newtime}\nMessage='${updatecount}'" >$configFile
|
||||
else
|
||||
updatecount="$Message"
|
||||
printf "%s %s \n" "^c$Foreground^^b$Purple^ $icon " "^c$Foreground^^b$Purple_Bright^ $updatecount"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
get_updates
|
||||
|
@ -50,8 +50,8 @@ keys = [Key(*key) for key in [ # type: ignore
|
||||
([mod], "Tab", lazy.next_layout()),
|
||||
|
||||
# qtile stuff
|
||||
([mod, "control"], "b", lazy.hide_show_bar()),
|
||||
([mod, "control"], "s", lazy.shutdown()),
|
||||
([mod, "shift"], "b", lazy.hide_show_bar()),
|
||||
([mod, "shift"], "s", lazy.shutdown()),
|
||||
([mod, "shift"], "r", restart),
|
||||
([mod, "shift"], "e", lazy.spawn(cfg.power)),
|
||||
|
||||
@ -67,10 +67,10 @@ keys = [Key(*key) for key in [ # type: ignore
|
||||
([mod], "y", lazy.spawn(cfg.youtube)),
|
||||
|
||||
# web browser
|
||||
([mod], "b", lazy.spawn(cfg.browser)),
|
||||
([mod, "control"], "b", lazy.spawn(cfg.browser)),
|
||||
|
||||
# code editor
|
||||
([mod], "c", lazy.spawn(cfg.editor)),
|
||||
([mod, "control"], "e", lazy.spawn(cfg.editor)),
|
||||
|
||||
# backlight
|
||||
([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 5%-")),
|
||||
|
Loading…
Reference in New Issue
Block a user