Skip to content

Commit

Permalink
more tweaks, latest incarnation of bspwm (quite different)
Browse files Browse the repository at this point in the history
  • Loading branch information
insanum committed Jun 29, 2016
1 parent b73bad4 commit dfe1fba
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 142 deletions.
58 changes: 2 additions & 56 deletions bashrc
Expand Up @@ -59,8 +59,7 @@ export DVT=swdvt.lab.irv.broadcom.com

exists vim && export P4EDITOR=vim

#export PACMAN=pacman-color
exists yaourt && alias pacman="HTTPS_PROXY=socks5://127.0.0.1:9999 yaourt"
exists pacaur && alias pacman="pacaur"

alias ipv6="sudo tcpdump -i eth1 -s 0 -XX -vvv ip6"
#alias xrootevo="qiv -o black -x $HOME/pics/evo_chevy.jpg"
Expand All @@ -75,6 +74,7 @@ alias vncstart="$HOME/.vnc/vncstart"
alias vnckill="$HOME/.vnc/vnckill"
alias ldap="$HOME/.mutt/ldap"
alias socks='ssh -ND 9999 edavis@insanum.com'
alias brcm_tun='ssh -N -D 9999 -L 7777:ltirv-edavis1:3389 edavis@192.168.168.3'
alias hgs='hg status | grep -v "? "'
alias httpdir='python -m SimpleHTTPServer'
alias gn='tsocks geeknote'
Expand Down Expand Up @@ -651,60 +651,6 @@ function reportimgs()
}


function wow()
{
#killall xcompmgr
#killall cairo-compmgr
#sleep 2

WOW=$HOME/.wine/drive_c/Program\ Files/World\ of\ Warcraft
D3=$HOME/.wine/drive_c/Program\ Files/Diablo\ III
HS=$HOME/.wine/drive_c/Program\ Files\ \(x86\)/Hearthstone

# start capture: 'dmenu fraps'
# stop capture: 'dmenu kfraps'

if [[ $1 = d3d ]]; then
echo "Wine (d3d) Wow.exe..."
cd "$WOW"
#WINEARCH=win32 wine Wow.exe
wine Wow-64.exe -d3d
cd -
elif [[ $1 = opengl ]]; then
echo "Wine (opengl) Wow.exe..."
cd "$WOW"
#wine64 Wow-64.exe -opengl
wine Wow-64.exe -opengl
cd -
elif [[ $1 == launcher ]]; then
echo "Wine Launcher..."
cd "$WOW"
wine "World of Warcraft Launcher.exe" -opengl
cd -
elif [[ $1 == hs ]]; then
echo "Wine 'Hearthstone.exe'"
cd "$HS"
wine Hearthstone.exe
elif [[ $1 == d3 ]]; then
echo "Wine 'Diablo III.exe'"
cd "$D3"
#WINEARCH=win32 wine Diablo\ III.exe -launch
#WINEARCH=win32 wine explorer /desktop=Diablo,1680x1050 Diablo\ III.exe -launch
#WINEARCH=win32 setarch i386 -3 -L -B -R wine explorer /desktop=Diablo,1680x1050 Diablo\ III.exe -launch
WINEARCH=win32 taskset -c 0 setarch i386 -3 wine explorer /desktop=Diablo,1680x1050 Diablo\ III.exe -launch
cd -
elif [[ $1 == glc ]]; then
echo "GLC Wine Wow.exe..."
cd "$WOW"
# start/stop capture: Shift-F8
# start capture with new capture number: Shift-F9
glc-capture --draw-indicator --capture=back --fps=24 --lock-fps -o /mnt/raid/wow_vids/wow_%year%%month%%day%_%hour%%min%_%capture%.glc WINEARCH=win32 wine Wow.exe
cd -
else
echo "Huh?"
fi
}

function fixkeys()
{
# For some reason the Linux kernel has been wigging out and thinking my
Expand Down
2 changes: 2 additions & 0 deletions bin/ekvm
Expand Up @@ -180,6 +180,8 @@ start)

# '-boot d' boots from the cdrom first
#ARGS="-boot d -enable-kvm"
# '-cpu core2duo,+nx,kvm=off' for Windows 7->10 Upgrade
#ARGS="-enable-kvm -cpu core2duo,+nx,kvm=off"
ARGS="-enable-kvm"

if [[ -n "$EKVM_NAME" ]]; then
Expand Down
54 changes: 30 additions & 24 deletions bspwm_panel
Expand Up @@ -9,45 +9,51 @@ else
fi
PANEL_FONT_FAMILY="-*-terminus-*-r-normal-*-18-*-*-*-c-*-*-1"

ALPHA_BLACK=#80000000
ALPHA_BLACK='#80000000'

COLOR_FOREGROUND=white
RED='#FFFF0000'
WHITE='#FFFFFFFF'

COLOR_FOREGROUND=$WHITE
COLOR_BACKGROUND=$ALPHA_BLACK

COLOR_ACTIVE_MONITOR_FG=green
#COLOR_ACTIVE_MONITOR_FG='#FFFFFF00'
COLOR_ACTIVE_MONITOR_FG='#FFFFA500'
COLOR_ACTIVE_MONITOR_BG=$ALPHA_BLACK

COLOR_INACTIVE_MONITOR_FG=red
COLOR_INACTIVE_MONITOR_FG='#FFFF0000'
COLOR_INACTIVE_MONITOR_BG=$ALPHA_BLACK

COLOR_FOCUSED_OCCUPIED_FG='#FF00FF00'
#COLOR_FOCUSED_OCCUPIED_FG='#FF00FF00'
#COLOR_FOCUSED_OCCUPIED_BG='#FF585858'
COLOR_FOCUSED_OCCUPIED_FG='#FFFFA500'
COLOR_FOCUSED_OCCUPIED_BG=$ALPHA_BLACK

COLOR_FOCUSED_FREE_FG='#FF00FF00'
#COLOR_FOCUSED_FREE_FG='#FF00FF00'
#COLOR_FOCUSED_FREE_BG='#FF585858'
COLOR_FOCUSED_FREE_FG='#FFFFA500'
COLOR_FOCUSED_FREE_BG=$ALPHA_BLACK

COLOR_OCCUPIED_FG=white
COLOR_OCCUPIED_FG=$WHITE
COLOR_OCCUPIED_BG=$ALPHA_BLACK

COLOR_FREE_FG='#FF000000'
#COLOR_FREE_FG='#FF585858'
COLOR_FREE_BG=$ALPHA_BLACK

COLOR_FOCUSED_URGENT_FG=black
COLOR_FOCUSED_URGENT_FG='#FF000000'
COLOR_FOCUSED_URGENT_BG='#FFFF0000'

COLOR_URGENT_FG=black
COLOR_URGENT_FG='#FF000000'
COLOR_URGENT_BG='#FFFF0000'

COLOR_LAYOUT_FG=cyan
COLOR_LAYOUT_FG='#FF00FFFF'
COLOR_LAYOUT_BG=$ALPHA_BLACK

COLOR_TITLE_FG=white
COLOR_TITLE_FG=$WHITE
COLOR_TITLE_BG=$ALPHA_BLACK

COLOR_STATUS_FG=white
COLOR_STATUS_FG=$WHITE
COLOR_STATUS_BG=$ALPHA_BLACK

sep="%{F#FF005FAF}--%{F-}"
Expand All @@ -56,10 +62,9 @@ sep="%{F#FF005FAF}--%{F-}"
obrack="%{F#FF000000}[%{F-}"
cbrack="%{F#FF000000}]%{F-}"


if [[ $(pgrep -cx panel) -gt 1 ]]; then
printf "The panel is already running.\n" >&2
exit 1
printf "The panel is already running.\n" >&2
exit 1
fi

function handle_signal()
Expand Down Expand Up @@ -117,12 +122,12 @@ function clock()
done
}

bspc control --subscribe > "$PANEL_FIFO" &
xtitle -sf 'T%s' > "$PANEL_FIFO" &
#clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &
clock > "$PANEL_FIFO" &
memory_usage > "$PANEL_FIFO" &
disk_usage > "$PANEL_FIFO" &
bspc subscribe report > "$PANEL_FIFO" &
xtitle -sf 'T%s' > "$PANEL_FIFO" &
#clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &
clock > "$PANEL_FIFO" &
memory_usage > "$PANEL_FIFO" &
disk_usage > "$PANEL_FIFO" &

function panel_bar()
{
Expand All @@ -143,17 +148,17 @@ function panel_bar()
;;
D*)
# disk usage output
disk="${obrack}%{Fred}d${cbrack} ${line#?}%"
disk="${obrack}%{F$RED}d${cbrack} ${line#?}%"
;;
M*)
# memory usage output
line=${line#?}
case $line in
U*)
mem_used="${obrack}%{Fred}m${cbrack} ${line#?}%"
mem_used="${obrack}%{F$RED}m${cbrack} ${line#?}%"
;;
S*)
mem_swap="${obrack}%{Fred}s${cbrack} ${line#?}%"
mem_swap="${obrack}%{F$RED}s${cbrack} ${line#?}%"
;;
esac
;;
Expand Down Expand Up @@ -242,6 +247,7 @@ function panel_bar()
cat "$PANEL_FIFO" | \
panel_bar | \
lemonbar \
-a 50 \
-f "$PANEL_FONT_FAMILY" \
-F "$COLOR_FOREGROUND" \
-B "$COLOR_BACKGROUND" | \
Expand Down
14 changes: 9 additions & 5 deletions bspwmrc
Expand Up @@ -15,18 +15,21 @@ bspc config gapless_monocle true
bspc config focus_by_distance true
bspc config auto_cancel true
bspc config ignore_ewmh_focus true

bspc config focus_follows_pointer true
bspc config pointer_follows_monitor false
#bspc config pointer_follows_focus true
bspc config pointer_modifier mod3

bspc monitor -d 1 2 3 4 5 6 7 8 9 10
if [[ $HOSTNAME = jackshrimp ]]; then
bspc monitor DVI-I-1 -d 1 2 3 4 5 6 7 8 9
bspc monitor DVI-D-0 -d 10
bspc monitor DVI-I-1 -d 3 4 5 6 7 8 9
bspc monitor DVI-D-0 -d 1 2 10
bspc monitor DVI-I-1 -n L
bspc monitor DVI-D-0 -n R
elif [[ $HOSTNAME = skylark ]]; then
bspc monitor DVI-I-1 -d 1 2 3 4 5 6 7 8 9
bspc monitor DP-0 -d 10
bspc monitor DVI-I-1 -d 3 4 5 6 7 8 9
bspc monitor DP-0 -d 1 2 10
bspc monitor DVI-I-1 -n L
bspc monitor DP-0 -n R
elif [[ -n "$CHROMEBOOK" ]]; then
Expand All @@ -36,7 +39,8 @@ elif [[ -n "$CHROMEBOOK" ]]; then
bspc monitor HDMI1 -n R
fi

bspc config focused_border_color orange
bspc config focused_border_color "#ffa500"
bspc config presel_feedback_color "#030303"

pkill -x .bspwm_panel
#pkill -x bspc
Expand Down
35 changes: 27 additions & 8 deletions bspwmrc_rules
Expand Up @@ -17,19 +17,33 @@ if [[ "$class" = Evilvte || "$class" = Termite ]]; then
;;
esac

elif [[ "$class" = Chromium ]]; then
elif [[ "$class" = chromium ]]; then

echo "desktop=1"

case "$instance" in
crx_nckgahadagoaajjgafhacjanaoiihapd) # Hangouts
echo "sticky=on"
echo "state=floating"
esac

case "$title" in
Untitled)
echo "floating=on"
echo "state=floating"
;;
esac

elif [[ "$class" = Firefox ]]; then

echo "desktop=2"
echo "desktop=3"

elif [[ "$class" = sun-awt-X11-XFramePeer ||
"$class" = java-lang-Thread ||
"$class" = Atasjni ]]; then

# webex
echo "state=floating"
echo "desktop=4"

elif [[ "$class" = Thunderbird || "$class" = "Thunderbird-nightly" ]]; then

Expand All @@ -39,20 +53,24 @@ elif [[ "$class" = Acroread || "$class" = Evince ]]; then

echo "desktop=3"

elif [[ "$class" = Wfica ]]; then

echo "desktop=3"

elif [[ "$class" = Pidgin ]]; then

echo "floating=on desktop=2"
echo "state=floating desktop=2"

elif [[ "$class" = Gimp ]]; then

echo "desktop=4"
echo "follow=on"
echo "floating=on"
echo "state=floating"

elif [[ "$class" = Wine ]]; then

echo "desktop=4"
echo "fullscreen=on"
echo "state=fullscreen"

elif [[ "$class" = Spicy ]]; then

Expand All @@ -65,12 +83,13 @@ elif [[ "$class" = Vncviewer ]]; then
elif [[ "$class" = rdesktop ]]; then

echo "desktop=5"
echo "fullscreen=on"
# 24px panel + 10px window gap + 5px window border (1890x1026+10+34)
#echo "state=fullscreen"

elif [[ "$class" = Dunst || "$class" = Gxmessage ]]; then

echo "sticky=on"
echo "floating=on"
echo "state=floating"

fi

2 changes: 1 addition & 1 deletion comptonrc
Expand Up @@ -16,7 +16,7 @@ opacity-rule = [
"99:class_g = 'Vncviewer'",
"99:class_g = 'Spicy'",
"99:class_g = 'rdesktop'",
"99:class_g = 'Chromium'",
"99:class_g = 'chromium'",
"99:class_g = 'Firefox'",
"99:class_g = 'Wfica'",
"95:class_g = 'Atom'",
Expand Down

0 comments on commit dfe1fba

Please sign in to comment.