diff --git a/arch_linux_init/gmusic.bash b/arch_linux_init/gmusic.bash old mode 100644 new mode 100755 diff --git a/arch_linux_init/shell.bash b/arch_linux_init/shell.bash index a780a69..e224cf3 100755 --- a/arch_linux_init/shell.bash +++ b/arch_linux_init/shell.bash @@ -1,4 +1,14 @@ #!/usr/bin/env bash +DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd) +source "$DIR/variables.bash" + sudo pacman -S tmux --noconfirm +mkdir -p "$HOME/.tmux/plugins/" +rm -rf "$HOME/.tmux/plugins/tpm" + +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm + +tmux source "$DOTFILES_PATH/sh/tmux.conf" + diff --git a/sh/tmux.conf b/sh/tmux.conf index 6145674..f16eb3a 100644 --- a/sh/tmux.conf +++ b/sh/tmux.conf @@ -83,6 +83,10 @@ set -g pane-base-index 1 # If we want Vim to be told about focus: http://git.io/2UqSgQ set -g focus-events on +# Use tmux-resurrect to manage saving/restoring sessions +set -g @resurrect-save 'S' +set -g @resurrect-restore 'R' + # fix pbcopy/pbpaste if 'command -v reattach-to-user-namespace >/dev/null' \ 'set -gq @osx-pasteboard true' @@ -115,6 +119,3 @@ set -g @plugin 'tmux-plugins/tmux-resurrect' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm' -set -g @resurrect-save 'S' -set -g @resurrect-restore 'R' - diff --git a/variables.bash b/variables.bash index 5726a7a..3987673 100755 --- a/variables.bash +++ b/variables.bash @@ -3,11 +3,15 @@ # This script will seriously nuke your home directory. You should really read # each of the scripts that will be executed in those process. -DOTFILES_PATH=$HOME/.dotfiles -REPOSITORY_PATH=$HOME/Documents/Repositories +DOTFILES_PATH="$HOME/.dotfiles" +REPOSITORY_PATH="$HOME/Documents/Repositories" WINDOW_GAP=20 BORDER_WIDTH=2 +source "$DOTFILES_PATH/scripts/get_x_fonts.sh" +source "$DOTFILES_PATH/scripts/get_color.sh" + +BAR_ON_XINIT=0 BAR_FIFO="$DOTFILES_PATH/wm_bar_fifo.lock" BAR_TOP=0 BAR_MARGIN=$WINDOW_GAP diff --git a/wm/extras/bar/formatter.bash b/wm/extras/bar/formatter.bash index da90512..f0a2a67 100755 --- a/wm/extras/bar/formatter.bash +++ b/wm/extras/bar/formatter.bash @@ -6,13 +6,6 @@ source "$DOTFILES_PATH/wm/extras/bar/colors.bash" export BAR_LOG="$PWD/bar.log" echo -e "BEGIN BAR LOG\n" > "$BAR_LOG" -ul="u" -if [ $BAR_UNDERLINE -eq 1 ]; then - : -else - ul="o" -fi - export MODULE_MATCH=() export MODULE_CALLBACK=() export MODULE_DATA=() diff --git a/wm/extras/bar/modules/date-bm.bash b/wm/extras/bar/modules/date-bm.bash new file mode 100644 index 0000000..26ff850 --- /dev/null +++ b/wm/extras/bar/modules/date-bm.bash @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +source "$DOTFILES_PATH/variables.bash" +source "$DOTFILES_PATH/wm/extras/bar/colors.bash" + +PRIORITY=3500 + +MATCH_PREFIX="BM_DATE" +MATCH="$MATCH_PREFIX*" + +bar_module_date() { + echo -e "%{T-}%{r}%{F$COLOR_S2}${1:7}%{F-}" +} + +export -f bar_module_date +register_bar_module "$PRIORITY" "$MATCH" "bar_module_date" + +bar_module_date_updater() { + while true; do + echo -e "$MATCH_PREFIX""$(date +"%a %b %d")" > $BAR_FIFO + sleep 1 + done +} +bar_module_date_updater & + diff --git a/x/xinitrc b/x/xinitrc index 1c50c52..67eea05 100644 --- a/x/xinitrc +++ b/x/xinitrc @@ -5,6 +5,7 @@ if [ -f ~/.fehbg ]; then fi source "$DOTFILES_PATH/x/xloadresources" +source "$DOTFILES_PATH/variables.bash" # keyrepeat settings xset r rate 300 80 & @@ -14,6 +15,11 @@ xset -dpms & xset s noblank & xset s off & +# start the bar if we want it +if [ "$BAR_ON_XINIT" -eq 1 ]; then + "$DOTFILES_PATH/wm/extras/bar/start.bash" & +fi + # fire up wm exec bspwm