dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit bbdec945d539c8676cfcf4e8b2c6229e695142f1
parent 2812701cd96307ddf8e14243c8a275c2758b2790
Author: Chris Bracken <chris@bracken.jp>
Date:   Mon,  9 Mar 2020 15:25:33 -0700

Extract swaybar contents to script

Diffstat:
M.config/sway/config | 2+-
A.config/sway/custom_statusbar | 12++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/.config/sway/config b/.config/sway/config @@ -242,7 +242,7 @@ bar { # When the status_command prints a new line to stdout, swaybar updates. # The default just shows the current date and time. - status_command while date +'%Y-%m-%d %k:%M'; do sleep 1; done + status_command while ~/.config/sway/custom_statusbar; do sleep 1; done colors { statusline #ffffff diff --git a/.config/sway/custom_statusbar b/.config/sway/custom_statusbar @@ -0,0 +1,12 @@ +#!/bin/sh + +ibus=$(ibus engine 2> /dev/null) +time=$(date +"%a %Y-%m-%d %k:%M") + +if [ "${ibus}" = "mozc-jp" ]; then + ibus="JA" +else + ibus="EN" +fi + +echo "${time} ⋯ ${ibus}"