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