diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc new file mode 100755 index 0000000..d6f7964 --- /dev/null +++ b/.config/bspwm/bspwmrc @@ -0,0 +1,21 @@ +#! /bin/sh + +sxhkd & + +bspc monitor -d I II III IV V VI VII VIII IX + +bspc config border_width 2 +bspc config window_gap 12 +bspc config bottom_padding 30 + +bspc config split_ratio 0.52 +bspc config borderless_monocle true +bspc config gapless_monocle true + +bspc rule -a Gimp desktop='^8' state=floating follow=on +bspc rule -a Chromium desktop='^2' +bspc rule -a mplayer2 state=floating +bspc rule -a Kupfer.py focus=on +bspc rule -a Screenkey manage=off +bspc rule -a Cerebro state=floating focus=on +bspc rule -a Emacs state=tiled diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc new file mode 100644 index 0000000..0197fbf --- /dev/null +++ b/.config/sxhkd/sxhkdrc @@ -0,0 +1,14 @@ +{alt,shift + alt} + {j,k} + bspc node {-f,-n} {next,prev} +alt + Return + bspc node -n biggest +shift + alt + Return + xfce4-terminal +{shift + ctrl,shift + alt + ctrl} + space + state={fullscreen,floating}; \ + bspc query -N -n "focused.$\{state\}" && state=tiled; \ + bspc node -t "$state" +{alt,shift + alt} + {w,e} + bspc monitor {-f,-m} {west,east} +{alt,shift + alt} + {1-9} + bspc {desktop -f,node -d} ^{1-9} diff --git a/recipes/_link b/recipes/_link index a14afbd..d58e6f5 100644 --- a/recipes/_link +++ b/recipes/_link @@ -5,7 +5,8 @@ _link() { source=$1 target=$2 if [ ! -e $target ]; then - _run "[link] Install $target" ln -s $source $target + _run "[link] Install $target" mkdir -p $(dirname $target) \ + && ln -s $source $target else echo "[link] $target already installed, skipping." fi diff --git a/recipes/bspwm b/recipes/bspwm new file mode 100644 index 0000000..ffeed22 --- /dev/null +++ b/recipes/bspwm @@ -0,0 +1,50 @@ +#!/bin/bash +# Description: Tiling window manager for Linux +# +# Info on using bspwm with xfce: +# https://github.com/bgdawes/bspwm-xfce-dotfiles/wiki +set -e + +_recipe git +_recipe _link + +_deps=( + xcb + libxcb-util0-dev + libxcb-ewmh-dev + libxcb-randr0-dev + libxcb-icccm4-dev + libxcb-keysyms1-dev + libxcb-xinerama0-dev + libasound2-dev + gcc + make + libxcb-xtest0-dev + libxft-dev + libx11-xcb-dev + compton +) + +for dep in ${_deps[@]}; do + _apt $dep +done + +if [ ! -x /usr/local/bin/bspwm ]; then + _git git@github.com:baskerville/bspwm.git $HOME/.bspwm + _run "[make] bspwm" make -C $HOME/.bspwm + _run "[make install] bspwm" sudo make -C $HOME/.bspwm install +else + echo "[make install] bspwm is already installed, skipping." +fi +if [ ! -x /usr/local/bin/sxhkd ]; then + _git git@github.com:baskerville/sxhkd.git $HOME/.sxhkd + _run "[make] sxhkd" make -C $HOME/.sxhkd + _run "[make install] sxhkd" sudo make -C $HOME/.sxhkd install +else + echo "[make install] sxhkd is already installed, skipping." +fi + +_link ${HOME}/dotfiles/.config/bspwm/bspwmrc \ + ${HOME}/.config/bspwm/bspwmrc +_link ${HOME}/dotfiles/.config/sxhkd/sxhkdrc \ + ${HOME}/.config/sxhkd/sxhkdrc