aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfig/i3blocks/scripts/email5
-rwxr-xr-xlocal/bin/email-unread1
-rw-r--r--profile4
-rw-r--r--shellrc3
4 files changed, 7 insertions, 6 deletions
diff --git a/config/i3blocks/scripts/email b/config/i3blocks/scripts/email
index db2dd29..2d26280 100755
--- a/config/i3blocks/scripts/email
+++ b/config/i3blocks/scripts/email
@@ -1,5 +1,6 @@
-#!/bin/bash
-OUT="$(email-unread -s | tr "\n" " ")"
+#!/bin/sh
+# Note: we cut last character because output ends with new line
+OUT="$(email-unread -s | tr "\n" " " | sed 's/ $//')"
echo "$OUT"
echo "$OUT"
echo "#ffff00"
diff --git a/local/bin/email-unread b/local/bin/email-unread
index a17c9b4..dec7d04 100755
--- a/local/bin/email-unread
+++ b/local/bin/email-unread
@@ -17,7 +17,6 @@ while (readdir EDIR) {
my $path = substr $File::Find::name, 1 + length EMAIL;
$path =~ s/\/new$//;
return if $_ ne "new" or $path =~ /$IGNORE/;
- #print "ok: $path\n";
my $cnt = 0;
opendir(NDIR, "$File::Find::name") or die $!;
while (readdir NDIR) {
diff --git a/profile b/profile
index cbee52d..445f471 100644
--- a/profile
+++ b/profile
@@ -1,3 +1,7 @@
+# First global user configuration
+export PATH=~/.local/bin:$PATH:$(ruby -e "print Gem.user_dir")/bin
+export EDITOR=vim
+
# Rest of the profile run only if login is from linux console
[[ "$(tty)" != /dev/tty* ]] && return
diff --git a/shellrc b/shellrc
index ccf60be..3d9c29d 100644
--- a/shellrc
+++ b/shellrc
@@ -1,9 +1,6 @@
# vim: ft=sh:
# This is file with aliases and variables shared between bash and zsh
-export PATH=~/.local/bin:$PATH:$(ruby -e "print Gem.user_dir")/bin
-export EDITOR=vim
-
# Continue only if this is interactive shell
[[ $- != *i* ]] && return