diff --git a/sh/bashrc b/sh/bashrc index 0f47252..0de0961 100644 --- a/sh/bashrc +++ b/sh/bashrc @@ -3,6 +3,9 @@ export DOTFILES_PATH=$HOME/.dotfiles BASE16_SHELL="$DOTFILES_PATH/colors/shell" [[ -s "$BASE16_SHELL" ]] && source "$BASE16_SHELL" +# disable ctrl-s terminal freeze +stty -ixon + # filesystem aliases alias lx='ls -lXB' # order by filetype alias lk='ls -lSr' # order by filesize reversed diff --git a/wm/extras/bar/formatter.bash b/wm/extras/bar/formatter.bash index 96e9007..3bbe06e 100755 --- a/wm/extras/bar/formatter.bash +++ b/wm/extras/bar/formatter.bash @@ -10,58 +10,23 @@ else ul="o" fi +export $MODULE_MATCH= +export $MODULE_CALLBACK= +export $MODULE_DATA= + +register_bar_module() { + : +} +export -f register_bar_module + +source "$DOTFILES_PATH/wm/extras/bar/modules/*-bm.bash" + while read -r line; do - case $line in - # bspwm - W*) - wm_info="" - IFS=':' # this is some magic variable... you need it - set -- ${line#?} - while [ $# -gt 0 ]; do - item=$1 - name=${item#?} - cname="$name" - case $item in - M*) - # active monitor - # do nothing - ;; - m*) - # inactive monitor - # do nothing - ;; - O*) - # focused occupied desktop - wm_info="${wm_info} %{F$COLOR_HIGHLIGHT}%{U$COLOR_HIGHLIGHT}%{+${ul}}${cname}%{-${ul}}%{U-}%{F-}" - ;; - F*) - # focused free desktop - wm_info="${wm_info} %{F$COLOR_DARK}%{U$COLOR_DARK}%{+${ul}}${cname}%{-${ul}}%{U-}%{F-}" - ;; - U*) - # focused occupied desktop - wm_info="${wm_info} %{F$COLOR_URGENT}%{U$COLOR_URGENT}%{+${ul}}${cname}%{-${ul}}%{U-}%{F-}" - ;; - o*) - # occupied desktop - wm_info="${wm_info} %{F$COLOR_FOREGROUND}${cname}%{F-}" - ;; - f*) - # free desktop - wm_info="${wm_info} %{F$COLOR_DARK}${cname}%{F-}" - ;; - u*) - # urgent desktop - wm_info="${wm_info} %{F$COLOR_URGENT}${cname}%{F-}" - ;; - L*) - # layout - ;; - esac - shift - done - ;; - esac - printf " %s \n" "%{T1}What up, bar? %{c}${wm_info} %{r}Clock here or something" + content= + for i in $MODULE_MATCH; do + content=$content$i + done + + printf " %s \n" "$content" done diff --git a/wm/extras/bar/modules/bspwm-bm.bash b/wm/extras/bar/modules/bspwm-bm.bash new file mode 100644 index 0000000..e69de29 diff --git a/wm/extras/bar/modules/clock-bm.bash b/wm/extras/bar/modules/clock-bm.bash new file mode 100644 index 0000000..e69de29 diff --git a/wm/extras/bar/modules/example.bash b/wm/extras/bar/modules/example.bash new file mode 100644 index 0000000..e69de29