From 0a054350dbedcae3618c92e8eb3a7d43836c4258 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 7 Feb 2021 22:05:20 -0500 Subject: Add simple battery status and clock to xsession I love how simple this is. --- home/.config/cwm/cwmrc | 3 +++ home/.local/bin/clock | 8 ++++++++ home/.xsession | 6 +++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 home/.local/bin/clock (limited to 'home') diff --git a/home/.config/cwm/cwmrc b/home/.config/cwm/cwmrc index 3ec07c68..a6a6b7f6 100644 --- a/home/.config/cwm/cwmrc +++ b/home/.config/cwm/cwmrc @@ -2,6 +2,9 @@ sticky yes snapdist 10 moveamount 10 +ignore clock +autogroup 0 clock,XTerm + unbind-key all bind-key 4-n terminal bind-key 4-Delete lock diff --git a/home/.local/bin/clock b/home/.local/bin/clock new file mode 100755 index 00000000..4f5c8561 --- /dev/null +++ b/home/.local/bin/clock @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +tput civis +while :; do + printf '%3s%% %s' "$(apm -l)" "$(date +'%a %H:%M')" + sleep 10 +done diff --git a/home/.xsession b/home/.xsession index 0f760261..bd7bbe91 100644 --- a/home/.xsession +++ b/home/.xsession @@ -1,7 +1,11 @@ . ~/.profile +export LC_CTYPE=C.UTF-8 + xset r rate 175 m 4 xmodmap ~/.config/X/modmap xrdb -load ~/.config/X/resources xsetroot -bitmap /usr/X11R6/include/X11/bitmaps/xsnow \ -bg rgb:7A/49/55 -fg rgb:16/15/10 -cwm -c ~/.config/cwm/cwmrc + +xterm -name clock -geometry 14x1-0+0 -sl 0 -e clock & +exec cwm -c ~/.config/cwm/cwmrc -- cgit 1.4.1