updated config files

This commit is contained in:
2017-03-24 21:49:22 +02:00
parent 7ccf62193e
commit 93d063bbbf
7 changed files with 153 additions and 163 deletions

View File

@@ -1,49 +1,48 @@
! Xresources file
!urxvt*depth: 32
!urxvt*background: [80]#000000
urxvt.background: #000000
urxvt.foreground: #DEDEDE
urxvt.scrollBar: false
urxvt.geometry: 90x30
!urxvt.font: xft:Menlo for Powerline:size=10
urxvt.font: -misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1
!urxvt.letterSpace: -1
urxvt.colorMode: on
urxvt.cursorBlink: true
urxvt.cursorUnderline: false
urxvt.buffered: true
urxvt.borderless: true
urxvt.urlLauncher: /usr/bin/chromium
urxvt.underlineURLs: false
!URxvt.depth: 32
!URxvt*background: [80]#000000
URxvt.background: #000000
URxvt.foreground: #DEDEDE
URxvt.scrollBar: false
URxvt.geometry: 90x30
!URxvt.font: xft:Menlo for Powerline:size=10
URxvt.font: -misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1
!URxvt.letterSpace: -1
URxvt.colorMode: on
URxvt.cursorBlink: true
URxvt.cursorUnderline: false
URxvt.buffered: true
URxvt.borderless: true
URxvt.urlLauncher: /usr/bin/opera
URxvt.underlineURLs: false
!Xft.dpi: 96
!Xft.autohint: false
!Xft.hinting: true
!Xft.hintstyle: hintfull
!Xft.antialias: true
!Xft.rgba: rgb
!Xft.lcdfilter: lcddefault
Xft.antialias: true
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
! black
urxvt.color0 : #2E3436
urxvt.color8 : #555753
*color0 : #2E3436
*color8 : #555753
! red
urxvt.color1 : #CC0000
urxvt.color9 : #EF2929
*color1 : #CC0000
*color9 : #EF2929
! green
urxvt.color2 : #4E9A06
urxvt.color10 : #8AE234
*color2 : #4E9A06
*color10 : #8AE234
! yellow
urxvt.color3 : #C4A000
urxvt.color11 : #FCE94F
*color3 : #C4A000
*color11 : #FCE94F
! blue
urxvt.color4 : #3465A4
urxvt.color12 : #729FCF
*color4 : #3465A4
*color12 : #729FCF
! magenta
urxvt.color5 : #75507B
urxvt.color13 : #AD7FA8
*color5 : #75507B
*color13 : #AD7FA8
! cyan
urxvt.color6 : #06989A
urxvt.color14 : #34E2E2
*color6 : #06989A
*color14 : #34E2E2
! white
urxvt.color7 : #D3D7CF
urxvt.color15 : #EEEEEC
*color7 : #D3D7CF
*color15 : #EEEEEC

View File

@@ -1,4 +1,4 @@
#! /bin/sh
#! /usr/bin/bash
# bspwm config
bspc config border_width 2
@@ -7,20 +7,33 @@ bspc config window_gap 4
bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_by_distance true
bspc config ignore_ewmh_focus true
bspc config auto_cancel true
bspc config click_to_focus true
# color
bspc config focused_border_color "#517ba2"
bspc config presel_feedback_color "#517ba2"
# desktops
bspc monitor DVI-I-1 -d web games
bspc monitor HDMI-0 -d term misc
monitors=$(bspc query -M)
array=(${monitors})
if [ ${#array[@]} -eq 2 ]; then
bspc monitor ${array[0]} -d web games
bspc monitor ${array[1]} -d term misc
else
bspc monitor -d term web games misc
fi
# application rules
bspc rule -a chromium desktop=web
bspc rule -a Steam follow=off border=off desktop=games
bspc rule -a Opera desktop=web
bspc rule -a Steam follow=off state=floating desktop=games
bspc rule -a Galculator state=floating
bspc rule -a RocketLeague border=off
bspc rule -a Nvidia-settings state=floating
bspc rule -a obs state=floating
bspc rule -a Pavucontrol state=floating
bspc rule -a "TeamSpeak 3" state=floating
# hotkey daemon
sxhkd &

View File

@@ -11,11 +11,13 @@ conky.config = {
conky.text = [[
S\
%{c}%{F\#ff3d3d3d}%{B\#ff3d3d3d}%{F\#ffffffff} ${time %a %b %d, %T}%{B-}%{F\#ff3d3d3d} \
%{r} \
%{c}\
%{F\#ff517ba2}%{B-}%{F\#ffffffff}%{B\#ff517ba2} ${upspeedf br0}K \
%{F\#ff3d3d3d}%{B\#ff517ba2}%{F\#ffffffff}%{B\#ff3d3d3d} ${downspeedf br0}K \
%{F\#ff517ba2}%{B\#ff3d3d3d}%{F\#ffffffff}%{B\#ff517ba2} ${platform coretemp.0/hwmon/hwmon1 temp 1}° \
%{F\#ff3d3d3d}%{B\#ff517ba2}%{F\#ffffffff}%{B\#ff3d3d3d} ${cpu cpu0}% \
%{F\#ff517ba2}%{B\#ff3d3d3d}%{F\#ffffffff}%{B\#ff517ba2} ${mem} %{B-}\
%{F\#ff517ba2}%{B\#ff3d3d3d}%{F\#ffffffff}%{B\#ff517ba2} ${hwmon 0 temp 1}°%{B\#ff3d3d3d}\
%{F\#ff517ba2}%{B\#ff3d3d3d} %{F\#ffffffff}%{B\#ff3d3d3d} ${cpu cpu0}%\
%{F\#ff3d3d3d}%{B\#ff517ba2} %{F\#ffffffff}%{B\#ff517ba2} ${mem}%{B-}%{F\#ff517ba2}\
%{r}\
%{F\#ff517ba2}%{B-}%{F\#ffffffff}%{B\#ff517ba2} ${texeci 60 mosquitto_sub -C 1 -t "study/sensor/temperature"}° \
%{F\#ff3d3d3d}%{B\#ff3d3d3d}%{F\#ffffffff} ${time %a %b %d, %T} %{B-}%{F\#ff3d3d3d}\
]]

View File

@@ -1,126 +1,95 @@
#!/usr/bin/sh
PANEL_FIFO="/tmp/panel-fifo"
num_mon=$(bspc query -M | wc -l)
#! /usr/bin/bash
PANEL_FIFO=/tmp/panel-fifo
PANEL_HEIGHT=16
FONT="-misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1"
PANEL_FONT="-misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1"
PANEL_WM_NAME=bspwm_panel
FG='#FFFFFFFF'
BG='#FF000000'
GREY='#ff3d3d3d'
BLUE='#ff517ba2'
COLOR_BLACK="#000000"
COLOR_GREY1="#d6d3d2"
COLOR_GREY2="#a7a5a5"
COLOR_GREY3="#504e4e"
BGSWAP=1
wm_info_array='array'
if [ $(pgrep -cx panel) -gt 1 ] ; then
killall panel
killall conky
if xdo id -a "$PANEL_WM_NAME" > /dev/null ; 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" &
num_mon=$(bspc query -M | wc -l)
conky -c ~/.config/bspwm/conky.conf > "$PANEL_FIFO" &
bspc config top_padding $PANEL_HEIGHT
bspc subscribe report > "$PANEL_FIFO" &
while read -r line ; do
case $line in
S*)
# conky output
sys_infos="${line#?}"
;;
S*)
# conky output
sys="${line#?}"
;;
W*)
# bspwm internal state
wm_infos=""
cur_mon=-1
# bspwm's state
wm=""
IFS=':'
mon=0
set -- ${line#?}
while [ $# -gt 0 ] ; do
item=$1
name=${item#?}
case $item in
M*)
# active monitor
cur_mon=$((cur_mon + 1))
wm_infos=""
;;
m*)
# inactive monitor
cur_mon=$((cur_mon + 1))
wm_infos=""
;;
O*)
# focused occupied desktop
if [ $BGSWAP -eq 1 ]; then
wm_infos="$wm_infos%{F$FG}%{B$BLUE} %{+u}${name}%{-u}%{F$BLUE}%{B$GREY}"
BGSWAP=2
else
wm_infos="$wm_infos%{F$FG}%{B$GREY} %{+u}${name}%{-u}%{F$GREY}%{B$BLUE}"
BGSWAP=1
[mM]*)
if [ $num_mon -ge 2 ]; then
mon=$((mon+1))
if [ $mon -gt 1 ]; then
wm="${wm}%{F${COLOR_GREY2}}%{B${COLOR_BLACK}};"
fi
fi
;;
F*)
# focused free desktop
if [ $BGSWAP -eq 1 ]; then
wm_infos="$wm_infos%{F$FG}%{B$BLUE} %{+u}${name}%{-u}%{F$BLUE}%{B$GREY}"
BGSWAP=2
else
wm_infos="$wm_infos%{F$FG}%{B$GREY} %{+u}${name}%{-u}%{F$GREY}%{B$BLUE}"
BGSWAP=1
fi
;;
U*)
# focused urgent desktop
wm_infos="$wm_infos%{F$FG} %{B$BG}%{U$FG}%{+u}${name}%{-u}"
;;
o*)
# occupied desktop
if [ $BGSWAP -eq 1 ]; then
wm_infos="$wm_infos%{B$BLUE}%{F$FG} ${name}%{B$GREY}%{F$BLUE}"
BGSWAP=2
else
wm_infos="$wm_infos%{B$GREY} %{F$FG}%{B$GREY}${name}%{B$BLUE}%{F$GREY}"
BGSWAP=1
fi
;;
f*)
# free desktop
if [ $BGSWAP -eq 1 ]; then
wm_infos="$wm_infos%{B$BLUE}%{F$FG} ${name}%{B$GREY}%{F$BLUE}"
BGSWAP=2
else
wm_infos="$wm_infos%{B$GREY} %{F$FG}%{B$GREY}${name}%{B$BLUE}%{F$GREY}"
BGSWAP=1
fi
;;
u*)
# urgent desktop
wm_infos="$wm_infos %{F$FG}%{B$BG}${name}"
;;
L*)
# layout
layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/')
wm_infos="$wm_infos%{B$BLUE} %{F$FG}$layout %{B$BG}%{F$BLUE}%{B-}"
[fFoOuU]*)
case $item in
f*)
# free desktop
FG=$COLOR_GREY2
BG=$COLOR_BLACK
;;
F*)
# focused free desktop
FG=$COLOR_GREY1
BG=$COLOR_GREY3
;;
o*)
# occupied desktop
FG=$COLOR_GREY2
BG=$COLOR_BLACK
;;
O*)
# focused occupied desktop
FG=$COLOR_GREY1
BG=$COLOR_GREY3
;;
esac
wm="${wm}%{F${COLOR_GREY2}}%{B${BG}}%{F${FG}}%{A:bspc desktop -f ${name}:} ${name}%{A}%{F${BG}}%{B${COLOR_GREY2}}"
;;
esac
shift
eval ${wm_info_array}${cur_mon}="'$wm_infos'"
done
;;
esac
if [ $num_mon -eq 2 ]; then
mon1=0
mon2=1
while IFS=';' read -ra array; do
bar=""
for item in "${!array[@]}"; do
bar=${bar}"%{l}${array[${item}]}"
if [ ${item} -lt $((${#array[@]} - 1)) ]; then
bar=${bar}"${sys}%{S+}"
fi
done
done <<< ${wm}
wm_info_mon1=$(echo $(eval echo \$$wm_info_array${mon1}))
wm_info_mon2=$(echo $(eval echo \$$wm_info_array${mon2}))
printf "%s\n" "${bar}%{F${COLOR_GREY2}}%{B${COLOR_BLACK}}${sys}"
bar_info="%{l}${wm_info_mon1} $sys_infos%{S+}%{l}${wm_info_mon2} $sys_infos"
fi
printf "%s\n" "$bar_info"
done < "$PANEL_FIFO" | lemonbar -f $FONT -g x$PANEL_HEIGHT -F "$FG" -B "$BG"
done < "$PANEL_FIFO" | lemonbar -a 10 -n "$PANEL_WM_NAME" -g x$PANEL_HEIGHT -f "$PANEL_FONT" -F "$COLOR_GREY2" -B "$COLOR_BLACK" | /usr/bin/dash

View File

@@ -58,20 +58,6 @@ super + shift + {h,j,k,l}
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} ^{1-9,10}
# focus window on left click
~button1
bspc pointer -g focus
# resize window
super + button{1-3}
bspc pointer -g {move,resize_side,resize_corner}
super + !button{1-3}
bspc pointer -t %i %i
super + @button{1-3}
bspc pointer -u
########################
# wm independent hotkeys
########################
@@ -102,7 +88,7 @@ alt + BackSpace
# web browser
alt + shift + b
chromium
opera
# steam
alt + shift + x
@@ -116,6 +102,10 @@ ctrl + super + l
ctrl + super + m
blankmonitor
# put rocket legue over both monitors
alt + c
xdotool search --name "Rocket League" windowactivate windowmove 0 0
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd

6
.vimrc
View File

@@ -23,6 +23,7 @@ Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/nerdcommenter'
Plugin 'nanotech/jellybeans.vim'
Plugin 'reedes/vim-colors-pencil'
Plugin 'rakr/vim-one'
call vundle#end()
" set color scheme
@@ -36,6 +37,9 @@ set hidden
filetype plugin indent on
syntax on
"colorscheme one
"set background=dark
" spell checking
imap <F5> <C-o>:setlocal spell! spelllang=en_us<CR>
autocmd FileType mail set spell spelllang=en_us
@@ -106,7 +110,7 @@ autocmd FileType python set colorcolumn=80
command Hardcopy call Hardcopy()
function! Hardcopy()
let colors_save = g:colors_name
colorscheme default
colorscheme pencil
hardcopy
execute 'colorscheme' colors_save
endfun

View File

@@ -6,12 +6,16 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then
unset f
fi
# Export variables
export EDITOR=vim
export BROWSER=opera
# Start the gpg-agent if not already running
if ! pgrep -x -u "${USER}" gpg-agent &> /dev/null; then
eval $(gpg-agent --homedir "${HOME}/.gnupg" --daemon)
fi
# Merge custom X resources
# Merge X resources
xrdb -merge ~/.Xresources
# Disable monitor blanking
@@ -20,9 +24,6 @@ xset s off -dpms
# Set cursor to expected left-pointer
xsetroot -cursor_name left_ptr
# Lock screen after 5 minutes
#xautolock -locker lock -time 10 &
# Restore wallpaper
nitrogen --restore
@@ -31,3 +32,15 @@ unclutter &
# Run urxvt daemon
urxvtd -q -o -f
# Start mpd
mpd
# Run notification daemon
dunst &
# Automount usb disks
#udiskie -2 &
# Run compositor
#compton &