How to use PhysicalScreens?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use PhysicalScreens?

Robert Sawko
Hi,

I just got myself a second screen which I daisy-chained with the first one, but
I am having issues with getting screens to be identified properly. I use xrandr
to configure display. The screens are identified as:

$ xrandr

DP-1-1-8 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+
   ...
DP-1-1-1-8 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+
   ...
DP-1-1-1-1 disconnected (normal left inverted right x axis y axis)

And I set the screen with:

xrandr \
    --output DP-1-1-1-8 --mode 2560x1440 --right-of DP-1-1-8 \
    --output DP-1-1-8 --mode 2560x1440 \
    --output eDP-1-1 --off

I am reading in here that using Actions.Physical screens involves importing and
changing the mapping(?).

https://hackage.haskell.org/package/xmonad-contrib-0.14/docs/XMonad-Actions-PhysicalScreens.html

If I include only the import then nothing changes. The mappings don't compile
for me. I am attaching the error below. Not sure, if I am doing something wrong
or if the docs are incomplete. What is "W" meant to be?

Best wishes,
Robert


Error detected while loading xmonad configuration file: /home/rsa/.xmonad/xmonad.hs

xmonad.hs:171:49: error:
    Not in scope: ‘W.view’
    No module named ‘W’ is imported.
    |
171 |         , ((modMask, xK_a), onPrevNeighbour def W.view)
    |                                                 ^^^^^^

xmonad.hs:172:49: error:
    Not in scope: ‘W.view’
    No module named ‘W’ is imported.
    |
172 |         , ((modMask, xK_o), onNextNeighbour def W.view)
    |                                                 ^^^^^^

xmonad.hs:173:63: error:
    Not in scope: ‘W.shift’
    No module named ‘W’ is imported.
    |
173 |         , ((modMask .|. shiftMask, xK_a), onPrevNeighbour def W.shift)
    |                                                               ^^^^^^^

xmonad.hs:174:63: error:
    Not in scope: ‘W.shift’
    No module named ‘W’ is imported.
    |
174 |         , ((modMask .|. shiftMask, xK_o), onNextNeighbour def W.shift)
    |                                                               ^^^^^^^

--
Blood moon rising!
http://time.com/3479189/blood-moon/
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: How to use PhysicalScreens?

Brandon Allbery
W comes from "import qualified XMonad.StackSet as W" which needs to go up with the other imports.

On Wed, Aug 29, 2018 at 3:02 AM Robert Sawko <[hidden email]> wrote:
Hi,

I just got myself a second screen which I daisy-chained with the first one, but
I am having issues with getting screens to be identified properly. I use xrandr
to configure display. The screens are identified as:

$ xrandr

DP-1-1-8 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+
   ...
DP-1-1-1-8 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+
   ...
DP-1-1-1-1 disconnected (normal left inverted right x axis y axis)

And I set the screen with:

xrandr \
    --output DP-1-1-1-8 --mode 2560x1440 --right-of DP-1-1-8 \
    --output DP-1-1-8 --mode 2560x1440 \
    --output eDP-1-1 --off

I am reading in here that using Actions.Physical screens involves importing and
changing the mapping(?).

https://hackage.haskell.org/package/xmonad-contrib-0.14/docs/XMonad-Actions-PhysicalScreens.html

If I include only the import then nothing changes. The mappings don't compile
for me. I am attaching the error below. Not sure, if I am doing something wrong
or if the docs are incomplete. What is "W" meant to be?

Best wishes,
Robert


Error detected while loading xmonad configuration file: /home/rsa/.xmonad/xmonad.hs

xmonad.hs:171:49: error:
    Not in scope: ‘W.view’
    No module named ‘W’ is imported.
    |
171 |         , ((modMask, xK_a), onPrevNeighbour def W.view)
    |                                                 ^^^^^^

xmonad.hs:172:49: error:
    Not in scope: ‘W.view’
    No module named ‘W’ is imported.
    |
172 |         , ((modMask, xK_o), onNextNeighbour def W.view)
    |                                                 ^^^^^^

xmonad.hs:173:63: error:
    Not in scope: ‘W.shift’
    No module named ‘W’ is imported.
    |
173 |         , ((modMask .|. shiftMask, xK_a), onPrevNeighbour def W.shift)
    |                                                               ^^^^^^^

xmonad.hs:174:63: error:
    Not in scope: ‘W.shift’
    No module named ‘W’ is imported.
    |
174 |         , ((modMask .|. shiftMask, xK_o), onNextNeighbour def W.shift)
    |                                                               ^^^^^^^

--
Blood moon rising!
http://time.com/3479189/blood-moon/
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad


--
brandon s allbery kf8nh

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: How to use PhysicalScreens?

Robert Sawko
Brandon,

Thanks for the reply. I actually did come across it before and tried it out!
But... I wasn't sure if the context was right and I was getting errors. I have
now retried adding the import qualified... and I found out that the modMask
from the doc had to be changed to mod4Mask in my case? Previously Xmonad was
compiling that modMask had too few arguments.

Thanks,
Robert
--
I am really afraid of the power of authority
http://en.wikipedia.org/wiki/Milgram_experiment
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: How to use PhysicalScreens?

Brandon Allbery
modMask is usually a projection function that takes an XConfig record and produces the modMask field from it. Some key mapping functions define it locally, which is a bit confusing because then it's a simple value instead of a function.

PhysicalScreens is the most difficult way to deal with screen ordering; usually it makes more sense to simply swap the mod-{w,e,r} bindings around.

On Wed, Aug 29, 2018 at 9:41 AM Robert Sawko <[hidden email]> wrote:
Brandon,

Thanks for the reply. I actually did come across it before and tried it out!
But... I wasn't sure if the context was right and I was getting errors. I have
now retried adding the import qualified... and I found out that the modMask
from the doc had to be changed to mod4Mask in my case? Previously Xmonad was
compiling that modMask had too few arguments.

Thanks,
Robert
--
I am really afraid of the power of authority
http://en.wikipedia.org/wiki/Milgram_experiment


--
brandon s allbery kf8nh

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad