You are not logged in.

#1 2011-04-04 23:01:30

axujen
Member
Registered: 2011-02-21
Posts: 14

Desktop Layer for apps in openbox ??

hi,
ive been messing around with openbox's config files and would like to set some apps to something like a desktop layer ( so they wont disappear when a toggle the desktop).
there was this thread about it for rxvt https://bbs.archlinux.org/viewtopic.php?id=45382 but it involved changing the src code and im wondering if there is an easier way to do this ?

Offline

#2 2011-04-05 02:32:03

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Desktop Layer for apps in openbox ??

Post # 24 is a no go??


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2011-04-05 04:32:17

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Desktop Layer for apps in openbox ??

@Inxsible - axujen want an application to be exempt from Openbox's ToggleShowDesktop. The wiki only explains how to do this for urxvt.

Offline

#4 2011-04-08 11:25:26

axujen
Member
Registered: 2011-02-21
Posts: 14

Re: Desktop Layer for apps in openbox ??

meh i suppose it cant be done through ob, guess ill just have t learn how to edit the source of apps directly hmm

Offline

#5 2011-05-06 10:45:08

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

Re: Desktop Layer for apps in openbox ??

axujen wrote:

meh i suppose it cant be done through ob, guess ill just have t learn how to edit the source of apps directly hmm

Sorry to resurrect a somewhat old thread, but I experienced the same problem and found a way to solve it using wmctrl. What I wanted to do, is embed xclock in the Openbox desktop and have it stay on the desktop even on "ToggleShowDesktop". So what I did is the following, I have the following entry for xclock in my rc.xml under applications:

<application name="xclock" class="XClock">
  <decor>no</decor>
  <focus>no</focus>
  <shade>no</shade>
  <desktop>all</desktop>
  <skip_taskbar>yes</skip_taskbar>
  <skip_pager>yes</skip_pager>
  <iconic>no</iconic>
  <layer>below</layer>
</applications>

And this my keybinding for showing the desktop:

<keybind key="W-e">
  <action name="ToggleShowDesktop"/>
  <action name="Execute>
    <execute>wmctrl -a xclock</execute>
  </action>
</keybind>

The only issue with this is, it's not really a toggle anymore because everytime I press W-e it will minimize all my windows and change focus to  xclock. So pressing W-e again won't bring up my windows again.

Offline

#6 2013-03-20 14:33:21

debuser
Member
Registered: 2013-03-20
Posts: 1

Re: Desktop Layer for apps in openbox ??

Sorry to resurrect (again) such old thread.

Unfortunatelly I didn't like geniuz's solution since (in my case) urxvt blinks when iconifying all windows, instead I wrote this script:

#!/bin/bash
desktop=$(wmctrl -d | grep "\*" | awk '{ print $1 }')
for i in $(wmctrl -l | sed -n "s/.*\(0x.\{9\}\) $desktop /\1/p" | awk '{ print $1 }'); do
         wmctrl -i -r $i -b add,hidden
done

Instead of iconifying every single window and then enabling again urxvt, which caused the blink, I iconify all windows that are running on the current desktop, minus urxvt.
The script assumes the terminal is displayed in all desktops. If it's running in a specific desktop it can be easily fixed with grep -v.
It also assumes no other windows are being displayed in all desktops (i.e. Firefox).

Last edited by debuser (2013-03-20 14:36:45)

Offline

Board footer

Powered by FluxBB