From 05f9bc5afd5ac5f671f1dcd3d20774b0987545ec Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Sat, 27 Jan 2024 12:45:54 +0530 Subject: refactor dotfiles, and use nix --- .dwm/bar.sh | 29 ----------------------------- .dwm/power.sh | 12 ------------ 2 files changed, 41 deletions(-) delete mode 100755 .dwm/bar.sh delete mode 100755 .dwm/power.sh (limited to '.dwm') diff --git a/.dwm/bar.sh b/.dwm/bar.sh deleted file mode 100755 index 966afe8..0000000 --- a/.dwm/bar.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -battery() { - capacity="$(cat /sys/class/power_supply/BAT1/capacity)" - case "$(cat /sys/class/power_supply/BAT1/status)" in - Charging) printf " $capacity +";; - Discharging) printf " $capacity -";; - Full) printf " $capacity";; - esac -} - -wlan() { - case "$(cat /sys/class/net/wl*/operstate 2>/dev/null)" in - up) echo "󰤨 $(iwgetid -r)";; - down) printf "󰤭 Disconnected";; - esac -} - -clock() { - printf "󱑆 $(date '+%H:%M')" -} - -user() { - printf "$(whoami)" -} - -while(true) do - xsetroot -name "| $(battery) | $(wlan) | $(clock) | $(user) " && sleep 2 -done diff --git a/.dwm/power.sh b/.dwm/power.sh deleted file mode 100755 index e5c5ad2..0000000 --- a/.dwm/power.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -chosen=$(printf " Power Off\n Restart\n Suspend\n Hibernate\n󰗼 Log Out\n Lock" | rofi -dmenu -i -p "Choice:") - -case "$chosen" in - " Power Off") poweroff ;; - " Restart") reboot ;; - " Suspend") systemctl suspend-then-hibernate ;; - " Hibernate") systemctl hibernate ;; - "󰗼 Log Out") killall dwm ;; - " Lock") betterlockscreen -l ;; - *) exit 1 ;; -esac -- cgit v1.2.3