mikachu / openbox Goto Github PK
View Code? Open in Web Editor NEWmirror of the openbox repo
Home Page: http://openbox.org
License: GNU General Public License v2.0
mirror of the openbox repo
Home Page: http://openbox.org
License: GNU General Public License v2.0
Hi,
I like openbox very much, there's only one thing that annoys me: I can't use XDG applications menu, although that's the de facto standard on almost all unices. I can create some dirty hacks with scripts and pipe menus, but that just feel not right. IMHO openbox should support the de facto standard application menu without any hacks. I've checked the source to figure out what would be the best way to do that. Here are my findings:
First I was thinking about to introduce a new xml tag in config, like "<xdgapps/>", but that would unnecessarily complicate parse_menu() in config.c to keep the order of config_menu_files. Therefore I though it would be better to have "<file>__xdgapps</file>", there __xdgapps is not a real filename (not ending in ".xml") but a special keyword.
To handle this special menu "file", only one modification would be needed in menu.c line 84. The following:
for (it = config_menu_files; it; it = g_slist_next(it)) {
if (obt_xml_load_config_file(menu_parse_inst,
would became
for (it = config_menu_files; it; it = g_slist_next(it)) {
if (!strcmp(it->data, "__xdgapps") && obt_xml_load_from_desktop_files(menu_parse_inst))
{
loaded = TRUE;
obt_xml_tree_from_root(menu_parse_inst);
obt_xml_close(menu_parse_inst);
}
else if (obt_xml_load_config_file(menu_parse_inst,
and "obt_xml_load_from_desktop_files()" would create the same xml tree in memory by parsing /usr/share/applications/*.desktop files as if it were loaded from a menu.xml (all attributes of a menu item, "id", "label", "icon", "execute" action, parent menu (category), localized "label" etc. can be easily read from those .desktop files too, one would only need to use those parsed values when adding xml nodes to menu_parse_inst).
Therefore other parts of the code (particularly parse_menu() in menu.c) wouldn't know the difference, and there's no need for further modifications. Even config.c would be intact.
The big advantage of this approach would be that it requires minimal modifications to the existing code, and it's configuration scheme is backward compatible. What's more, since this special value does not end in ".xml", it's guaranteed that no existing configuration would conflict with this patch.
What do you say? Is this a proper way to add XDG applications menu to openbox?
bzt
In openbox/client.c:client_update_icons()
, if a window doesn't have an icon explicitly set and it doesn't have any parents to inherit an icon from, Openbox sets one:
OBT_PROP_SETA32(self->window, NET_WM_ICON, CARDINAL, ldata, w*h+2);
I'm not entirely sure why this is necessary: client_startup
initializes each client's icon to def_win_icon
, so everything in Openbox itself will have something to render.
By contrast, if a window doesn't have an icon set on it, some other environments (I know GNOME in particular) can pull an icon out of the system theme. I haven't looked into exactly how GNOME does it, but in the panel I'm building I'm checking the WM_CLASS
property to see if there's something matching in /usr/share/pixmaps
or /usr/share/icons
. Unfortunately, because Openbox is setting the _NET_WM_ICON
for the window, nothing else will ever get the chance to notice that the icon is missing in order to supply one. (In particular, Slack doesn't set an icon for itself. Because it's not open-source, I can't fix it upstream.)
Experimentally removing the icon assignment doesn't appear to have any negative consequences.
Would you be willing to consider removing the icon-setting behavior? Is there anything that depends on that behavior?
If removing it isn't acceptable, could we discuss setting another property on the window to indicate that Openbox has overridden the icon? That wouldn't make third-party tools automatically work but at least it would make it possible to build Openbox compatibility.
Hi guys,
I've just installed Manjaro Linux (OB version) in my new laptop (thinkpad x1 carbon 3gen) and the UI is unusable E.g: too tiny characters, menus etc
Can you help me figuring out which is the best way to set it ?
My distro comes with two GUI tools to configure the UI
obmanager
to set up OBlxappearance
to switch gtk+ themeI'm using tint2
as system bar and conky
to display some information
This is the first time that I have this issue because of my screen resolution (2560 by 1440)
Currently I'm using firefox
and thunderbird
with a huge zoom (200%) and the terminal with huge font size (30) but I'm quite unsatisfied.
Thank you very much !
currently i can only enlarge window title font (which I don't want, since it goes way too big), and the only effect I get is increased spacing between minimize/maximize/close buttons, while the buttons remains at a fixed size.
what I need is truly larger buttons, as it helps me to easier click them.
how to hidden mouse,i want to hidden it
Whenever ForEach
runs it allows to execute else
branch for a query but it does it for each client that failed to match the query.
Please, add an option to execute certain action when none of the clients were able to match a query.
It would effectively allow people to achieve "focus or run" functionality with configuration that looks something like that:
<keybind key="A-W-f">
<action name="ForEach">
<query target="default">
<class>RangerFm</class>
<desktop>current</desktop>
</query>
<then>
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
<action name="Stop"/>
</then>
<none>
<action name="Execute">
<command>gtk-launch ranger</command>
</action>
</none>
</action>
</keybind>
It currently seems to be impossible to bind a single modifier key press to an action.
<keybind key="C">
...
</keybind>
This will trigger an action on pressing the c key instead of control.
Why do I need this? For example in gnome-shell a single press of the super key also called Windows key,
is used for showing the overview, and I want to do something similar with the Control, Super, Alt keys.
My current fallback solution is to use showkeys or xinput to manually keep track of keys, but this isn't a nice
solution as showkeys needs to be root to work, and xinput -root breaks other things.
I don't know if this would be considered a bug, or count as a new feature, in my opinion it is more like a bug.
In case the formerly active developers of openbox don't want to implement this, I'd like to get some guidance on
how I could implement this change (allowing actions on single modifier key presses (more specifically:
on those keys being released)) myself.
Also, I'd really like to know if there's any chance that there'll be at least a new bugfix release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.