added bar modules, work on new bar system
This commit is contained in:
parent
333e5edd7b
commit
a4c06b34cf
|
@ -3,6 +3,9 @@ export DOTFILES_PATH=$HOME/.dotfiles
|
||||||
BASE16_SHELL="$DOTFILES_PATH/colors/shell"
|
BASE16_SHELL="$DOTFILES_PATH/colors/shell"
|
||||||
[[ -s "$BASE16_SHELL" ]] && source "$BASE16_SHELL"
|
[[ -s "$BASE16_SHELL" ]] && source "$BASE16_SHELL"
|
||||||
|
|
||||||
|
# disable ctrl-s terminal freeze
|
||||||
|
stty -ixon
|
||||||
|
|
||||||
# filesystem aliases
|
# filesystem aliases
|
||||||
alias lx='ls -lXB' # order by filetype
|
alias lx='ls -lXB' # order by filetype
|
||||||
alias lk='ls -lSr' # order by filesize reversed
|
alias lk='ls -lSr' # order by filesize reversed
|
||||||
|
|
|
@ -10,58 +10,23 @@ else
|
||||||
ul="o"
|
ul="o"
|
||||||
fi
|
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
|
while read -r line; do
|
||||||
case $line in
|
content=
|
||||||
# bspwm
|
for i in $MODULE_MATCH; do
|
||||||
W*)
|
content=$content$i
|
||||||
wm_info=""
|
done
|
||||||
IFS=':' # this is some magic variable... you need it
|
|
||||||
set -- ${line#?}
|
printf " %s \n" "$content"
|
||||||
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"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
0
wm/extras/bar/modules/bspwm-bm.bash
Normal file
0
wm/extras/bar/modules/bspwm-bm.bash
Normal file
0
wm/extras/bar/modules/clock-bm.bash
Normal file
0
wm/extras/bar/modules/clock-bm.bash
Normal file
0
wm/extras/bar/modules/example.bash
Normal file
0
wm/extras/bar/modules/example.bash
Normal file
Reference in a new issue