Comments (8)
I am using the default DesktopConfiguration
(global). So I am not sure what is wrong. I will do some more tests and see if I can make a minimal config and example.
from fvwm3.
I'm not sure I quite follow. GotoPag prev
is already per-monitor aware. So it remembers each screen's last page, and if you run that command for either the implied current monitor, or a specific monitor, it works just fine for me.
from fvwm3.
I wanted GotoPage prev
to be specific to the desktop (I hadn't thought about the monitor). Or is it already desktop-aware? I may have misunderstood or done my test incorrectly.
from fvwm3.
I wanted
GotoPage prev
to be specific to the desktop (I hadn't thought about the monitor). Or is it already desktop-aware? I may have misunderstood or done my test incorrectly.
It's both -- in that, if you have: DesktopConfiguration global
set (which is the default), then GotoPage prev
will go to the previous page.
If you have: DesktopConfiguration per-monitor
set, then the desktop on that monitor is the one which is used, and GotoPage prev
works in the same way.
from fvwm3.
I think I see what you are requesting, and you are correct, fvwm doesn't store the previous page per desk, only per monitor. So what you want is to recall the previous page per desk, per monitor.
Note that this could be implemented via storing this information in your setup using InfoStore
along with FvwmEvent
using the new_page
event. Each time you move to a new page, use fvwm to save the variable of the previous page (you may have to first save the variable of the current page, then move this to the previous page), for instance bind the following function to the new_page
event. I haven't tested this fully, but in theory it should work, you may need to tweak it though.
# Initialize the previous page and current page variables
# You need to do this for each desk you want to use.
InfoStoreAdd PrevPageX0 0
InfoStoreAdd PrevPageY0 0
InfoStoreAdd CurPageX0 0
InfoStoreAdd CurPageY0 0
InfoStoreAdd PrevPageX1 0
InfoStoreAdd PrevPageX2 0
InfoStoreAdd CurPageX1 0
InfoStoreAdd CurPageY1 0
...
# This function updates your variables when you switch pages.
DestroyFunc SavePageLoc
AddToFunc SavePageLoc
+ I InfoStoreAdd PrevPageX$[desk.n] $[infostore.CurPageY$[desk.n]]
+ I InfoStoreAdd PrevPageY$[desk.n] $[infostore.CurPageY$[desk.n]]
+ I InfoStoreAdd CurPageX[$desk.n] $[page.nx]
+ I InfoStoreAdd CurPageY[$desk.n] $[page.ny]
# Custom Previous Page Function
DestroyFunc MyPrevPage
AddToFunc MyPrevPage
+ I GotoPage $[infostore.PrevPageX$[desk.n]] $[infostore.PrevPageY$[desk.n]]
# Use FvwmEvent to update your variables
DestroyModuleConfig FE-NewPage: *
*FE-NewPage: Cmd Function
*FE-NewPage: new_page SavePageLoc
# Start FvwmEvent
AddToFunc StartFunction I Module FvwmEvent FE-NewPage
Note here is an alternative that should also work, seems you can also get the prev_page from the monitor variables, so instead adapt something like this.
DestroyFunc SavePageLoc
AddToFunc SavePageLoc
+ I InfoStoreAdd PrevPageX$[desk.n] $[monitor.$[monitor.primary].prev_pagex]
+ I InfoStoreAdd PrevPageY$[desk.n] $[monitor.$[monitor.primary].prev_pagey]
Though this might not be as good as the first approach, though simpler, it maybe harder
to guarantee that the variable saved by fvwm is for the current desk you are on, though you could try it (as mentioned I'm only brain storming here, I have not tested any of this actually works).
from fvwm3.
Right, OK. Yes, this is something you can use FvwmEvent for. I'm going to close this "bug", as it can be implemented using something like the above.
from fvwm3.
Thank you for the approaches and sample code. I have been experimenting with them. They hasn't worked yet (e.g., I cannot get a second FvwmEvent process to start). However, I think that the problem lies with my very incomplete / hack understanding of fvwm coding, so I am slowly working on that problem...
from fvwm3.
@sanjoymahajan I did have a small issue with how I was calling the FvwmEvent function, I fixed that. Note how I've given FvwmEvent a new name, FE-NewPage
, this way you can have multiple running, since they have a new name.
from fvwm3.
Related Issues (20)
- UseSkipList doesn't work HOT 6
- ItemFormat "%5.5i%|%5.5l%5.2>%|" HOT 5
- Handle _NET_WM_STATE_SKIP_TASKBAR in _NET_WM_STATE client messages
- FvwmPager grid disappears HOT 4
- Unmaximizing a window on a different desk moves but won't map the window. HOT 3
- fvwm 1.1.0 crash and logout when launch pycharm HOT 3
- SVG icons not work HOT 7
- FvwmButtons listens for incoming TCP connections HOT 2
- Implicit function _IceTransNoListen in fsm.c HOT 4
- FvwmRearrange broken on multi-monitor layout
- FvwmCommand doesn't find socket HOT 3
- EdgeCommand stopped working in 1.0.9 HOT 2
- Wayland Support When HOT 2
- Fsvg.h using deprecated calls. HOT 2
- No image and system freeze HOT 21
- mouse binding breaks Firefox HOT 6
- InfoStore: rewrite internals to use TAILQ instead of a linked list.
- FvwmMFL: FVWMMFL_SOCKET needs rethinking
- Workspace number at changes -- system freeze HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fvwm3.