Re: [i3] Call for testing: upcoming i3 4.9 release

2015-02-21 Thread Baptiste Daroussin
2015-02-21 22:29 GMT+01:00 Michael Stapelberg :
> Hey,
>
> it’s been quite a while since the i3 4.8 release, so it’s time to do
> another release soon :).
>
> If you are not running a version of i3 built from the “next” branch,
> please upgrade and help us test :). You can check which version you
> are running by using i3 --moreversion. See also
> http://i3wm.org/docs/debugging.html
>
> To obtain a version built from “next”, check out
> http://i3wm.org/docs/repositories.html if you are using Debian or a
> derivative. For Arch Linux (and possibly others), install i3-git.
>
> In case you encounter any bug that wasn’t there in 4.8, please report
> it at https://github.com/i3/i3
>
> I’m planning to release in a week from now, i.e. on 2015-02-28.
>
> Thanks!
>
Works great on FreeBSD thanks !

Best regards,
Bapt


[i3] Call for testing: upcoming i3 4.9 release

2015-02-21 Thread Michael Stapelberg
Hey,

it’s been quite a while since the i3 4.8 release, so it’s time to do
another release soon :).

If you are not running a version of i3 built from the “next” branch,
please upgrade and help us test :). You can check which version you
are running by using i3 --moreversion. See also
http://i3wm.org/docs/debugging.html

To obtain a version built from “next”, check out
http://i3wm.org/docs/repositories.html if you are using Debian or a
derivative. For Arch Linux (and possibly others), install i3-git.

In case you encounter any bug that wasn’t there in 4.8, please report
it at https://github.com/i3/i3

I’m planning to release in a week from now, i.e. on 2015-02-28.

Thanks!

-- 
Best regards,
Michael


Re: [i3] Code for titlebar borders

2015-02-21 Thread Michael Stapelberg
I see. But then you’ve been looking at the right thing all along.

On Sat, Feb 21, 2015 at 7:48 PM, Bigby James
 wrote:
> On 02/21, Michael Stapelberg wrote:
>> Are you aware of
>> http://i3wm.org/docs/userguide.html#_border_style_for_new_windows,
>> specifically something like “new_window pixel 4”?
>
> Yes I am. I'm referring to the two horizontal lines drawn across the top and
> bottom edges of the titlebar (affected by the "border" color setting), *not* 
> the
> container frame (affected by the "background" color setting). Confusion no 
> doubt
> arises from the fact that "border" has two distinct meanings in i3 parlance.
>
> --
> "A common mistake that people make when trying to design something completely
> foolproof is to underestimate the ingenuity of complete fools." - Douglas 
> Adams
>



-- 
Best regards,
Michael


Re: [i3] Code for titlebar borders

2015-02-21 Thread Bigby James
On 02/21, Michael Stapelberg wrote:
> Are you aware of
> http://i3wm.org/docs/userguide.html#_border_style_for_new_windows,
> specifically something like “new_window pixel 4”?

Yes I am. I'm referring to the two horizontal lines drawn across the top and
bottom edges of the titlebar (affected by the "border" color setting), *not* the
container frame (affected by the "background" color setting). Confusion no doubt
arises from the fact that "border" has two distinct meanings in i3 parlance.

-- 
"A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools." - Douglas Adams



Re: [i3] Assign workspaces to outputs dynamically.

2015-02-21 Thread Michael Stapelberg
Correct. I’m not sure if reload does the trick or if a restart is
required. In case reload is not sufficient, I bet TonyC is interested
in fixing that ;).

On Sat, Feb 21, 2015 at 11:47 AM, Layus  wrote:
> @Michael,
>
> You mean that I should rewrite .i3/config and reload (restart?) i3 every
> time I detect a monitor change, right ?
>
> This seems a bit overkill but might just work.
> I will try that on Monday.
>
> Le 21/02/15 11:25, Michael Stapelberg a écrit :
>
>> For the level of customization you describe, you’ll need to create a
>> simple script that generates/puts together your config file. See e.g.
>> https://faq.i3wm.org/question/1367/anyway-to-include-in-config-file/
>>
>> On Tue, Feb 17, 2015 at 9:31 PM, Serge van Ginderachter
>>  wrote:
>>>
>>> fwiw, I use a script that detects things like which monitor is connected,
>>> and falls back to certain defaults, or can be forced to e.g. VGA display
>>> etc.
>>>
>>>  https://github.com/srvg/dotfiles/blob/master/bin/xdisp
>>>
>>> HTH,
>>>
>>>Serge
>>>
>>> On 17 February 2015 at 21:24, Layus  wrote:

 Hi,

 I use my laptop in three different environments with different randr
 outputs enabled.
 I often switch between environments, and could not configure i3 to place
 my workspaces on the desired outputs.
 My randr configuration is updated automatically on udev drm change
 events
 with autorandr.
 Is there some way to specify dynamic output bindings ?

 My three environments are pretty simple :

 Nomad (undocked)

 eDP1 connected primary ← all workspaces

 Docked

 eDP1 connected ← workspace 0
 DP1-1 connected primary ← all other workspaces

 Presentation

 VGA1 connected ← workspace 0
 eDP1 connected primary ← all other workspaces

 My current config works for situation 1 and 2 :

 workspace 0 output eDP1

 workspace 1 output DP1-1
 workspace 2 output DP1-1
 workspace 3 output DP1-1
 workspace 4 output DP1-1
 workspace 5 output DP1-1
 workspace 6 output DP1-1
 workspace 7 output DP1-1
 workspace 8 output DP1-1
 workspace 9 output DP1-1
 workspace 10 output DP1-1

 This is already a hack because the configuration describes the Docked
 configuration.
 It incidentally works when Undocked because there is only one output,
 and
 all workspaces are mapped to it.

 It does not work at all for my presentation.

 One solution that would suit me would be to extend the workspace 
 output command to support multiple outputs in order of preference.
 for example, worspace 0 output(s) VGA1 eDP1 would place workspace 0 on
 the
 projector when available, and on eDP1 otherwise.

 Do you find this useful ?

 Layus.
>>>
>>>
>>
>>
>



-- 
Best regards,
Michael


Re: [i3] Assign workspaces to outputs dynamically.

2015-02-21 Thread Layus

@Michael,

You mean that I should rewrite .i3/config and reload (restart?) i3 every 
time I detect a monitor change, right ?


This seems a bit overkill but might just work.
I will try that on Monday.

Le 21/02/15 11:25, Michael Stapelberg a écrit :

For the level of customization you describe, you’ll need to create a
simple script that generates/puts together your config file. See e.g.
https://faq.i3wm.org/question/1367/anyway-to-include-in-config-file/

On Tue, Feb 17, 2015 at 9:31 PM, Serge van Ginderachter
 wrote:

fwiw, I use a script that detects things like which monitor is connected,
and falls back to certain defaults, or can be forced to e.g. VGA display
etc.

 https://github.com/srvg/dotfiles/blob/master/bin/xdisp

HTH,

   Serge

On 17 February 2015 at 21:24, Layus  wrote:

Hi,

I use my laptop in three different environments with different randr
outputs enabled.
I often switch between environments, and could not configure i3 to place
my workspaces on the desired outputs.
My randr configuration is updated automatically on udev drm change events
with autorandr.
Is there some way to specify dynamic output bindings ?

My three environments are pretty simple :

Nomad (undocked)

eDP1 connected primary ← all workspaces

Docked

eDP1 connected ← workspace 0
DP1-1 connected primary ← all other workspaces

Presentation

VGA1 connected ← workspace 0
eDP1 connected primary ← all other workspaces

My current config works for situation 1 and 2 :

workspace 0 output eDP1

workspace 1 output DP1-1
workspace 2 output DP1-1
workspace 3 output DP1-1
workspace 4 output DP1-1
workspace 5 output DP1-1
workspace 6 output DP1-1
workspace 7 output DP1-1
workspace 8 output DP1-1
workspace 9 output DP1-1
workspace 10 output DP1-1

This is already a hack because the configuration describes the Docked
configuration.
It incidentally works when Undocked because there is only one output, and
all workspaces are mapped to it.

It does not work at all for my presentation.

One solution that would suit me would be to extend the workspace 
output command to support multiple outputs in order of preference.
for example, worspace 0 output(s) VGA1 eDP1 would place workspace 0 on the
projector when available, and on eDP1 otherwise.

Do you find this useful ?

Layus.









Re: [i3] Assign workspaces to outputs dynamically.

2015-02-21 Thread Michael Stapelberg
On Sat, Feb 21, 2015 at 11:40 AM, Layus  wrote:
> Hi,
>
> The configuration directive workspace 1 output DP1-1 seems to have no
> “command” counterpart.
> (i.e. i3-msg workspace 1 output DP1-1 creates a new workspace named “1
> output DP1-1”)
>
> This means that I am unable to remap dynamically workspaces to outputs.
> Am I missing some option or should I fill a feature request/provide a patch
> ?

It does, see 
http://i3wm.org/docs/userguide.html#_moving_containers_workspaces_to_randr_outputs

>
> @Serge:
> Thank you for your response.
>
> I have looked into autorandr, and it does indeed provide a postswitch hook.
> I have added some reconfiguration for i3 there (see my postswitch file
> https://gist.github.com/layus/89a6bb8feebe6c1f96d2)
>
> Regards,
> Layus
>
> Le 17/02/15 21:31, Serge van Ginderachter a écrit :
>
> fwiw, I use a script that detects things like which monitor is connected,
> and falls back to certain defaults, or can be forced to e.g. VGA display
> etc.
>
> https://github.com/srvg/dotfiles/blob/master/bin/xdisp
>
> HTH,
>
>   Serge
>
> On 17 February 2015 at 21:24, Layus  wrote:
>>
>> Hi,
>>
>> I use my laptop in three different environments with different randr
>> outputs enabled.
>> I often switch between environments, and could not configure i3 to place
>> my workspaces on the desired outputs.
>> My randr configuration is updated automatically on udev drm change events
>> with autorandr.
>> Is there some way to specify dynamic output bindings ?
>>
>> My three environments are pretty simple :
>>
>> Nomad (undocked)
>>
>> eDP1 connected primary ← all workspaces
>>
>> Docked
>>
>> eDP1 connected ← workspace 0
>> DP1-1 connected primary ← all other workspaces
>>
>> Presentation
>>
>> VGA1 connected ← workspace 0
>> eDP1 connected primary ← all other workspaces
>>
>> My current config works for situation 1 and 2 :
>>
>> workspace 0 output eDP1
>>
>> workspace 1 output DP1-1
>> workspace 2 output DP1-1
>> workspace 3 output DP1-1
>> workspace 4 output DP1-1
>> workspace 5 output DP1-1
>> workspace 6 output DP1-1
>> workspace 7 output DP1-1
>> workspace 8 output DP1-1
>> workspace 9 output DP1-1
>> workspace 10 output DP1-1
>>
>> This is already a hack because the configuration describes the Docked
>> configuration.
>> It incidentally works when Undocked because there is only one output, and
>> all workspaces are mapped to it.
>>
>> It does not work at all for my presentation.
>>
>> One solution that would suit me would be to extend the workspace 
>> output command to support multiple outputs in order of preference.
>> for example, worspace 0 output(s) VGA1 eDP1 would place workspace 0 on the
>> projector when available, and on eDP1 otherwise.
>>
>> Do you find this useful ?
>>
>> Layus.
>
>

-- 
Best regards,
Michael


Re: [i3] Assign workspaces to outputs dynamically.

2015-02-21 Thread Layus

Hi,

The configuration directive |workspace 1 output DP1-1| seems to have no 
“command” counterpart.
(i.e. i3-msg workspace 1 output DP1-1 creates a new workspace named “1 
output DP1-1”)


This means that I am unable to remap dynamically workspaces to outputs.
Am I missing some option or should I fill a feature request/provide a 
patch ?


@Serge:
Thank you for your response.

I have looked into autorandr, and it does indeed provide a postswitch hook.
I have added some reconfiguration for i3 there (see my postswitch file 
https://gist.github.com/layus/89a6bb8feebe6c1f96d2)


Regards,
Layus

Le 17/02/15 21:31, Serge van Ginderachter a écrit :

fwiw, I use a script that detects things like which monitor is 
connected, and falls back to certain defaults, or can be forced to 
e.g. VGA display etc.


https://github.com/srvg/dotfiles/blob/master/bin/xdisp

HTH,

  Serge

On 17 February 2015 at 21:24, Layus > wrote:


Hi,

I use my laptop in three different environments with different
randr outputs enabled.
I often switch between environments, and could not configure i3 to
place my workspaces on the desired outputs.
My randr configuration is updated automatically on udev drm change
events with autorandr .
Is there some way to specify dynamic output bindings ?

My three environments are pretty simple :

 1. /Nomad (undocked)/
  * eDP1 connected primary ← all workspaces
 2. /Docked/
  * eDP1 connected ← workspace 0
  * DP1-1 connected primary ← all other workspaces
 3. /Presentation/
  * VGA1 connected ← workspace 0
  * eDP1 connected primary ← all other workspaces

My current config works for situation 1 and 2 :

|workspace 0 output eDP1

workspace 1 output DP1-1
workspace 2 output DP1-1
workspace 3 output DP1-1
workspace 4 output DP1-1
workspace 5 output DP1-1
workspace 6 output DP1-1
workspace 7 output DP1-1
workspace 8 output DP1-1
workspace 9 output DP1-1
workspace 10 output DP1-1
|

This is already a hack because the configuration describes the
/Docked/ configuration.
It incidentally works when /Undocked/ because there is only one
output, and all workspaces are mapped to it.

It does not work at all for my presentation.

One solution that would suit me would be to extend the |workspace
 output| command to support multiple outputs in order of
preference.
for example, |worspace 0 output(s) VGA1 eDP1| would place
workspace 0 on the projector when available, and on eDP1 otherwise.

Do you find this useful ?

Layus.

​



​

​


Re: [i3] Assign workspaces to outputs dynamically.

2015-02-21 Thread Michael Stapelberg
For the level of customization you describe, you’ll need to create a
simple script that generates/puts together your config file. See e.g.
https://faq.i3wm.org/question/1367/anyway-to-include-in-config-file/

On Tue, Feb 17, 2015 at 9:31 PM, Serge van Ginderachter
 wrote:
> fwiw, I use a script that detects things like which monitor is connected,
> and falls back to certain defaults, or can be forced to e.g. VGA display
> etc.
>
> https://github.com/srvg/dotfiles/blob/master/bin/xdisp
>
> HTH,
>
>   Serge
>
> On 17 February 2015 at 21:24, Layus  wrote:
>>
>> Hi,
>>
>> I use my laptop in three different environments with different randr
>> outputs enabled.
>> I often switch between environments, and could not configure i3 to place
>> my workspaces on the desired outputs.
>> My randr configuration is updated automatically on udev drm change events
>> with autorandr.
>> Is there some way to specify dynamic output bindings ?
>>
>> My three environments are pretty simple :
>>
>> Nomad (undocked)
>>
>> eDP1 connected primary ← all workspaces
>>
>> Docked
>>
>> eDP1 connected ← workspace 0
>> DP1-1 connected primary ← all other workspaces
>>
>> Presentation
>>
>> VGA1 connected ← workspace 0
>> eDP1 connected primary ← all other workspaces
>>
>> My current config works for situation 1 and 2 :
>>
>> workspace 0 output eDP1
>>
>> workspace 1 output DP1-1
>> workspace 2 output DP1-1
>> workspace 3 output DP1-1
>> workspace 4 output DP1-1
>> workspace 5 output DP1-1
>> workspace 6 output DP1-1
>> workspace 7 output DP1-1
>> workspace 8 output DP1-1
>> workspace 9 output DP1-1
>> workspace 10 output DP1-1
>>
>> This is already a hack because the configuration describes the Docked
>> configuration.
>> It incidentally works when Undocked because there is only one output, and
>> all workspaces are mapped to it.
>>
>> It does not work at all for my presentation.
>>
>> One solution that would suit me would be to extend the workspace 
>> output command to support multiple outputs in order of preference.
>> for example, worspace 0 output(s) VGA1 eDP1 would place workspace 0 on the
>> projector when available, and on eDP1 otherwise.
>>
>> Do you find this useful ?
>>
>> Layus.
>
>



-- 
Best regards,
Michael


Re: [i3] I3 and emacs

2015-02-21 Thread Michael Stapelberg
See https://faq.i3wm.org/question/360/emacs-like-keybinding/

On Sat, Feb 21, 2015 at 8:45 AM, Jeff Abrahamson  wrote:
> I'd like to use I3 and emacs. I don't have a spare modifier key on my
> keyboard, so I'd like to use a prefix key. Maybe I missed it in the docs, in
> which case, please accept my apologies. (I've only just begun to look at the
> source.)
>
> 1. Is there support for this currently in I3?
>
> 2. If not, is there interest in a patch?
>
> Jeff Abrahamson
> +33 6 24 40 01 57
> +44 7920 594 255<-- only if I'm in the UK
>
> http://jeff.purple.com/
> http://blog.purple.com/jeff/



-- 
Best regards,
Michael


Re: [i3] Code for titlebar borders

2015-02-21 Thread Michael Stapelberg
Are you aware of
http://i3wm.org/docs/userguide.html#_border_style_for_new_windows,
specifically something like “new_window pixel 4”?

To answer your actual question: I think
https://github.com/i3/i3/blob/fbe25297b7921c390bcdac846710667fc04569f8/src/con.c#L1130
is what you’re looking for.

On Fri, Feb 20, 2015 at 5:16 PM, Bigby James
 wrote:
> Howdy-ha, all. This message is basically a rehash of a question I asked on the
> FAQ.[1] It didn't get any responses, so I'm just giving this list a shot to 
> see
> if anyone can point me in the right direction.
>
> I'm looking for the portion of the i3 source code that controls the thickness
> (height) of the titlebar borders, in the hopes of increasing that thickness. 
> The
> goal is to make the border slight thicker in order to make it more prominent,
> making it another indicator of the focus status of a window rather than a mere
> aesthetic supplement to the background color of the window's titlebar 
> (although
> I also think it would look nice; it's not *just* a practical thing ;) ).
>
> I'm not much of a coder, so the closest related thing I've found that seems
> relevant is the following snippet from '/src/x.c':
>
>> /* 5: draw two unconnected horizontal lines in border color */
>> xcb_change_gc(conn, parent->pm_gc, XCB_GC_FOREGROUND, (uint32_t[])
>> {p->color->border});
>> Rect *dr = &(con->deco_rect);
>> int deco_diff_l = 2;
>> int deco_diff_r = 2;
>> if (parent->layout == L_TABBED) {
>> if (TAILQ_PREV(con, nodes_head, nodes) != NULL)
>> deco_diff_l = 0;
>> if (TAILQ_NEXT(con, nodes) != NULL)
>> deco_diff_r = 0;
>> }
>>
>> xcb_segment_t segments[] = {
>> {dr->x, dr->y,
>> dr->x + dr->width - 1, dr->y},
>> {dr->x + deco_diff_l, dr->y + dr->height - 1,
>> dr->x - deco_diff_r + dr->width - 1,
>> dr->y + dr->height - 1}};
>> xcb_poly_segment(conn, parent->pixmap, parent->pm_gc, 2, segments);
>
> This mostly seems to control the position and padding of the border, but not 
> its
> thickness/height, so I feel like it's the wrong place to look.  If anyone can
> either correct me if I'm wrong or let me know where in the code to look, I'd
> appreciate it.  Thanks for your time; take care.
>
> - Bigby
>
> [1]: https://faq.i3wm.org/question/5385/code-for-window-title-border/
>
> --
> "A common mistake that people make when trying to design something completely
> foolproof is to underestimate the ingenuity of complete fools." - Douglas 
> Adams
>



-- 
Best regards,
Michael