You are not logged in.

#1 2019-04-17 08:11:45

Colonel Panic
Member
Registered: 2018-11-13
Posts: 34

Dragging shaded windows in Openbox

Hi again. I've been trying to recreate in Openbox a composite action which is easy to do in Fluxbox - shading a window (which is easy enough to do, there's a button on the toolbar for it) and then dragging the now shaded window without unshading it. When I try to do this in Openbox, the window automatically unshades.

Has anyone got any suggestions as to how I might do this? I've tried to do the straightforward thing

  <context name="Titlebar">
    <mousebind button="Left" action="Drag">
      <action name="Move"/>
    </mousebind>

with the window shaded, but there seems to be something else in the rc.xml file which unshades the window before I try to drag it.

Thanks in advance,

Colonel Panic.

Last edited by Colonel Panic (2019-04-17 08:22:17)

Offline

#2 2019-04-17 10:00:40

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 985

Re: Dragging shaded windows in Openbox

You will need to find the mouse binding in the rc.xml file that shades/unshades the window (I think ToggleShading is the action). Needs to be changed to something else so that holding the mouse to drag doesn't activate the ToggleShading.

Double click on titlebar is ToggleMaximize by default, I think so don't use that.

Last edited by PackRat (2019-04-17 10:05:15)


You must unlearn what you have learned.
    -- yoda

Offline

#3 2019-04-17 10:16:30

Colonel Panic
Member
Registered: 2018-11-13
Posts: 34

Re: Dragging shaded windows in Openbox

Thanks PackRat! I'll look into it.

Part of the problem for me is that Click, Press and Drag are presented in the rc.xml file as though they are independent actions, but they aren't really; when you move the cursor over a window's titlebar in order to drag it across the desktop, you have to click on it and then press on it as well.

Last edited by Colonel Panic (2019-04-17 10:16:49)

Offline

#4 2019-04-17 13:47:14

damo
....moderator....
Registered: 2015-08-20
Posts: 4,873

Re: Dragging shaded windows in Openbox

Alt-LMouse-Drag moves the shaded window without unshading it. The relevant section in my rc.xml has

      <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>

Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2019-04-17 20:38:18

Colonel Panic
Member
Registered: 2018-11-13
Posts: 34

Re: Dragging shaded windows in Openbox

Thanks Damo, I’m using your code now and it works well smile. I’m about 95% finished with working on my Openbox configuration file and in particular getting Openbox to do the things I can do in Fluxbox.

Also, is it possible to bind any commands to the KP_0 number pad key in Openbox? I've got it set up in Fluxbox to minimise a window when I press KP_0 and a command key such as Control, but it doesn't seem to work in the same way with Openbox.

Thanks in advance,

CP .

Last edited by Colonel Panic (2019-04-17 20:39:20)

Offline

#6 2019-04-17 21:05:30

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 985

Re: Dragging shaded windows in Openbox

Also, is it possible to bind any commands to the KP_0 number pad key in Openbox?

Yes, I use the number pad keys for faux tiling in openbox and fluxbox.

    <keybind key="W-KP_7">
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </keybind>

Last edited by PackRat (2019-04-17 21:09:48)


You must unlearn what you have learned.
    -- yoda

Offline

#7 2019-04-17 22:45:01

Colonel Panic
Member
Registered: 2018-11-13
Posts: 34

Re: Dragging shaded windows in Openbox

Thanks for replying. I'm using alaskan hippie's key bindings as shown here;

<!-- Start of Tiling -->
<!-- Poorly strewn together by alaskan-hippie who can be found here: [url]http://crunchbang.org/forums/profile.php?id=9401[/url] -->

<!--Bottom Left-->
	<keybind key="W-A-KP_1">
		<action name="UnmaximizeFull"/>
		<action name="MoveResizeTo">
			<width>50%</width>
			<height>50%</height>
		</action>
		<action name="MoveToEdge"><direction>south</direction></action>
		<action name="MoveToEdge"><direction>west</direction></action>
	</keybind>
<!--Bottom-->
	<keybind key="W-A-KP_2">
		<action name="UnmaximizeFull"/>
		<action name="Maximize"><direction>horizontal</direction></action>
		<action name="MoveResizeTo">
			<height>50%</height>
		</action>
		<action name="MoveToEdge"><direction>south</direction></action>
	</keybind>
<!--Bottom Right-->	
	<keybind key="W-A-KP_3">
		<action name="UnmaximizeFull"/>
		<action name="MoveResizeTo">
			<width>50%</width>
			<height>50%</height>
		</action>
		<action name="MoveToEdge"><direction>south</direction></action>
		<action name="MoveToEdge"><direction>east</direction></action>
	</keybind>
<!--Full Left-->
	<keybind key="W-A-KP_4">
		<action name="UnmaximizeFull"/>
		<action name="MaximizeVert"/>
		<action name="MoveResizeTo">
			<width>50%</width>
		</action>
		<action name="MoveToEdge"><direction>west</direction></action>
	</keybind>
<!--Full Screen/Center-->
	<keybind key="W-A-KP_5">
		<action name="Maximize"><direction>both</direction></action>
	</keybind>
<!--Full Right-->
	<keybind key="W-A-KP_6">
		<action name="UnmaximizeFull"/>
		<action name="MaximizeVert"/>
		<action name="MoveResizeTo">
			<width>50%</width>
		</action>
		<action name="MoveToEdge"><direction>east</direction></action>
	</keybind>
<!--Top Left-->
	<keybind key="W-A-KP_7">
		<action name="UnmaximizeFull"/>
		<action name="MoveResizeTo">
			<width>50%</width>
			<height>50%</height>
		</action>
		<action name="MoveToEdge"><direction>north</direction></action>
		<action name="MoveToEdge"><direction>west</direction></action>
	</keybind>
<!--Full Top-->
	<keybind key="W-A-KP_8">
		<action name="UnmaximizeFull"/>
		<action name="Maximize"><direction>horizontal</direction></action>
		<action name="MoveResizeTo">
			<height>50%</height>
		</action>
		<action name="MoveToEdge"><direction>north</direction></action>
	</keybind>
<!--Top Right-->
	<keybind key="W-A-KP_9">
		<action name="UnmaximizeFull"/>
		<action name="MoveResizeTo">
			<width>50%</width>
			<height>50%</height>
		</action>
		<action name="MoveToEdge"><direction>north</direction></action>
		<action name="MoveToEdge"><direction>east</direction></action>
	</keybind>
		
<!-- End of tiling -->	

https://forums.bunsenlabs.org/viewtopic.php?id=246

I haven't found a way to get any command to work with the 0 keypad key (KP_0) though, which was the point of my question here.

Offline

#8 2019-04-17 23:20:47

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 985

Re: Dragging shaded windows in Openbox

This keybinding -

   

 <keybind key="A-KP_0">
      <action name="Iconify"/>
    </keybind>

Is iconifying the active window on my system. That what you're trying to accomplish?


You must unlearn what you have learned.
    -- yoda

Offline

#9 2019-04-18 19:37:04

Colonel Panic
Member
Registered: 2018-11-13
Posts: 34

Re: Dragging shaded windows in Openbox

Thanks. I'm not sure what I did wrong the first time, maybe one "action" too many in the second line, but all's well that ends well and it's working now (I'm using W-A-KP_0 to iconify the window).

I'm very much still learning my way around Openbox but already I'm impressed by how configurable it is. It seems to offer a good balance between configurability, on the one hand, and yet not having so many options that you get lost in them all and get stuck (as I did with fvwm more than once in a different distro).

Last edited by Colonel Panic (2019-04-18 23:11:58)

Offline

#10 2019-04-18 20:55:35

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 985

Re: Dragging shaded windows in Openbox


You must unlearn what you have learned.
    -- yoda

Offline

#11 2019-04-19 05:25:43

ohnonot
...again
Registered: 2015-09-29
Posts: 3,663
Website

Re: Dragging shaded windows in Openbox

openbox xml parsing errors are famously non-descript - usually it's just "XML parsing error on line 1237" where line 1237 is the end of the file. good luck hunting that down.
I hope you have syntax highlighting enabled in your editor, without it editing XML is a real pita.

but other than that I (and most Openbox users) totally agree:

Colonel Panic wrote:

Openbox ... I'm impressed by how configurable it is. It seems to offer a good balance between configurability, on the one hand, and yet not having so many options that you get lost in them all and get stuck.

QFT!

Last edited by ohnonot (2019-04-22 04:35:37)

Offline

#12 2019-04-21 14:33:07

Colonel Panic
Member
Registered: 2018-11-13
Posts: 34

Re: Dragging shaded windows in Openbox

PackRat wrote:

Here's another good webpage about Openbox;

https://urukrama.wordpress.com/openbox-guide/

Offline

#13 2019-04-21 16:47:43

DeepDayze
Member
From: In Linux Land
Registered: 2017-05-28
Posts: 647

Re: Dragging shaded windows in Openbox

Colonel Panic wrote:
PackRat wrote:

Here's another good webpage about Openbox;

https://urukrama.wordpress.com/openbox-guide/

That's for an older version of Openbox but the material is still very relevant. Multihead support is better with OB than with Fluxbox IMO.


Real Men Use Linux

Offline

#14 2019-04-21 17:58:47

hhh
That's it!
Registered: 2015-09-17
Posts: 7,440
Website

Re: Dragging shaded windows in Openbox

Colonel Panic wrote:
PackRat wrote:

Here's another good webpage about Openbox;

https://urukrama.wordpress.com/openbox-guide/

Pretty much considered the Definitive Guide, it's been online... what, ten years or more? -edit- Since 2008 at least. /edit

Obligatory Arch Wiki link to OB...

https://wiki.archlinux.org/index.php/openbox

Last edited by hhh (2019-04-21 18:03:13)

Offline

#15 2019-04-22 16:54:26

damo
....moderator....
Registered: 2015-08-20
Posts: 4,873

Re: Dragging shaded windows in Openbox

^ Sheesh, does no-one ever look at the "Help & Resources" section in the main menu? hmm

Lots of links in the Openbox section, driven by bl-help-pipemenu

menuSubmenu 'OpenboxWWW' 'Openbox'
    menuSubmenu 'ObWWW' 'Openbox Website'
        menuItem 'Openbox Homepage' 'x-www-browser "http://openbox.org/"'
        menuItem 'Openbox Getting Started' 'x-www-browser "http://openbox.org/wiki/Help:Getting_started"'
        menuItem 'Openbox Documentation' 'x-www-browser "http://openbox.org/wiki/Help:Contents"'
        menuItem 'Openbox FAQs' 'x-www-browser "http://openbox.org/wiki/Help:FAQ"'
    menuSubmenuEnd
    menuItem 'ArchWiki Openbox Guide' 'x-www-browser "http://wiki.archlinux.org/index.php/Openbox"'
    menuItem 'Debian Wiki Openbox Guide' 'x-www-browser "https://wiki.debian.org/Openbox"'
    menuItem 'Urukramas Openbox Guide' 'x-www-browser "https://urukrama.wordpress.com/openbox-faq/"'
menuSubmenuEnd

Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

Board footer

Powered by FluxBB