From robertsawko at gmail.com Wed Aug 29 07:04:57 2018 From: robertsawko at gmail.com (Robert Sawko) Date: Wed, 29 Aug 2018 08:04:57 +0100 Subject: [xmonad] How to use PhysicalScreens? Message-ID: <20180829070457.GA13853@avignon> 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/ From allbery.b at gmail.com Wed Aug 29 13:16:42 2018 From: allbery.b at gmail.com (Brandon Allbery) Date: Wed, 29 Aug 2018 09:16:42 -0400 Subject: [xmonad] How to use PhysicalScreens? In-Reply-To: <20180829070457.GA13853@avignon> References: <20180829070457.GA13853@avignon> Message-ID: 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 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 > xmonad at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad > -- brandon s allbery kf8nh allbery.b at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From robertsawko at gmail.com Wed Aug 29 13:43:54 2018 From: robertsawko at gmail.com (Robert Sawko) Date: Wed, 29 Aug 2018 14:43:54 +0100 Subject: [xmonad] How to use PhysicalScreens? In-Reply-To: References: <20180829070457.GA13853@avignon> Message-ID: <20180829134354.GA11898@avignon> 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 From allbery.b at gmail.com Wed Aug 29 13:43:35 2018 From: allbery.b at gmail.com (Brandon Allbery) Date: Wed, 29 Aug 2018 09:43:35 -0400 Subject: [xmonad] How to use PhysicalScreens? In-Reply-To: <20180829134354.GA11898@avignon> References: <20180829070457.GA13853@avignon> <20180829134354.GA11898@avignon> Message-ID: 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 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 allbery.b at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: