Initial commit - bspwm, compton, panel, sxhkd, vim, x, zsh

This commit is contained in:
Alex Janka 2015-10-10 15:34:24 +11:00
commit 100e8b6b0a
18 changed files with 638 additions and 0 deletions

BIN
.Readme.md.swp Normal file

Binary file not shown.

BIN
.install.sh.swp Normal file

Binary file not shown.

10
Readme.md Normal file
View file

@ -0,0 +1,10 @@
## Requires
compton
lemonbar
pkgfile
zsh
vim
bspwm
sxhkd
yaourt (for install script)

29
bspwm/.config/bspwm/bspwmrc Executable file
View file

@ -0,0 +1,29 @@
#! /bin/sh
wmname LG3D
bspc config border_width 0
bspc config window_gap 12
bspc config split_ratio 0.5
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_by_distance true
bspc config top_padding 16
bspc config focus_follows_pointer true
bspc monitor DVI-I-1 -d I II III IV V
bspc monitor DVI-D-0 -d VI VII VIII IX X
bspc monitor DVI-I-1 -n ""
bspc monitor DVI-D-0 -n ""
bspc rule -a Gimp desktop=^8 follow=on floating=on
bspc rule -a Chromium desktop=^2
bspc rule -a mplayer2 floating=on
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off
export PANEL_FIFO="/tmp/panel-fifo"
panel

54
compton/.compton.conf Normal file
View file

@ -0,0 +1,54 @@
backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
vsync = "opengl-swc";
# These are important. The first one enables the opengl backend. The last one is the vsync method. Depending on the driver you might need to use a different method.
# The other options are smaller performance tweaks that work well in most cases.
# You can find the rest of the options here: https://github.com/chjj/compton/wiki/perf-guide, and here: https://github.com/chjj/compton/wiki/vsync-guide
# Shadow
shadow = true; # Enabled client-side shadows on windows.
#no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental).
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
shadow-exclude = [
"! name~=''",
"n:e:Notification",
"n:e:Plank",
"n:e:Docky",
"g:e:Synapse",
"g:e:Kupfer",
"g:e:Conky",
# "n:w:*Firefox*",
"n:w:*Chrome*",
"n:w:*Chromium*",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'"
];
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
# Fading
fading = true; # Fade windows during opacity changes.
fade-delta = 4; # The time between steps in a fade in milliseconds. (default 10).
fade-in-step = 0.08; # Opacity change between steps while fading in. (default 0.028).
fade-out-step = 0.08; # Opacity change between steps while fading out. (default 0.03).
#no-fading-openclose = true; # Fade windows in/out when opening/closing
detect-client-opacity = true; # This prevents opacity being ignored for some apps. For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
# Window type settings
wintypes:
{
tooltip = { fade = true; shadow = false; };
};

3
install.sh Normal file
View file

@ -0,0 +1,3 @@
sudo pacman -S pkgfile zsh vim
yaourt -S bspwm-git sxhkd-git compton-git lemonbar-git
pkgfile --update

22
panel/bspwm/panel/panel Executable file
View file

@ -0,0 +1,22 @@
#! /bin/sh
if [ $(pgrep -cx panel) -gt 1 ] ; then
printf "%s\n" "The panel is already running." >&2
exit 1
fi
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO"
bspc config top_padding $PANEL_HEIGHT
bspc control --subscribe > "$PANEL_FIFO" &
xtitle -sf 'T%s' > "$PANEL_FIFO" &
clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &
. panel_colors
cat "$PANEL_FIFO" | panel_bar | lemonbar -g x$PANEL_HEIGHT -f "" -F "$COLOR_FOREGROUND" -B "$COLOR_BACKGROUND" &
wait

74
panel/bspwm/panel/panel_bar Executable file
View file

@ -0,0 +1,74 @@
#! /bin/sh
#
# Example panel for LemonBoy's bar
. panel_colors
num_mon=$(bspc query -M | wc -l)
while read -r line ; do
case $line in
S*)
# clock output
sys_infos="%{F$COLOR_STATUS_FG}%{B$COLOR_STATUS_BG} ${line#?} %{B-}%{F-}"
;;
T*)
# xtitle output
title="%{F$COLOR_TITLE_FG}%{B$COLOR_TITLE_BG} ${line#?} %{B-}%{F-}"
;;
W*)
# bspwm internal state
wm_infos=""
IFS=':'
set -- ${line#?}
while [ $# -gt 0 ] ; do
item=$1
name=${item#?}
case $item in
#M*)
# active monitor
# if [ $num_mon -gt 1 ] ; then
# wm_infos="$wm_infos %{F$COLOR_ACTIVE_MONITOR_FG}%{B$COLOR_ACTIVE_MONITOR_BG} ${name} %{B-}%{F-} "
# fi
# ;;
#m*)
# inactive monitor
# if [ $num_mon -gt 1 ] ; then
# wm_infos="$wm_infos %{F$COLOR_INACTIVE_MONITOR_FG}%{B$COLOR_INACTIVE_MONITOR_BG} ${name} %{B-}%{F-} "
# fi
# ;;
O*)
# focused occupied desktop
wm_infos="${wm_infos}%{F$COLOR_FOCUSED_OCCUPIED_FG}%{B$COLOR_FOCUSED_OCCUPIED_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
;;
F*)
# focused free desktop
wm_infos="${wm_infos}%{F$COLOR_FOCUSED_FREE_FG}%{B$COLOR_FOCUSED_FREE_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
;;
U*)
# focused urgent desktop
wm_infos="${wm_infos}%{F$COLOR_FOCUSED_URGENT_FG}%{B$COLOR_FOCUSED_URGENT_BG}%{U$COLOR_FOREGROUND}%{+u} ${name} %{-u}%{B-}%{F-}"
;;
o*)
# occupied desktop
wm_infos="${wm_infos}%{F$COLOR_OCCUPIED_FG}%{B$COLOR_OCCUPIED_BG} ${name} %{B-}%{F-}"
;;
f*)
# free desktop
wm_infos="${wm_infos}%{F$COLOR_FREE_FG}%{B$COLOR_FREE_BG} ${name} %{B-}%{F-}"
;;
u*)
# urgent desktop
wm_infos="${wm_infos}%{F$COLOR_URGENT_FG}%{B$COLOR_URGENT_BG} ${name} %{B-}%{F-}"
;;
#L*)
# layout
# wm_infos="$wm_infos %{F$COLOR_LAYOUT_FG}%{B$COLOR_LAYOUT_BG} ${name} %{B-}%{F-}"
# ;;
esac
shift
done
;;
esac
printf "%s\n" "%{l}${wm_infos}%{c}${title}%{r}${sys_infos}"
done

View file

@ -0,0 +1,24 @@
COLOR_FOREGROUND='#FFA3A6AB'
COLOR_BACKGROUND='#FF34322E'
COLOR_ACTIVE_MONITOR_FG='#FF34322E'
COLOR_ACTIVE_MONITOR_BG='#FF58C5F1'
COLOR_INACTIVE_MONITOR_FG='#FF58C5F1'
COLOR_INACTIVE_MONITOR_BG='#FF34322E'
COLOR_FOCUSED_OCCUPIED_FG='#FFF6F9FF'
COLOR_FOCUSED_OCCUPIED_BG='#FF5C5955'
COLOR_FOCUSED_FREE_FG='#FFF6F9FF'
COLOR_FOCUSED_FREE_BG='#FF6D561C'
COLOR_FOCUSED_URGENT_FG='#FF34322E'
COLOR_FOCUSED_URGENT_BG='#FFF9A299'
COLOR_OCCUPIED_FG='#FFA3A6AB'
COLOR_OCCUPIED_BG='#FF34322E'
COLOR_FREE_FG='#FF6F7277'
COLOR_FREE_BG='#FF34322E'
COLOR_URGENT_FG='#FFF9A299'
COLOR_URGENT_BG='#FF34322E'
COLOR_LAYOUT_FG='#FFA3A6AB'
COLOR_LAYOUT_BG='#FF34322E'
COLOR_TITLE_FG='#FFA3A6AB'
COLOR_TITLE_BG='#FF34322E'
COLOR_STATUS_FG='#FFA3A6AB'
COLOR_STATUS_BG='#FF34322E'

104
sxhkd/.config/sxhkd/sxhkdrc Normal file
View file

@ -0,0 +1,104 @@
#
# bspwm hotkeys
#
super + alt + Escape
bspc quit
super + w
bspc window -c
super + t
bspc desktop -l next
super + b
bspc desktop -B
super + {s,f}
bspc window -t {floating,fullscreen}
super + {grave,Tab}
bspc {window,desktop} -f last
super + apostrophe
bspc window -s last
super + {o,i}
bspc control --record-history off; \
bspc window {older,newer} -f; \
bspc control --record-history on
super + y
bspc window -w last.manual
super + m
bspc window -s biggest
super + {_,shift + }{h,j,k,l}
bspc window -{f,s} {left,down,up,right}
super + {_,shift + }c
bspc window -f {next,prev}
super + {comma,period}
bspc desktop -C {backward,forward}
super + bracket{left,right}
bspc desktop -f {prev,next}
super + ctrl + {h,j,k,l}
bspc window -p {left,down,up,right}
super + ctrl + {_,shift + }space
bspc {window -p cancel,desktop -c}
super + alt + {h,j,k,l}
bspc window -e {left -10,down +10,up -10,right +10}
super + alt + shift + {h,j,k,l}
bspc window -e {right -10,up +10,down -10,left +10}
super + ctrl + {1-9}
bspc window -r 0.{1-9}
super + {_,shift + }{1-9,0}
bspc {desktop -f,window -d} ^{1-9,10}
~button1
bspc pointer -g focus
super + button{1-3}
; bspc pointer -g {move,resize_side,resize_corner}
super + @button{1-3}
bspc pointer -u
#
# wm independent hotkeys
#
super + Return
urxvt
super + space
dmenu_run
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
# media keys
XF86AudioPlay
/home/alex/bspwm/spotifykeys.sh play
XF86AudioNext
/home/alex/bspwm/spotifykeys.sh next
XF86AudioPrev
/home/alex/bspwm/spotifykeys.sh prev
# misc
super + e
thunar

3
vim/.vim/.netrwhist Normal file
View file

@ -0,0 +1,3 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =1
let g:netrw_dirhist_1='/home/alex/.config/bspwm'

@ -0,0 +1 @@
Subproject commit cfd3b2d388a8c2e9903d7a9d80a65539aabfe933

@ -0,0 +1 @@
Subproject commit 78566c37aeb3b7609eee84a7b10114a0f512830e

42
vim/.vimrc Normal file
View file

@ -0,0 +1,42 @@
set nocompatible " be iMproved, required
filetype off " required
set autoread
set wildmenu
set wildignore=*.o,*~,*.pyc
set ruler
syntax enable
colorscheme desert
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'bling/vim-airline'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
set laststatus=2
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
set hidden

166
x/.Xresources Normal file
View file

@ -0,0 +1,166 @@
URxvt.tabbed.autohide: true
URxvt.keysym.Control-t: perl:tabbedex:new_tab
URxvt.keysym.Control-Tab: perl:tabbedex:next_tab
URxvt.keysym.Control-Shift-Tab: perl:tabbedex:prev_tab
! URxvt*rxvt-unicode (urxvt) v9.21 - released: 2014-12-31
! URxvt*options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent,tint,XIM,frills,selectionscrolling,wheel,slipwheel,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm
! URxvt*Usage: urxvt [options] [-e command args]
! URxvt*termName: string
! URxvt*geometry: geometry
! URxvt*chdir: string
! URxvt*reverseVideo: boolean
! URxvt*loginShell: boolean
! URxvt*multiClickTime: number
! URxvt*jumpScroll: boolean
! URxvt*skipScroll: boolean
! URxvt*pastableTabs: boolean
! URxvt*scrollstyle: plain
URxvt*scrollBar: false
! URxvt*scrollBar_right: boolean
! URxvt*scrollBar_floating: boolean
! URxvt*scrollBar_align: mode
! URxvt*thickness: number
! URxvt*scrollTtyOutput: boolean
! URxvt*scrollTtyKeypress: boolean
! URxvt*scrollWithBuffer: boolean
! URxvt*inheritPixmap: boolean
URxvt*transparent: false
! URxvt*tintColor: color
! URxvt*shading: number
! URxvt*blurRadius: HxV
! URxvt*fading: number
! URxvt*fadeColor: color
! URxvt*utmpInhibit: boolean
! URxvt*urgentOnBell: boolean
! URxvt*visualBell: boolean
! URxvt*mapAlert: boolean
! URxvt*meta8: boolean
! URxvt*mouseWheelScrollPage: boolean
! URxvt*tripleclickwords: boolean
! URxvt*insecure: boolean
! URxvt*cursorUnderline: boolean
! URxvt*cursorBlink: boolean
! URxvt*pointerBlank: boolean
URxvt*background: #3e3e3e
URxvt*foreground: #f2f2f2
! URxvt*foreground: #fffbe2
! Normal
! color0 black
! color1 red
! color2 green
! color3 yellow
! color4 blue
! color5 purple
! color6 cyan
! color7 white
URxvt*color0: #6c6c6c
URxvt*color1: #f02d5e
URxvt*color2: #26c97f
URxvt*color3: #ffc730
URxvt*color4: #b9f42e
URxvt*color5: #ee0054
URxvt*color6: #00d383
URxvt*color7: #f2f2f2
! Light
! color8 black
! color9 red(red-pink)
! color10 green(blue-green)
! color11 yellow
! color12 blue(green)
! color13 purple(pink)
! color14 cyan(green)
! color15 white
URxvt*color8: #6c6c6c
URxvt*color9: #f3003d
URxvt*color10: #00d574
URxvt*color11: #ffba00
URxvt*color12: #adf700
URxvt*color13: #ee0054
URxvt*color14: #00d383
URxvt*color15: #f2f2f2
! URxvt*colorBD: white
! URxvt*colorIT: white
! URxvt*colorUL: color
! URxvt*colorRV: color
! URxvt*underlineColor: white
! URxvt*scrollColor: color
! URxvt*troughColor: color
URxvt*highlightColor: #202020
URxvt*highlightTextColor: #383838
URxvt*cursorColor: #202020
! URxvt*cursorColor2: color
! URxvt*pointerColor: color
! URxvt*pointerColor2: color
! URxvt*borderColor: color
! URxvt*iconFile: file
URxvt*font: xft:Inconsolata for Powerline:size=10:antialias=true:hinting=true
! URxvt*boldFont: fontname
! URxvt*italicFont: fontname
! URxvt*boldItalicFont: fontname
! URxvt*intensityStyles: boolean
! URxvt*inputMethod: name
! URxvt*preeditType: style
! URxvt*imLocale: string
! URxvt*imFont: fontname
! URxvt*title: string
! URxvt*iconName: string
! URxvt*saveLines: number
! URxvt*buffered: boolean
URxvt*depth: 32
! URxvt*visual: number
! URxvt*transient-for: windowid
! URxvt*override-redirect: boolean
! URxvt*hold: boolean
! URxvt*externalBorder: number
! URxvt*internalBorder: number
! URxvt*borderLess: boolean
! URxvt*lineSpace: number
URxvt*letterSpace: -1
! URxvt*skipBuiltinGlyphs: boolean
! URxvt*pointerBlankDelay: number
! URxvt*backspacekey: string
! URxvt*deletekey: string
! URxvt*print-pipe: string
! URxvt*modifier: modifier
! URxvt*cutchars: string
! URxvt*answerbackString: string
! URxvt*secondaryScreen: boolean
! URxvt*secondaryScroll: boolean
! URxvt*perl-lib: string
! URxvt*perl-eval: perl-eval
URxvt*perl-ext-common: tabbedex
! URxvt*perl-ext: string
! URxvt*iso14755: boolean
! URxvt*iso14755_52: boolean
! URxvt*xrm: string
! URxvt*keysym.sym: keysym
! URxvt*background.border: boolean
! URxvt*background.expr: string
! URxvt*background.interval: seconds
! URxvt*bell-command: string
! URxvt*kuake.hotkey: string
! URxvt*matcher.button: string
! URxvt*matcher.launcher: string
! URxvt*matcher.launcher.*: string
! URxvt*matcher.pattern.*: string
! URxvt*matcher.rend.*: string
! URxvt*remote-clipboard.fetch: string
! URxvt*remote-clipboard.store: string
! URxvt*searchable-scrollback: string
! URxvt*selection-autotransform.*: string
! URxvt*selection-pastebin.cmd: string
! URxvt*selection-pastebin.url: string
! URxvt*selection.pattern-0: string
! URxvt*tab-bg: colour
! URxvt*tab-fg: colour
! URxvt*tabbar-bg: colour
! URxvt*tabbar-fg: colour
! URxvt*url-launcher: lynx

13
x/.xinitrc Normal file
View file

@ -0,0 +1,13 @@
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?* ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
xrdb -merge ~/.Xresources
sh ~/.fehbg &
compton -b &
sxhkd &
exec bspwm

1
zsh/.oh-my-zsh Submodule

@ -0,0 +1 @@
Subproject commit 9c08641d7c2aae0c82fa5ad91f94c67b70115ba5

91
zsh/.zshrc Normal file
View file

@ -0,0 +1,91 @@
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="eastwood"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
# User configuration
export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/alex/bspwm/panel"
# export MANPATH="/usr/local/man:$MANPATH"
source $ZSH/oh-my-zsh.sh
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
#
#POWERLINE_RIGHT_B="none"
#
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/doc/pkgfile/command-not-found.zsh
alias tree="tree -C"