Browse Source

Added bspwm and lemonbar config files.

master
Daniel Sissom 5 years ago
parent
commit
db533226c5
Signed by untrusted user who does not match committer: djsissom GPG Key ID: 2C30FFB796852389
4 changed files with 233 additions and 0 deletions
  1. + 132
    - 0
      bspwm/bspwmrc
  2. + 14
    - 0
      bspwm/external_rules
  3. + 37
    - 0
      bspwm/panel/panel
  4. + 50
    - 0
      bspwm/panel/panel_bar

+ 132
- 0
bspwm/bspwmrc

@ -0,0 +1,132 @@
#! /bin/sh
export PANEL_FIFO="/tmp/djsissom-panel-fifo"
export PANEL_HEIGHT=18
#export PANEL_FONT="-*-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
export PANEL_FONT='Ubuntu:style=L:size=11:antialias=false'
export PANEL_FONT2='Symbola:size=10:antialias=true'
export PANEL_FONT3='Hack:style=Regular:size=10:antialias=false'
export PANEL_WM_NAME=bspwm_panel
export XDG_CURRENT_DESKTOP="KDE"
#export QT_QPA_PLATFORMTHEME="qt5ct"
export SAL_USE_VCLPLUGIN="kde4"
sxhkd & # start hotkey daemon
bspc config border_width 2
bspc config window_gap 12
bspc config split_ratio 0.6
#bspc config borderless_monocle true
#bspc config gapless_monocle true
bspc config history_aware_focus true
#bspc config pointer_follows_monitor true
#bspc config auto_cancel true
bspc config remove_disabled_monitors false
bspc config remove_unplugged_monitors false
#bspc config persistent_monitors true
bspc config merge_overlapping_monitors true
bspc config presel_feedback_color \#FFFFFF
bspc config ignore_ewmh_focus true
bspc config click_to_focus true
bspc config pointer_modifier mod1
bspc config normal_border_color '#000000'
bspc config active_border_color '#000000'
bspc config focused_border_color '#00FFEE'
# hack to fix monitor order
#bspc monitor -s left
bspc rule -a Gimp state=floating
bspc rule -a Gimp-2.8 state=floating
bspc rule -a *:gwenview state=floating layer=above
bspc rule -a *:gv state=floating
bspc rule -a *:feh state=floating
bspc rule -a *:Plugin-container state=floating
bspc rule -a *:Conky sticky=on manage=off lower=on
bspc rule -a *:Screenkey manage=off
bspc rule -a Steam border=off state=floating
bspc rule -a Stellaris border=off state=fullscreen
#bspc rule -a vlc:vlc state=floating layer=above
bspc config external_rules_command "$HOME/.config/bspwm/external_rules"
i=1
#for monitor in DVI-D-0 DVI-I-1 DP-1; do
#for monitor in $(bspc query -M); do
for monitor in $(bspc query -M --names); do
bspc monitor $monitor \
-d $i/{Desktop-2, Desktop-1, Desktop-0, Desktop+1, Desktop+2}
#-n "$i" \
#-d $i/{I,II,III,IV,V,VI,VII,VIII,IX,X}
let i++
done
#NMON=$i
unset i
for i in {1..6}; do
bspc desktop --focus next;
bspc monitor --focus next;
done
#bspc monitor -r Desktop2
#bspc monitor DVI-D-0 -d I II III
#bspc monitor DVI-I-0 -d IV V VI
#bspc monitor DP-1 -d VII VIII IX
#!/bin/sh
#
#i=1
#for monitor in $(bspc query -M); do
#bspc monitor $monitor \
# -n "$i" \
# -d $i/{i,ii,iii,iv,v,vi,vii,viii,ix,x}
# let i++
#done
#NMON=$i
#unset i
#
#bspc config top_padding 14
#
## Visual options
#bspc config split_ratio 0.50
#bspc config border_width 1
#bspc config window_gap 4
#bspc config borderless_monocle true
#bspc config gapless_monocle true
#bspc config focus_follows_pointer true
#bspc config auto_alternate true
#bspc config auto_cancel true
#bspc config normal_border_color "#504339"
#bspc config active_border_color "#504339"
#bspc config focused_border_color "#817267"
#bspc config presel_border_color "#9a875f"
#bspc config urgent_border_color "#504339"
#bspc config normal_frame_opacity 0.0
#bspc config focused_frame_opacity 0.1
#
#
## Rules
#bspc rule -a Skype pseudo_tiled=on
#bspc rule -a Spotify pseudo_tiled=on
#bspc rule -a Thunar pseudo_tiled=on
#bspc rule -a Skype pseudo_tiled=on
#bspc rule -a File-roller pseudo_tiled=on
#bspc rule -a Transmission-gtk pseudo_tiled=on
#bspc rule -a Conky sticky=on manage=off lower=on
#bspc rule -a astime sticky=on
#bspc rule -a feh floating=on manage=off
#
/home/djsissom/.config/bspwm/panel/panel &

+ 14
- 0
bspwm/external_rules

@ -0,0 +1,14 @@
#! /bin/sh
wid=$1
class=$2
instance=$3
if [ "$instance" = vlc ] ; then
title=$(xtitle "$wid")
case "$title" in
vlc)
echo "layer=above border=off"
;;
esac
fi

+ 37
- 0
bspwm/panel/panel

@ -0,0 +1,37 @@
#! /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
flavor=${1:-bar}
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO"
bspc config top_padding $PANEL_HEIGHT
#bspc control --subscribe > "$PANEL_FIFO" &
bspc subscribe report > "$PANEL_FIFO" &
xtitle -sf 'T%s\n' | sed -u 's/^\(.................................................\).*\(..........................\)/\1...\2/' > "$PANEL_FIFO" &
tick > "$PANEL_FIFO" &
#clock -s -i 1 -f 'S%a %F %r' > "$PANEL_FIFO" &
#clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &
echo "$PANEL_FONT"
case "$flavor" in
bar)
cat "$PANEL_FIFO" | /home/djsissom/.config/bspwm/panel/panel_bar | lemonbar -g "x$PANEL_HEIGHT" -B "#BF000000" -F "#FF9A875F" -f "$PANEL_FONT" -f "$PANEL_FONT2" -f "$PANEL_FONT3" &
;;
dzen2)
. panel_colors
FONT_FAMILY='DejaVu Sans'
FONT_SIZE=11
cat "$PANEL_FIFO" | panel_dzen2 -f "$FONT_FAMILY" -s "$FONT_SIZE" | dzen2 -h $PANEL_HEIGHT -dock -ta l -title-name panel -fn "${FONT_FAMILY}:pixelsize=${FONT_SIZE}" -fg "$COLOR_FOREGROUND" -bg "$COLOR_BACKGROUND" &
;;
esac
wait

+ 50
- 0
bspwm/panel/panel_bar

@ -0,0 +1,50 @@
#! /bin/sh
#
# Example panel for LemonBoy's bar
while read -r line ; do
case $line in
S*)
sys_infos="%{r}%{F-}${line#?}%{F-}"
;;
T*)
title="%{F-} ${line#?}"
# title=""
;;
W*)
wm_infos="%{c}"
IFS=':'
set -- ${line#?}
while [ $# -gt 0 ] ; do
item=$1
name=${item#?}
case $item in
[OFU]*)
# active desktop
wm_infos="$wm_infos%{F#FAE7BF} ● %{F-}%{B-}"
;;
o*)
# inactive but occupied desktop
wm_infos="$wm_infos%{F-} ● %{F-}"
;;
f*)
# inactive desktop
wm_infos="$wm_infos%{F-} ○ %{F-}"
;;
u*)
# urgent desktop
wm_infos="$wm_infos%{F-} ● %{F-}"
;;
L*)
# layout
# layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/')
layout=""
wm_infos="$wm_infos %{B-}%{F-}$layout%{B-}%{F-}"
;;
esac
shift
done
;;
esac
printf "%s\n" "%{S+}$title $wm_infos $sys_infos ⏻ "
done

Loading…
Cancel
Save