A layout like the tall layout, except that master area windows are in columns - xmonad

Is there a way to create a layout similar to a tall layout, except when you add more windows to the master pane, it orders them by columns rather than rows?

I don't have a definitive answer, but i use something similar for viewing PDF files, either one or two columns with slave on the right side (if there are slave windows).
import XMonad.Layout.ResizableTile
import XMonad.Layout.GridVariants
...
myPDFLayout = myPDFLayout1 ||| myPDFLayout2
myPDFLayout1 = ResizableTall 1 (3/100) (7/8) []
myPDFLayout2 = SplitGrid L 1 2 (7/8) (16/10) (3/100)
Feel free to add more columns - i guess SplitGrid can be used for three or more columns as well, find the details in the documentation.
If you don't know already check out the xmonad contribs, they provide quite a few different layouts, for example the two above.
Those layouts are per default changed with mod-Space. You could rebind them on specific workspaces like
((modMask, xK_comma), bindOn [("PDF", sendMessage NextLayout)])
but as far as i know there is nothing like PrevLayout, and it will cycle through the layouts rather then stopping.
edit: I thought there was a thread on SO about cycling backwards, but i was wrong (haven't read or tested this though)

Related

"Book like" view in Openseadragon (several "2 pages" sequences)

Openseadragon newbbie here !
I'm trying to display images by group of 2 AND keeping sequence mode activated, so I can "turn pages".
I managed to display 2 pages, I managed to read pages 1 by 1 in sequence mode, ...
But I just didn't find a way to do both.
To display 2 pages, I loaded 2 tiles sets and configured "sequenceMode=false". Then I set coordinates, to display visuals aside.
To read pages 1 by 1, I loaded several tiles and configured "sequenceMode = true".
What I would like to do is display two visuals (= tiles sets) aside (like an open book). And then, on "next" button click, display the two next visuals from my "tilesSources" array... and so on !
Thank you for your help !
I recommend keeping sequence mode off, like you did for the two pages, and lay out the entire sequence (in pairs) that way. You should then create your own next/previous buttons and use viewer.viewport.fitBounds to animate the viewer to each pair as needed.
Here's an example of a system that does something like that (plus a lot more):
https://iangilman.com/osd/test/demo/m2/
Press the "book" button at the top to see the "two-page" mode. The code for this is here:
https://github.com/openseadragon/openseadragon/tree/master/test/demo/m2
Of course you don't need all of that code, but hopefully it can be a helpful reference.

Cadence Virtuoso Layout L phantom objects

I have a cell (call it A) which is used once in a hierarchically higher cell (call it P). When I place A in P, its borders are rather larger than the actual content of A. When I descend to A and zoom-fit, it is way zoomed out, indicating there is something present way out on the edges.
I may have dragged objects there at one point but currently there is nothing visible. It is driving me crazy in terms of aligning objects, etc.
Is there any way to clean this up or something?
If I recall Cadence used to have a problem with leaving steiners behind when you moved routes. They are not visible but the db treats them as real objects for the bbox calculation. According to Cadence, deleting the objects should not harm anything. Open the layout in edit mode and paste this code into the CIW. This will delete all the steiner objects in your layout. If this was the root cause after saving you should see the bbox return to normal.
cv=geGetEditCellView()
foreach( item cv~>steiners
dbDeleteObject( item )
)
This thread may be considered "dead," but hopefully this helps.
It is possible the layers that are not visible are turned off.
To turn them on, go to the layers pane on the left. (If it is not there you can turn it on by going to Window —> Assistants —> Layers)
You can then click the drop down arrow in the top right corner and click Edit Valid Layers.
Then, click all valid in the Set Valid Layers popup. Click Ok.
Finally, check the Used Layers Only checkbox in the Layers pane. Look for any layers that weren't there before that you don't need.
Usually it happens when you draw the cell in LayoutXL, particularly when you insert pins.
Layer and purpose in these pins are selected separately for some reason, that is why it is easy to enter "impossible" combination.
Nothing happens, then you do it again and continue drawing. But there are several invisible squares that will continuously frustrate your inner perfectionist. You do the following:
Open this cell's layout, switch to Virtuoso window and enter:
lppList=list()
then:
foreach(shape hiGetCurrentWindow()~>cellView~>shapes if( (member(shape~>lpp lppList)==nil) then lppList=cons(shape~>lpp lppList)))
You have created the list with all layers in this layout, you can view it by entering:
lppList
You'll get something like this:
(("NW" "drawing")
("NP" "drawing")
("weird" "guy")
("M1" "pin")
("M3" "pin")
)
If you find a weird guy in this company, just enter the following command:
foreach(shape hiGetCurrentWindow()~>cellView~>shapes if((shape~>lpp == list("weird" "guy")) shape~>lpp = list("prBoundary" "drawing")))
If you see that some squares, labels (or whatever unseen before) appears as prBoundary, just delete it, save, and your layout will be small and shiny again.

how does xmonad assign numbers to screens, and screens to (two) monitors

I am using xmonad (with minimal configuration, main = xmonad gnomeConfig{ modMask = mod4Mask, terminal = "gnome-terminal" }) and my computer has two monitors and I am using xinerama.
This works, but way too often I am surprised by the mapping of xmonad screens to monitors,
when pushing a window to a screen (shift-mod-N) or moving focus to a screen (mod-N).
Also, mate-panel shows window symbols on virtual screens symbols - but something is not right there (these virtual screen seem to have double width, I guess because it's one X screen)
What is the right mental model for this?
(Is there a magic key that shows the screen number of the current (focused) window?)
NOTE (suggested by answers below): in xmonad lingo, a window is on a workspace, and a workspace is mapped to a (physical) screen.
The XMonad.Actions.PhysicalScreens documentation says the following:
This module allows you name Xinerama screens from XMonad using their
physical location relative to each other (as reported by Xinerama),
rather than their ScreenID s, which are arbitrarily determined by your
X server and graphics hardware.
Screens are ordered by the upper-left-most corner, from top-to-bottom
and then left-to-right.
I believe that "physical location relative to each other" refers to the layout specified by the ServerLayout section of Xinerama's configuration file. I am doing a bit of guesswork here, as I am not very familiar with Xinerama, but it seems that module can help with the issue of unpredictable screen numbers.
Here is a copy of my answer from here. I will preface it by giving a terminology clarification: what you call "screen" is called a "workspace" in xmonad parlance, and what you call "monitor" is called a "screen".
By default, this is what happens:
There are 10 distinct workspaces, numbered 1-10.
Each screen is assigned one of the ten workspaces.
There are two ways to navigate: you can choose to focus a particular screen (via mod+w,e,r) or to focus a particular workspace (mod+1,2,...,0).
If you focus a particular screen, the assignment of screens to workspaces does not change, but the selected screen gets input focus.
If you focus a particular workspace, and that workspace is not currently visible on one of the screens, then the currently focused screen has its mapping changed to that workspace.
If you focus a particular workspace, and that workspace is currently visible on one of the screens, then the currently focused screen and the screen showing that workspace have their mappings swapped.
There's two common ways of tweaking this behavior. One way is to change case (6) to keep the mapping as is, but change input focus to the screen that is showing the workspace you selected. See view. The other way is to change (1) and (3) in tandem: create (10 * number of screens) workspaces, and arrange for the mod+1,2,...,0 keybindings to choose which workspace to jump to based on both which key you pressed and which screen is currently focused. The result of this modification is to create the illusion that each screen has an independent set of workspaces that never interfere with each other -- rendering case (6), the confusing case, impossible. See IndependentScreens.

Visio 2010: Prevent Co-Linear Connector Routes

I have recently picked up Microsoft Office Visio 2010 in the interest of drawing out the execution flow of a software application I am planning. So far I have enjoyed the program, and it has helped me significantly to figure out exactly what interactions and events I will need for the program even before I begin coding it. However, there is one gripe I have with the software, as I add new elements to the diagram, Visio tends to try to combine routes as often as possible. This can make it difficult at times to see exactly where some of the routes are pointing. For example:
Example 1: Example 2:
In Example 1, You can see that there are three routes, each with a different label. Originally, these labels would overlap each other as well. I figured out this can be turned off in the "Page Layout" dialog, so it's a little better than it was, but the beginnings and ends of the route are still combined. Here it's not really an issue, but it could be as shown in Example 2.
What's pointing where in Example 2? The line coming in from the left is pointing at the diamond on the bottom, and then there are three routes coming out the top of the diamond. This is the problem I'm trying to solve. It's not shown in these examples, but putting labels on those three routes in Example 2 puts the labels all on that long stretch of vertical, which makes it impossible to tell which label corresponds to which line.
Is there a way to prevent the lines from overlapping like this? I have fully explored the "Page Setup" dialog, but none of the options available there seem to allow this behavior. The only solution I was able to find online was to draw all the routes manually, but this would mean I cannot use the "Re-Layout Page" feature, and it could be rather time-intensive if Visio decides to do it often.
Update: While messing around with some more settings trying to find a solution to this, I came up with a great example showing just how bad this can get. Now, this is an extreme example, and if your diagrams look like this you're probably doing it wrong, but it clearly shows that it can quickly become impossible to tell what the source and destination for each line is.
After many more hours of searching for ways to make routes either not overlap or play nice, the only solution I've found that keeps being recommended is to re-arrange the routes manually. Changing things like snap settings and page layout options do help to some degree, but not completely. Hopefully the next incarnation of Visio will handle this better. Oh well, it's still a great tool and has definitely helped me visualize execution flow.
This may not be the solution for you but in my network diagrams, I can perform the following.
In Visio 2010 click Design tab, now click Connectors, and select curved.
It separates the lines but again it might not look right for a flow chart.
I'm having the exact same issue and have not found a satisfactory solution.
I've tried all the permutations of snap/glue settings, layout behaviour and connector behaviour with no success.
The best solution I've found so far is to manually add multiple connector points to your source and destination and use those to connect your shapes. Make sure 'no overlap' is specified for your connectors. You can then use the automatic align/layout tools and get something reasonably unambiguous.
You do lose the benefits of dynamic glue but you can mitigate that by deleting connection points (ie from one side of a shape) to force Visio to use your custom connections. You'll also have to disable 'glue to geometry' in the snap/glue options.
http://office.microsoft.com/en-au/visio-help/add-move-or-delete-connection-points-HP001231166.aspx
Please update this question if you find a better solution.
Huh. Most of the time, I have trouble getting my lines to overlap nicely :).
You might try changing some of the Snap & Glue settings:
On the View tab, in the Visual Aids group, click the dialog box launcher (the little two-headed arrow). In the Snap & Glue dialog box, I'd try changing the Snap to setting for Shape geometry.
I cna't tell if you're talking about doing this from code or not, but I've found the Design -> Layout -> Re-Layout option takes care of this.
Similarly to Alex I've found adding my own glue points to shapes and removing the default ones helps enormously. So does making sure one has appropriate settings under Page Setup | Layout and Routing:
Style: Right Angle
Separate: All lines
Overlap: No Lines
Appearance: Straight
Spacing: I found all these distances especially important
Being aware of the setting for each connector under Developer | Behaviour | Connector | Reroute, how that setting changes from "Freely" to "On Crossover" when a connector is rerouted manually is also important. Sometimes I find it necessary to set a particular connector to "Never". Also useful is the ability to select all the connectors (and NOT the shapes) with Select by Type when forcing Visio to reroute.
I'm doing this with Visio 2013's ERD diagrams and I've noticed that whilst I have defined my own connection points now on each entity it is usually best not to actually select them but let Visio dynamically select the "best" one - then if I re-arrange the entities the re-routing still works. One curiosity I've noticed is that Visio's connectors do not align with my connection points at the bottom of each entity but (since I deleted the OotB connection point at the bottom of the entity at any rate) is spacing the connectors appropriately. Along the top and down the sides the connectors are dynamically attached in the same places as my connection points.
I still sometimes have problems with connectors being placed under/inside/through entities (so a connector running through/inside/under a shape) [with ERD's especially with self-referential relationships] despite Developer | Behavior settings on both the connector and the shape seemingly to prevent that. Those are often the ones I have to route manually and set to re-route "Never".
[Visio 2016]
Not a complete solution, just an aid to manual re-routing, ...
Add "Connection Point" to the two shapes. Each connection line will then have its own route, ... though some overlapping might still occur.
Being graphically challenged, here is how I accomplish it, ...
Select the one of shapes (I have to also zoom in to get better placement control).
Select the X in the [Home] menu bar.
The selected shape will have small bumps for any shape connection points.
Press and hold the Ctrl key and hover on the boarder of the shape, the mouse cursor will change to show where a point would be added.
Ctrl-Click to add a connection point. Here I added 10 or so points.
Add additional connection points to the other shape and move the connectors to use unique points on the two shapes. Your connectors will be (more or less) separated.

How do you alter the 'page_load' for DotNetNuke

For the main menu, I want the first four links to be blue, and specifically the last four links to be yellow. There will only be eight menu items.
I was thinking of hard coding the yellow links into the menu div, and that way when the page loads the first four menu items (default colour blue) they will be blue, and then my hard-coded links of yellow would load up.
My question is, where can I add the "yellow" code? Where can I hard code my yellow menu items? Or is there a different, better, approach to this?
My first question would be which men u are you implementing? A lot of them have a menuitem_x sort of id that is applied to the menu markup so with the CSS you can do what you want
As for where to place the markup there are a few places
You can do it directly in the skin files (not suggested since you may have to edit a few files)
in the skin .css files (much better place to do it and more maintainable and portable)
in the admin go to Site Settings and use the stylesheet editor to add the classes to the portal stylesheet (better than #1 but not as good as #2 since its now specific to the portal and not the skin so it wont be as portable)
Number 3 - works good if you dont have access to the skin or dont want to change it for other reasons
You could use Javascript within the skin.
We have done simular in the past for DNN menus but i keep away from the skinning side so dont have any examples, sorry.
Google does though :)
I would use one of the specific SEO friendly DNN menu modules that generate clean code that can be followed by search engines. I usually use one of them, except for projects where I don't have SEO concerns. When you have a menu with clean markup, like a list, you can change the colors using jQuery and specifying the first four items. You can probably do it like this, one by one. There may be a better selector for grabbing the first four items which is something I have never used.
Solved it, not as dynamic as I'd like, but it works.
The way I've done it is I'm playing with id tags, rather than class tags. Using ID, I can pick out the individual menu items and apply CSS to them.
Essentially, it looks like I've done what 'codemypantsoff' suggested. Thanks!

Resources