summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-02-07 22:05:20 -0500
committerJune McEnroe <june@causal.agency>2021-02-07 22:21:59 -0500
commit8cf73de3a20f3b8e7d6169fb26a02c819dbe8e42 (patch)
treea5cd7c3685be7b07d719e8a510479ea43fd6afbe
parentSet cursor theme and size (diff)
downloadsrc-8cf73de3a20f3b8e7d6169fb26a02c819dbe8e42.tar.gz
src-8cf73de3a20f3b8e7d6169fb26a02c819dbe8e42.zip
Add simple battery status and clock to xsession
I love how simple this is.
-rw-r--r--home/.config/cwm/cwmrc3
-rwxr-xr-xhome/.local/bin/clock8
-rw-r--r--home/.xsession6
3 files changed, 16 insertions, 1 deletions
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
-05-01Clean up SSH configJune McEnroe 2017-05-01Rename colorscheme "trivial"June McEnroe 2017-05-01Update vendored pathogenJune McEnroe 2017-05-01Clean up git configJune McEnroe 2017-05-01Clean up style in xxJune McEnroe 2017-05-01Clean up style in pbdJune McEnroe 2017-05-01Use EX_OK in pbcopyJune McEnroe 2017-04-30Clean up clockJune McEnroe 2017-04-30Clean up error strings in briJune McEnroe 2017-03-18Add -u option to xxJune McEnroe 2017-03-15Fix non-string-literal-format-string in briJune McEnroe 2017-03-15Fix bri compilationJune McEnroe cc will remove the file itself just fine. Always exit in case any of the shell commands fail. 2017-03-15Use psvar for title settingJune McEnroe Prevents prompt expansion from happening on the command being run when it is set in the title. 2017-03-14Add bri brightness control scriptJune McEnroe This is probably terrible. 2017-03-14Add comment to tmux terminal overrideJune McEnroe 2017-03-13Have tmux set block cursor on linux consoleJune McEnroe 2017-03-13Use inverse for Visual in colorschemeJune McEnroe