more work on bar stuff, added date module to bar
This commit is contained in:
parent
6ac712e06e
commit
b28560c788
7 changed files with 51 additions and 12 deletions
0
arch_linux_init/gmusic.bash
Normal file → Executable file
0
arch_linux_init/gmusic.bash
Normal file → Executable file
|
@ -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"
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=()
|
||||
|
|
25
wm/extras/bar/modules/date-bm.bash
Normal file
25
wm/extras/bar/modules/date-bm.bash
Normal file
|
@ -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 &
|
||||
|
|
@ -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
|
||||
|
||||
|
|
Reference in a new issue