You are not logged in.
there's a simple program that makes configuring specific windows by class etc. in rc.xml really simple. It's called OBapps
http://sourceforge.net/apps/mediawiki/o … =Main_Page
I made * maximized with no decor on my netbook...
<application class="*">
<decor>no</decor>
<maximized>yes</maximized>
</application>
which works great for most programs, except things like the gimp. Three big issues with the gimp:
1) lots of popups and separate windows that are not intended to be fullscreen
2) (for some reason) two different paths, depending on how I open it, leaving me running either "gimp" or "gimp_2.6"
3) toolboxes show up in my panel...which I don't want.
here's how I set it up:
<application class="Gimp" name="gimp">
<decor>yes</decor>
<maximized>no</maximized>
<skip_taskbar>yes</skip_taskbar>
<skip_pager>yes</skip_pager>
</application>
<application class="Gimp" name="gimp" role="gimp-toolbox" type="utility">
<decor>no</decor>
<maximized>vertical</maximized>
<fullscreen>no</fullscreen>
</application>
<application class="Gimp" name="gimp" role="gimp-dock" type="utility">
<skip_taskbar>yes</skip_taskbar>
<skip_pager>yes</skip_pager>
<decor>no</decor>
<maximized>vertical</maximized>
<layer>default</layer>
</application>
<application class="Gimp" name="gimp" role="gimp-image-window" type="normal">
<decor>yes</decor>
<maximized>vertical</maximized>
<skip_taskbar>no</skip_taskbar>
<skip_pager>no</skip_pager>
<position force="no">
<x>center</x>
<y>center</y>
</position>
</application>
<application name="gimp-2.6">
<decor>yes</decor>
<maximized>no</maximized>
<skip_taskbar>yes</skip_taskbar>
<skip_pager>yes</skip_pager>
</application>
<application class="Gimp-2.6" name="gimp-2.6" role="gimp-toolbox" type="utility">
<decor>no</decor>
<maximized>vertical</maximized>
</application>
<application class="Gimp-2.6" name="gimp-2.6" role="gimp-dock" type="utility">
<decor>no</decor>
<maximized>vertical</maximized>
</application>
<application class="Gimp-2.6" name="gimp-2.6" role="gimp-image-window" type="normal">
<maximized>vertical</maximized>
<decor>yes</decor>
<skip_taskbar>no</skip_taskbar>
<skip_pager>no</skip_pager>
</application>
This makes my Gimp behave...an excellent attribute in any gimp.
Last edited by bobrossw (2011-03-21 21:25:10)
Offline
<application name="firefox-bin">
<decor>no</decor>
<maximized>yes</maximized>
</application>
That works for me.
Also, xkill bound to Ctrl/Alt/Delete
<keybind key="C-A-Delete">
<action name="Execute">
<command>terminator --command='xkill'</command>
</action>
</keybind>
Lastly: nice one, bob. I use gimp extensively and this is just what I was looking for.
Last edited by zengrapefruit (2011-03-22 08:53:13)
Offline
<application name="firefox-bin">
<decor>no</decor>
<maximized>yes</maximized>
</application>That works for me.
Possibly I made a newbie mistake. I opened a terminal and typed in firefox-bin but when I pressed enter nothing ran so I made the assumption that firefox-bin was incorrect. Like I said newbie mistake. Now I have been introduced to xprops etc I know better.
pay the bills with Windows, obssesed with Linux, studying CCNA when I can fit it in.
Offline
I am trying to set mine up so that when I open "terminator_desktop", rather than just terminator, it will open ONLY on the second desktop as a sort of wallpaper. When I run terminator_desktop it does open exactly how I want it, but on desktop 1 instead of desktop 2. Any ideas please?
</application>
<application name="terminator_desktop">
<focus>yes</focus>
<layer>below</layer>
<desktop>2</desktop>
<skip_taskbar>yes</skip_taskbar>
</application>
Offline
Inside your terminator_desktop script, try launching terminator with this flag: "--role=TERMINATOR_DESKTOP"
Then change your Openbox rule to:
<application role="TERMINATOR_DESKTOP">
<focus>yes</focus>
<layer>below</layer>
<desktop>2</desktop>
<skip_taskbar>yes</skip_taskbar>
</application>
Offline
Here's mine if anyone wants to check it out:
http://crunchbanglinux.org/pastebin/1135
It has a button to power off the laptop quickly by tapping the power button(452-460), the archbang style window manipulation shortcuts (line 461-505), and you can see my keybinds, there's 4 different four different terminator shortcuts, an xkill shortcut, maximize/minimize toggle, volume keys etc. Here's the script to power down the laptop in a hurry:
gdm-control --shutdown && openbox --exit
.
Offline
Made quite a bit of changes. Don't remember all of them. Frankly the best way to learn is to just read through the whole file as I did and hack things up. Anyway if anyone gives a damn here's mine. Hope it helps someone do something they want to.
<?xml version="1.0" encoding="UTF-8"?>
<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>Any</monitor>
</placement>
<theme>
<name>Shiki-Statler</name>
<titleLayout>DSLIMC</titleLayout>
<!--
avaible 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>9</size>
<!-- font size in points -->
<weight>normal</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="InactiveWindow">
<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="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="OnScreenDisplay">
<name>Sans</name>
<size>9</size>
<!-- font size in points -->
<weight>normal</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</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>1</number>
<firstdesk>1</firstdesk>
<names>
<name>1</name>
</names>
<popupTime>875</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>Nonpixel</popupShow>
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
<popupPosition>Center</popupPosition>
<!-- 'Center' or 'Top' -->
<popupFixedPosition>
<x>0</x>
<y>0</y>
</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>Above</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>
<!-- Keybindings for desktop switching -->
<keybind key="C-A-Left">
<action name="DesktopLeft">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Right">
<action name="DesktopRight">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Up">
<action name="DesktopUp">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Down">
<action name="DesktopDown">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Left">
<action name="SendToDesktopLeft">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Right">
<action name="SendToDesktopRight">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Up">
<action name="SendToDesktopUp">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="S-A-Down">
<action name="SendToDesktopDown">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="W-d">
<action name="ToggleShowDesktop"/>
</keybind>
<!-- Keybindings for windows -->
<!-- Modified by Georgiy. -->
<keybind key="W-0">
<action name="Close"/>
</keybind>
<!-- End of modified by Georgiy. -->
<!-- Added by Georgiy. -->
<keybind key="W-1">
<action name="ToggleMaximizeFull"/>
</keybind>
<!-- End of added by Georgiy. -->
<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="Print">
<action name="Execute">
<execute>scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/screenshots/ & viewnior ~/screenshots/$f'</execute>
</action>
</keybind>
<keybind key="A-Print">
<action name="Execute">
<execute>scrot -d 10 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/screenshots/ & viewnior ~/screenshots/$f'</execute>
</action>
</keybind>
<!-- Keybindings for window switching -->
<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>
<!-- Keybindings for running applications -->
<keybind key="A-F2">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Run Program</name>
</startupnotify>
<command>gmrun</command>
</action>
</keybind>
<keybind key="A-F3">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>dmenu-bind</name>
</startupnotify>
<command>~/.config/dmenu/dmenu-bind.sh</command>
</action>
</keybind>
<!-- Start of Georgiy's crap. -->
<keybind key="W-a">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>clamtk</name>
</startupnotify>
<command>/usr/bin/clamtk</command>
</action>
</keybind>
<keybind key="W-c">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>qalculate</name>
</startupnotify>
<command>/usr/bin/qalculate</command>
</action>
</keybind>
<keybind key="W-s">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Synaptic</name>
</startupnotify>
<command>/usr/bin/gksu /usr/sbin/synaptic</command>
</action>
</keybind>
<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<!--
<command>amixer set Master 5%+</command>
-->
<command>/home/georgiy/SpecialPrograms/Workarounds/volumeControl.sh up</command>
</action>
</keybind>
<keybind key="XF86AudioLowerVolume">
<action name="Execute">
<!--
<command>amixer set Master 5%-</command>
-->
<command>/home/georgiy/SpecialPrograms/Workarounds/volumeControl.sh down</command>
</action>
</keybind>
<keybind key="XF86AudioMute">
<action name="Execute">
<!--
<command>amixer set Master toggle</command>
-->
<command>/home/georgiy/SpecialPrograms/Workarounds/volumeControl.sh mute</command>
</action>
</keybind>
<!-- End of Georgiy's crap. -->
<keybind key="W-f">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>thunar</name>
</startupnotify>
<command>thunar</command>
</action>
</keybind>
<keybind key="W-t">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Terminal</name>
</startupnotify>
<command>terminator</command>
</action>
</keybind>
<keybind key="W-w">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Web Browser</name>
</startupnotify>
<command>x-www-browser</command>
</action>
</keybind>
<keybind key="W-l">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Lock screen</name>
</startupnotify>
<command>cb-lock</command>
</action>
</keybind>
<keybind key="W-e">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Editor</name>
</startupnotify>
<command>gedit</command>
</action>
</keybind>
<keybind key="W-m">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Mediaplayer</name>
</startupnotify>
<command>vlc</command>
</action>
</keybind>
<keybind key="W-v">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Volume</name>
</startupnotify>
<command>xfce4-mixer</command>
</action>
</keybind>
<keybind key="W-x">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Logout</name>
</startupnotify>
<command>openbox-logout</command>
</action>
</keybind>
<keybind key="W-Tab">
<action name="ShowMenu">
<menu>client-list-combined-menu</menu>
</action>
</keybind>
<keybind key="W-space">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</keybind>
<keybind key="A-C-q">
<action name="ShowMenu">
<menu>root-menu</menu>
</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 button="A-Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="A-Left" action="Click">
<action name="Unshade"/>
</mousebind>
<mousebind button="A-Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="A-Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="A-Right" action="Drag">
<action name="Resize"/>
</mousebind>
<mousebind button="A-Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="C-A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="C-A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-S-Up" action="Click">
<action name="SendToDesktopPrevious"/>
</mousebind>
<mousebind button="A-S-Down" action="Click">
<action name="SendToDesktopNext"/>
</mousebind>
</context>
<context name="Titlebar">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="Up" action="Click">
<action name="Shade"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
<action name="Lower"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="Unshade"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="Top">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>top</edge>
</action>
</mousebind>
</context>
<context name="Left">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>left</edge>
</action>
</mousebind>
</context>
<context name="Right">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>right</edge>
</action>
</mousebind>
</context>
<context name="Bottom">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize">
<edge>bottom</edge>
</action>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="BLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="BRCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="TLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="TRCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="Client">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Icon">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</mousebind>
</context>
<context name="AllDesktops">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleOmnipresent"/>
</mousebind>
</context>
<context name="Shade">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleShade"/>
</mousebind>
</context>
<context name="Iconify">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="Iconify"/>
</mousebind>
</context>
<context name="Maximize">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleMaximizeFull"/>
</mousebind>
<mousebind button="Middle" action="Click">
<action name="ToggleMaximizeVert"/>
</mousebind>
<mousebind button="Right" action="Click">
<action name="ToggleMaximizeHorz"/>
</mousebind>
</context>
<context name="Close">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="Close"/>
</mousebind>
</context>
<context name="Desktop">
<mousebind button="Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="C-A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="C-A-Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Root">
<!-- Menus -->
<mousebind button="Middle" action="Press">
<action name="ShowMenu">
<menu>client-list-combined-menu</menu>
</action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</mousebind>
</context>
<context name="MoveResize">
<mousebind button="Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="Down" action="Click">
<action name="DesktopNext"/>
</mousebind>
<mousebind button="A-Up" action="Click">
<action name="DesktopPrevious"/>
</mousebind>
<mousebind button="A-Down" action="Click">
<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/) -->
<!-- system menu files on Debian systems
<file>/var/lib/openbox/debian-menu.xml</file>
<file>debian-menu.xml</file> -->
<file>menu.xml</file>
<hideDelay>200</hideDelay>
<middle>no</middle>
<submenuShowDelay>100</submenuShowDelay>
<applicationIcons>yes</applicationIcons>
</menu>
<applications>
<!--
# this is an example with comments through out. use these to make your
# own rules, but without the comments of course.
<application name="first element of window's WM_CLASS property (see xprop)"
class="second element of window's WM_CLASS property (see xprop)"
role="the window's WM_WINDOW_ROLE property (see xprop)">
# the name or the class can be set, or both. this is used to match
# windows when they appear. role can optionally be set as well, to
# further 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.
# when multiple rules match a window, they will all be applied, in the
# order that they appear in this list
# each element can be left out or set to 'default' to specify to not
# change that attribute of the window
<decor>yes</decor>
# enable or disable window decorations
<shade>no</shade>
# make the window shaded when it appears, or not
<position>
# the position is only used if both an x and y coordinate are provided
# (and not set to 'default')
<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
-->
<application name="gmessage">
<decor>no</decor>
<shade>no</shade>
<skip_pager>yes</skip_pager>
<skip_taskbar>yes</skip_taskbar>
<fullscreen>no</fullscreen>
<maximized>no</maximized>
</application>
<application name="openbox-logout">
<decor>no</decor>
<shade>no</shade>
<skip_pager>yes</skip_pager>
<fullscreen>no</fullscreen>
<maximized>no</maximized>
<layer>above</layer>
</application>
</applications>
</openbox_config>
Offline
</keybind>
<keybind key="F4">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Mediaplayer</name>
</startupnotify>
<command>gksudo synaptic</command>
</action>
</keybind>
About the only thing I've done, other than change many of the default shortcuts over to using one of the F1-F12 keys. Why have to hit several key combinations when I can push 1 button and have summin I use a lot up ? In the above I kicked vlc out, instead of going ahead and just making a new keybinding. Not sure why ... other than I don't use the media player much. End result of above, when I hit F4 synaptic asks for my PW, then opens up. Ready, willing and able to install summin if I like. Wow I know ... init amazing, lol.
Last edited by CBizgreat! (2011-09-09 08:38:41)
Some common cbiz abbreviations. This will save me time and yet @ same time tell folks what the babble is supposed to mean.
Vll ! = ( Viva la gnu/Linux !) Vl#!! = ( Viva la #! !) Last but not least, UD ... OD ! = ( Use Debian ... or die !)
Offline
^ Well the F row can be pretty remote...
Good two key combinations are probably faster.
Here are some bits of mine for Openbox 3.4:
<keyboard>
<keybind key="W-m">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</keybind>
<keybind key="W-S-m">
<action name="Execute">
<execute>/home/d/.dmenu</execute>
</action>
</keybind>
<keybind key="W-r">
<action name="Reconfigure"/>
</keybind>
<keybind key="W-S-r">
<action name="Restart"/>
</keybind>
<keybind key="W-q">
<action name="Exit">
<prompt>yes</prompt>
</action>
</keybind>
<keybind key="W-x">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>xkill</name>
</startupnotify>
<command>xkill</command>
</action>
</keybind>
<!-- Keybindings for desktop switching -->
<keybind key="W-d">
<action name="ToggleShowDesktop"/>
</keybind>
<keybind key="W-1">
<action name="Desktop">
<desktop>1</desktop>
</action>
</keybind>
<keybind key="W-2">
<action name="Desktop">
<desktop>2</desktop>
</action>
</keybind>
<keybind key="W-3">
<action name="Desktop">
<desktop>3</desktop>
</action>
</keybind>
<keybind key="W-4">
<action name="Desktop">
<desktop>4</desktop>
</action>
</keybind>
<keybind key="W-5">
<action name="Desktop">
<desktop>5</desktop>
</action>
</keybind>
<keybind key="W-S-1">
<action name="SendToDesktop"><desktop>1</desktop></action>
</keybind>
<keybind key="W-S-2">
<action name="SendToDesktop"><desktop>2</desktop></action>
</keybind>
<keybind key="W-S-3">
<action name="SendToDesktop"><desktop>3</desktop></action>
</keybind>
<keybind key="W-S-4">
<action name="SendToDesktop"><desktop>4</desktop></action>
</keybind>
<keybind key="W-S-5">
<action name="SendToDesktop"><desktop>5</desktop></action>
</keybind>
<!-- Keybindings for windows -->
<keybind key="W-c">
<action name="Close"/>
</keybind>
<keybind key="W-w">
<action name="ToggleMaximizeFull"></action>
</keybind>
<keybind key="W-S-d">
<action name="ToggleDecorations"/>
</keybind>
<keybind key="A-Escape">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</keybind>
<keybind key="W-o">
<action name="ShowMenu">
<menu>client-menu</menu>
</action>
</keybind>
Offline
anonymous wrote:I made these to emulate a couple of Windows 7 keybinds:
<keybind key="W-Left"> <action name="UnmaximizeFull"/> <action name="MaximizeVert"/> <action name="MoveResizeTo"> <width>640</width> </action> <action name="MoveToEdgeWest"/> </keybind> <keybind key="W-Right"> <action name="UnmaximizeFull"/> <action name="MaximizeVert"/> <action name="MoveResizeTo"> <width>640</width> </action> <action name="MoveToEdgeEast"/> </keybind>
You should change the numbers based on your display resolution and any panels you have.
I've been looking for this! Thanks!
Made a few modifications of my own...
<keybind key="W-Up"> <action name="MaximizeFull"/> <action name="Maximize"/> </keybind> <keybind key="W-Down"> <action name="UnmaximizeFull"/> <action name="Unmaximize"/> </keybind> <keybind key="W-Left"> <action name="UnmaximizeFull"/> <action name="MaximizeVert"/> <action name="MoveResizeTo"> <width>683</width> </action> <action name="MoveToEdgeWest"/> </keybind> <keybind key="W-Right"> <action name="UnmaximizeFull"/> <action name="MaximizeVert"/> <action name="MoveResizeTo"> <width>683</width> </action> <action name="MoveToEdgeEast"/> </keybind>
Hi, new #! user here. I just want to thank you to rolobio and anonymous and to others. I just added this shortcut to my rc.xml. works like a charm!
Offline
I added this to mine today:
<keybind key="W-d">
<action name="ToggleDecorations"/>
</keybind>
Turns the decorations (title bar) on and off.
Offline
Wow,I never thought to link my favorite sites to keybinds. Heres mine,I changed a few that i never use to run applications like Pidgin/Transmission. and made a Xkill one too.
<keybind key="W-b"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>bit torrent</name> </startupnotify> <command>transmission</command> </action> </keybind> <keybind key="W-e"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>Editor</name> </startupnotify> <command>gedit</command> </action> </keybind> <keybind key="W-m"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>Mediaplayer</name> </startupnotify> <command>vlc</command> </action> </keybind> <keybind key="W-i"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>pidgin</name> </startupnotify> <command>pidgin</command> </action> </keybind> <keybind key="W-x"> <action name="Execute"> <startupnotify> <enabled>true</enabled> <name>xkill</name> </startupnotify> <command>xkill</command> </action>
definately a must.
i use alt-F6 for xkill.
an easy save for pesky non-closing gui apps. especially when you have many open of the same type and you cant easily see in htop which one it is you want to kill... saves going through the steps (e.g. xev etc) to find out which pid is for which window.
just a press of a keybind, and a click on the window you want to kill. even works on stuff like tint2, conky, xteddy etc.
~ think ~
i have chosen to commit to bedrocklinux.
remember aaron | bad-systemdoze! | without a shot fired
Community #!
Offline
Using xev to find a PID is kinda like using a rocket launcher to blow up the haystack and find the needle.
Offline
how would you find a window's pid then? xprop i presume? (i just couldnt remember it at the time when i wrote that.) ^_^
could be handy to have that on alt f7. ^_^
Last edited by Digit (2012-06-28 11:45:29)
~ think ~
i have chosen to commit to bedrocklinux.
remember aaron | bad-systemdoze! | without a shot fired
Community #!
Offline
how would you find a window's pid then? xprop i presume? (i just couldnt remember it at the time when i wrote that.) ^_^
could be handy to have that on alt f7. ^_^
ps -ef | grep -i <program>
pidof program
I don't concern myself with windows, kill sends termination commands to the entire process, so objects aren't interesting. I mean, if you really wanna kill by clicking on a window you use xkill anyway.
Last edited by el_koraco (2012-06-28 21:36:23)
Offline
Here's this, I like it a lot.
<!-- Move and resize windows, cwm style! -->
<!-- Move windows a little -->
<keybind key="M-h"> <action name="MoveRelative"><x>-3</x><y>0</y></action> </keybind>
<keybind key="M-j"> <action name="MoveRelative"><x>0</x><y>3</y></action> </keybind>
<keybind key="M-k"> <action name="MoveRelative"><x>0</x><y>-3</y></action> </keybind>
<keybind key="M-l"> <action name="MoveRelative"><x>3</x><y>0</y></action> </keybind>
<!-- Move windows a lot -->
<keybind key="S-M-h"> <action name="MoveRelative"><x>-20</x><y>0</y></action> </keybind>
<keybind key="S-M-j"> <action name="MoveRelative"><x>0</x><y>20</y></action> </keybind>
<keybind key="S-M-k"> <action name="MoveRelative"><x>0</x><y>-20</y></action> </keybind>
<keybind key="S-M-l"> <action name="MoveRelative"><x>20</x><y>0</y></action> </keybind>
<!-- Resize windows a little -->
<keybind key="C-M-h"> <action name="ResizeRelative"><right>-3</right></action> </keybind>
<keybind key="C-M-j"> <action name="ResizeRelative"><bottom>3</bottom></action> </keybind>
<keybind key="C-M-k"> <action name="ResizeRelative"><bottom>-3</bottom></action> </keybind>
<keybind key="C-M-l"> <action name="ResizeRelative"><right>3</right></action> </keybind>
<!-- Resize windows a lot -->
<keybind key="S-C-M-h"> <action name="ResizeRelative"><right>-20</right></action> </keybind>
<keybind key="S-C-M-j"> <action name="ResizeRelative"><bottom>20</bottom></action> </keybind>
<keybind key="S-C-M-k"> <action name="ResizeRelative"><bottom>-20</bottom></action> </keybind>
<keybind key="S-C-M-l"> <action name="ResizeRelative"><right>20</right></action> </keybind>
Last edited by rkwurth (2012-12-12 02:34:11)
Offline
This is a sweet thread. One of my favorite things about Linux is customization, and openbox is just about the epitome of that.
So I don't have any cool tweaks to contribute (yet), but I was wondering if someone could help me out. I would like to tweak my rc.xml so that I have another option for right-click in general. My old mac laptop has a pretty crappy touchpad; I'm pretty sure right-click is supposed to be a 2-finger click but I can never get it to work.
I tried the following:
<mousebind action="Press" button="W-Left">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
but it isn't quite what I want. It allows me to bring up the main openbox menu (which is cool), but it doesn't act as a right-click in general (e.g. using that key combination on the nm-applet in the systray doesn't do anything).
Anyone have any helpful (or snarky, even) suggestions? Thanks!
stevo
P.S. What's the difference between "Press" and "Click" in the mousebind options?
Eschew obfuscation.
Offline
Yep, that's because that's what you've configured it to do.
A quick google suggests that you can do what you want with the `mouseemu` package. (`sudo aptitude install mouseemu`), though I've never used it.
ETA: IIRC, `press` activates when you press the mouse button, `click` when you release it...
Last edited by joek (2013-02-13 12:02:05)
Offline
Well, thanks for researching that for me, Joek. Finding things on google using the keywords "right-click" was challenging. Go figure that I'd find something that isn't configurable in openbox. And thanks for clarification on "click" versus "press"!
stevo
Last edited by stevo1977 (2013-02-13 16:54:05)
Eschew obfuscation.
Offline
Start gnome-terminal with custom dimensions and run the MPD player in it.
<keybind key="W-n">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>MPD PLAYER</name>
</startupnotify>
<command>gnome-terminal --geometry=100x10 -e ncmpcpp</command>
</action>
</keybind>
Best thing is if I press "q" to quit the terminal will not stay open.
I have another keybind W-m to start midnight commander with dimensions 90x40 (characters).
Offline
There are several ways to achieve an "aero snap" like functionality in openbox. Some are keyboard driven, others rely on the mouse and screen edge detection. Unfortunately most of these methods lack a proper unsnap functionality and restoring the windows to their pre-snapped size can be quite annoying. (As an aside, opensnap has an experimental unsnap branch but there are still issues with restoring window size.)
I found a way to solve this with a small rc.xml tweak. The following snippet allows you to automatically unsnap and restore windows to their original size:
<mousebind button="Left" action="Drag">
<!-- Unsnap if snapped-->
<action name="if">
<maximizedvertical>yes</maximizedvertical>
<then>
<action name="Unmaximize"/>
<direction>vertical</direction>
<action name="MoveResizeTo">
<x>center</x>
<!-- we center windows in order to mitigate discrepancies
between window placement and mouse cursor -->
<y>current</y>
</action>
<action name="Move"/>
</then>
<else>
<action name="Move"/>
</else>
</action>
</mousebind>
Make sure to replace the existing keybind.
Enjoy!
Last edited by Feltzer (2013-09-02 15:42:08)
Offline
I use "W-f" as a keybind to start Firefox. But if I already have Firefox and press "W-f" again, I get a new instance which I don't like. I know I could use Alt-tab (perhaps several times depending on how many other applications are open) to get to the existing Firefox, but I came across another trick involving wmctrl.
First, I created this bash script and called it "fx":
#!/usr/bin/env bash
wmctrl -a Firefox || firefox
Then, I went back into rc.xml and modified the "W-f" keybind to run "fx".
Now, whenever I press "W-f", the existing Firefox comes to focus; if there's no Firefox open, the command causes Firefox to launch.
Offline
^ a more extended version of your fix is the launch script presented in here
http://crunchbang.org/forums/viewtopic. … 90#p176490
I use it since long time and works well...
by the way...have you seen this!?
http://forum.manjaro.org/index.php?topic=1596.0
#!#!#! Forum etiquette #!#!#!
Are you a new member!? Have you introduced yourself?!
CLI basics | LVM | smxi | chrooting | multiarch
Offline
^ a more extended version of your fix is the launch script presented in here
http://crunchbang.org/forums/viewtopic. … 90#p176490
I use it since long time and works well...by the way...have you seen this!?
http://forum.manjaro.org/index.php?topic=1596.0
Thanks! I think the second link relates to how a the active Firefox responds to clicking on a link --- to override opening a new window by opening a new tab instead.
Offline
^ the last post also mentions the "single window mode" enabled by TabMixPlus...it is a great extension, I used to use it before switching to chromium/chrome...
#!#!#! Forum etiquette #!#!#!
Are you a new member!? Have you introduced yourself?!
CLI basics | LVM | smxi | chrooting | multiarch
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat