Browse Source

More updates, removed email checker from lemonbar, more trouble than it was worth for now

Simon Watson 2 years ago
parent
commit
6804042d9c
3 changed files with 4 additions and 29 deletions
  1. 2 2
      alacritty/alacritty.yml
  2. 1 0
      himalaya/himalaya_shell_ui.sh
  3. 1 27
      lemonbar/swatson-casana/bar.sh

+ 2 - 2
alacritty/alacritty.yml

@@ -17,5 +17,5 @@ font:
 
   size: 8
 
-window:
-  decorations: "none"
+    #window:
+    #  decorations: "none"

+ 1 - 0
himalaya/himalaya_shell_ui.sh

@@ -5,6 +5,7 @@
 
 alias eml="$HIMALAYA_PATH list"  # List emails in default inbox
 alias ems="$HIMALAYA_PATH send"  # Provide email via stdin and send
+alias emwatch="watch -g -c -n 60 $HIMALAYA_PATH list" # List emails every 60 seconds, if something changes, stop watching
 
 # Read email passed and page into bat/less
 function emr() {

+ 1 - 27
lemonbar/swatson-casana/bar.sh

@@ -2,32 +2,6 @@
 
 div="%{F#0092ff}<>%{F-}%{B-}"
 
-# Global var, last epoch time we checked email
-# Update this when we call email() so that we can
-# call email() every second, but only call himalaya
-# once every minute
-
-LAST_EMAIL_CHECK_EPOCH=$(date +%s)
-EMAIL_STATE="Email: No new emails"
-
-email() {
-    EPOCH_NOW=$(date +%s)
-    DIFF=$((EPOCH_NOW - $LAST_EMAIL_CHECK_EPOCH))
-    if [ $DIFF -gt 60 ]; then
-	NEW_EMAILS=$(himalaya list -s 1 | grep ✷ | wc -l)
-	if [ $NEW_EMAILS -gt 0 ]; then
-	    EMAIL_STATE="Email: ** New Emails **"
-	    LAST_EMAIL_CHECK_EPOCH=$(date +%s)
-	else
-	    EMAIL_STATE="Email: No new emails"
-	fi
-    fi
-
-    echo -n "$EMAIL_STATE"
-    echo -n "  Last Checked: $LAST_EMAIL_CHECK_EPOCH  "
-}
-
-
 Clock() {
         DATETIME=$(date "+%a %b %d, %T")
 
@@ -120,6 +94,6 @@ soundState() {
 
 while true; do
 	sleep 1
-	echo "%{l} $(Clock)  $div  $(cpuTemp)  $div  $(loadAvg)  $div  $(wifiInfo)  $div  $(ethPort)  $div  $(diskFree)  $div  $(soundState)  $div  $(batteryInfo)  $div  $(email)"
+	echo "%{l} $(Clock)  $div  $(cpuTemp)  $div  $(loadAvg)  $div  $(wifiInfo)  $div  $(ethPort)  $div  $(diskFree)  $div  $(soundState)  $div  $(batteryInfo)  $div  "
         sleep 0.5
 done