summaryrefslogtreecommitdiff
path: root/dist/dwl
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-03-11 22:16:24 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-03-11 22:16:24 +0530
commit55542f1ce3f313419ebe6a7fa9a7629898e6ce2e (patch)
treeaec78781c3f64eed7dce21e1aadb0342fae6bacd /dist/dwl
parentb71f27a2179cdfa58492e2696246d3d8e55f9844 (diff)
dwm
Diffstat (limited to 'dist/dwl')
-rwxr-xr-xdist/dwl/bar.sh39
-rwxr-xr-xdist/dwl/run.sh2
2 files changed, 41 insertions, 0 deletions
diff --git a/dist/dwl/bar.sh b/dist/dwl/bar.sh
new file mode 100755
index 0000000..2b23972
--- /dev/null
+++ b/dist/dwl/bar.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+wifi() {
+ iwgetid -r
+}
+
+battery() {
+ c=$(cat /sys/class/power_supply/BAT1/capacity)
+
+ if [[ $c > 85 ]]; then
+ echo " $c"
+ elif [[ $c > 70 ]]; then
+ echo " $c"
+ elif [[ $c > 50 ]]; then
+ echo " $c"
+ elif [[ $c > 30 ]]; then
+ echo " $c"
+ else
+ echo " $c"
+ fi
+}
+
+charging() {
+ if [[ "$(cat /sys/class/power_supply/BAT1/status)" == "Charging" ]]; then
+ echo "+"
+ fi
+}
+
+calendar() {
+ date +'%a, %d %b %Y |  %H:%M'
+}
+
+volume() {
+ pamixer --get-volume
+}
+
+while [[ true ]]; do
+ dwlb -status all "| ^lm(alacritty -e nmtui-connect) $(wifi)^lm() |  $(volume)% | $(battery)%$(charging) |  $(calendar) | λ"
+ sleep 1
+done
diff --git a/dist/dwl/run.sh b/dist/dwl/run.sh
new file mode 100755
index 0000000..dc13e69
--- /dev/null
+++ b/dist/dwl/run.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+alacritty --title float -o 'window.dimensions = { columns = 80, lines = 40 }' -e sway-launcher-desktop