diff options
author | Karel Kočí <cynerd@email.cz> | 2017-04-11 13:23:06 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-04-11 13:23:06 +0200 |
commit | addf0820e80286e42864f12ade3cd0215fa51bc4 (patch) | |
tree | eedc6fb8fc35a00c67ad0bf35956f74164e1ddb6 | |
parent | 968eb80c3fa1d3581186e47ff8d3c7a32aa6b577 (diff) | |
download | myconfigs-addf0820e80286e42864f12ade3cd0215fa51bc4.tar.gz myconfigs-addf0820e80286e42864f12ade3cd0215fa51bc4.tar.bz2 myconfigs-addf0820e80286e42864f12ade3cd0215fa51bc4.zip |
Fix email and other scripts called from i3
-rwxr-xr-x | config/i3blocks/scripts/email | 5 | ||||
-rwxr-xr-x | local/bin/email-unread | 1 | ||||
-rw-r--r-- | profile | 4 | ||||
-rw-r--r-- | 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) { @@ -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 @@ -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 |