You are not logged in.
Hi all, I am new to arch linux and just started using bspwm, have used xmonad for a few months or so. I am trying to base my desktop on windelicato's config (which is incredible imo and you can see it at his github) but am having trouble using the scripts from it. In particular, I don't get the panel that I can see in his screenshot. I will post all relevant files that I know of, tell me if I have missed some!
~/.xinitrc
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
udisksvm &
#udiskie &
#exec openbox-session
#/usr/bin/start-pulseaudio-x11 &
#razercfg -r 1:3 &
xset m 0 0 &
#dhcpcd net1 &
#~/.conky/loadconky.sh &
#steam &
#compton --config ~/.config/compton.conf -cGb &
#(sleep 2s && tint2)
xrandr --output DFP17 --output DFP18 --right-of DFP17 &
#setxkbmap -option terminate:ctrl_alt_bksp &
bash ~/.fehbg &
#stalonetray &
#redshiftgui &
xsetroot -cursor_name left_ptr &
mpd ~/.mpd/mpd.conf &
autocutsel -fork &
autocutsel -selection PRIMARY -fork &
#bash ~/.xmonad/workspaces/master
#stalonetray -i 20 -geometry 1x1+1390+0 --sticky --skip-taskbar --no-shrink &
#exec ~/.cabal/bin/xmonad
#sxhkd -c ~/.config/sxhkd/sxhkdrc &
#exec bspwm
DEFAULT_SESSION=xmonad
case $2 in
xmonad)
stalonetray &
compton --config ~/.config/compton.conf -cGb &
exec xmonad
;;
openbox)
exec openbox-session
;;
bspwm|*)
sxhkd &
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO"
exec bspwm -c /home/jordan/.config/bspwm/bspwmrc -s "$PANEL_FIFO" -p W
;;
esac
~/.config/bspwm/bspwmrc
#! /bin/sh
FIRST_DESK_MAIN=i
REMAINING_DESKS_MAIN="ii iii iv v vi vii viii ix x"
FIRST_DESK_SECONDARY=I
REMAINING_DESKS_SECONDARY="II III IV V VI VII VIII IX X"
#if [[ -z `xrandr | grep " connected" | grep 'VGA'` ]]; then
# echo "No monitor connected"
# bspc desktop Desktop01 -n $FIRST_DESK_MAIN
# bspc monitor -a $REMAINING_DESKS_MAIN
# bspc monitor -p 14 0 0 0
#else
bspc desktop Desktop01 -n $FIRST_DESK_MAIN
bspc monitor -a $REMAINING_DESKS_MAIN
bspc monitor -p 14 0 0 0
bspc monitor -f next
bspc desktop Desktop02 -n $FIRST_DESK_SECONDARY
bspc monitor -a $REMAINING_DESKS_SECONDARY
bspc monitor -p 0 0 0 0
#fi
bspc config split_ratio 0.52
bspc config border_width 2
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 focused_border_color #646a6d
bspc config normal_border_color #322d29
bspc rule -a Thunar --floating
bspc rule -a Skype --floating
bspc rule -a Transmission --floating
bspc rule -a feh --floating
bspc rule -a Gimp -d Eight --floating
panel &
/home/jordan/.xmonad/status_bar "#d6c3b6" "#181512" "-*-nu-*-*-*-*-*-*-*-*-*-*-*-*" &
~/scripts/panel (added to path in ~/.profile)
#! /bin/sh
flavor=${1:-bar}
bspc control --put-status
xtitle -sf 'T%s' > "$PANEL_FIFO" &
clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &
case "$flavor" in
bar)
cat "$PANEL_FIFO" | /home/jordan/scripts/panel_bar | bar
;;
dzen2)
PANEL_HEIGHT=24
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
~/.xmonad/status_bar
#!/bin/bash
foreground=$1
background=$2
font=$3
conky -qc /home/jordan/.xmonad/.conky_dzen | dzen2 -x '500' -w '1420' -h '14' -ta 'r' -fg $foreground -bg $background -y '0' -fn $font
~/scripts/panel_bar
#! /bin/sh
#
# Example panel for LemonBoy's bar
while read -r line ; do
case $line in
S*)
sys_infos="\\r\\f5${line#?}\\fr"
;;
T*)
title="\\c${line#?}"
;;
W*)
wm_infos=""
IFS=':'
set -- ${line#?}
while [ $# -gt 0 ] ; do
item=$1
name=${item#?}
case $item in
u*)
# urgent desktop
wm_infos="$wm_infos\\ f3 ${name}\\fr\\br"
;;
[DU]*)
# active desktop
wm_infos="$wm_infos\\u9\\f1 ${name} \\fr\\br\\ur"
;;
d*)
# inactive but occupied desktop
wm_infos="$wm_infos\\f2 ${name} \\fr"
;;
E*)
# inactive desktop
wm_infos="$wm_infos\\f0 ${name} \\fr"
;;
# L*)
# # layout
# layout=$(printf "%s" "${name}" | sed 's/\(.\).*/\U\1/')
# wm_infos="$wm_infos \\b4\\f0$layout\\br\\fr"
# ;;
esac
shift
done
;;
esac
printf "%s\n" "$wm_infos $title $sys_infos"
done
~/scripts/panel_dzen2
#! /bin/sh
#
# Example panel for dzen2
font_family='sans-serif'
font_size=11
. panel_colors
adaptive_centering=0
screen_width=$(sres -W)
NORMIFS=$IFS
FIELDIFS=':'
PADDING=' '
while getopts 'af:s:' opt ; do
case "$opt" in
a)
adaptive_centering=1
;;
f)
font_family=$OPTARG
;;
s)
font_size=$OPTARG
;;
esac
done
shift $((OPTIND - 1))
while read -r line ; do
case $line in
S*)
# system informations
sys_infos="^fg($COLOR_STATUS_FG)^bg($COLOR_STATUS_BG)^ca(1, bspc control --toggle-visibility)${PADDING}${line#?}${PADDING}^ca()^fg()^bg()${PADDING}"
;;
T*)
# focused window title
title="^fg($COLOR_TITLE_FG)^bg($COLOR_TITLE_BG)^ca(1, bspc window -t floating)^ca(2, bspc window -t locked)^ca(3, bspc window -c)${PADDING}${line#?}${PADDING}^ca()^ca()^ca()"
;;
W*)
# window manager informations
wm_infos="$PADDING"
IFS=$FIELDIFS
set -- ${line#?}
while [ $# -gt 0 ] ; do
item=$1
case $item in
[DdEUu]*)
# desktops
name=${item#?}
case $item in
u*)
# urgent (inactive) desktop
FG=$COLOR_URGENT_FG
BG=$COLOR_URGENT_BG
;;
[DU]*)
# active desktop
FG=$COLOR_ACTIVE_FG
BG=$COLOR_ACTIVE_BG
;;
d*)
# inactive desktop
FG=$COLOR_INACTIVE_FG
BG=$COLOR_INACTIVE_BG
;;
E*)
# empty desktop
FG=$COLOR_EMPTY_FG
BG=$COLOR_EMPTY_BG
;;
esac
wm_infos="${wm_infos}^fg(${FG})^bg(${BG})^ca(1, bspc desktop -f ${name})^ca(2, bspc window -d ${name})^ca(3, bspc window -d ${name} -f)${PADDING}${name}${PADDING}^ca()^ca()^ca()"
;;
L*)
# layout
layout=$(printf "%s" "${item#?}" | sed 's/^\(.\).*/\U\1/')
wm_infos="${wm_infos}^fg()^bg()${PADDING}${PADDING}^fg($COLOR_LAYOUT_FG)^bg($COLOR_LAYOUT_BG)^ca(1, bspc desktop -l next)^ca(2, bspc desktop -B)${PADDING}$layout${PADDING}^ca()^ca()"
;;
esac
shift
done
IFS=$NORMIFS
;;
esac
set -- $(printf '%s\0%s\0%s' "$wm_infos" "$title" "$sys_infos" | sed 's/\^[a-z]\+([^)]*)//g' | xargs -0 txtw -f "$font_family" -s "$font_size")
left_width=$1
center_width=$2
right_width=$3
left_indent=0
right_indent=$((screen_width - right_width))
available_center=$((screen_width - (left_width + right_width)))
if [ $available_center -lt $center_width ] ; then
center_indent=$((left_indent + left_width))
else
if [ $adaptive_centering -eq 1 ] ; then
center_indent=$((left_width + (available_center - center_width) / 2))
else
center_indent=$(( (screen_width - center_width) / 2 ))
fi
fi
printf "%s\n" "^pa($center_indent)$title^pa($left_indent)$wm_infos^pa($right_indent)$sys_infos"
done
~/.bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
pathdirs=(
~/scripts
)
for dir in $pathdirs; do
if [ -d $dir ]; then
path+=$dir
fi
done
export EDITOR="vim"
PS1='[\u@\h \W]\$ '
PROMPT_COMMAND='history -a'
export LANGUAGE="en_AU:en_GB:en"
alias n4="go-mtpfs /media/nexus"
alias n4dc="sudo umount /media/nexus"
Last edited by instantepiphany (2013-09-05 01:43:25)
Offline
Did you install Lemonboy's bar?
Personally I would try to take this configuration step by step and not just enable everything all at once. Like, try to get at least a basic bar first, and then apply some of windelicato's config on top of yours. That way, you can understand what is going on instead of copying and pasting tons of configs and expecting them all to work.
Offline
Yes, I have LemonBoy's bar installed, cloned it from his git and then compiled and installed it. I did actually do that, what you see in the screenshot(on windelicato's github) is a bar instance and a dzen2 instance. The music, time and other status info on the top right of the lefthand monitor in the screenshot being the dzen2 instance. I have that working, I just can't get the middle/left side to work, which displayes the desktops available (i-x on first monitor, I-X on second) and the selected window title.
I am thinking this may be something to do with panel_fifo, as I have never used it before and don't really understand it all that well. Doing "echo $PANEL_FIFO" just outputs an empty line in urxvt, but doing "cat /tmp/panel-fifo" outputs a list of windows that i have selected recently.
Last edited by instantepiphany (2013-09-04 05:06:19)
Offline
You need to set PANEL_FIFO in ~/.profile in the same way as your path, like:
PANEL_FIFO="/tmp/panel-fifo"
That way, your fifo can be created properly in .xinitrc
Last edited by Mindstormscreator (2013-09-04 10:57:58)
Offline
Panel still doesn't work, once I have added that to ~/.profile should "echo $PANEL_FIFO" produce "/tmp/panel-fifo"?
Running panel still gives the same errors as before:
/home/jordan/scripts/panel: line 6: : No such file or directory
/home/jordan/scripts/panel: line 7: : No such file or directory
cat: : No such file or directory
Offline
Did you log out and log back in? If so, and it still doesn't work, you may have to set the variable in another location such as /etc/profile or in a separate script in /etc/profile.d
Offline
Did you export the variable? Something like this:
export PANEL_FIFO=/tmp/panel-fifo
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO"
exec bspwm -s "$PANEL_FIFO" -p W
Offline
added that line to xinitrc, logged out and in and the bar starts now, and displays this
The uppercase roman numerals should be on my second monitor, which is on the right(not pictured). The bar extends the whole way across both monitors, which it should, but as I said the uppercase numbers should be on the righthand monitor, and the current window title should be in the middle of each monitor(or just the one with an active/selected window, I am not sure which but I know it shouldn't be stretched across both).
Also, if I try to run the dzen2 part of the case instance, I get
[jordan@jordanpc-linux ~]$ panel dzen2
/home/jordan/scripts/panel: line 6: : No such file or directory
/home/jordan/scripts/panel: line 7: : No such file or directory
cat: : No such file or directory
dzen: error, cannot allocate color ''
Making it the default within the file causes bspwm to start without a bar at all. I don't really mind whether I end up using bar or dzen2, as long as one works. I would however appreciate fixing both so I can learn why they aren't working.
Last edited by instantepiphany (2013-09-04 14:07:45)
Offline
Install sutils from baskerville's github and xtitle to fix the two errors by getting the clock and window title programs.
Offline
Thanks, had xtitle installed, I think those errors were related to the fact that I wasn't exporting PANEL_FIFO properly, because if I ran
export PANEL_FIFO=/tmp/panel-fifo
panel bar
the 6 line ran without error but the 7th still did(because I hadn't installed sutils).
Bar starts up now and all is well! Thanks for the help Mindstormscreator and bslackr.
Offline
Glad you got it working, just remember to mark the title of your original post as (Solved).
Last edited by Mindstormscreator (2013-09-05 01:42:29)
Offline
Oh yep, sorry!
Offline
Thanks, had xtitle installed, I think those errors were related to the fact that I wasn't exporting PANEL_FIFO properly, because if I ran
export PANEL_FIFO=/tmp/panel-fifo panel bar
the 6 line ran without error but the 7th still did(because I hadn't installed sutils).
Bar starts up now and all is well! Thanks for the help Mindstormscreator and bslackr.
How did you export PANEL_FIFO properly ?
You can find me @ ellugar.co
Offline
instantepiphany wrote:Thanks, had xtitle installed, I think those errors were related to the fact that I wasn't exporting PANEL_FIFO properly, because if I ran
export PANEL_FIFO=/tmp/panel-fifo panel bar
the 6 line ran without error but the 7th still did(because I hadn't installed sutils).
Bar starts up now and all is well! Thanks for the help Mindstormscreator and bslackr.How did you export PANEL_FIFO properly ?
You need
export PANEL_FIFO=/tmp/panel-fifo
in your xinitrc,
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO"
and
bspc control --subscribe > "$PANEL_FIFO" &
in your panel script. If you still have problems you should probably post your ~/.xinitrc and panel script.
Offline