You are not logged in.
Someone please show me how so I don't hose my system again. Nested <>s confuse me.
Offline
This Help:Contents page is you friend, until your look at it. Then it's "YEA! RIGHT!"
OK now let me ask a question: What do you mean by: add a file?
I ask because I add files to my
menu.xml
and key-binds to my
rc.xml
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Application. Like Firefox. I refer you to line 707 and onwards of the xml.rc file.
Offline
My rc.xml file is highly modified so line reference doesn't apply.
open your rc.xml file san search for:
W-w
You'll find 'firefox-esr' as a sample
<keybind key="W-w">
<action name="Execute">
<startupnotify>
<enabled>false</enabled>
<name>Web Browser</name>
</startupnotify>
<command>firefox-esr</command>
</action>
</keybind>
A simple way for the program 'peek' for example.
First check to make sure 'Alt-p' isn't used and add it:
<keybind key="A-p">
<action name="Execute">
<command>peek</command>
</action>
</keybind>
For every action there is an equal and opposite reaction:
<keybind key="···"> needs a </keybind>
<action name="Execute"> needs a </action>
<command>·······</command>
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
It's not how to do them, it's where to put them. I don't know how to explain it if you haven't read the applications section (at the end) of the xml.rc file. The one that starts
<applications> <!-- # this is an example with comments through out. use these to make your # own rules, but without the comments of course. # you may use one or more of the name/class/role/title/type rules to specify # windows to match
And ends
# end of the example --> </applications> </openbox_config>
I am utterly paranoid about getting it wrong again after following what was obviously bad advice (will post as soon as I can find it again)
Offline
OH. I'm not the guy then.
I do it by guess or bu golly.
Mucked it up a few times.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Would this work?
<application>"Discord"</application>
<decor>yes</decor>
<shade>no</shade>
<position force=>"no"</position>
<desktop>3</desktop>
Offline
Apologies if this isn't helpful but I put the absolute minimum of applications in either my menu.xml or my rc.xml files. For everything else I rely on DMenu or JGMenu, both of which I've installed.
Here's my latest menu.
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
<menu id="root-menu" label="Openbox 3">
<item label="Terminal emulator">
<action name="Execute">
<execute>roxterm</execute>
</action>
</item>
<item label="Web browser">
<action name="Execute">
<execute>firefox</execute>
</action>
</item>
<!-- This requires the presence of the 'menu' package to work -->
<item label="Gkrellm">
<action name="Execute">
<execute>gkrellm</execute>
</action>
</item>
<item label="Plank">
<action name="Execute">
<execute>plank</execute>
</action>
</item>
<item label="SpaceFM">
<action name="Execute">
<execute>spacefm</execute>
</action>
</item>
<item label="Tint2">
<action name="Execute">
<execute>tint2</execute>
</action>
</item>
<item label="DMenu">
<action name="Execute">
<execute>dmenu_run</execute>
</action>
</item>
<item label="JGMenu">
<action name="Execute">
<execute>jgmenu_run</execute>
</action>
</item>
<menu id="Debian"/>
<separator/>
<menu id="client-list-menu"/>
<separator/>
<item label="ObConf">
<action name="Execute">
<execute>obconf</execute>
</action>
</item>
<item label="Xkill">
<action name="Execute">
<execute>xkill</execute>
</action>
</item>
<item label="Reconfigure">
<action name="Reconfigure"/>
</item>
<item label="Restart">
<action name="Restart"/>
</item>
<separator/>
<menu id='/Debian/Window Managers' label='Window Managers'>
<item label='Ctwm'>
<action name='Restart'><execute>ctwm</execute></action>
</item>
<item label='FluxBox'>
<action name='Restart'><execute>/usr/bin/startfluxbox</execute></action>
</item>
<item label='FVWM'>
<action name='Restart'><execute>/usr/bin/fvwm2</execute></action>
</item>
<item label='Olvwm'>
<action name='Restart'><execute>/usr/bin/olvwm</execute></action>
</item>
<item label='Openbox' icon='/usr/share/pixmaps/openbox.xpm'>
<action name='Restart'><execute>/usr/bin/openbox</execute></action>
</item>
<item label='VTWM'>
<action name='Restart'><execute>vtwm</execute></action>
</item>
</menu>
<item label="Log Out">
<action name="Exit"/>
<prompt>yes</prompt>
</action>
</item>
</menu>
</openbox_menu>
Offline
Yes, that's not what I'm trying to do. Look at the fifth line of my example
Offline
You need to be a bit clearer about what you are wanting to do. I do the same thing when I ask these guys questions. They know their stuff but they need to know exactly what you are trying to do.
Would this work?
<application>"Discord"</application>
<decor>yes</decor>
<shade>no</shade>
<position force=>"no"</position>
<desktop>3</desktop>
That's almost right, but I think the first line should be:
<application name="Discord">
You need to make sure that 'Discord' is the correct _OB_APP_NAME. Check this by opening Discord and then typing this into a terminal:
obxprop | grep "^_OB_APP"
Then click on the Discord window and you should get some info:
_OB_APP_TYPE(UTF8_STRING) = "normal"
_OB_APP_TITLE(UTF8_STRING) = "Mozilla Firefox"
_OB_APP_GROUP_CLASS(UTF8_STRING) = "Firefox-esr"
_OB_APP_GROUP_NAME(UTF8_STRING) = "firefox-esr"
_OB_APP_CLASS(UTF8_STRING) = "firefox-esr"
_OB_APP_NAME(UTF8_STRING) = "Navigator"
_OB_APP_ROLE(UTF8_STRING) = "browser"
That will give you the correct name. Just put your code between the <applications> and </applications> tags in the rc.xml file.
Hope this helps.
Offline
Would this work?
<application>"Discord"</application>
<decor>yes</decor>
<shade>no</shade>
<position force=>"no"</position>
<desktop>3</desktop>
No, because you need to specify if Discord is the name, class, etc ... of the window. And it looks like some other syntax errors.
Here's an example for deadbeef music player:
<application class="Deadbeef*">
<desktop>4</desktop>
<maximized>no</maximized>
<skip_pager>no</skip_pager>
<skip_taskbar>no</skip_taskbar>
</application>
Here's the official openbox documentation for per app settings - https://openbox.org/help/Applications
You must unlearn what you have learned.
-- yoda
Offline
It's not how to do them, it's where to put them.
I am utterly paranoid about getting it wrong again after following what was obviously bad advice (will post as soon as I can find it again)
Looks like you want per app settings - https://openbox.org/help/Applications
First make a backup of your rc.xml file.
Then when you're editing it, have a terminal open. If something goes wrong, you should be able to copy the original rc.xml file over the broken one and then restart openbox with:
openbox --restart
Get you back to Square 1.
You must unlearn what you have learned.
-- yoda
Offline
Okay, I created this entry
<application>
<application_name="discord">
<decor>yes</decor>
<shade>no</shade>
<position_force=>"no"</position>
<desktop>3</desktop>
</application>
But it's still starting Discord on desktop 1.
Offline
There are a few errors in there. Also, have you checked that "discord" is the correct name? If so, copy and paste this:
<application>
<application name="discord">
<decor>yes</decor>
<shade>no</shade>
<position force="no">
<desktop>3</desktop>
</application>
Offline
Why do name and force turn orange in Geany?
Offline
Nope, I made the changes suggested and the application keeps stubbornly appearing on desktop 1. What am I missing?
Offline
Why do name and force turn orange in Geany?
Syntax highlighting. Most text editors designed for development work do that. Don't worry about it.
Did you use xprop to get the class for discord? Do it again and post a screenshot of the output, or post the last several lines so we can see actual output.
You must unlearn what you have learned.
-- yoda
Offline
Is discord an actual application you installed, or are you on the discord site in your browser?
You must unlearn what you have learned.
-- yoda
Offline
Why can't I paste my imgur link?
Offline
I think I might need special permission to post the image.
Offline