+scripts to version control
Stored in .local/scripts, scripts I use for my init. I will be adding my xinit shortly for a full experience.
This commit is contained in:
3
Scripts/.local/scripts/background
Executable file
3
Scripts/.local/scripts/background
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
feh --bg-scale --randomize $HOME/Pictures/Backgrounds;
|
||||||
3
Scripts/.local/scripts/rdwm
Executable file
3
Scripts/.local/scripts/rdwm
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
killall dwm;
|
||||||
8
Scripts/.local/scripts/reboot_services
Executable file
8
Scripts/.local/scripts/reboot_services
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
killall nm-applet;
|
||||||
|
killall blueman-applet;
|
||||||
|
killall sxhkd;
|
||||||
|
killall mpd;
|
||||||
|
|
||||||
|
nm-applet & blueman-applet & refresh_bar & mpd & sxhkd;
|
||||||
4
Scripts/.local/scripts/refresh_bar
Executable file
4
Scripts/.local/scripts/refresh_bar
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
killall set_bar;
|
||||||
|
$HOME/.local/scripts/set_bar;
|
||||||
64
Scripts/.local/scripts/set_bar
Executable file
64
Scripts/.local/scripts/set_bar
Executable file
@@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
delimiter=' | '
|
||||||
|
|
||||||
|
timedate() {
|
||||||
|
echo $(date +'%a %F %R')
|
||||||
|
}
|
||||||
|
|
||||||
|
battery() {
|
||||||
|
capacity=$(cat /sys/class/power_supply/BAT0/capacity) || break
|
||||||
|
status=$(cat /sys/class/power_supply/BAT0/status)
|
||||||
|
|
||||||
|
if [[ $status == "Charging" ]]
|
||||||
|
then
|
||||||
|
status=""
|
||||||
|
else
|
||||||
|
if [[ $capacity -ge 75 ]]
|
||||||
|
then
|
||||||
|
status=""
|
||||||
|
elif [[ $capacity -ge 50 ]]
|
||||||
|
then
|
||||||
|
status=""
|
||||||
|
elif [[ $capacity -ge 25 ]]
|
||||||
|
then
|
||||||
|
status=""
|
||||||
|
elif [[ $capacity -ge 10 ]]
|
||||||
|
then
|
||||||
|
status=""
|
||||||
|
else
|
||||||
|
status=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "$status $capacity%"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume() {
|
||||||
|
sinks="$(pactl list sinks)"
|
||||||
|
vol="$(echo "$sinks" | grep '[0-9]\+%' | sed "s,.* \([0-9]\+\)%.*,\1,;1q")"
|
||||||
|
|
||||||
|
if [[ $vol -gt 50 ]]
|
||||||
|
then
|
||||||
|
icon=""
|
||||||
|
elif [[ $vol -gt 10 ]]
|
||||||
|
then
|
||||||
|
icon=""
|
||||||
|
else
|
||||||
|
icon=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$icon $vol%"
|
||||||
|
}
|
||||||
|
|
||||||
|
ram() {
|
||||||
|
echo $(vmstat -s -a -S M | grep 'used memory' | grep -Po "\d+")M
|
||||||
|
}
|
||||||
|
|
||||||
|
disk() {
|
||||||
|
echo $(df | grep /dev/sda2 | awk '{print $5}')
|
||||||
|
}
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
xsetroot -name "Meme level at $(disk) $delimiter $(ram) $delimiter $(volume) $delimiter $(battery) $delimiter $(timedate)"
|
||||||
|
sleep 30s;
|
||||||
|
done
|
||||||
3
Scripts/.local/scripts/suctl
Executable file
3
Scripts/.local/scripts/suctl
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
systemctl --user $@
|
||||||
Reference in New Issue
Block a user