You are not logged in.

#1576 2015-10-30 06:14:36

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: bspwm — A tiling window manager based on binary space partitioning

oceans11 wrote:
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

#1577 2015-10-30 18:55:00

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1578 2015-11-01 21:56:41

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1579 2015-11-01 23:56:28

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: bspwm — A tiling window manager based on binary space partitioning

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'

Offline

#1580 2015-11-02 03:00:28

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: bspwm — A tiling window manager based on binary space partitioning

kaptenen wrote:
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

#1581 2015-11-02 07:35:57

th3voic3
Member
Registered: 2012-03-20
Posts: 92

Re: bspwm — A tiling window manager based on binary space partitioning

chickenPie4tea wrote:

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

#1582 2015-11-07 09:53:32

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1583 2015-11-07 10:27:10

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: bspwm — A tiling window manager based on binary space partitioning

chickenPie4tea wrote:

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

#1584 2015-11-07 15:52:55

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1585 2015-11-07 19:31:03

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1586 2015-11-07 20:00:42

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

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.


gh · da · ds

Offline

#1587 2015-11-12 14:31:23

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: bspwm — A tiling window manager based on binary space partitioning

bloom wrote:

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

#1588 2015-11-22 10:24:49

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1589 2015-11-22 18:47:11

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1590 2015-11-30 01:51:14

mssun
Member
Registered: 2013-04-06
Posts: 33

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1591 2015-12-04 16:07:58

tthanh16
Member
Registered: 2015-11-24
Posts: 4
Website

Re: bspwm — A tiling window manager based on binary space partitioning

How can I set mpv  play fullscreen override lemonbar?
http://imgur.com/IZOSC8c

Offline

#1592 2015-12-06 10:50:35

cju
Member
Registered: 2013-06-23
Posts: 194

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1593 2015-12-06 10:54:28

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: bspwm — A tiling window manager based on binary space partitioning

cju wrote:

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

#1594 2015-12-06 11:08:51

cju
Member
Registered: 2013-06-23
Posts: 194

Re: bspwm — A tiling window manager based on binary space partitioning

Wait… Do you mean this is intended behaviour? O.o

Imho toggling means forward/backward with the SAME switch…

Offline

#1595 2015-12-06 11:10:59

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: bspwm — A tiling window manager based on binary space partitioning

cju wrote:

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 smile


"I exist" is the best myth I know..

Offline

#1596 2015-12-22 17:59:31

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

A dark, musical logo.


gh · da · ds

Offline

#1597 2015-12-22 18:32:34

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

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.


gh · da · ds

Offline

#1598 2015-12-24 00:27:00

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: bspwm — A tiling window manager based on binary space partitioning

*clap*. Nice!


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#1599 2016-01-07 09:07:21

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: bspwm — A tiling window manager based on binary space partitioning

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

#1600 2016-02-27 07:00:03

Chrysostomus
Member
Registered: 2015-09-13
Posts: 64
Website

Re: bspwm — A tiling window manager based on binary space partitioning

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

Board footer

Powered by FluxBB