From addf0820e80286e42864f12ade3cd0215fa51bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 11 Apr 2017 13:23:06 +0200 Subject: Fix email and other scripts called from i3 --- config/i3blocks/scripts/email | 5 +++-- local/bin/email-unread | 1 - profile | 4 ++++ shellrc | 3 --- 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 -- cgit v1.2.3