1
0
Fork 0

get rid of bspwm, as awesome as it is, it is unusible for me for now

This commit is contained in:
Von Random 2015-06-27 19:13:37 +03:00
parent c132453f4e
commit 71a65b5043
17 changed files with 0 additions and 861 deletions

View file

@ -1,5 +0,0 @@
wallpaper="${HOME}/Pictures/wallpaper.png"
[[ -r "$wallpaper" ]] && feh --bg-center "$wallpaper"
setxkbmap -layout us,ru -variant altgr-intl,typewriter -option ctrl:nocaps,grp:win_space_toggle,grp_led:scroll,compose:menu
xfce4-panel &
nm-applet &

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
source "$HOME/.config/bspwm/common"
dmenu -fn "$fontspec" \
-nb "#$colour_bg_normal" \
-nf "#$colour_fg_normal" \
-sb "#$colour_bg_focused" \
"$@"

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
source "$HOME/.config/bspwm/common"
dmenu_path | /home/von/.config/bspwm/bspmenu -p 'run' "$@" | ${SHELL:-"/bin/sh"} &

View file

@ -1,15 +0,0 @@
#!/bin/sh
get_bookmarks() {
while read url title; do
echo "$url"
done < "$HOME/.config/bookmarks"
}
main() {
uri=$(get_bookmarks | /home/von/.config/bspwm/bspmenu -p 'url' "$@")
[ "$uri" ] && { sx-open "$uri"; }
echo "$uri"
}
main "$@"

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
source "$HOME/.config/bspwm/common"
bspc desktop -t floating
bspc control --get-status > "$panel_fifo"

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
bsp_status=$( bspc control --get-status )
layout="${bsp_status##*:}"
case "$layout" in
LT) bspc desktop -l monocle;;
LM) bspc desktop -l tiled;;
esac

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
source "$HOME/.config/bspwm/common"
#xsetroot -cursor_name left_ptr
bspc config focused_border_color "#$colour_bg_focused"
bspc config normal_border_color "#$colour_bg_normal"
bspc config urgent_border_color "#$colour_urgent"
bspc config focused_sticky_border_color "#$colour_sticky_focused"
bspc config top_padding "$panel_h"
bspc config border_width "$bspwm_border_width"
bspc config window_gap "$bspwm_window_gap"
bspc config focus_follows_pointer 'true'
bspc config pointer_follows_monitor 'true'
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 initial_polarity 'second_child'
bspc monitor -d 1 2 3 4 5
bspc rule -a Gimp desktop=^8 follow=on floating=on
bspc rule -a Steam desktop=^4 follow=off floating=on
bspc rule -a mpv floating=on

View file

@ -1,44 +0,0 @@
# vim: ft=sh
# common config
colour_fg_normal='f9f9f9'
colour_fg_focused=$colour_fg_normal
colour_bg_normal='2d2d2d'
colour_bg_focused='00612b'
#colour_fg_normal_alpha='00'
#colour_fg_focused_alpha=$colour_fg_normal_alpha
#colour_bg_normal_alpha='00'
#colour_bg_focused_alpha='00'
colour_urgent='610000'
colour_sticky_focused='030061'
xset +fp /home/von/.fonts/terminus/PCF
fontspec='-*-terminus-medium-*-normal-*-14-*-*-*-*-*-iso10646-*'
font_bold='-*-terminus-bold-*-normal-*-14-*-*-*-*-*-iso10646-*'
# bspwm config
bspwm_border_width='1'
bspwm_window_gap='3'
# root win
#IFS='x' read -r root_win_w root_win_h < <( xwininfo -root | awk '/geometry/ { split($2,g,"+"); printf("%s", g[1]) }' )
# panel config
panel_bg_normal="${colour_bg_normal_alpha}${colour_bg_normal}"
panel_bg_focused="${colour_bg_focused_alpha}${colour_bg_focused}"
panel_fg_normal="${colour_fg_normal_alpha}${colour_fg_normal}"
panel_fg_focused="${colour_fg_focused_alpha}${colour_fg_focused}"
panel_fifo="/tmp/panel${DISPLAY}-fifo"
panel_h='18'
panel_w='100%'
panel_show_empty_tags=0
# taskbar
panel_taskbar_enable=1
panel_taskbar_max_length=160
panel_taskbar_max_title=32
## dmenu in place of bar
#dmenu_w=$panel_w
#dmenu_h=$panel_h
#dmenu_x=$bspwm_window_gap
#dmenu_y=$bspwm_window_gap

View file

@ -1,199 +0,0 @@
#!/usr/bin/env bash
source "$HOME/.config/bspwm/common"
cleanup() {
jobs=( $(jobs -p) )
if [[ "$jobs" ]]; then
kill "${jobs[@]}"
fi
bspc config top_padding 0
}
get_line() {
declare counter=0 line=$1
while read; do
if (( counter == line )); then
printf '%s\n' "$REPLY"
return 0
fi
(( counter++ ))
done
}
parse_fifo_data() {
declare msg desktop_spec
declare -g win_name misc bspwm_status
while read; do
case "$REPLY" in
cmd::*)
read -r cmd args <<< "${REPLY#cmd::}"
case "$cmd" in
redraw)
printf 'Redraw triggered\n'
sleep 1
printf '%s\n' "$msg"
;;
respawn)
printf 'Dying...\n'
sleep 1
rexec
;;
run)
$args
rexec
;;
esac
;;
updates::*) updates="${REPLY#*updates::}";;
date::*) date="${REPLY#*date::}";;
T*)
if (( panel_taskbar_enable )); then
unset win_title
unset taskbar taskbar_windows taskbar_length
panel_taskbar_max_title_current=$panel_taskbar_max_title
while read -r _ _ _ wid _ _ _ _ focus; do
if [[ "$wid" =~ [0-9]x[0-9A-F] ]]; then
if [[ "$focus" == '*' ]]; then
taskbar_windows+=( "$wid::F" )
else
taskbar_windows+=( "$wid::u" )
fi
fi
done < <( bspc query -T -d focused )
taskbar_windows_n="${#taskbar_windows[@]}"
if (( taskbar_windows_n )); then
until (( taskbar_length )) && (( taskbar_length <= panel_taskbar_max_length )); do
unset taskbar
taskbar_length=$(( (taskbar_windows_n * 2) + 2 ))
for w in "${taskbar_windows[@]}"; do
IFS='::' read -r wid _ state <<< "$w"
win_title=$( xtitle -f '%s' -t "${panel_taskbar_max_title_current}" "$wid" )
win_title_length="${#win_title}"
taskbar_length=$(( taskbar_length + win_title_length ))
if [[ "$state" == 'F' ]]; then
taskbar+=" %{B#${panel_bg_focused}}%{F#${panel_bg_normal}}%{F-} ${win_title} %{B-}%{F#${panel_bg_focused}}%{F-}"
else
taskbar+=" %{A:bspc window -f ${wid}:} ${win_title} %{A}"
fi
done
(( panel_taskbar_max_title_current-- ))
done
fi
else
win_title="${REPLY#*T}"
if [[ "$win_title" ]]; then
taskbar=" %{B#${panel_bg_focused}}%{F#${panel_bg_normal}}%{F-} ${win_title} %{B-}%{F#${panel_bg_focused}}%{F-}"
else
unset taskbar
fi
fi
;;
WM*)
unset desktop_spec
IFS=':' read -a bspwm_status <<< "$REPLY"
for i in "${bspwm_status[@]}"; do
if [[ "$i" =~ ^[oOfFuU].+ ]]; then
n="${i#*[oOfFuU]}"
case "$i" in
O*|F*|U*) desktop_spec+="%{B#${panel_bg_focused}} $n %{B-}";;
u*) desktop_spec+="%{B#${colour_urgent}}%{A:bspc desktop -f $n:} $n %{A}%{B-}";;
o*) desktop_spec+="%{B-}%{A:bspc desktop -f $n:} $n %{A}";;
f*)
(( panel_show_empty_tags )) && {
desktop_spec+="%{B-} $n "
}
;;
esac
fi
done
read _ _ _ _ layout float _ < <( bspc query -T -d focused | get_line 1 )
if [[ "$float" == 'f' ]]; then
float_flag='f'
else
float_flag=''
fi
case "$layout" in
T) layout_flag='t';;
M) layout_flag='m';;
esac
desktop_spec+=" %{A:bsptl:}[${layout_flag}${float_flag}]%{A}"
;;
esac
msg="$desktop_spec"
[[ "$taskbar" ]] && { msg+="$taskbar"; }
msg+="%{r}%{F#${colour_bg_focused}}%{F-}%{B#${panel_bg_focused}} $updates $date "
msg+='%{B-}%{F-}'
printf '%s\n' "$msg"
done < "$panel_fifo"
}
misc_status() {
declare ip msg date
while sleep 1; do
date=$( date +%A,\ %Y.%m.%d\ %H:%M:%S )
msg="[ $date ]"
printf 'S:%s\n' "$msg"
done
}
rexec() {
kill $(jobs -p)
exec "$0"
}
main() {
trap 'cleanup' EXIT TERM INT
trap 'rexec' HUP
[[ -e "$panel_fifo" ]] && {
rm "$panel_fifo" || { return 1; }
}
mkfifo "$panel_fifo"
if (( panel_taskbar_enable )); then
xtitle -s -t "$panel_taskbar_max_title" -f 'T%s' > "$panel_fifo" &
else
xtitle -s -f 'T%s' > "$panel_fifo" &
fi
bspc control --subscribe > "$panel_fifo" &
/home/von/.config/bspwm/panel/panel_status &
bspc config top_padding "$(( panel_h + bspwm_window_gap ))"
parse_fifo_data | lemonbar -g "1280x16+0+0" \
-f "$fontspec" \
-f "$font_bold" \
-F "#${panel_fg_normal}" \
-B "#${panel_bg_normal}" | sh &
wait
}
main

View file

@ -1,53 +0,0 @@
#!/usr/bin/env bash
source "$HOME/.config/bspwm/common"
status::date() {
while true; do
printf 'date::%%{T2}%s%%{T}\n' "$(date '+%a %d %H:%M')"
sleep 1
done
}
status::updates() {
declare pkgs
while true; do
pkgs=( $(pacman -Qqu) )
pkgs_n=${#pkgs[@]}
if (( pkgs_n )); then
printf 'updates::[ Updates: %s ]\n' "${#pkgs[@]}"
else
printf 'updates::[ No updates ]\n'
fi
sleep 5
done
}
cleanup() {
kill $(jobs -p)
}
rexec() {
kill $(jobs -p)
exec "$0"
}
main() {
declare msg date
trap cleanup EXIT TERM INT
trap rexec HUP
modules=( date )
for i in "${modules[@]}"; do
"status::${i}" > "$panel_fifo" &
done
wait
}
main

View file

@ -1,78 +0,0 @@
#
# bspwm hotkeys
#
alt + control + c
bspc window -c
alt + control + k
bspc window -k
alt + Return
bspc window -t fullscreen
alt + {j,k}
bspc window -f {next,prev}
alt + shift + {j,l}
bspc window -e {down,right} +32
alt + shift + {k,h}
bspc window -e {down,right} -32
alt + Tab
bspc window -t floating
alt + Return
bspc window -s biggest
alt + {1-9}
bspc desktop -f {1-9}
alt + shift + {1-9}
bspc window -d {1-9}
alt + t
bspc desktop -R 90
alt + m
bspc desktop -l next
alt + f
/home/von/.config/bspwm/bsptf
~button{1-3}
bspc pointer -g focus
alt + button{1-3}
bspc pointer -g {move,resize_side,resize_corner}
alt + !button{1-3}
bspc pointer -t %i %i
alt + @button{1-3}
bspc pointer -u
alt + x
termite
alt + {r,u}
/home/von/.config/bspwm/bspmenu_{run,url}
alt + F2
dmenu_run
alt + z
bash -c "until i3lock -entc 661111 -i /home/von/Pictures/wallpaper.png; do :; done"
Print
xfce4-screenshooter
alt + shift + F12
/home/von/vscripts/compton_toggle
alt + {Left,Up,Right,Down}
bspc window --presel {left,up,right,down}
alt + o
bspc monitor -f {right,left}

View file

@ -1,44 +0,0 @@
#!/usr/bin/env zsh
export BSPWM_SOCKET='/tmp/bspwm_sock'
bspwm&
until [[ -e $BSPWM_SOCKET ]]; do
sleep 1
done
export bspwm_config_dir="$HOME/vdotfiles/bspwm-zsh"
source $bspwm_config_dir/common
# bspwm general settings
/usr/bin/bspc config focused_border_color $colors_bg_focused
/usr/bin/bspc config normal_border_color $colors_bg_normal
/usr/bin/bspc config urgent_border_color $colors_urgent
/usr/bin/bspc config focused_sticky_border_color $colors_sticky_focused
/usr/bin/bspc config top_padding 18
/usr/bin/bspc config border_width 1
/usr/bin/bspc config window_gap 5
/usr/bin/bspc config focus_follows_pointer true
/usr/bin/bspc config pointer_follows_monitor true
/usr/bin/bspc config split_ratio 0.50
/usr/bin/bspc config borderless_monocle true
/usr/bin/bspc config gapless_monocle true
/usr/bin/bspc config focus_by_distance true
/usr/bin/bspc config ignore_ewmh_focus true
# bspwm window placement rules
/usr/bin/bspc rule -a URxvt desktop=^2 follow=on floating=on
/usr/bin/bspc rule -a Steam desktop=^4 follow=off floating=on
# bspwm create tags
/usr/bin/bspc monitor -d 1 2 3 4 5
# the rest of it
job_list=()
# sxhkd kill / spawn (there can only be one)
/usr/bin/pkill sxhkd 2>&1 >/dev/null
/usr/bin/sxhkd -f 60 -c $bspwm_config_dir/sxhkdrc&
# panel
fontdir="$HOME/.fonts/terminus/PCF"
/usr/bin/xset +fp $fontdir
$bspwm_config_dir/panel&
# trap to kill all the jobs when killing the script itself
trap 'cleanup' EXIT TERM INT
function cleanup
{
eval "kill ${${jobstates##*:*:}%=*}"
}
wait

View file

@ -1,24 +0,0 @@
# vim: ft=sh
# common config
# fonts
font_norm='-*-terminus-medium-*-normal-*-14-*-*-*-*-*-iso10646-*'
font_bold='-*-terminus-bold*-normal-*-14-*-*-*-*-*-iso10646-*'
# colors
colors_fg_normal='#f9f9f9'
colors_fg_focused=$colors_fg_normal
colors_bg_normal='#2d2d2d'
colors_bg_focused='#00612b'
colors_urgent='#610000'
colors_sticky_focused='#030061'
# date format
date_format='+%a %d %H:%M'
# panel config
panel_fifo="/tmp/panel$DISPLAY-sock"
bspwm_sock="/tmp/bspwm$DISPLAY-sock"
panel_h='14'
panel_show_empty_tags=0
# taskbar
panel_taskbar_enable=1
panel_taskbar_max_length=160
panel_taskbar_max_title=32

View file

@ -1,207 +0,0 @@
#!/usr/bin/env zsh
source $bspwm_config_dir/common
cleanup() {
jobs=${${jobstates##*:*:}%=*}
if [[ "$jobs" ]]; then
eval "kill $jobs"
fi
bspc config top_padding 0
}
get_line() {
declare counter=0 line=$1
while read; do
if (( counter == line )); then
printf '%s\n' "$REPLY"
return 0
fi
(( counter++ ))
done
}
parse_fifo_data() {
declare msg desktop_spec
declare -g win_name misc bspwm_status
while read; do
case "$REPLY" in
cmd::*)
read -r cmd args <<< "${REPLY#cmd::}"
case "$cmd" in
redraw)
printf 'Redraw triggered\n'
sleep 1
printf '%s\n' "$msg"
;;
respawn)
printf 'Dying...\n'
sleep 1
rexec
;;
run)
$args
rexec
;;
esac
;;
updates::*) updates="${REPLY#*updates::}";;
date::*) date="${REPLY#*date::}";;
T*)
if (( panel_taskbar_enable )); then
unset win_title
unset taskbar taskbar_windows taskbar_length
panel_taskbar_max_title_current=$panel_taskbar_max_title
while read -r _ _ _ wid _ _ _ _ focus; do
if [[ "$wid" =~ [0-9]x[0-9A-F] ]]; then
if [[ "$focus" == '*' ]]; then
taskbar_windows+=( "$wid::F" )
else
taskbar_windows+=( "$wid::u" )
fi
fi
done < <( bspc query -T -d focused )
taskbar_windows_n="${#taskbar_windows[@]}"
if (( taskbar_windows_n )); then
until (( taskbar_length )) && (( taskbar_length <= panel_taskbar_max_length )); do
unset taskbar
taskbar_length=$(( (taskbar_windows_n * 2) + 2 ))
for w in "${taskbar_windows[@]}"; do
IFS='::' read -r wid _ state <<< "$w"
win_title=$( xtitle -f '%s' -t "${panel_taskbar_max_title_current}" "$wid" )
win_title_length="${#win_title}"
taskbar_length=$(( taskbar_length + win_title_length ))
if [[ "$state" == 'F' ]]; then
taskbar+=" %{B${colors_bg_focused}}%{F${colors_bg_normal}}%{F-} ${win_title} %{B-}%{F${colors_bg_focused}}%{F-}"
else
taskbar+=" %{A:bspc window -f ${wid}:} ${win_title} %{A}"
fi
done
(( panel_taskbar_max_title_current-- ))
done
fi
else
win_title="${REPLY#*T}"
if [[ "$win_title" ]]; then
taskbar=" %{B${colors_bg_focused}}%{F${colors_bg_normal}}%{F-} ${win_title} %{B-}%{F${colors_bg_focused}}%{F-}"
else
unset taskbar
fi
fi
;;
WM*)
unset desktop_spec
IFS=':' read -A bspwm_status <<< "$REPLY"
for i in "${bspwm_status[@]}"; do
if [[ "$i" =~ ^[oOfFuU].+ ]]; then
n="${i#*[oOfFuU]}"
case "$i" in
O*|F*|U*) desktop_spec+="%{B${colors_bg_focused}} $n %{B-}";;
u*) desktop_spec+="%{B${colour_urgent}}%{A:bspc desktop -f $n:} $n %{A}%{B-}";;
o*) desktop_spec+="%{B-}%{A:bspc desktop -f $n:} $n %{A}";;
f*)
(( panel_show_empty_tags )) && {
desktop_spec+="%{B-} $n "
}
;;
esac
fi
done
read _ _ _ _ layout float _ < <( bspc query -T -d focused | get_line 1 )
if [[ "$float" == 'f' ]]; then
float_flag='f'
else
float_flag=''
fi
case "$layout" in
T) layout_flag='t';;
M) layout_flag='m';;
esac
desktop_spec+=" %{A:bsptl:}[${layout_flag}${float_flag}]%{A}"
;;
esac
msg="$desktop_spec"
[[ "$taskbar" ]] && { msg+="$taskbar"; }
msg+="%{r}%{F${colors_bg_focused}}%{F-}%{B${colors_bg_focused}} $updates $date "
msg+='%{B-}%{F-}'
printf '%s\n' "$msg"
done < "$panel_fifo"
}
misc_status() {
declare ip msg date
while sleep 1; do
date=$( date +%A,\ %Y.%m.%d\ %H:%M:%S )
msg="[ $date ]"
printf 'S:%s\n' "$msg"
done
}
rexec() {
eval "kill ${${jobstates##*:*:}%=*[@]}"
exec "$0"
}
function panel_geometry
{
xrandr|grep -Eo '[[:digit:]]+x[[:digit:]]+\+[[:digit:]]+\+[[:digit:]]+'|awk -F'x|+' '{print $1,$2,$3,$4}'|read -A screen_geometry
((panel_h)) || panel_h=20
((panel_w)) || panel_w=$screen_geometry[2]
((panel_l)) || panel_l=$screen_geometry[3]
((panel_d)) || panel_d=$screen_geometry[4]
}
main() {
trap 'cleanup' EXIT TERM INT
trap 'rexec' HUP
[[ -e "$panel_fifo" ]] && {
rm "$panel_fifo" || { return 1; }
}
mkfifo "$panel_fifo"
if (( panel_taskbar_enable )); then
xtitle -s -t "$panel_taskbar_max_title" -f 'T%s' > "$panel_fifo" &
else
xtitle -s -f 'T%s' > "$panel_fifo" &
fi
bspc control --subscribe > "$panel_fifo" &
$bspwm_config_dir/panel_status &
bspc config top_padding "$(( panel_h + bspwm_window_gap ))"
parse_fifo_data | lemonbar -g "${panel_w}x${panel_h}+${panel_l}+${panel_d}" \
-f "$font_norm" \
-f "$font_bold" \
-F "$colors_fg_normal" \
-B "$colors_bg_normal" | zsh &
wait
}
main

View file

@ -1,54 +0,0 @@
#!/usr/bin/env zsh
source $bspwm_config_dir/common
status::date() {
while true; do
printf 'date::%%{T2}%s%%{T}\n' "$(date '+%a %d %H:%M:%S')"
sleep 1
done
}
status::updates() {
declare pkgs
while true; do
pkgs=( $(pacman -Qqu) )
pkgs_n=${#pkgs[@]}
if (( pkgs_n )); then
printf 'updates::[ Updates: %s ]\n' "${#pkgs[@]}"
else
printf 'updates::[ No updates ]\n'
fi
sleep 5
done
}
cleanup() {
eval "kill ${${jobstates##*:*:}%=*}"
}
rexec() {
eval "kill ${${jobstates##*:*:}%=*}"
exec "$0"
}
main() {
declare msg date
typeset -a modules
trap cleanup EXIT TERM INT
trap rexec HUP
modules=( date )
for i in "${modules[@]}"; do
"status::${i}" > "$panel_fifo" &
done
wait
}
main

View file

@ -1,78 +0,0 @@
#
# bspwm hotkeys
#
alt + control + c
bspc window -c
alt + control + k
bspc window -k
alt + Return
bspc window -t fullscreen
alt + {j,k}
bspc window -f {next,prev}
alt + shift + {j,l}
bspc window -e {down,right} +32
alt + shift + {k,h}
bspc window -e {down,right} -32
alt + Tab
bspc window -t floating
alt + Return
bspc window -s biggest
alt + {1-9}
bspc desktop -f {1-9}
alt + shift + {1-9}
bspc window -d {1-9}
alt + t
bspc desktop -R 90
alt + m
bspc desktop -l next
alt + f
/home/von/.config/bspwm/bsptf
~button{1-3}
bspc pointer -g focus
alt + button{1-3}
bspc pointer -g {move,resize_side,resize_corner}
alt + !button{1-3}
bspc pointer -t %i %i
alt + @button{1-3}
bspc pointer -u
alt + x
termite
alt + {r,u}
/home/von/.config/bspwm/bspmenu_{run,url}
alt + F2
dmenu_run
alt + z
bash -c "until i3lock -entc 661111 -i /home/von/Pictures/wallpaper.png; do :; done"
Print
xfce4-screenshooter
alt + shift + F12
/home/von/vscripts/compton_toggle
alt + {Left,Up,Right,Down}
bspc window --presel {left,up,right,down}
alt + o
bspc monitor -f {right,left}

View file

@ -1,3 +0,0 @@
#!/usr/bin/env zsh
/usr/bin/sxhkd -f 60&
wait