You are not logged in.

#1 2011-04-12 00:05:43

ERiS
Member
Registered: 2011-03-15
Posts: 20

Is my dream window manager out there? Floating + remember positions

(EDIT, a year later :-P
I am now using Openbox as usual, and I setup my rc.xml as such:

<?xml version="1.0"?>
<openbox_config xmlns="http://openbox.org/3.4/rc">
  <resistance>
    <strength>23</strength>
    <screen_edge_strength>60</screen_edge_strength>
  </resistance>
  <focus>
    <focusNew>yes</focusNew>
    <followMouse>no</followMouse>
    <focusLast>yes</focusLast>
    <underMouse>no</underMouse>
    <focusDelay>200</focusDelay>
    <raiseOnFocus>no</raiseOnFocus>
  </focus>
  <theme>
    <name>Lessr-Pink</name>
    <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>Calibri</name>
      <size>1</size>
      <weight>Normal</weight>
      <slant>Normal</slant>
    </font>
    <font place="InactiveWindow">
      <name>Calibri</name>
      <size>1</size>
      <weight>Normal</weight>
      <slant>Normal</slant>
    </font>
    <font place="MenuHeader">
      <name>Inconsolata Medium</name>
      <size>9.5</size>
      <weight>Normal</weight>
      <slant>Normal</slant>
    </font>
    <font place="MenuItem">
      <name>Segoe UI</name>
      <size>10</size>
      <weight>Normal</weight>
      <slant>Normal</slant>
    </font>
    <font place="ActiveOnScreenDisplay">
      <name>Segoe UI</name>
      <size>12</size>
      <weight>Normal</weight>
      <slant>Normal</slant>
    </font>
    <font place="InactiveOnScreenDisplay">
      <name>Segoe UI</name>
      <size>10</size>
      <weight>Normal</weight>
      <slant>Normal</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>3</number>
    <firstdesk>1</firstdesk>
    <names>
      <name>1</name>
      <name>2</name>
      <name>3</name>
      <name>4</name>
    </names>
    <popupTime>0</popupTime>
  </desktops>
  <resize>
    <drawContents>yes</drawContents>
    <popupShow>Always</popupShow>
    <popupPosition>Center</popupPosition>
    <popupFixedPosition>
      <x>0</x>
      <y>0</y>
    </popupFixedPosition>
  </resize>
  <margins>
    <top>0</top>
    <bottom>0</bottom>
    <left>0</left>
    <right>0</right>
  </margins>
  <dock>
    <position>TopRight</position>
    <floatingX>0</floatingX>
    <floatingY>0</floatingY>
    <noStrut>yes</noStrut>
    <stacking>Normal</stacking>
    <direction>Horizontal</direction>
    <autoHide>yes</autoHide>
    <hideDelay>1170</hideDelay>
    <showDelay>180</showDelay>
    <moveButton>Middle</moveButton>
  </dock>
  <keyboard>
    <chainQuitKey>C-g</chainQuitKey>
    <keybind key="W-F1">
      <action name="SendToDesktopLeft">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="W-F3">
      <action name="SendToDesktopRight">
        <dialog>no</dialog>
        <wrap>no</wrap>
      </action>
    </keybind>
    <keybind key="W-d">
      <action name="ToggleShowDesktop"/>
    </keybind>
    <keybind key="W-1">
      <action name="GoToDesktop">
        <to>1</to>
      </action>
    </keybind>
    <keybind key="W-2">
      <action name="GoToDesktop">
        <to>2</to>
      </action>
    </keybind>
    <keybind key="W-3">
      <action name="GoToDesktop">
        <to>3</to>
      </action>
    </keybind>
    <keybind key="Print">
      <action name="Execute">
        <execute>scrot '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/screenshots/'</execute>
      </action>
    </keybind>
    <keybind key="A-Tab">
      <action name="NextWindow"/>
      <raise>yes</raise>        
    </keybind>
    <keybind key="A-S-Tab">
      <action name="PreviousWindow"/>
      <raise>yes</raise>
    </keybind>
    <keybind key="W-0x16">
      <action name="Execute">
        <command>shutdown-dialog.py</command>
      </action>
    </keybind>
    <keybind key="W-a">
      <action name="ToggleMaximizeFull"/>
    </keybind>
    <keybind key="W-t">
      <action name="ToggleAlwaysOnTop"/>
    </keybind>
    <keybind key="W-v">
      <action name="ToggleMaximizeVert"/>
    </keybind>
    <keybind key="W-h">
      <action name="ToggleMaximizeHorz"/>
    </keybind>
    <keybind key="W-x">
      <action name="Close"/>
    </keybind>
    <keybind key="W-z">
      <action name="Iconify"/>
    </keybind>
    <keybind key="W-S-0x55">
      <action name="GrowToEdgeEast"/>
    </keybind>
    <keybind key="W-S-0x53">
      <action name="GrowToEdgeWest"/>
    </keybind>
    <keybind key="W-S-0x50">
      <action name="GrowToEdgeNorth"/>
    </keybind>
    <keybind key="W-S-0x58">
      <action name="GrowToEdgeSouth"/>
    </keybind>
    <keybind key="W-0x55">
      <action name="MoveToEdgeEast"/>
    </keybind>
    <keybind key="W-0x53">
      <action name="MoveToEdgeWest"/>
    </keybind>
    <keybind key="W-0x50">
      <action name="MoveToEdgeNorth"/>
    </keybind>
    <keybind key="W-0x58">
      <action name="MoveToEdgeSouth"/>
    </keybind>
    <keybind key="W-Left">
      <action name="Execute">
        <command>sonata prev</command>
      </action>
    </keybind>
    <keybind key="W-Right">
      <action name="Execute">
        <command>sonata next</command>
      </action>
    </keybind>
    <keybind key="W-Down">
      <action name="Execute">
        <command>sonata pp</command>
      </action>
    </keybind>
    <keybind key="W-Up">
      <action name="Execute">
        <command>sonata stop</command>
      </action>
    </keybind>
    <keybind key="W-space">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>
    <keybind key="W-Return">
      <action name="Execute">
        <command>dmenu_run</command>
      </action>
    </keybind>
  </keyboard>
  <mouse>
    <dragThreshold>43</dragThreshold>
    <doubleClickTime>200</doubleClickTime>
    <screenEdgeWarpTime>800</screenEdgeWarpTime>
    <context name="Frame">
      <mousebind action="Drag" button="W-Left">
        <action name="Move"/>
      </mousebind>
      <mousebind action="Drag" button="W-Right">
        <action name="Resize"/>
      </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>
    </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>
    </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="Press" button="Left">
        <action name="Focus"/>
        <action name="Raise"/>
      </mousebind>
    </context>
    <context name="Root">
      <!-- Menus -->
      <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>
    </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>
    <application class="*">
      <decor>no</decor>
    </application>
    <application class="Gmrun">
      <position>
        <x>center</x>
        <y>center</y>
      </position>
    </application>
    <application name="Firefox*">
      <desktop>1</desktop>
    </application>
    <application name="sonata">
      <desktop>3</desktop>
    </application>
    <application name="terminator">
      <desktop>2</desktop>
    </application>
    <application name="geany">
      <desktop>2</desktop>
    </application>
    <application name="thunar">
      <desktop>2</desktop>
    </application>
    <application name="xchat">
      <desktop>3</desktop>
    </application>
    <application class="Shutdown-dialog.py">
      <decor>yes</decor>
    </application>
  </applications>
  <placement>
    <policy>Smart</policy>
    <center>no</center>
    <monitor>Any</monitor>
    <primaryMonitor/>
  </placement>
</openbox_config>

This means I have 3 desktops.
I change with Win + 1 2 3
To send a window to the left desktop, I use Win F1, to the right, Win F3.
I set things up so that my favorite programs start on a predetermined desktop.
Firefox and Geany are the only programs that remember their previous positions, but can't have everything, uh?
I use Win + numpad 8 6 2 4 to move window to the top right bottom left of the desktop.
Similarly, I use Win + Shift + numpad 8 6 2 4 to grow/shrink the size of the current window.
So basically I have a "fake" tilling wm, or atleast that's how it looks like on my screen.
I set up Alt-tab so it only shows windows in the current desktop. Previously the silly alt-tabbing went all over the desktops and made me dizzy (:P) even if the window I wanted was in the desktop I was in the first place! Geeez!
Like this, I don't even need to use a taskbar to keep track of windows. Everything is very organized and simple to use. Hurray!
END EDIT.



Blah! I'm so frustrated that I can't find what I'm looking for.

At the moment I use Openbox, and I really do like it,  but the window placement is really silly/random. 

For example, if I put gedit here, and firefox there, etc, I want that position to be used next time I launch those programs.
But Firefox is the only program that remembers its last position tongue

There's ObApp, but  you have to give it the positions for each program, which is really annoying as I have to guess and retry, guess and retry @_@ So I might as well edit the rc.xml...

Does anyone if there's such a WM?
(KDE is out of the question, I get bad migraines from using it)

Last edited by ERiS (2012-03-14 17:19:16)

Offline

#2 2011-04-12 00:23:10

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: Is my dream window manager out there? Floating + remember positions

You could use

wmctrl -lG

to get the positions of all current windows and put those in rc.xml. wmctrl is in the community repo.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#3 2011-04-12 02:36:22

ERiS
Member
Registered: 2011-03-15
Posts: 20

Re: Is my dream window manager out there? Floating + remember positions

That's a nifty tool...strangely, the windows are still ignoring their positions ... except Sonata, Firefox, VLC, but those always remember their positions anyway.

#_#  I think I give up

  <application class="Terminator" name="terminator" type="normal"><position force="yes"><x>108</x><y>645</y></position><desktop>2</desktop></application>
<application class="Lxtask" name="lxtask" type="normal"><skip_pager>yes</skip_pager><position force="yes"><x>1056</x><y>0</y></position></application>
<application class="Thunar" name="Thunar" role="Thunar-1302570061-1278163965" type="normal"><position force="yes"><x>2</x><y>283</y></position><desktop>2</desktop></application>
<application class="Firefox-bin" name="firefox-bin" role="browser" type="normal"><position force="yes"><x>311</x><y>204</y></position><desktop>2</desktop></application>
<application class="Gedit" name="gedit" role="gedit-window-1302570065-232282-0-ERiS" type="normal"><position force="yes"><x>101</x><y>195</y></position><desktop>2</desktop></application>
<application class="Xchat" name="xchat" type="normal"><position force="yes"><x>-26</x><y>864</y></position><desktop>2</desktop></application>
<application class="Gmpc" name="gmpc" type="normal"><position force="yes"><x>2</x><y>501</y></position><desktop>2</desktop></application>
<application class="Abiword" name="abiword" role="topLevelWindow" type="normal"><position force="yes"><x>1132</x><y>552</y></position><desktop>1</desktop></application>
<application class="Mangler" name="mangler" type="normal"><position force="yes"><x>1140</x><y>550</y></position><desktop>1</desktop><skip_pager>yes</skip_pager></application>
</applications>

Not that I want this to become an openbox help thread ;P

Offline

#4 2011-04-12 02:45:43

rockin turtle
Member
From: Montana, USA
Registered: 2009-10-22
Posts: 227

Re: Is my dream window manager out there? Floating + remember positions

I use fluxbox which is (I believe) similar to openbox.  To have applications remember their positions you simply right click on the title bar and select 'remember...->position" from the menu.  This works for me for urxvt and Firefox and any other application I want to have come up in the same position each time I start.

Offline

#5 2011-04-12 03:14:07

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: Is my dream window manager out there? Floating + remember positions

I know you said floating, but you could also try out a tiling wm. That's one of the main reasons I switched in the first place.

Offline

#6 2011-04-12 03:41:50

ERiS
Member
Registered: 2011-03-15
Posts: 20

Re: Is my dream window manager out there? Floating + remember positions

Yeah, I've tried some tiling managers, subtle, scrotwm, and another one I don't remember the name. After spending time learning and configuring them, it still doesn't really work for me =_=


rockin turtle: Installed Fluxbox, now prettyfying it, let's see how it goes!

Offline

#7 2011-04-12 07:41:42

sunaj
Member
Registered: 2010-06-08
Posts: 9

Re: Is my dream window manager out there? Floating + remember positions

E17 has a built in function to remember window settings. It should be exactly what you are looking for.

Offline

#8 2011-04-12 09:36:51

rabid_works
Member
Registered: 2010-08-15
Posts: 45

Re: Is my dream window manager out there? Floating + remember positions

I use PekWM and can state that it can remember the previous positions and dimensions of your apps. If I remember correctly this is the default behaviour. For instance, if I move pcmanfm to the bottom right-hand corner of my screen, then the next time I open the app -- even after restarting PekWM -- the WM will remember the last position, height and width of audacious, and will open the app in the same spot. This will occur in all cases except in situations where another app is already taking up that spot.

However, PekWM has an autoproperties config file that allows you to determine the position, height, width and desktop of every app when launched. This means that -- even if another app is currently occupying the usual placement of another app which you have just launched -- an app will always open at the same location, and with the same dimensions.

An example of an autoproperty for pcmanfm might be :

Property = "^pcmanfm,^Pcmanfm" {
    ApplyOn = "New"
    FrameGeometry = "644x512+0+266"
}

Which is pretty self explanatory ; while an autoproperties of , say, gimp might be :

Property = "^gimp,^Gimp,^gimp-image-window" {
    ApplyOn = "New"
    FrameGeometry = "1920x1077+0+1"
    Layer = "Normal"
    Workspace = "2"
}    
Property = "^gimp,^Gimp,^gimp-toolbox" {
    ApplyOn = "New"
    Layer = "OnTop"
    Workspace = "2"
    Titlebar = "False"
}    
Property = "^gimp,^Gimp,^gimp-dock" {
    ApplyOn = "New"
    Layer = "OnTop"
    Workspace = "2"
    Titlebar = "False"
}

Where ^gimp,^Gimp,^gimp-image-window is the main window, with full screen dimensions,  always opening on desktop2, and acting as a normal desktop window ; ^gimp,^Gimp,^gimp-toolbox  and ^gimp,^Gimp,^gimp-dock are the respective history and toolbox windows, which are always on top of the gimp main window, always on desktop2, don't use titlebars, and use the default behaviour of remembering their pevious height, width, and screenposition.

I've used PekWM to set up certain desktops to act as tiling WMs and others to act as floating.

Even if it's not 100% what you're after, give PekWM a try if you haven't already done so because it's a simple yet powerful WM. Here is the PekWM Documentation for autoproperties in case you're interested : http://www.pekwm.org/files/pekwm/doc/0. … props.html

Offline

Board footer

Powered by FluxBB