You are not logged in.

#51 2011-11-07 12:56:54

sablabra
Member
Registered: 2008-07-21
Posts: 32

Re: herbstluftwm

Ohh, I didn't know that was shown in list_monitors. Thanks, I'll make a little script then

Offline

#52 2011-11-07 14:24:40

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

Re: herbstluftwm

Does herbstluftwm reacts to 'xdotool windowactivate foo_id'?
Would it be possible to have fullscreen 'enter' and 'leave' hooks to automatically disable 'xscreensaver' and 'dpms' while in fullscreen?
To get the title of the current client when it changes, custom hooks are needed right?
It means one has to do 'emit_hook title_changed' on each 'shift', 'focus', etc.?


gh · da · ds · cr · ab · fkr

Offline

#53 2011-11-07 20:09:09

thorsten
Member
From: Germany
Registered: 2010-02-24
Posts: 151

Re: herbstluftwm

bloom wrote:

Does herbstluftwm reacts to 'xdotool windowactivate foo_id'?

No, not yet. But EWMH-Support will be implemented soon (next weeks/months...)

bloom wrote:

Would it be possible to have fullscreen 'enter' and 'leave' hooks to automatically disable 'xscreensaver' and 'dpms' while in fullscreen?

This sounds very useful. So I just implemented it. The usage of this hook is:

fullscreen [on|off] WINID STATE
    the fullscreen state of window WINID was changed to [on|off].
bloom wrote:

To get the title of the current client when it changes, custom hooks are needed right?
It means one has to do 'emit_hook title_changed' on each 'shift', 'focus', etc.?

Yes, but this would be quite a dirty hack. A clean solution would be to wait for EWMH, because he hook for it will come together with (partial/full/?) EWMH-Support wink

Offline

#54 2011-11-09 20:24:45

Doomcide
Member
Registered: 2011-08-22
Posts: 221

Re: herbstluftwm

I'm trying to let my autostart applications start in certain frames at startup, by applying rules with the "once" flag, but it only works for one terminal in the "11" frame and the terminal that goes there is random...

layout dump I load (for testing purposes):

hc load "(split horizontal:0.449800:0 (split vertical:0.800000:0 (split vertical:0.600000:0 (clients vertical:0 0x1a00006) (clients vertical:0 0x2600006)) (clients vertical:0 0x1800006)) (split vertical:0.800000:1 (clients vertical:0 0x1600006) (clients vertical:0 0x2800006)))"

spawning and ruling terminals:

hc spawn urxvt
hc rule once instance='urxvt' index=10
hc spawn urxvt
hc rule once instance='urxvt' index=01
hc spawn urxvt
hc spawn urxvt -e centerim
hc rule once instance='urxvt' index=001
hc spawn urxvt -e ranger
hc rule once instance='urxvt' index=11

Offline

#55 2011-11-09 20:45:41

jealma
Member
From: The Netherlands
Registered: 2008-01-03
Posts: 71

Re: herbstluftwm

ninjaaron wrote:

Why, I'm glad you asked wink

http://ubuntuone.com/0vgOBcaoQfLwdWCfywENUT

Left to right:
Some code, sample latin-based characters, some Hebrew above a gtk widget about a bit of ascii art.  Conky on top.

Also there is an AUR package, but I just pushed a new update yesterday, and the package isn't updated.  I want to call it 1.0 soon, but I'm waiting for more feedback.

Offtopic: the Hebrew from "pointed text" in your screenshot is from Psalm 29, starting at verse 3, isn't it? Funny to encounter this here, as I have just translated Ps. 29 for my Hebrew assessment next friday.

Offline

#56 2011-11-10 12:49:55

ninjaaron
Member
Registered: 2010-12-10
Posts: 284

Re: herbstluftwm

jealma wrote:
ninjaaron wrote:

Why, I'm glad you asked wink

http://ubuntuone.com/0vgOBcaoQfLwdWCfywENUT

Left to right:
Some code, sample latin-based characters, some Hebrew above a gtk widget about a bit of ascii art.  Conky on top.

Also there is an AUR package, but I just pushed a new update yesterday, and the package isn't updated.  I want to call it 1.0 soon, but I'm waiting for more feedback.

Offtopic: the Hebrew from "pointed text" in your screenshot is from Psalm 29, starting at verse 3, isn't it? Funny to encounter this here, as I have just translated Ps. 29 for my Hebrew assessment next friday.

עין טוב!

Yeah.  I'm a grad student in Bible at Hebrew U in Jerusalem.  It's a fascinating texts that raises a lot of questions about the relationship between Ugarit and Israel.

Last edited by ninjaaron (2011-11-10 13:01:16)

Offline

#57 2011-11-10 19:46:23

thorsten
Member
From: Germany
Registered: 2010-02-24
Posts: 151

Re: herbstluftwm

Doomcide wrote:

I'm trying to let my autostart applications start in certain frames at startup, by applying rules with the "once" flag, but it only works for one terminal in the "11" frame and the terminal that goes there is random...

layout dump I load (for testing purposes):

hc load "(split horizontal:0.449800:0 (split vertical:0.800000:0 (split vertical:0.600000:0 (clients vertical:0 0x1a00006) (clients vertical:0 0x2600006)) (clients vertical:0 0x1800006)) (split vertical:0.800000:1 (clients vertical:0 0x1600006) (clients vertical:0 0x2800006)))"

spawning and ruling terminals:

hc spawn urxvt
hc rule once instance='urxvt' index=10
hc spawn urxvt
hc rule once instance='urxvt' index=01
hc spawn urxvt
hc spawn urxvt -e centerim
hc rule once instance='urxvt' index=001
hc spawn urxvt -e ranger
hc rule once instance='urxvt' index=11

there are some reasons why this doesn't work with your code:

  1. the rule has to be there _before_ the client appears. spawn does a fork&exec, and then the urxvt binary shows a window after some time, so there is no guarantee that the centerim-urxvt appears before the ranger urxvt. the spawn doesn't wait until a urxvt window appears

  2. once means that the rule is only applied once. it does _not_ mean that it is the only rule that's applied. so if three once-rules are added before the first urxvt-window appears, then _all_ rules are applied (and they aren't applied to the other urxvt-clients because they will be only applied once)

  3. your urxvts can't be distinguished. so the centerim-urxvt also can match the first urxvt rule.

You need two things to fix this:

  1. First create the rule, then spawn the application

  2. Make the urxvt instance unique. There are two different possibilities to do this

    • distinguish per instance name:
      set the urxvt instance with: urxvt -name myinstance
      and then make a rule with: hc rule instance=myinstance ...

    • distinguish per process id (much cooler but it's not network-transparent and not supported by all applications)
      the code for the ranger-urxvt and centerim-urxvt would be:

      (
         # 1. enforce a new subshell by &
         # 2. create a rule for this process
         hc rule once pid=$$ expire=30 index=11
         # 3. exec into the desired command
         exec urxvt -e ranger
      ) &
      (
        hc rule once pid=$$ expire=30 index=001
        exec urxvt -e centerim
      )&

       

EDIT: and you probably don't want to put it in your autostart but in an extra script to avoid the urxvts to be started on each reload wink

Last edited by thorsten (2011-11-10 19:49:14)

Offline

#58 2011-11-10 20:16:21

Doomcide
Member
Registered: 2011-08-22
Posts: 221

Re: herbstluftwm

@ thorsten: Just tried it, doesn't work when using the pid method:

(
hc rule once pid=$$ expire=10 index=10
exec urxvt
) &
(
hc rule once pid=$$ expire=10 index=01
exec urxvt -e ncmpcpp
) &
(
hc rule once pid=$$ expire=10 index=001
exec urxvt -e centerim
) &
(
hc rule once pid=$$ expire=10 index=11
exec urxvt -e ranger
) 

The -name method works, but forces me to specify the resources again for each different istance-name, which I would rather avoid.

Last edited by Doomcide (2011-11-10 20:20:45)

Offline

#59 2011-11-10 22:28:06

thorsten
Member
From: Germany
Registered: 2010-02-24
Posts: 151

Re: herbstluftwm

Doomcide wrote:

@ thorsten: Just tried it, doesn't work when using the pid method:
The -name method works, but forces me to specify the resources again for each different istance-name, which I would rather avoid.

you are right. I just posted it without testing it. at first it isn't called expire but maxage, and the $$ does not expand to the pid of the subshell but to the parent pid. If you are using bash, then this works (now it is tested).. at least in bash >= 4.0 smile

#!/bin/bash

spawn_at() {(
    herbstclient rule once pid=$BASHPID maxage=10 index="$1"
    shift
    exec "$@"
    ) &
}

spawn_at 10 urxvt
spawn_at 01 urxvt -e ncmpcpp
spawn_at 001 urxvt -e cat
spawn_at 11 urxvt -e tty-clock

Offline

#60 2011-11-11 06:01:51

ninjaaron
Member
Registered: 2010-12-10
Posts: 284

Re: herbstluftwm

I just learned a bunch of bash that I never knew.

Offline

#61 2011-11-11 10:04:59

Doomcide
Member
Registered: 2011-08-22
Posts: 221

Re: herbstluftwm

Works like a charm, now. Thanks! smile

Offline

#62 2011-11-14 04:34:35

Wintervenom
Member
From: /home/wintervenom
Registered: 2008-08-20
Posts: 1,011
Website

Re: herbstluftwm

Whenever I restart HLWM, it does not seem to re-map windows that were not on the current tag.  I can see them in xwininfo, but can't get them back.  Is there any thing I can do to fix or work around this?

Last edited by Wintervenom (2011-11-14 04:35:19)


My [GitHub] and my [artwork].
Data is guaranteed to stay crunchy in milk.
Keep your _✍ hand strong.

Offline

#63 2011-11-15 13:20:35

clod89
Member
Registered: 2011-11-14
Posts: 18

Re: herbstluftwm

I can't get rid of a green border all around the screen, is there an option in the config or is it related to something else?

Offline

#64 2011-11-15 15:50:02

Doomcide
Member
Registered: 2011-08-22
Posts: 221

Re: herbstluftwm

clod89 wrote:

I can't get rid of a green border all around the screen, is there an option in the config or is it related to something else?

Could you specify which border you mean or maybe provide a screenshot?

Offline

#65 2011-11-15 19:08:32

clod89
Member
Registered: 2011-11-14
Posts: 18

Re: herbstluftwm

Doomcide wrote:
clod89 wrote:

I can't get rid of a green border all around the screen, is there an option in the config or is it related to something else?

Could you specify which border you mean or maybe provide a screenshot?

with the background set to back i have a green border all around it, as soon as i spawn a terminal and resize it everything turns green.



Sceenshot after opening a terminal http://img33.imageshack.us/img33/598/20 … 0x1050.png

Screenshot after closing it: http://img197.imageshack.us/img197/4068 … 0x1050.png

Offline

#66 2011-11-15 19:43:01

Doomcide
Member
Registered: 2011-08-22
Posts: 221

Re: herbstluftwm

clod89 wrote:
Doomcide wrote:
clod89 wrote:

I can't get rid of a green border all around the screen, is there an option in the config or is it related to something else?

Could you specify which border you mean or maybe provide a screenshot?

with the background set to back i have a green border all around it, as soon as i spawn a terminal and resize it everything turns green.



Sceenshot after opening a terminal http://img33.imageshack.us/img33/598/20 … 0x1050.png

Screenshot after closing it: http://img197.imageshack.us/img197/4068 … 0x1050.png

Ok, do you switch to floating mode, or are you splitting the frames for resizing? Also: Could you please post your configs?

Offline

#67 2011-11-15 19:52:27

thorsten
Member
From: Germany
Registered: 2010-02-24
Posts: 151

Re: herbstluftwm

clod89 wrote:
Doomcide wrote:
clod89 wrote:

I can't get rid of a green border all around the screen, is there an option in the config or is it related to something else?

Could you specify which border you mean or maybe provide a screenshot?

with the background set to back i have a green border all around it, as soon as i spawn a terminal and resize it everything turns green.



Sceenshot after opening a terminal http://img33.imageshack.us/img33/598/20 … 0x1050.png

Screenshot after closing it: http://img197.imageshack.us/img197/4068 … 0x1050.png

This is not the border. This is your background. you can remove it with this command

herbstclient set window_gap 0

Offline

#68 2011-11-15 19:56:26

thorsten
Member
From: Germany
Registered: 2010-02-24
Posts: 151

Re: herbstluftwm

Wintervenom wrote:

Whenever I restart HLWM, it does not seem to re-map windows that were not on the current tag.  I can see them in xwininfo, but can't get them back.  Is there any thing I can do to fix or work around this?

HLWM re-maps all windows on quit. but not if you kill it. Quit herbstluftwm with

herbstclient quit

If you really have to restart it, then all windows will be re-mapped and put on the first tag. You can restart it with:

herbstclient wmexec

But actually you don't need to restart hlwm. everything can be configured during runtime. just reload the current config:

herbstclient reload

Please also check the FAQ

Offline

#69 2011-11-15 20:32:21

clod89
Member
Registered: 2011-11-14
Posts: 18

Re: herbstluftwm

thorsten wrote:
clod89 wrote:
Doomcide wrote:

Could you specify which border you mean or maybe provide a screenshot?

with the background set to back i have a green border all around it, as soon as i spawn a terminal and resize it everything turns green.



Sceenshot after opening a terminal http://img33.imageshack.us/img33/598/20 … 0x1050.png

Screenshot after closing it: http://img197.imageshack.us/img197/4068 … 0x1050.png

This is not the border. This is your background. you can remove it with this command

herbstclient set window_gap 0

I knew i was missing something, thanks smile

Offline

#70 2011-11-16 05:06:23

Wintervenom
Member
From: /home/wintervenom
Registered: 2008-08-20
Posts: 1,011
Website

Re: herbstluftwm

thorsten wrote:
Wintervenom wrote:

Whenever I restart HLWM, it does not seem to re-map windows that were not on the current tag.  I can see them in xwininfo, but can't get them back.  Is there any thing I can do to fix or work around this?

HLWM re-maps all windows on quit. but not if you kill it. Quit herbstluftwm with

herbstclient quit

Thanks.  I've [added a hook to my (in-need-of-being-revised) session manager] so it will now close HLWM correctly before switching WMs.  So far, so good.

I suppose, while I am here, I could [share my HLWM configuration].  I've ported some of the Musca scripts I've written over such as a [layout manager] and a (for now, rather simple) [tag status] bar for Xmobar that I will soon improve a bit.

The color scheme in this configuration is read from .Xdefaults, which is [generated by this], from an image file (in this case, whatever the X root is currently set to).

At some point, I will also update the color generator so that hooks could be added to generate schemes for GTK and whatnot and also generate dark-on-light schemes.

Last edited by Wintervenom (2011-11-16 05:10:04)


My [GitHub] and my [artwork].
Data is guaranteed to stay crunchy in milk.
Keep your _✍ hand strong.

Offline

#71 2011-11-16 11:58:21

geniuz
Member
Registered: 2010-04-10
Posts: 127

Re: herbstluftwm

I am currently using Musca. What is holding me back from hlwm is the way in which frames are handled. In Musca, if I open a new window in a frame which already contains a window, the new window replaces the current one and moves it to the background. I can then bring this window back if required by simply using cycle. In hlwm, the current frame is split up thereby creating a new frame to hold the new window. I find this somewhat counterintuitive and for me it defeats the whole purpose of manual tiling, where the user is fully responsible for the frame layout. A glance at the hlwm documentation has given me the impression that this is the way hlwm was designed, but nonetheless, did I miss a configuration option that influences this behavior?

Offline

#72 2011-11-16 13:09:57

Doomcide
Member
Registered: 2011-08-22
Posts: 221

Re: herbstluftwm

^ The frame is not split up, it just contains more then one window. I think the thing that irritates you here, is that hlwm has more than one option how a frame, containing more than one window handles them. That's where the frame_layout comes in. It can be set to vertical, horizontal, grid or fullscreen. The last of them is what you're looking for. So this is not a limitation, but rather a feature. It let's you handle windows much like a automatic-tiling wm would.

Offline

#73 2011-11-16 17:58:12

geniuz
Member
Registered: 2010-04-10
Posts: 127

Re: herbstluftwm

Doomcide wrote:

^ The frame is not split up, it just contains more then one window. I think the thing that irritates you here, is that hlwm has more than one option how a frame, containing more than one window handles them. That's where the frame_layout comes in. It can be set to vertical, horizontal, grid or fullscreen. The last of them is what you're looking for. So this is not a limitation, but rather a feature. It let's you handle windows much like a automatic-tiling wm would.

Thanks for the hint. I've managed to get hlwm to behave mostly like I want to now. It offers some advantages as compared to Musca, so I switched now.

Offline

#74 2011-11-18 09:11:12

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: herbstluftwm

First big kudo for herbstluftwm, great wm. 
After many years, just switch from ratpoison.

In my "try to make my definitive cool custom config & test time" I exec command:

herbstclient version
herbstluftwm 0.1-git (built on Nov 17 2011)

But it seem to be a 0.2 version no ?

Offline

#75 2011-11-18 13:12:10

thorsten
Member
From: Germany
Registered: 2010-02-24
Posts: 151

Re: herbstluftwm

mentat wrote:

First big kudo for herbstluftwm, great wm. 
After many years, just switch from ratpoison.

In my "try to make my definitive cool custom config & test time" I exec command:

herbstclient version
herbstluftwm 0.1-git (built on Nov 17 2011)

Thanks for using herbstluftwm smile

But it seem to be a 0.2 version no ?

It is version 0.1-git. Version 0.2 isn't released yet, but it will be the 'next' release. You can check the releases in the NEWS file.

Offline

Board footer

Powered by FluxBB