-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DesktopConfiguration: make options case-insensitive
Don't use strcmp() to compare the options presented to the DesktopConfiguration command, as not everyone is likely to use all lower-case, and this doesn't match with how other parameters are checked for. Fixes #260
- Loading branch information
1 parent
ae1fa76
commit 6f96e75
Showing
13 changed files
with
570 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Desktop Thoughts | ||
================ | ||
|
||
Fvwm3 has two modes for handling desktops: | ||
|
||
* `global` -- all connected monitors share the same desktop | ||
* `per-monitor` -- all desktops defined by `DesktopName` are separate from one | ||
another. | ||
|
||
A third mode is suggested: `shared`. | ||
|
||
|
||
Shared would operate much like spectrwm does now: | ||
|
||
So for example, let's say you had the following number of desktops: | ||
|
||
``` | ||
0 1 2 3 4 | ||
``` | ||
|
||
... and let's say that you have two monitors. You might have this: | ||
|
||
``` | ||
[0] 1 2 <3> 4 | ||
``` | ||
|
||
Where `[]` is monitor1 and `<>` is monitor2. | ||
|
||
You could move monitor1 (`[]`) all the way along to desktop 2, without changing where monitor2 (`<>`) is, as in: | ||
|
||
``` | ||
0 1 [2] <3> 4 | ||
``` | ||
|
||
If you were to then continue to move monitor1 (`[]`) to desktop 3, what would happen is this: | ||
|
||
``` | ||
0 1 <2> [3] 4 | ||
``` | ||
|
||
So that now, the desktops have switched over from each monitor. | ||
|
||
FVWM3 Changes | ||
============= | ||
|
||
In order to provide this feature, fvwm3 needs to try and structure things such | ||
that existing `DesktopConfiguration` modes are not broken by this | ||
implementation. Unlike with other modes, this `shared` mode is not a | ||
structure suited to isolation per-monitor, thus this breaks the conceptual | ||
model. | ||
|
||
In order for `fvwm3` to sustain all three models, the following should be | ||
true: | ||
|
||
* When setting `shared`: | ||
|
||
1. Initialise the shared desktop environment. | ||
2. Existing windows per desktop should be migrated to the share env. | ||
3. All monitors should be scanned. They need to be placed on different desktops. | ||
4. On a switch to a new desktop (regardless of page) if a desktop: | ||
* Is mapped: | ||
* Swap the desktop: | ||
* Mark the windows on the current monitor | ||
* Move the windows on the *other* monitor to this monitor's desk | ||
* Switch desktops | ||
* Move the marked windows from this monitor to the other monitor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
DesktopConfiguration per-monitor | ||
SetEnv RXVT "urxvt -b 5 -bd '#333333'" | ||
|
||
ModuleTimeout 1 | ||
EdgeResistance 800 1 | ||
EdgeThickness 2 | ||
IgnoreModifiers L25 | ||
|
||
DesktopName 0 0 | ||
DesktopName 1 1 | ||
DesktopName 2 2 | ||
DesktopName 3 3 | ||
DesktopName 4 4 | ||
DesktopName 5 5 | ||
|
||
DesktopSize 1x1 | ||
|
||
Key Right A C GotoDesk next | ||
Key Left A C GotoDesk -1 0 0 5 | ||
|
||
# Window key-bindings | ||
Key i A 4 Iconify | ||
|
||
Key Left A 4 Direction West (CurrentDesk, AcceptsFocus, Visible) Focus | ||
Key Right A 4 Direction East (CurrentDesk, AcceptsFocus, Visible) Focus | ||
Key Up A 4 Direction North (CurrentDesk, AcceptsFocus, Visible) Focus | ||
Key Down A 4 Direction South (CurrentDesk, AcceptsFocus, Visible) Focus | ||
|
||
Key Return A 4 Exec exec $[RXVT] -ls | ||
Key Return A C Maximize grow grow | ||
Key A W S4 Close | ||
Key Down W M Lower | ||
Key Up W M Raise | ||
Key m W 4 Maximize | ||
|
||
Key L A CM Exec exec i3lock -c '#2000FF' | ||
Key S A 4 Stick | ||
|
||
Key F12 A 4 Module FvwmConsole | ||
#Key F12 A 4 Exec exec $[RXVT] -bg '#004103' -e FvwmPrompt | ||
|
||
Key Up WTSF CM PackUp | ||
Key Down WTSF CM PackDown | ||
Key Left WTSF CM PackLeft | ||
Key Right WTSF CM PackRight | ||
|
||
Key p A C4 Exec exec rofi-pass | ||
Key slash A M4 Exec exec rofi \ | ||
-levenshtein-sort \ | ||
-show window \ | ||
-bg '#66ba66' \ | ||
-fg black \ | ||
-hlbg white \ | ||
-hlfg black \ | ||
-bc 'blue' \ | ||
-bw 4 \ | ||
-columns 1 \ | ||
-lines 5 \ | ||
-fixed-num-lines 1 \ | ||
-width 40 \ | ||
-terminal xterm \ | ||
-hide-scrollbar \ | ||
-font "Monospace 12" | ||
|
||
Key question A MS Exec exec rofi \ | ||
-levenshtein-sort \ | ||
-show run \ | ||
-bg '#66ba66' \ | ||
-fg black \ | ||
-hlbg white \ | ||
-hlfg black \ | ||
-bc 'blue' \ | ||
-bw 4 \ | ||
-columns 1 \ | ||
-lines 5 \ | ||
-fixed-num-lines 1 \ | ||
-width 40 \ | ||
-terminal xterm \ | ||
-hide-scrollbar \ | ||
-font "Monospace 12" | ||
|
||
KillModule FvwmPager FP1 | ||
DestroyModuleConfig FP1: * | ||
*FP1: Monitor DP1-8 | ||
|
||
Style FP1 StartsOnScreen DP1-8, Sticky, CirculateSkip | ||
Module FvwmPager FP1 0 5 | ||
|
||
KillModule FvwmPager FP2 | ||
DestroyModuleConfig FP2: * | ||
*FP2: Monitor DP1-1-8 | ||
|
||
Style FP2 StartsOnScreen DP1-1-8, Sticky, CirculateSkip | ||
Module FvwmPager FP2 0 5 | ||
|
||
KillModule FvwmPager FP3 | ||
DestroyModuleConfig FP3: * | ||
*FP3: Monitor HDMI2 | ||
|
||
Style FP3 StartsOnScreen HDMI2, Sticky, CirculateSkip | ||
Module FvwmPager FP3 0 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.