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 434353decfdf4d1980556b151d95748f4e270ae7
parent 5daa39b7f6c42f6aea7ef7785e0793c848fb364f
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 20 Dec 2018 13:58:12 +0100

Tweak date format and colorize mail output

Diffstat:
Mlinks/.config/i3/i3blocks | 3+--
Mlinks/.config/i3/i3scripts/i3date | 5++---
Mlinks/.config/i3/i3scripts/i3mail | 7+++++--
3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/links/.config/i3/i3blocks b/links/.config/i3/i3blocks @@ -119,7 +119,6 @@ label= signal=15 interval=30 -[time] -command=date '+%Y-%m-%d %H:%M:%S ' +[i3date] interval=5 signal=13 diff --git a/links/.config/i3/i3scripts/i3date b/links/.config/i3/i3scripts/i3date @@ -1,12 +1,11 @@ #!/bin/sh -date '+%Y %b %d (%a) %I:%M%p' - case $BLOCK_BUTTON in - 1) pgrep -x dunst >/dev/null && notify-send "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" ;; + 1) pgrep -x dunst >/dev/null && notify-send "$(cal -3 --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" ;; 2) "$TERMINAL" -e calcurse ;; 3) pgrep -x dunst >/dev/null && notify-send "<b>📅 Time/date module:</b> - Left click to show month via \`cal\` - Middle click opens calcurse if installed" ;; esac +date '+%Y-%m-%d (%a) %H:%M:%S ' diff --git a/links/.config/i3/i3scripts/i3mail b/links/.config/i3/i3scripts/i3mail @@ -17,9 +17,12 @@ esac mailstatus="$(mailstatus.sh | sed 's/\#\[.*]M: //')" if [[ "$mailstatus" =~ '0' ]]; then - color="#ffffff" + color="white" + style="normal" else color="#fabd2f" + style="normal" fi -printf "M: <span color=\"%s\">%s</span>" "$color" "$mailstatus" +printf "<span color=\"%s\" font_style=\"%s\">M: %s</span>" \ + "$color" "$style" "$mailstatus"