aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/.local/scripts')
-rwxr-xr-xScripts/.local/scripts/background3
-rwxr-xr-xScripts/.local/scripts/rdwm3
-rwxr-xr-xScripts/.local/scripts/reboot_services8
-rwxr-xr-xScripts/.local/scripts/refresh_bar4
-rwxr-xr-xScripts/.local/scripts/set_bar64
-rwxr-xr-xScripts/.local/scripts/suctl3
6 files changed, 85 insertions, 0 deletions
diff --git a/Scripts/.local/scripts/background b/Scripts/.local/scripts/background
new file mode 100755
index 0000000..8a64d0f
--- /dev/null
+++ b/Scripts/.local/scripts/background
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+feh --bg-scale --randomize $HOME/Pictures/Backgrounds;
diff --git a/Scripts/.local/scripts/rdwm b/Scripts/.local/scripts/rdwm
new file mode 100755
index 0000000..131fbb9
--- /dev/null
+++ b/Scripts/.local/scripts/rdwm
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+killall dwm;
diff --git a/Scripts/.local/scripts/reboot_services b/Scripts/.local/scripts/reboot_services
new file mode 100755
index 0000000..85f0c88
--- /dev/null
+++ b/Scripts/.local/scripts/reboot_services
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+killall nm-applet;
+killall blueman-applet;
+killall sxhkd;
+killall mpd;
+
+nm-applet & blueman-applet & refresh_bar & mpd & sxhkd;
diff --git a/Scripts/.local/scripts/refresh_bar b/Scripts/.local/scripts/refresh_bar
new file mode 100755
index 0000000..6491ecc
--- /dev/null
+++ b/Scripts/.local/scripts/refresh_bar
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+killall set_bar;
+$HOME/.local/scripts/set_bar;
diff --git a/Scripts/.local/scripts/set_bar b/Scripts/.local/scripts/set_bar
new file mode 100755
index 0000000..5141bb9
--- /dev/null
+++ b/Scripts/.local/scripts/set_bar
@@ -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
diff --git a/Scripts/.local/scripts/suctl b/Scripts/.local/scripts/suctl
new file mode 100755
index 0000000..feb2a0f
--- /dev/null
+++ b/Scripts/.local/scripts/suctl
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+systemctl --user $@