diff --git a/functions/dwm_alsa.sh b/functions/dwm_alsa.sh deleted file mode 100755 index 5fc8bcb..0000000 --- a/functions/dwm_alsa.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# A dwm_bar function to show the master volume of ALSA -# Joe Standring -# GNU GPLv3 - -# Dependencies: alsa-utils - -dwm_alsa () { - VOL=$(amixer get Master | tail -n1 | sed -r "s/.*\[(.*)%\].*/\1/") - if [ "$IDENTIFIER" = "unicode" ]; then - if [ "$VOL" -eq 0 ]; then - printf "[🔇 %s]\n" "$VOL]\n" - elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then - printf "[🔈 %s]\n" "$VOL" - elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then - printf "[🔉 %s]\n" "$VOL" - else - printf "[🔊 %s]\n" "$VOL" - fi - else - if [ "$VOL" -eq 0 ]; then - printf "[VOL %s]\n" "$VOL]\n" - elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then - printf "[VOL %s]\n" "$VOL" - elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then - printf "[VOL %s]\n" "$VOL" - else - printf "[VOL %s]\n" "$VOL" - fi - fi -} - -dwm_alsa diff --git a/functions/dwm_cmus.sh b/functions/dwm_cmus.sh deleted file mode 100755 index 2b8294c..0000000 --- a/functions/dwm_cmus.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# A dwm_bar function that shows the current artist, track, position, duration, and status from cmus -# Joe Standring -# GNU GPLv3 - -# Dependencies: cmus - -dwm_cmus () { - if ps -C cmus > /dev/null; then - ARTIST=$(cmus-remote -Q | grep -a '^tag artist' | awk '{gsub("tag artist ", "");print}') - TRACK=$(cmus-remote -Q | grep -a '^tag title' | awk '{gsub("tag title ", "");print}') - POSITION=$(cmus-remote -Q | grep -a '^position' | awk '{gsub("position ", "");print}') - DURATION=$(cmus-remote -Q | grep -a '^duration' | awk '{gsub("duration ", "");print}') - STATUS=$(cmus-remote -Q | grep -a '^status' | awk '{gsub("status ", "");print}') - SHUFFLE=$(cmus-remote -Q | grep -a '^set shuffle' | awk '{gsub("set shuffle ", "");print}') - - if [ "$IDENTIFIER" = "unicode" ]; then - if [ "$STATUS" = "playing" ]; then - STATUS="▶" - else - STATUS="⏸" - fi - - if [ "$SHUFFLE" = "true" ]; then - SHUFFLE=" 🔀" - else - SHUFFLE="" - fi - else - if [ "$STATUS" = "playing" ]; then - STATUS="PLA" - else - STATUS="PAU" - fi - - if [ "$SHUFFLE" = "true" ]; then - SHUFFLE=" S" - else - SHUFFLE="" - fi - fi - - printf "[%s %s - %s " "$STATUS" "$ARTIST" "$TRACK" - printf "%0d:%02d/" $((POSITION%3600/60)) $((POSITION%60)) - printf "%0d:%02d" $((DURATION%3600/60)) $((DURATION%60)) - printf "%s]\n" "$SHUFFLE" - fi -} - -dwm_cmus diff --git a/functions/dwm_countdown.sh b/functions/dwm_countdown.sh deleted file mode 100755 index 7ba938e..0000000 --- a/functions/dwm_countdown.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# A dwm_status function that displays the status of countdown.sh -# Joe Standring -# GNU GPLv3 - -# Dependencies: https://github.com/joestandring/countdown - -dwm_countdown () { - for f in /tmp/countdown.*; do - if [ -e "$f" ]; then - if [ "$IDENTIFIER" = "unicode" ]; then - printf "[⏳ %s]\n" "$(tail -1 /tmp/countdown.*)" - else - printf "[CDN %s]\n" "$(tail -1 /tmp/countdown.*)" - fi - - break - fi - done -} - -dwm_countdown diff --git a/functions/dwm_date.sh b/functions/dwm_date.sh deleted file mode 100755 index 4550fa2..0000000 --- a/functions/dwm_date.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# A dwm_bar function that shows the current date and time -# Joe Standring -# GNU GPLv3 - -# Date is formatted like like this: "[Mon 01-01-00 00:00:00]" -dwm_date () { - if [ "$IDENTIFIER" = "unicode" ]; then - printf "[📆 %s]\n" "$(date "+%a %d-%m-%y %T")" - else - printf "[DAT %s]\n" "$(date "+%a %d-%m-%y %T")" - fi -} - -dwm_date diff --git a/functions/dwm_keyboard.sh b/functions/dwm_keyboard.sh deleted file mode 100755 index 686afb6..0000000 --- a/functions/dwm_keyboard.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# A dwm_bar function that displays the current keyboard layout -# Joe Standring -# GNU GPLv3 - -# Dependencies: xorg-setxkbmap - -dwm_keyboard () { - if [ "$IDENTIFIER" = "unicode" ]; then - printf "[⌨ %s]\n" "$(setxkbmap -query | awk '/layout/{print $2}')" - else - printf "[KEY %s]\n" "$(setxkbmap -query | awk '/layout/{print $2}')" - fi -} - -dwm_keyboard diff --git a/functions/dwm_mail.sh b/functions/dwm_mail.sh deleted file mode 100755 index c50ee90..0000000 --- a/functions/dwm_mail.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# A dwm_bar function to display the number of emails in an inbox -# Joe Standring -# GNU GPLv3 - -# To count mail in an inbox, change "/path/to/inbox" below to the location of your inbox. For example, "/home/$USER/.mail/new" - -dwm_mail () { - MAILBOX=$(ls /path/to/inbox | wc -l) - - if [ "$IDENTIFIER" = "unicode" ]; then - if [ "$MAILBOX" -eq 0 ]; then - printf "[📪 %s]\n" "$MAILBOX" - else - printf "[📫 %s]\n" "$MAILBOX" - fi - else - printf "[MAI %s]\n" "$MAILBOX" - fi -} - -dwm_mail diff --git a/functions/dwm_pulse.sh b/functions/dwm_pulse.sh deleted file mode 100755 index 02db615..0000000 --- a/functions/dwm_pulse.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# A dwm_bar function to show the master volume of PulseAudio -# Joe Standring -# GNU GPLv3 - -# Dependencies: pamixer - -dwm_pulse () { - VOL=$(pamixer --get-volume) - if [ "$IDENTIFIER" = "unicode" ]; then - if [ "$VOL" -eq 0 ]; then - printf "[🔇 %s]\n" "$VOL]\n" - elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then - printf "[🔈 %s]\n" "$VOL" - elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then - printf "[🔉 %s]\n" "$VOL" - else - printf "[🔊 %s]\n" "$VOL" - fi - else - if [ "$VOL" -eq 0 ]; then - printf "[VOL %s]\n" "$VOL]\n" - elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then - printf "[VOL %s]\n" "$VOL" - elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then - printf "[VOL %s]\n" "$VOL" - else - printf "[VOL %s]\n" "$VOL" - fi - fi -} - -dwm_pulse diff --git a/functions/dwm_resources.sh b/functions/dwm_resources.sh deleted file mode 100755 index 87db9bb..0000000 --- a/functions/dwm_resources.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# A dwm_bar function to display information regarding system memory, CPU temperature, and storage -# Joe Standring -# GNU GPLv3 - -dwm_resources () { - # Used and total memory - MEMUSED=$(free -h | awk '(NR == 2) {print $3}') - MEMTOT=$(free -h |awk '(NR == 2) {print $2}') - # CPU temperature - CPU=$(sysctl -n hw.sensors.cpu0.temp0 | cut -d. -f1) - # Used and total storage in /home (rounded to 1024B) - STOUSED=$(df -h | grep '/home$' | awk '{print $3}') - STOTOT=$(df -h | grep '/home$' | awk '{print $2}') - STOPER=$(df -h | grep '/home$' | awk '{print $5}') - - if [ "$IDENTIFIER" = "unicode" ]; then - printf "[💻 MEM %s/%s CPU %s STO %s/%s: %s]\n" "$MEMUSED" "$MEMTOT" "$CPU" "$STOUSED" "$STOTOT" "$STOPER" - else - printf "[STA | MEM %s/%s CPU %s STO %s/%s: %s]\n" "$MEMUSED" "$MEMTOT" "$CPU" "$STOUSED" "$STOTOT" "$STOPER" - fi -} - -dwm_resources diff --git a/functions/dwm_weather.sh b/functions/dwm_weather.sh deleted file mode 100755 index 678475d..0000000 --- a/functions/dwm_weather.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# A dwm_bar function to print the weather from wttr.in -# Joe Standring -# GNU GPLv3 - -# Dependencies: curl - -# Change the value of LOCATION to match your city -dwm_weather() { - LOCATION=city - if [ "$IDENTIFIER" = "unicode" ]; then - printf "[%s]\n" "$(curl -s wttr.in/$LOCATION?format=1)" - else - printf "[WEA %s]\n" "$(curl -s wttr.in/$LOCATION?format=1 | grep -o "[0-9].*")" - fi -} - -dwm_weather