bar stuff in place

This commit is contained in:
Daniel Flanagan 2016-01-07 02:16:53 -06:00
parent 39d8abefa4
commit b3ec39a6ba
7 changed files with 99 additions and 15 deletions

14
arch_linux_init/bar.bash Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
mkdir -p "$REPOSITORY_PATH"
git clone https://github.com/LemonBoy/bar.git "$REPOSITORY_PATH/lemonbar"
cd "$REPOSITORY_PATH/lemonbar"
make
sudo make install
cd -

View File

@ -3,13 +3,19 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash"
sudo pacman -S xcb-util xcb-util-keysyms xcb-util-wm feh --noconfirm
sudo pacman -S xcb-util xcb-util-keysyms xcb-util-wm xorg-xrandr xdotool feh --noconfirm
mkdir -p "$REPOSITORY_PATH"
git clone https://github.com/baskerville/bspwm.git "$REPOSITORY_PATH/bspwm"
git clone https://github.com/baskerville/xdo.git "$REPOSITORY_PATH/xdo"
git clone https://github.com/baskerville/sxhkd.git "$REPOSITORY_PATH/sxhkd"
cd "$REPOSITORY_PATH/xdo"
make
sudo make install
cd -
cd "$REPOSITORY_PATH/bspwm"
make
sudo make install

10
bar_variables.bash Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
source "variables.bash"
BAR_FIFO="$DOTFILES_PATH/wm_bar_fifo.lock"
BAR_TOP=1
BAR_MARGIN=$WINDOW_GAP
BAR_HEIGHT=30

View File

@ -8,6 +8,11 @@ REPOSITORY_PATH=$HOME/Documents/Repositories
WINDOW_GAP=20
BORDER_WIDTH=2
BAR_FIFO="$DOTFILES_PATH/wm_bar_fifo.lock"
BAR_TOP=1
BAR_MARGIN=$WINDOW_GAP
BAR_HEIGHT=30
# load per-device bashrc_env if it exists
if [ -a "$HOME/.bashrc_env" ]; then
. "$HOME/.bashrc_env"

View File

@ -6,6 +6,8 @@ source "$DOTFILES_PATH/wm/bspwm_config"
source "$DOTFILES_PATH/scripts/get_color.sh"
source "$DOTFILES_PATH/scripts/get_x_fonts.sh"
bspc wm -o
urxvtd &
sxhkd &

33
wm/extras/bar/start.bash Executable file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash"
trap killbar INT TERM QUIT EXIT
function killbar() {
if [ $BAR_TOP -eq 1 ]; then
bspc config -m $(bspc query -M | head -n 1) top_padding "0"
else
bspc config -m $(bspc query -M | head -n 1) bottom_padding "0"
fi
}
if [ $BAR_TOP -eq 1 ]; then
bspc config -m $(bspc query -M | head -n 1) top_padding "$BAR_HEIGHT"
else
bspc config -m $(bspc query -M | head -n 1) bottom_padding "$BAR_HEIGHT"
fi
# get width of our main monitor
WIDTH=`xrandr -q | egrep '(^| )connected( |$)' | tr 'x' '\n' | head -n 1 | awk '{print $NF}'`
WIDTH=$((WIDTH-BAR_MARGIN-BAR_MARGIN))
HEIGHT=`xrandr -q | egrep '(^| )connected( |$)' | tr '+' '\n' | tr 'x' '\n' | head -n 2 | tail -n 1`
POS_Y=0
if [ $BAR_TOP -eq 1 ]; then
:
else
POS_Y=$((HEIGHT-BAR_HEIGHT))
fi
lemonbar -g "$WIDTH"x"$BAR_HEIGHT"+"$BAR_MARGIN"+"$POS_Y"

View File

@ -4,18 +4,23 @@
super + ctrl + Escape
bspc quit
# kill the current application
# close the current application
super + c
bspc node -c
# balance node surface area on current desktop
super + b
bspc node -B
# kill the current application
super + shift + c
bspc node -k
# toggle floating/fullscreen modes for current node
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# set modes to tiled/floating for current node
super + {s,f}
bspc node -t {tiled,floating}
# set modes to pseudo_tiled/fullscreen for current node
super + shift + {s,f}
bspc node -t {pseudo_tiled,fullscreen}
@ -39,13 +44,6 @@ super + {_,shift + }{h,j,k,l}
super + bracket{left,right}
bspc desktop -f {prev,next}
super + {p,n}
bspc desktop -f {prev,next}
# rotate node placement on current desktop
super + r
bspc node -R 90
# preselect the splitting area for the current node
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
@ -56,16 +54,24 @@ super + ctrl + {_,shift + }space
# expand the current node
super + alt + {h,j,k,l}
bspc node -e {left -10,down +10,up -10,right +10}
bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10}
# shrink the current node
super + alt + shift + {h,j,k,l}
bspc node -e {right -10,up +10,down -10,left +10}
bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10}
# set node split ratio
super + ctrl + {1-9,0}
bspc node -r 0.{1-9,10}
# move a floating window very slowly
super + shift + {Left,Down,Up,Right}
xdo move {-x -1,-y +1,-y -1,-x +1}
# move a floating window
super + {Left,Down,Up,Right}
xdo move {-x -20,-y +20,-y -20,-x +20}
# focus/move node to the selected desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} ^{1-9,10}
@ -115,6 +121,14 @@ super + alt + minus
super + alt + t
urxvtc && compton-trans -c -o 0
# rotate the current node
super + r
bspc node -R 90
# balance the current node
super + shift + b
bspc node -B
# make current node transparent
super + t
compton-trans -c -o 0