dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit e1410345747138c11692406b6ea34a3ebc19cdc3
parent a0ed46f4f0e0eb2b6ff81110a278c70c3fe6a5c8
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue,  5 Mar 2019 21:45:52 +0100

Simplify mailstatus output and disable dunst notification on layout change

Diffstat:
Mlinks/bin/keyboard-layout-switch.sh | 2+-
Mlinks/bin/mailstatus.sh | 12+++---------
2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/links/bin/keyboard-layout-switch.sh b/links/bin/keyboard-layout-switch.sh @@ -13,7 +13,7 @@ function set_language { #pkill -RTMIN+3 i3blocks setxkbmap "$1" -option ctrl:nocaps -option altwin:swap_lalt_lwin #xmodmap $HOME/.Xmodmap - notify-send "$1" + #notify-send "$1" } [[ $# -gt 0 ]] && set_language "$1" && exit diff --git a/links/bin/mailstatus.sh b/links/bin/mailstatus.sh @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e maildir=~/mail if [ ! -d $maildir ]; then exit 0 @@ -8,11 +9,6 @@ numbernewmails=$(echo $newmails | wc -w | sed 's/ *//') mailboxes="$(echo $newmails | tr ' ' '\n' | sed 's/.*\/mail\///' | sed 's/\/INBOX.*//' | sed 's/adamsgaard\/geodatahub.*/geodatahub/')" -mailcolor="#859900" -debug=false -#debug=true -offlineimap=/usr/local/bin/offlineimap - accounts="" if [[ $mailboxes == *"adamsgaard"* ]]; then accounts="${accounts}a" @@ -40,7 +36,5 @@ if [[ $mailboxes == *"riseup"* ]]; then fi if [ "$numbernewmails" -gt 0 ]; then - echo "#[fg=red]M: ${numbernewmails} (${accounts})" -else - echo "#[fg=green]M: ${numbernewmails}" + echo "M: ${numbernewmails} (${accounts})" fi