You are not logged in.
3xOSC wrote:Hi there, I haven't used bspwm in about 8 months and I guessed a lot has changed, namely the rules.
I migrated old dotfiles over and majority of it seem to work, except my rules and external rules.
I noticed now, the rulc, ruld, rule_command and bspwm_rules
are no longer in the main repo of Baskerville.How can I get my old external_rules file, and the rules in my bspwmrc working again?
Here is my .xinitrc for reference.
Here's mine:
bspc rule -a chromium follow=on border=off bspc rule -a mpv desktop=^9 follow=on bspc rule -a photoqt desktop=^9 follow
Thanks a bunch. Tried it out with your config and also enabled external_rules in my xinitrc did the trick.
Also hda to remove the rulc/ruld stuff.
Offline
has anyone managed to get bar (lemon boys bar) set up that is clickable, ie you can click on a number to go to that workspace?
I've tried a few times but never found a setup that works for me.
You can like linux without becoming a fanatic!
Offline
Regarding rules:
If I have a urxvt term that opens ranger, how can I use the rules to make 'ranger' automatically go to desktop 3?
I tried to set it's instance name, but realized that because ranger is opened in urxvt, the instance is urxvt.
So I'm a bit stuck, if I set a rule with urxvt, all my future terminals will land in desktop 3
Offline
Regarding rules:
If I have a urxvt term that opens ranger, how can I use the rules to make 'ranger' automatically go to desktop 3?
I tried to set it's instance name, but realized that because ranger is opened in urxvt, the instance is urxvt.So I'm a bit stuck, if I set a rule with urxvt, all my future terminals will land in desktop 3
You can start urxvt with a name:
urxvt -name 'Ranger'
Offline
3xOSC wrote:Regarding rules:
If I have a urxvt term that opens ranger, how can I use the rules to make 'ranger' automatically go to desktop 3?
I tried to set it's instance name, but realized that because ranger is opened in urxvt, the instance is urxvt.So I'm a bit stuck, if I set a rule with urxvt, all my future terminals will land in desktop 3
You can start urxvt with a name:
urxvt -name 'Ranger'
You're wonderful. Thank you.
Offline
has anyone managed to get bar (lemon boys bar) set up that is clickable, ie you can click on a number to go to that workspace?
I've tried a few times but never found a setup that works for me.
Yes. It can look something like this:
o*)
# occupied desktop
wm_infos="${wm_infos}%{F$COLOR_OCCUPIED_FG}%{B$COLOR_OCCUPIED_BG}%{A:bspc desktop -f ${name}:} ${name} %{A}%{B-}%{F-}"
;;
f*)
# free desktop
wm_infos="${wm_infos}%{F$COLOR_FREE_FG}%{B$COLOR_FREE_BG}%{A:bspc desktop -f ${name}:} ${name} %{A}%{B-}%{F-}"
;;
Offline
That didn't work for me but I manged to get it going(by using dzen).
Is there a follow switch? I can send apps to other workspaces but is there a send and follow?
nevermind found something that works
control + {1-6}
nth={1-6} ; \
bspc window -d ^$nth ; \
bspc desktop -f ^$nth
Last edited by chickenPie4tea (2015-11-07 18:12:15)
You can like linux without becoming a fanatic!
Offline
That didn't work for me but I manged to get it going(by using dzen).
Is there a follow switch? I can send apps to other workspaces but is there a send and follow?
What´s the content of your panel script? It may be something there thats make it hard to click in lemonbar. I´m thinking about the "cat "$PANEL_FIFO" ...." part.
Offline
here is my panel script, everything shows up but isn't clickable, however I have a working setup using dzen
#! /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
[ -e /tmp/PANEL_FIFO ] && rm /tmp/PANEL_FIFO
mkfifo /tmp/PANEL_FIFO
bspc config top_padding $PANEL_HEIGHT
bspc control --subscribe > /tmp/PANEL_FIFO &
xtitle -sf "T%s" > /tmp/PANEL_FIFO &
PANEL_HEIGHT=18
#PANEL_FONT_FAMILY='dejavusansmono'
PANEL_FONT_SIZE=12
#. panel_colors
. /home/dka/.config/bspwm/panel_colors
cat /tmp/PANEL_FIFO | panel_bar | bar -g x$PANEL_HEIGHT -f "$PANEL_FONT_FAMILY" -F "$COLOR_FOREGROUND" -B "$COLOR_BACKGROUND" &
wait
Last edited by chickenPie4tea (2015-11-07 15:53:49)
You can like linux without becoming a fanatic!
Offline
if pgrep ...; then
...
fi
This is POSIX if you're worried about that.
Edit0: The use of a formatter for printf in your use doesn't make use of any formatting You might as well include the entire message in it.
Edit1: Why use cat instead of reading from the fifo in a while loop without wait?
Last edited by Earnestly (2015-11-07 19:34:12)
Offline
Some breaking changes (as of f28f334):
There's now a clear distinction between states (tiled, floating, …) and flags (sticky, private, …).
The previous -t|--toggle option is split into -t|--state and -g|--flag.
rule -a Foo floating=on private=off becomes rule -a Foo state=floating private=off.
window -t floating -t sticky becomes window -t floating -g sticky.
desktop -t|--toggle was removed because writing a script emulating its behavior is trivial.
Offline
Some breaking changes (as of f28f334):
Hi!
Have tried
bspc rule -a Pidgin state=floating
But the window is still arising as tiled. Current git state is in use. How to cue?
ADDITION: aha, have edited bspwmrc and restarted the wm, and all is Ok now. Probably old executed rules (in bspwmrc) some way interfered with new ones.
Last edited by student975 (2015-11-12 20:13:41)
"I exist" is the best myth I know..
Offline
On the github page in the examples folder there is a panel setup. Why not have 2 panel setups, one with a clickable bar?
Took me ages to get a setup using dzen and then later using lemon boys bar, but now happy with it.
You can like linux without becoming a fanatic!
Offline
If I have a browser opened on a desktop which has monocle mode and I open a floating terminal, how am I able to hide (or toggle visibility) between my browser in monocle mode and the terminal? i.e. i just want one of the two showing at each time)
Offline
I met a strange bug in bspwm, moving floating window become quiet slow and jump randomly.
Here is a video:
https://goo.gl/photos/VxWYyVEo33zCfDdw8
I am using Arch Linux and nvidia graphic card with two monitors. Any suggestions? Thank you so much.
I asked in this issue here: https://bbs.archlinux.org/viewtopic.php?id=205522 and someone suggest to use sxhkd -f 100, but still not lucky.
Offline
How can I set mpv play fullscreen override lemonbar?
http://imgur.com/IZOSC8c
Offline
Hi,
as of bspwm 1088, I've got the problem that commands like `bspc window -t floating` put the window into the given state, but the state isn't toggled anymore. I. e. in this example, the window is sent into the floating state, but can't be brought back into tiling state by executing this command again.
Toggling seems to be only dead for states, for flags, it still works…
Offline
Hi,
as of bspwm 1088, I've got the problem that commands like `bspc window -t floating` put the window into the given state, but the state isn't toggled anymore. I. e. in this example, the window is sent into the floating state, but can't be brought back into tiling state by executing this command again.
Toggling seems to be only dead for states, for flags, it still works…
Yes. To return back now I just use target mode having in sxhkdrc:
super + {s,f,t,p}
bspc window -t {floating,fullscreen,tiled,pseudo_tiled}
Last edited by student975 (2015-12-06 10:54:40)
"I exist" is the best myth I know..
Offline
Wait… Do you mean this is intended behaviour? O.o
Imho toggling means forward/backward with the SAME switch…
Offline
Wait… Do you mean this is intended behaviour? O.o
Imho toggling means forward/backward with the SAME switch…
I mean it isn't show stopper for me, and the concrete way is a matter of taste. Yes, it is possible to treat it as a bug (and probably it is). But the last one doesn't affect me
"I exist" is the best myth I know..
Offline
The generalization of the window commands to nodes finally happened in eb07d2f.
0.9.1 isn't released yet, but the transition guide is already there.
Offline
I have updated to the latest bspwm and although I have changed the settings within sxhkdrc (which works), I am having troubles getting the rules in bspwm to work.
Here is what I have in my bspwmrc:
https://paste.debian.net/361895/
I understand that for rule -a: "rule -a: it is now possible to specify the class name and instance name (e.g.: rule -a Foo:bar)" It mentions that is only "possible" so I did not do it.
Are there lines that have changed there as well?
Last edited by 3xOSC (2016-01-07 09:09:04)
Offline
I made a small configuration utility for bspwm using bash and fzf (from aur). It is not ready yet, but can be useful already. If somebody is interested, please test and give feedback!
It can also be found in github: https://github.com/Chrysostomus/bspwm-ruler/tree/master
#!/bin/bash
RED='\e[41m'
BLUE='\e[44m'
ORANGE='\e[46m'
NC='\e[0m'
rule_ops()
{
touch /tmp/rule_ops
echo -e "state=$(echo -e "tiling\npseudo-tiling\nfloating\nfullscreen" | fzf-tmux -e --reverse --prompt='Select state for chosen window class >')" >> /tmp/rule_ops
cat /tmp/rule_ops | xargs
read
window_manage=$(echo -e "on\noff" | fzf-tmux -e --reverse --prompt='manage= >')
echo -e "manage=$window_manage" >> /tmp/rule_ops
cat /tmp/rule_ops | xargs
read
window_layer=$(echo -e "below\nnormal\nabove" | fzf-tmux -e --reverse --prompt='layer= >')
echo -e "layer=$window_layer" >> /tmp/rule_ops
cat /tmp/rule_ops | xargs
read
window_flags=$(echo -e "sticky=on\nprivate=on\nlocked=on\nurgent=on\n' '" | fzf-tmux -e -m --reverse --prompt='Choose window flags (tab to select multiple) >')
echo -e "$window_flags" >> /tmp/rule_ops
cat /tmp/rule_ops | xargs
read
}
add_rule()
{
echo -e "Click on the window you wish to rule..."
class=$(xprop | awk '/WM_CLASS/ {print substr($4, 1, length($4)-1)}' | awk NR==1 | cut -c 2-)
echo ""
echo -e "You have chosen $class."
rule_ops
rule_command="bspc rule -a $class $(cat /tmp/rule_ops | xargs)"
$rule_command
echo "your rule is $rule_command. Would you like to make this rule permanent? (y/N)"
read -s -n1 yesno
case yesno in
y|Y)
echo -e "$rule_command" >> $HOME/.config/bspwm/bspwmrc
;;
*)
echo ""
echo -e "Okay. Press Return to continue"
read
;;
esac
rm /tmp/rule_ops
}
disable_rule()
{
for rule in $(bspc rule -l | fzf-tmux -e -m --reverse --prompt='Select rules to disable (use TAB to toggle selection) >' | awk '{print substr($1, 1, length($1)-2)}'); do
bspc rule -r $rule
done
}
rm_rule()
{
for rule in $(bspc rule -l | fzf-tmux -e -m --reverse --prompt='Select rules to remove (use TAB to toggle selection) >' | awk '{print substr($1, 1, length($1)-2)}'); do
sed -i "/rule -a $rule/d" $HOME/.config/bspwm/bspwmrc
sed -i "/rule --add $rule/d" $HOME/.config/bspwm/bspwmrc
done
}
bspwm_cfg()
{
for cfg in borderless_monocle gapless_monocle paddingless_monocle single_monocle history_aware_focus focus_by_distance focus_follows_pointer pointer_follows_focus ignore_emwh_focus center_pseudo-tiled remove_disabled_monitors remove_unplugged_monitors merge_overlapping_monitors; do
echo "$cfg $(bspc config $cfg)" >> /tmp/bspwm-configs
done
toggles=$(cat /tmp/bspwm-configs | fzf-tmux -e -m --reverse --prompt='Select configs to toggle (use TAB to toggle selection) >')
for tog in $toggles; do
toggle=$(bspc config $tog | \
awk -vtoggle="true" \
'{ if ($1 == "true") toggle="false"; print toggle }')
bspc config $tog $toggle
done
rm /tmp/bspwm-configs
}
main()
{
while true; do
clear
echo ""
echo -e " ::Bspwm settings:: "
echo -e " ┌─────────────────────────────────────────────────────────────┐"
echo -e " │ 1 Add a rule 2 Remove a rule │"
echo -e " │ 3 Configure settings 4 Disable a rule │"
echo -e " │ 5 Edit keydindings 6 Edit .profile │"
echo -e " │ 7 Edit autostart 8 Edit bspwmrc │"
echo -e " └─────────────────────────────────────────────────────────────┘"
echo -e " Select an item - 0 Exit "
echo ""
read -s -n1 choix
case $choix in
1)
echo
add_rule
echo ""
;;
2)
echo
rm_rule
echo ""
;;
3)
echo
bspwm_cfg
echo ""
;;
4)
echo
disable_rule
echo ""
;;
5)
echo
$EDITOR $HOME/.config/sxhkd/sxhkdrc
echo ""
;;
6)
echo
$EDITOR $HOME/.profile
echo ""
;;
7)
echo
$EDITOR $HOME/.config/bspwm/autostart
echo ""
;;
8)
echo
$EDITOR $HOME/.config/bspwm/bspwmrc
echo ""
;;
0)
clear && exit
read
;;
*)
echo -e "$RED Wrong option $NC"
echo "Wait and try again later..."
echo ""
sleep 1
clear
;;
esac
done
}
main
The difference between reality and fiction is that fiction has to make sense.
Offline