diff --git a/README.md b/README.md index aedeb6a..9fa6700 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,13 @@ A modular statusbar for DWM - [dwm_countdown](#dwm_countdown) - [dwm_keyboard](#dwm_keyboard) - [dwm_resources](#dwm_resources) - - [dwm_battery](#dwm_battery) - [dwm_cmus](#dwm_cmus) - [dwm_date](#dwm_date) - [dwm_mail](#dwm_mail) - [dwm_weather](#dwm_weather) - [dwm_network](#dwm_network) - [dwm_vpn](#dwm_vpn) + - [dwm_ccurse](#dwm_ccurse) - [Installation](#installation) - [Usage](#usage) - [Customizing](#customizing) @@ -54,11 +54,6 @@ Displays information regarding memory, CPU temperature, and storage ``` [🖥 MEM 1.3Gi/15Gi CPU 45C STO 2.3G/200G: 2%] ``` -### dwm_battery -Displays battery level and status -``` -[🔌 55 Charging] -``` ### dwm_cmus displays current cmus status, artist, track, position, duration, and shuffle ``` @@ -81,7 +76,7 @@ Displays the current weather provided by [wttr.in](https://wttr.in) [☀ +20°C] ``` ### dwm_network -Displays the current network connection/SSID, private IP, and public IP +Displays the current network connection, private IP, and public IP ``` [🌐 enp7s0: 192.168.0.1/24 | 185.199.109.153] ``` @@ -92,6 +87,12 @@ Displays the current VPN connection [🔒 Sweden - Stockholm] ``` Dependencies: ```NetworkManager-openvpn``` +### dwm_ccurse +Shows the next appointment from calcurse +``` +[💡 18/04/19 19:00 20:00 Upload dwm_ccurse] +``` +Dependencies: ```calcurse``` ## Installation 1. Clone and enter the repository: ``` diff --git a/bar-functions/dwm_ccurse.sh b/bar-functions/dwm_ccurse.sh new file mode 100755 index 0000000..10e6cee --- /dev/null +++ b/bar-functions/dwm_ccurse.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# A dwm_bar function to show the closest appointment in calcurse +# Joe Standring +# GNU GPLv3 + +# Dependencies: calcurse + +dwm_ccurse () { + APPOINTMENT=$(calcurse -a | head -n 3 | tr -d '\n+>-' | awk '$1=$1' | sed 's/://') + + if [ "$IDENTIFIER" = "unicode" ]; then + printf "[💡 %s]\n" "$APPOINTMENT" + else + printf "[APT %s]\n" "$APPOINTMENT" + fi +} + +dwm_ccurse