You are not logged in.
@quigybo: very cool! Didn't know about that feature. Buuut... not functioning properly. I just executed your lines directly from the terminal and I get the window id for tint2, so I see how that works to make sure it's running. I also see how you find out if it's visible. But sending the windowmap command makes it pop up about 8 pixels and that's it. From there if I move my mouse on it, it appears at the full 20px height and then autohides when I take the mouse away. Essentially windowmap just makes it function like normal, from what I can tell...
Windowunmap, on the other hand, makes it inaccessible with the mouse. The script seems like it would work if 1) the windowmap function actually made it appear and 2) you only wanted to use the keybind and never the actual cursor. I currently still prefer mine better. If this did what mine does without fiddling with the cursor, that would definitely be the ideal solution.
Offline
Well I just started w/Openbox a few days ago. Before i tackIe piping menus I'm loving obmenugen! Anyways, I wanted a wine menu.
First, add a entry in ~/config/obmenugen/obmenugen.schema
file:wine.xml
like so -
item:terminal
item:filemanager
item:webbrowser
#item:instantmessaging
item:editor
item:runcommand
submenu:windowsanddesktops
sep:Applications
cat:accesories
cat:graphics
cat:audiovideo
cat:education
cat:office
cat:games
cat:network
cat:development
cat:settings
cat:system
file:wine.xml
submenu:openbox
sep:
item:lock
item:exit
Here's a script that will find all your wine .desktop files and make a menu for them, run obmenugen to create a new menu.xml, and reconfigure openbox.
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
FINDDIR="$HOME/.local/share/applications/wine"
OUTFILE="$HOME/.config/obmenugen/wine.xml"
FILES="$(find $FINDDIR -name '*.desktop')"
if [ -e $OUTFILE ]; then
rm -f $OUTFILE
echo "Updating WINE menu file."
echo ' <menu id="Wine" label="Wine">' >>$OUTFILE
for lines in $FILES;do
echo ' <item label="'"$(grep Name $lines| gawk -F"=" '{ print $2 }')"'"><action name="Execute"><execute>'"$(grep env $lines| gawk -F"Exec=" '{ print $2 }' )"' </execute></action></item>' >> $OUTFILE
done
echo " </menu>" >> $OUTFILE
# Stupid .desktop file fix
sed -i 's/\\\\ /\\ /g' $OUTFILE
# Regen Menu
obmenugen
# Put menu in play
openbox --reconfigure
else
echo "Creating WINE menu file."
echo ' <menu id="Wine" label="Wine">' >>$OUTFILE
for lines in $FILES;do
echo ' <item label="'"$(grep Name $lines| gawk -F"=" '{ print $2 }')"'"><action name="Execute"><execute>'"$(grep env $lines| gawk -F"Exec=" '{ print $2 }' )"' </execute></action></item>' >> $OUTFILE
done
echo " </menu>" >> $OUTFILE
# Stupid .desktop file fix
sed -i 's/\\\\ /\\ /g' $OUTFILE
# Regen Menu
obmenugen
# Put menu in play
openbox --reconfigure
fi
IFS=$SAVEIFS
It was just some stuff i found on the web while looking for this ability. I tweaked it a little bit and added some things. If it can be written better or more efficient let me know!
Last edited by zippy (2011-02-12 22:14:38)
Offline
I have stolen a few things here, the menu + mod is very nice and easy.
I also have this:
PrtScrn: Takes screenshot with scrot
Ctrl-Page Up: Master Volume Up (amixer set Master 5%+)
Ctrl-Page Down: Master Volume Down (amixer set Master 5%-)
Ctrl-End: Master Volume 0 (amixer set Master 0) // i do not want to really mute it but still have it shut down
I'm still in the process for my special menu i'm making. I can be lazy and ask it on the forums here but i just wanna do it myself so i learn something along the way
Offline
Does anyone know why certain windows would act differently than others? I've mostly copied moljac024's config, but I've noticed that my urxvt terminal windows are always slightly smaller than everything else... :huh:
Thank you everyone who has posted here!
Offline
... I've noticed that my urxvt terminal windows are always slightly smaller than everything else...
That's common for many terminal apps. The window is actually being set for the complete lines of text it can display. If the vertical size you set would result in 32.5 lines, urxvt (and xterm and a few others) corrects this to 32.0 lines.
Offline
I have stolen a few things here, the menu + mod is very nice and easy.
I also have this:
PrtScrn: Takes screenshot with scrot
Ctrl-Page Up: Master Volume Up (amixer set Master 5%+)
Ctrl-Page Down: Master Volume Down (amixer set Master 5%-)
Ctrl-End: Master Volume 0 (amixer set Master 0) // i do not want to really mute it but still have it shut downI'm still in the process for my special menu i'm making. I can be lazy and ask it on the forums here but i just wanna do it myself so i learn something along the way
Ok discoverd notify-send/osd today so i was thinking to myself lets use this with key bidings so i took those from above and made them notify me what i'm doing.
Here is what (for example) ctrl+page up does now:
- Kill all notify-OSD // this is here if i push ctrl+page up rapidly it kills it of the screen and then shows it again real fast
- Up the volume like before
- Make a notify of volume Up
code for it:
...
<keybind key="C-Page_Down">
<action name="Execute">
<command>killall notify-osd</command>
</action>
<action name="Execute">
<command>amixer set Master 5%-</command>
</action>
<action name="Execute">
<command>notify-send "Volume Down" -t 10</command>
</action>
</keybind>
...
Still expirimenting with this as i think it's posible to merge them and/or show them in a diffrent place on the screen. Stuff like that but as you can see i'm "new" to all this.
Still working on my special menu (if i can figure it out though).
Last edited by Redostrike (2011-05-08 13:28:33)
Offline
After trying out GNOME 3 to see how bad it was first-hand (and I'll have to admit that it'd be quite usable, IF you've never used a computer before—old habits die hard), I figured I'd implement a few of its best features with Openbox. I haven't got a GNOME-shell-style interface (slingshot is buggy), but I am using workspaces more productively now, and I can create a temporary one as needed with some keybindings. Enjoy and feel free to plunder
(For the record I've got about 116 of them defined. Chaining is awesome.)
Basically, it's set up so that a chain enters a command sequence, such as for window management, desktop management, application shortcuts, etc, and I can perform pretty much every action imaginable from the keyboard. Needless to say I've probably gone totally overboard but I've definitely defined the most common actions. The only part of the desktop management I'm not sure about is dynamically defining names for workspaces, but I'll figure that out sometime.
Offline
Here is an example of how to bind keys to programs for lightning-fast movement between apps: (in this example press Meta-W to switch to the virtual desktop Opera is on and focus it):
<keybind key="W-W">
<action name="Execute">
<command>sh -c 'wmctrl -a "- Opera"'</command>
</action>
</keybind>
You'll need to install 'wmctrl'. I have all my most-used apps bound to the LHS of the keyboard, next to the Meta key - got browser, IM, IRC, file manager, music player all bound; you'll be amazed how much more efficiently you'll be switching between apps
Last edited by NewWorld (2011-06-14 17:49:20)
Offline
@NewWorld: can you outline how this approach is different from using the "DesktopLast", "SendToDesktopLast" and "NextWindow" (with <allDesktops>yes) actions?
Offline
@NewWorld: can you outline how this approach is different from using the "DesktopLast", "SendToDesktopLast" and "NextWindow" (with <allDesktops>yes) actions?
Haha I remember asking on the #openbox channel if this was implemented, and I was given no solutions except to script it xD Thanks for telling me this action exists; I'll delete the relevant parts of my previous post.
EDIT: As for "NextWindow", it's a lot more efficient to bind keyboard shortcuts to apps, because there is a lot more overhead locating an app using Alt-Tab when you have more than a few apps loaded.
Last edited by NewWorld (2011-06-14 17:54:15)
Offline
So, nothing special but here are my keybindings - basically I hate using the mouse for anything (I'm mostly on my netbook, who cares about the mousepad really? And I don't really feel like bringing my mouse to college so...) so I've setup some shortcuts for my mostly used applications and such..
Here they are:
<!-- Keybindings for running applications -->
<keybind key="A-F2">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Terminal-popup</name>
</startupnotify>
<command>gmrun</command>
</action>
</keybind>
<keybind key="W-c">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Chromium</name>
</startupnotify>
<command>chromium</command>
</action>
</keybind>
<keybind key="W-t">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Gnome Terminal</name>
</startupnotify>
<command>gnome-terminal</command>
</action>
</keybind>
<keybind key="W-g">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Gimp</name>
</startupnotify>
<command>gimp</command>
</action>
</keybind>
<keybind key="W-n">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Nautilus</name>
</startupnotify>
<command>nautilus</command>
</action>
</keybind>
<keybind key="W-a">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Audacity</name>
</startupnotify>
<command>audacity</command>
</action>
</keybind>
<keybind key="W-l">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>LibreOffice</name>
</startupnotify>
<command>libreoffice</command>
</action>
</keybind>
<keybind key="W-s">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Terminar Sessão</name>
</startupnotify>
<command>logout</command>
</action>
</keybind>
<keybind key="Print">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Screenshot</name>
</startupnotify>
<command>gnome-screenshot</command>
</action>
</keybind>
On another note, there are mostly only keybindings in this thread... Aren't there any ways to "hack" Openbox and do something different with it? For example, setting up a cube - (can that even be done?) that would be an interesting hack to see... oh well, but I'm a girl - it's normal for me to wish for flashy effects (a year and a half ago, that was the reason why I converted to Linux and started using Ubuntu)...
~ Believing oneself to be perfect is often the sign of a delusional mind ~
Offline
From all my keybiobknds, the most useful are:
alt+[1..6]: go to desktop x
shift+alt+[1..6]: send window to desktop x
alt+p: execute dmenu_run
shift+alt+c: close a window
Offline
how do I remove the decorations from all openbox?
this lines is not working. sorry for my poor english+
<applications>
<!-- match all windows, and remove their decorations -->
<application class="*">
<decor>no</decor>
</application>
<!-- but give decorations back to Firefox -->
<application name="Firefox*">
<decor>yes</decor>
</application>
</application>
Offline
If it counts as a hack, here is mine:
menu.xml
<?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 execute="~/.config/openbox/pipemenus/menu.sh" id="root-menu" label="Openbox 3.5"/>
</openbox_menu>
and a part of the actual menu.sh
#!/bin/bash
NAME=`wmctrl -d | grep "*" | awk '{print $10}'` # returns the name of your desktop.
programItem(){
echo "<item label=\"$1\">"
echo " <action name=\"Execute\">"
echo " <execute>"
echo " $2"
echo " </execute>"
echo " </action>"
echo "</item>"
}
pipemenuItem(){
echo "<menu execute=\"$3\" id=\"$1\" label=\"$2\"/>"
}
separatorItem(){
echo "<separator/>"
}
beginmenuItem(){
echo "<menu id=\"$1\" label=\"$2\">"
}
endmenuItem(){
echo "</menu>"
}
reconfItem(){
echo "<item label=\"Reconfigure\">"
echo " <action name=\"Reconfigure\"/>"
echo "</item>"
}
recstartItem(){
echo "<item label=\"Restart\">"
echo " <action name=\"Restart\"/>"
echo "</item>"
}
echo "<openbox_pipe_menu>"
echo "<separator label=\"$NAME\"/>"
programItem "Run Program" "gmrun"
separatorItem
.
.
.
programItem "Exit" "oblogout"
echo "</openbox_pipe_menu>"
so finally i got:
1. my menu shows the desktopname
2. because it is a pipemenu, you can edit the menu.sh file and use it without reconfigure openbox.
Last edited by morgulbrut (2012-04-24 10:32:41)
Offline
hmmm quick question on hacking openbox.... i cant seem to find this anywhere..... but is it possible to make all windows permanently undecorated? i can right click on each window one by one and select undecorate, but i want the effect to be permanent and for everything. in the rc.xml i have set the attribute for decor as follows, but no joy <decor>no</decor>
any ideas?
2007 - Started using Arch Linux as my only/main OS
- Samsung Series 3, Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz - 8Gb DDR3 ram - 700Gb HDD
On board intel Graphics & Sound
Offline
Ninja, can you post the surrounding region of your rc.xml. That works perfectly for me.
Are your running `openbox --reconfure` after you edit your rc.xml?
Last edited by Trilby (2012-06-01 01:13:22)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ninja, can you post the surrounding region of your rc.xml. That works perfectly for me.
Are your running `openbox --reconfure` after you edit your rc.xml?
yeah, always do the `openbox --reconfigure`after changes... the only thing i can find anywhere in all the documentation about getting rid of the titlebar/decoration is the to change the line "<decor>yes</decor>" to "<decor>no</decor>" which i have done.......
<?xml version="1.0"?>
<openbox_config xmlns="http://openbox.org/3.4/rc">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<!-- always try to focus new windows when they appear. other rules do
apply -->
<followMouse>no</followMouse>
<!-- move focus to a window when you move the mouse into it -->
<focusLast>yes</focusLast>
<!-- focus the last used window when changing desktops, instead of the one
under the mouse pointer. when followMouse is enabled -->
<underMouse>no</underMouse>
<!-- move focus under the mouse, even when the mouse is not moving -->
<focusDelay>200</focusDelay>
<!-- when followMouse is enabled, the mouse must be inside the window for
this many milliseconds (1000 = 1 sec) before moving focus to it -->
<raiseOnFocus>no</raiseOnFocus>
<!-- when followMouse is enabled, and a window is given focus by moving the
mouse into it, also raise the window -->
</focus>
<placement>
<policy>Smart</policy>
<!-- 'Smart' or 'UnderMouse' -->
<center>yes</center>
<!-- whether to place windows in the center of the free area found or
the top left corner -->
<monitor>Active</monitor>
<!-- with Smart placement on a multi-monitor system, try to place new windows
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
the active window is -->
<primaryMonitor>1</primaryMonitor>
<!-- The monitor where Openbox should place popup dialogs such as the
focus cycling popup, or the desktop switch popup. It can be an index
from 1, specifying a particular monitor. Or it can be one of the
following: 'Mouse' - where the mouse is, or
'Active' - where the active window is -->
</placement>
<theme>
<name>Shiki-Statler</name>
<titleLayout>NLIMC</titleLayout>
<!--
available characters are NDSLIMC, each can occur at most once.
N: window icon
L: window label (AKA title).
I: iconify
M: maximize
C: close
S: shade (roll up/down)
D: omnipresent (on all desktops).
-->
<keepBorder>yes</keepBorder>
<animateIconify>yes</animateIconify>
<font place="ActiveWindow">
<name>sans</name>
<size>8</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="InactiveWindow">
<name>sans</name>
<size>8</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="MenuHeader">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>normal</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="MenuItem">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>normal</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="ActiveOnScreenDisplay">
<name/>
</font>
<font place="InactiveOnScreenDisplay">
<name>Sans</name>
<size>8</size>
<weight/>
<slant/>
</font>
</theme>
<desktops>
<!-- this stuff is only used at startup, pagers allow you to change them
during a session
these are default values to use when other ones are not already set
by other applications, or saved in your session
use obconf if you want to change these without having to log out
and back in -->
<number>2</number>
<firstdesk>1</firstdesk>
<names>
<!-- set names up here if you want to, like this:
<name>desktop 1</name>
<name>desktop 2</name>
-->
</names>
<popupTime>500</popupTime>
<!-- The number of milliseconds to show the popup for when switching
desktops. Set this to 0 to disable the popup. -->
</desktops>
<resize>
<drawContents>yes</drawContents>
<popupShow>Never</popupShow>
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
<popupPosition>Center</popupPosition>
<!-- 'Center', 'Top', or 'Fixed' -->
<popupFixedPosition>
<!-- these are used if popupPosition is set to 'Fixed' -->
<x>10</x>
<!-- positive number for distance from left edge, negative number for
distance from right edge, or 'Center' -->
<y>10</y>
<!-- positive number for distance from top edge, negative number for
distance from bottom edge, or 'Center' -->
</popupFixedPosition>
</resize>
<!-- You can reserve a portion of your screen where windows will not cover when
they are maximized, or when they are initially placed.
Many programs reserve space automatically, but you can use this in other
cases. -->
<margins>
<top>0</top>
<bottom>0</bottom>
<left>0</left>
<right>0</right>
</margins>
<dock>
<position>TopLeft</position>
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
<floatingX>0</floatingX>
<floatingY>0</floatingY>
<noStrut>no</noStrut>
<stacking>Below</stacking>
<!-- 'Above', 'Normal', or 'Below' -->
<direction>Vertical</direction>
<!-- 'Vertical' or 'Horizontal' -->
<autoHide>no</autoHide>
<hideDelay>300</hideDelay>
<!-- in milliseconds (1000 = 1 second) -->
<showDelay>300</showDelay>
<!-- in milliseconds (1000 = 1 second) -->
<moveButton>Middle</moveButton>
<!-- 'Left', 'Middle', 'Right' -->
</dock>
<keyboard>
<chainQuitKey>C-g</chainQuitKey>
<keybind key="C-A-Left">
<action name="DesktopLeft">
<wrap>no</wrap>
</action>
</keybind>
<keybind key="XF86PowerOff">
<action name="Execute">
<command>oblogout</command>
<startupnotify>
<enabled>yes</enabled>
<name>oblogout</name>
</startupnotify>
</action>
</keybind>
<keybind key="C-A-Right">
<action name="DesktopRight">
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Up">
<action name="DesktopUp">
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Down">
<action name="DesktopDown">
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Left">
<action name="SendToDesktopLeft">
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Right">
<action name="SendToDesktopRight">
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Up">
<action name="SendToDesktopUp">
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Down">
<action name="SendToDesktopDown">
<wrap>no</wrap>
</action>
</keybind>
<keybind key="W-F1">
<action name="Desktop"/>
</keybind>
<keybind key="W-F2">
<action name="Desktop">
<desktop>2</desktop>
</action>
</keybind>
<keybind key="W-F3">
<action name="Desktop">
<desktop>3</desktop>
</action>
</keybind>
<keybind key="W-F4">
<action name="Desktop">
<desktop>4</desktop>
</action>
</keybind>
<keybind key="W-d">
<action name="ToggleShowDesktop"/>
</keybind>
<keybind key="A-F4">
<action name="Close"/>
</keybind>
<keybind key="A-F2">
<action name="Execute">
<command>gmrun</command>
<startupnotify>
<enabled>yes</enabled>
<name>gmrun</name>
</startupnotify>
</action>
</keybind>
<keybind key="A-F3">
<action name="Execute">
<command>~/.config/dmenu/dmenu-bind.sh</command>
<startupnotify>
<enabled>yes</enabled>
<name>dmenu</name>
</startupnotify>
</action>
</keybind>
<keybind key="A-Escape">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</keybind>
<keybind key="A-space">
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</keybind>
<keybind key="A-Tab">
<action name="NextWindow"/>
</keybind>
<keybind key="A-S-Tab">
<action name="PreviousWindow"/>
</keybind>
<keybind key="C-A-Tab">
<action name="NextWindow">
<panels>yes</panels>
<desktop>yes</desktop>
</action>
</keybind>
<keybind key="W-f">
<action name="Execute">
<command>pcmanfm</command>
<startupnotify>
<enabled>yes</enabled>
<name>File Manager</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-w">
<action name="Execute">
<command>chromium</command>
<startupnotify>
<enabled>yes</enabled>
<name>Minefield Web Browser</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-g">
<action name="Execute">
<command>gucharmap</command>
<startupnotify>
<enabled>yes</enabled>
<name>gucharmap</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-t">
<action name="Execute">
<command>urxvt</command>
<startupnotify>
<enabled>yes</enabled>
<name>urxvt</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-q">
<action name="Execute">
<command>xkill</command>
<startupnotify>
<enabled>yes</enabled>
<name>Kill an application</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-v">
<action name="ToggleMaximizeVert"/>
</keybind>
<keybind key="W-u">
<action name="Execute">
<command>urxvt -e packer -Syyuf</command>
<startupnotify>
<enabled>yes</enabled>
<name>System Upgrade</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-e">
<action name="Execute">
<command>leafpad</command>
<startupnotify>
<enabled>yes</enabled>
<name>leafpad</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-m">
<action name="Execute">
<command>gnome-mplayer</command>
<startupnotify>
<enabled>yes</enabled>
<name>Gnome Media Player</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-l">
<action name="Execute">
<command>slimlock</command>
<startupnotify>
<enabled>yes</enabled>
<name>lock</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-r">
<action name="Execute">
<command>chromium /usr/share/ab/DOC.html</command>
<startupnotify>
<enabled>yes</enabled>
<name>DOC</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-x">
<action name="Execute">
<command>conkyswitcher</command>
<startupnotify>
<enabled>yes</enabled>
<name>Switches conky</name>
</startupnotify>
</action>
</keybind>
<keybind key="W-space">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</keybind>
<keybind key="W-a">
<action name="ToggleMaximizeFull"/>
</keybind>
<keybind key="W-Right">
<action name="MoveToEdgeEast"/>
</keybind>
<keybind key="W-Up">
<action name="MoveToEdgeNorth"/>
</keybind>
<keybind key="W-Left">
<action name="MoveToEdgeWest"/>
</keybind>
<keybind key="W-Down">
<action name="MoveToEdgeSouth"/>
</keybind>
<keybind key="W-h">
<action name="ToggleMaximizeHorz"/>
</keybind>
<keybind key="A-W-Up">
<action name="GrowToEdgeNorth"/>
</keybind>
<keybind key="A-W-Right">
<action name="GrowToEdgeEast"/>
</keybind>
<keybind key="A-W-Down">
<action name="GrowToEdgeSouth"/>
</keybind>
<keybind key="A-W-Left">
<action name="GrowToEdgeWest"/>
</keybind>
<keybind key="W-c">
<action name="MoveToCenter"/>
</keybind>
<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<command>amixer set Master 5%+ unmute</command>
</action>
</keybind>
<keybind key="XF86AudioLowerVolume">
<action name="Execute">
<command>amixer set Master 5%- unmute</command>
</action>
</keybind>
<keybind key="XF86AudioMute">
<action name="Execute">
<command>amixer set Master toggle</command>
</action>
</keybind>
<keybind key="XF86ScreenSaver">
<action name="Execute">
<command>slimlock</command>
</action>
</keybind>
<keybind key="XF86Sleep">
<action name="Execute">
<command>sudo pm-suspend</command>
</action>
</keybind>
</keyboard>
<mouse>
<dragThreshold>8</dragThreshold>
<!-- number of pixels the mouse must move before a drag begins -->
<doubleClickTime>200</doubleClickTime>
<!-- in milliseconds (1000 = 1 second) -->
<screenEdgeWarpTime>400</screenEdgeWarpTime>
<!-- Time before changing desktops when the pointer touches the edge of the
screen while moving a window, in milliseconds (1000 = 1 second).
Set this to 0 to disable warping -->
<context name="Frame">
<mousebind action="Press" button="A-Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Click" button="A-Left">
<action name="Unshade"/>
</mousebind>
<mousebind action="Drag" button="A-Left">
<action name="Move"/>
</mousebind>
<mousebind action="Press" button="A-Right">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Drag" button="A-Right">
<action name="Resize"/>
</mousebind>
<mousebind action="Press" button="A-Middle">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind action="Click" button="A-Up">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind action="Click" button="A-Down">
<action name="DesktopNext"/>
</mousebind>
<mousebind action="Click" button="C-A-Up">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind action="Click" button="C-A-Down">
<action name="DesktopNext"/>
</mousebind>
<mousebind action="Click" button="A-S-Up">
<action name="SendToDesktopPrevious"/>
</mousebind>
<mousebind action="Click" button="A-S-Down">
<action name="SendToDesktopNext"/>
</mousebind>
</context>
<context name="Titlebar">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Move"/>
</mousebind>
<mousebind action="DoubleClick" button="Left">
<action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind action="Press" button="Middle">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind action="Click" button="Up">
<action name="Shade"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
<action name="Lower"/>
</mousebind>
<mousebind action="Click" button="Down">
<action name="Unshade"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Press" button="Right">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="Top">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Resize">
<edge>top</edge>
</action>
</mousebind>
</context>
<context name="Left">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Resize">
<edge>left</edge>
</action>
</mousebind>
<mousebind action="Press" button="Right">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="Right">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Resize">
<edge>right</edge>
</action>
</mousebind>
<mousebind action="Press" button="Right">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="Bottom">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Resize">
<edge>bottom</edge>
</action>
</mousebind>
<mousebind action="Press" button="Middle">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind action="Press" button="Right">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="BLCorner">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Resize"/>
</mousebind>
</context>
<context name="BRCorner">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Resize"/>
</mousebind>
</context>
<context name="TLCorner">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Resize"/>
</mousebind>
</context>
<context name="TRCorner">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Drag" button="Left">
<action name="Resize"/>
</mousebind>
</context>
<context name="Client">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Press" button="Middle">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Press" button="Right">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Icon">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
<mousebind action="Press" button="Right">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="AllDesktops">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Click" button="Left">
<action name="ToggleOmnipresent"/>
</mousebind>
</context>
<context name="Shade">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Click" button="Left">
<action name="ToggleShade"/>
</mousebind>
</context>
<context name="Iconify">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Click" button="Left">
<action name="Iconify"/>
</mousebind>
</context>
<context name="Maximize">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Press" button="Middle">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Press" button="Right">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Click" button="Left">
<action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind action="Click" button="Middle">
<action name="ToggleMaximizeVert"/>
</mousebind>
<mousebind action="Click" button="Right">
<action name="ToggleMaximizeHorz"/>
</mousebind>
</context>
<context name="Close">
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind action="Click" button="Left">
<action name="Close"/>
</mousebind>
</context>
<context name="Desktop">
<mousebind action="Click" button="Up">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind action="Click" button="Down">
<action name="DesktopNext"/>
</mousebind>
<mousebind action="Click" button="A-Up">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind action="Click" button="A-Down">
<action name="DesktopNext"/>
</mousebind>
<mousebind action="Click" button="C-A-Up">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind action="Click" button="C-A-Down">
<action name="DesktopNext"/>
</mousebind>
<mousebind action="Press" button="Left">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind action="Press" button="Right">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Root">
<!-- Menus -->
<mousebind action="Press" button="Middle">
<action name="ShowMenu">
<menu>client-list-combined-menu</menu>
</action>
</mousebind>
<mousebind action="Press" button="Right">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</mousebind>
</context>
<context name="MoveResize">
<mousebind action="Click" button="Up">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind action="Click" button="Down">
<action name="DesktopNext"/>
</mousebind>
<mousebind action="Click" button="A-Up">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind action="Click" button="A-Down">
<action name="DesktopNext"/>
</mousebind>
</context>
</mouse>
<menu><!-- You can specify more than one menu file in here and they are all loaded,
just don't make menu ids clash or, well, it'll be kind of pointless --><!-- default menu file (or custom one in $HOME/.config/openbox/) --><file>menu.xml</file><hideDelay>200</hideDelay><!-- if a press-release lasts longer than this setting (in milliseconds), the
menu is hidden again --><middle>no</middle><!-- center submenus vertically about the parent entry --><submenuShowDelay>100</submenuShowDelay><!-- time to delay before showing a submenu after hovering over the parent
entry.
if this is a negative value, then the delay is infinite and the
submenu will not be shown until it is clicked on --><submenuHideDelay>400</submenuHideDelay><!-- time to delay before hiding a submenu when selecting another
entry in parent menu -->
if this is a negative value, then the delay is infinite and the
submenu will not be hidden until a different submenu is opened -->
<applicationIcons>yes</applicationIcons>
<!-- controls if icons appear in the client-list-(combined-)menu -->
<manageDesktops>yes</manageDesktops>
<!-- show the manage desktops section in the client-list-(combined-)menu -->
<showIcons>yes</showIcons>
</menu>
<applications>
<application class="*">
<position>
<monitor>1</monitor>
</position>
<focus>yes</focus>
<maximized>no</maximized>
</application>
<!--
# this is an example with comments through out. use these to make your
# own rules, but without the comments of course.
<application name="the window's _OB_APP_NAME property (see obxprop)"
class="the window's _OB_APP_CLASS property (see obxprop)"
role="the window's _OB_APP_ROLE property (see obxprop)"
type="the window's _OB_APP_TYPE property (see obxprob)..
(if unspecified, then it is 'dialog' for child windows)">
# you may set only one of name/class/role/type, or you may use more than one
# together to restrict your matches.
# the name, class, and role use simple wildcard matching such as those
# used by a shell. you can use * to match any characters and ? to match
# any single character.
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
# or desktop
# when multiple rules match a window, they will all be applied, in the
# order that they appear in this list
# each rule element can be left out or set to 'default' to specify to not
# change that attribute of the window
<decor>no</decor>
# enable or disable window decorations
<shade>no</shade>
# make the window shaded when it appears, or not
<position force="no">
# the position is only used if both an x and y coordinate are provided
# (and not set to 'default')
# when force is "yes", then the window will be placed here even if it
# says you want it placed elsewhere. this is to override buggy
# applications who refuse to behave
<x>center</x>
# a number like 50, or 'center' to center on screen. use a negative number
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
# right edge (or bottom).
<y>200</y>
<monitor>1</monitor>
# specifies the monitor in a xinerama setup.
# 1 is the first head, or 'mouse' for wherever the mouse is
</position>
<focus>yes</focus>
# if the window should try be given focus when it appears. if this is set
# to yes it doesn't guarantee the window will be given focus. some
# restrictions may apply, but Openbox will try to
<desktop>1</desktop>
# 1 is the first desktop, 'all' for all desktops
<layer>normal</layer>
# 'above', 'normal', or 'below'
<iconic>no</iconic>
# make the window iconified when it appears, or not
<skip_pager>no</skip_pager>
# asks to not be shown in pagers
<skip_taskbar>no</skip_taskbar>
# asks to not be shown in taskbars. window cycling actions will also
# skip past such windows
<fullscreen>yes</fullscreen>
# make the window in fullscreen mode when it appears
<maximized>true</maximized>
# 'Horizontal', 'Vertical' or boolean (yes/no)
</application>
# end of the example
-->
</applications>
</openbox_config>
2007 - Started using Arch Linux as my only/main OS
- Samsung Series 3, Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz - 8Gb DDR3 ram - 700Gb HDD
On board intel Graphics & Sound
Offline
oooops sorry, i posted to hastily!! i solved it by adding <decor>no</decor> to the following bit as well at the bottom... thanks tho
<applications>
<application class="*">
.........................
................................
...........................
........................
</application>
2007 - Started using Arch Linux as my only/main OS
- Samsung Series 3, Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz - 8Gb DDR3 ram - 700Gb HDD
On board intel Graphics & Sound
Offline
Yup, where you had it is actually commented out. That part of the example rc.xml always bothered me - it's really not very clear that those are ALL comments, particularly when they mix comment styles (lines starting with # have no special meaning in XML - they are not actually commented out*). That whole region of the file is commented out between the "<!--" and the "-->".
*Edit for clarification: Those lines are commented out, but not because of the #, the # is irrelevant. They are all commented (# or not) because of the <!-- ... -->
Last edited by Trilby (2012-06-01 02:04:56)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Can OpenBox group windows as FluxBox does ?
e^(π⋅i) + 1 = 0
Offline
Short answer: no.
There are some tools that will provide some degree of tabbed window functionality in openbox - but these are add ons. Openbox does not provide such an option. This may be the biggest difference between the two *boxes (and the only advantage of fluxbox IMHO).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I was able to use one really neat thing. In many DE or WM, when you maximize the window and then try drag the window from the titlebar, the window would be unmaximized. I was able to achieve this by following config:
<context name="Titlebar">
<mousebind button="Left" action="Drag">
<action name="Unmaximize"/>
<action name="Move"/>
</mousebind>
</context>
The Move action is necessary to keep to be still moving window.
BUT there is one thing...I hope you can help me..
This way, when window become unmaximized, the cursor will still be on top of the screen (it looks ugly when you move your mouse and window below moves too). How to move the cursor to still be on a titlebar?
Last edited by bakytn (2013-03-14 10:43:30)
Offline
bakytn, I doubt there is a way to do this in "pure" openbox, but you could call xdotool to warp the mouse pointer.
Add and <action name="execute">...</action> between the Unmaximize and the Move that executes the appropriate xdotool command.
This is completely untested, and is just my brainstorming - but it should be able to do what you want.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Trilby, I think this is very acceptable workaround. Thank you very much!
Last edited by bakytn (2013-03-15 04:57:40)
Offline
Hi!
Does anybody know is there a way to hide bars (tint2, fbpanel or similar) on a particular desktop through key binding as it is possible in WMs like dwm and awesome? Or is there possibility to never show these bars on a particular desktop?
I'm aware of the "autohide" option of these bars but that's not what I'm looking for.
Offline