summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/getprojects1
-rwxr-xr-xscripts/startup1
-rwxr-xr-xscripts/sysinfo41
3 files changed, 42 insertions, 1 deletions
diff --git a/scripts/getprojects b/scripts/getprojects
index c10f507..3f0bd31 100755
--- a/scripts/getprojects
+++ b/scripts/getprojects
@@ -3,4 +3,5 @@
find "$HOME/homework/" -mindepth 2 -maxdepth 2 -type d
find "$HOME/development/" -mindepth 1 -maxdepth 1 -type d
find "$HOME/opt/" -mindepth 1 -maxdepth 1 -type d
+ find "$HOME/classes/" -mindepth 1 -maxdepth 1 -type d
}
diff --git a/scripts/startup b/scripts/startup
index a3291e4..e79419e 100755
--- a/scripts/startup
+++ b/scripts/startup
@@ -1,7 +1,6 @@
#!/bin/sh
hyprpaper &
hypridle &
-waybar &
pipewire &
restartemacs >/dev/null &
dunst
diff --git a/scripts/sysinfo b/scripts/sysinfo
new file mode 100755
index 0000000..1daf4c7
--- /dev/null
+++ b/scripts/sysinfo
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+batperc=$(cat /sys/class/power_supply/BAT0/capacity)
+batstate=$(cat /sys/class/power_supply/BAT0/status)
+brightness=$(brightnessctl -m | cut -d, -f 4)
+
+network_info() {
+ device=$(ip a | grep "state UP" | awk -F': ' '{ printf($2) }')
+ case "${device}" in
+ wlan*)
+ network=$(iwctl station ${device} show | grep 'Connected network' \
+ | awk -F' ' '{ printf($3) }')
+ echo "${device}: ${network}"
+ ;;
+ eth*)
+ echo "${device}: ${network}"
+ ;;
+ esac
+}
+
+get_volume() {
+ wpctl get-volume @DEFAULT_SINK@ | awk -F' ' '{ printf "%s %s%% %s", $1, ($2 * 100), $3; }'
+}
+
+if [ "$TERM" = "linux" ]; then
+ notify-send \
+ "System Info:" \
+ "\
+Time: $(date "+%I:%M:%S")
+$(get_volume)
+Brightness: ${brightness}
+${batstate}: ${batperc}%
+$(network_info)"
+else
+ echo "\
+Time: $(date "+%I:%M:%S")
+$(get_volume)
+Brightness: ${brightness}%
+${batstate}: ${batperc}%
+$(network_info)"
+fi