You are not logged in.

#1 2015-12-30 11:40:36

navi_se
Member
Registered: 2015-07-06
Posts: 135

[SOLVED] Xmobar covered in one workspace and Xmonad issues after -Syu

I am a recent xmonad user.

While upgrading I was having issues with the haskell files as noted here: https://bbs.archlinux.org/viewtopic.php?id=206112

I run

 # pacman -Syu --force 

to overwrite some haskell files that were causing the problem (they looked like some sort of html documentations). I had a few errors as reported in the thread above, but upgrading completed and compiling Xmonad seemed to work fine.

For some reason though, the very first workspace windows now overlap and cover xmobar. This happens only there, all other workspaces are just fine. This persists after recompiling and rebooting.

Here is my xomonad.hs

import XMonad
-- No border imports
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
-- Import things to put in the xmobar
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks  
import XMonad.Util.Run  
import System.IO  
-- Import keybind utility
import XMonad.Util.EZConfig  
import Graphics.X11.ExtraTypes.XF86
-- import XMonad.Actions.Volume
import XMonad.Actions.SpawnOn
import XMonad.Actions.WithAll

defaultLayouts = tiled ||| Mirror tiled ||| Full  
 where  
      -- default tiling algorithm partitions the screen into two panes  
      tiled = Tall nmaster delta ratio  
   
      -- The default number of windows in the master pane  
       
      nmaster = 2  
      -- Default proportion of screen occupied by master pane  
      ratio = 2/3  
   
      -- Percent of screen to increment by when resizing panes  
      delta = 5/100 
-- Define layout for specific workspaces
nobordersLayout = noBorders $ Full

myLayout = onWorkspace "5:media" nobordersLayout $ defaultLayouts   
-- Define amount and names of workspaces  
myWorkspaces = ["1:main","2:browser","3:pdf","4:software","5:media","6:notes","7","8:web","9:chat"]  

-- Start application in a predefined window
myManageHook = composeAll  
     [ className =? "chromium" --> doShift "8:web"  
     , className =? "qutebrowser" --> doShift "2:browser"  
     , className =? "Vlc" --> doShift "5:media"  
     , className =? "Mpv" --> doShift "5:media"  
     , className =? "Skype" --> doShift "9:chat"  
     , className =? "Okular" --> doShift "3:pdf"  
     , className =? "Apvlv" --> doShift "3:pdf"  
     , className =? "Mendeleydesktop.x86_64" --> doShift "3:pdf"  
     , className =? "RStudio" --> doShift "4:software"  
     , title =? "notes" --> doShift "6:notes"  
     , title =? "weechat" --> doShift "9:chat"
     ]   		

main = do
xmproc <- spawnPipe "/usr/bin/xmobar ~/.xmobarrc"   
xmonad $ defaultConfig
	{ manageHook = manageDocks <+> myManageHook 
														 <+> manageHook defaultConfig
 	, layoutHook = avoidStruts $ myLayout 
	, logHook = dynamicLogWithPP xmobarPP  
	   { ppOutput = hPutStrLn xmproc  
	   , ppTitle = xmobarColor "cyan" "" . shorten 50   
	   , ppLayout = const "" -- to disable the layout info on xmobar  
	   }     
	, modMask            =  mod4Mask  -- Rebind Mod to the Windows key
	, borderWidth        = 2
	, terminal           = "urxvt"
	, normalBorderColor  = "#cccccc"
	, focusedBorderColor = "#cd8b00" 
 	, workspaces = myWorkspaces 
 	}`additionalKeys` -- Already bound: q(wer)t nmhjkl,.(p) 
  [(( mod4Mask, xK_b), spawn "qutebrowser")
  ,(( mod4Mask, xK_p), spawn "terminology") 
  ,(( mod4Mask, xK_i), spawn "urxvt --title=weechat -e weechat") 
  ,(( mod4Mask, xK_v), spawn "notes") 
  ,(( mod3Mask, xK_v), spawn "notes") 
  ,(( mod4Mask, xK_c), spawn "chromium") 
  ,(( mod4Mask, xK_s), spawn "skype")
  ,(( mod4Mask, xK_y), spawn "rstudio-bin")
  ,(( mod4Mask .|. shiftMask, xK_y), spawn "mendeleydestkop & disown >> /dev/null")
  ,((0, xF86XK_MonBrightnessUp ), spawn "sudo brightness +5")
  ,((0, xF86XK_MonBrightnessDown ), spawn "sudo brightness -5")
  ,((0, xF86XK_AudioLowerVolume ), spawn "amixer set Master 10%-")
  ,((0, xF86XK_AudioRaiseVolume ), spawn "amixer set Master 10%+")
  ,((0, xF86XK_AudioMute ), spawn "amixer set Master toggle")
  ,(( mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock") -- window key + Shift + l to lock system  
  ,(( mod4Mask .|. shiftMask, xK_F5), spawn "reboot") -- window key + Shift + F4 to shutdown system  
  ,(( mod4Mask .|. shiftMask, xK_F4), spawn "shutdown -h now") -- window key + Shift + F4 to shutdown system  
  ,(( mod4Mask, xK_F4), killAll) -- to kill applications  
  ]

Last edited by navi_se (2016-01-01 17:16:03)

Offline

#2 2015-12-31 13:05:57

navi_se
Member
Registered: 2015-07-06
Posts: 135

Re: [SOLVED] Xmobar covered in one workspace and Xmonad issues after -Syu

Update: I have attempted reinstalling GHC, and after that xmonad  cannot compile anymore, complaining that it cannot find module xmonad (or any other module I previously had imported in my xmonad.hs).

Reinstalling GHC yields:

warning: ghc-7.10.3-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) ghc-7.10.3-1

Total Installed Size:  903.50 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                                 [########################################################] 100%
(1/1) checking package integrity                                                               [########################################################] 100%
(1/1) loading package files                                                                    [########################################################] 100%
(1/1) checking for file conflicts                                                              [########################################################] 100%
(1/1) checking available disk space                                                            [########################################################] 100%
==> Unregistering cabalized packages...
ghc-pkg: cannot find package X11-xft-0.3.1
unregistering would break the following packages: data-default-0.5.3 (ignoring)
unregistering would break the following packages: data-default-instances-old-locale-0.0.1 data-default-instances-dlist-0.0.1 data-default-instances-base-0.0.1 (ignoring)
ghc-pkg: cannot find package X11-1.6.1.2
ghc-pkg: cannot find package xmonad-0.12
ghc-pkg: cannot find package xmonad-contrib-0.12
ghc-pkg: cannot find package setlocale-1.0.0.3
ghc-pkg: cannot find package random-1.1
ghc-pkg: cannot find package old-time-1.1.0.3
ghc-pkg: cannot find package utf8-string-1.0.1.1
==> Done.
(1/1) reinstalling ghc                                                                         [########################################################] 100%
==> All cabalized packages need to be reinstalled now.
==> See /usr/share/haskell/ for a tentative list of affected packages.

while reinstalling xmonad yields

warning: xmonad-0.12-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) xmonad-0.12-2

Total Installed Size:  7.76 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                                 [########################################################] 100%
(1/1) checking package integrity                                                               [########################################################] 100%
(1/1) loading package files                                                                    [########################################################] 100%
(1/1) checking for file conflicts                                                              [########################################################] 100%
(1/1) checking available disk space                                                            [########################################################] 100%
ghc-pkg: cannot find package xmonad-0.12
error: command failed to execute correctly
(1/1) reinstalling xmonad                                                                      [########################################################] 100%
Reading package info from stdin ... done.
xmonad-0.12: dependency "X11-1.6.1.2-70a2dcf9b574b3a1ae6b9650729385ed" doesn't exist (use --force to override)
xmonad-0.12: dependency "data-default-0.5.3-a34fab0e414a3e31b9dccb1774520fca" doesn't exist (use --force to override)
xmonad-0.12: dependency "extensible-exceptions-0.1.1.4-8159918b63d70675389129eaecbf720a" doesn't exist (use --force to override)
xmonad-0.12: dependency "mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219" doesn't exist (use --force to override)
xmonad-0.12: dependency "setlocale-1.0.0.3-7c72c1b2e56d1e1535b49b5914076361" doesn't exist (use --force to override)
xmonad-0.12: dependency "utf8-string-1.0.1.1-df4bc704a473da34292b0ea0e21e5412" doesn't exist (use --force to override)
error: command failed to execute correctly

System is up to date, I am rather newb, so I am not sure where to look apart from reinstalling. Any suggestions?

Offline

#3 2015-12-31 21:48:04

masterdisaster
Member
Registered: 2013-05-12
Posts: 14

Re: [SOLVED] Xmobar covered in one workspace and Xmonad issues after -Syu

I am having the same problem with xmobar being covered. It's happening on two separate machines and started only after the recent update. I don't know the solution yet but I can help with ghc not working.

First you need to take a note of installed Haskell packages on your system

pacman -Qi qt | grep "Req" | sed -e 's/Required By    : //g'

Then you uninstall ghc and reinstall it cleanly

pacman -Rcs ghc
pacman -S ghc

Afterwards reinstall the other installed packages on top - if you only use ghc for xmonad, you will only need xmonad and xmonad-contrib + their dependencies

pacman -S xmonad xmonad-contrib

Afterwards check again what package you've got and install missing ones

pacman -Qi qt | grep "Req" | sed -e 's/Required By    : //g'

Offline

#4 2015-12-31 22:40:19

masterdisaster
Member
Registered: 2013-05-12
Posts: 14

Re: [SOLVED] Xmobar covered in one workspace and Xmonad issues after -Syu

I have made it work, inside the list that you pass to xmobar $ defaultConfig you need to add

, handleEventHook = mconcat
                  [ docksEventHook
                  , handleEventHook defaultConfig ]

so you'll get (for example, doesn't have to be exactly the same spot, just same scope)

        -- SNIP --
 	, layoutHook = avoidStruts $ myLayout
        , handleEventHook = mconcat
                          [ docksEventHook
                          , handleEventHook defaultConfig ]
	, logHook = dynamicLogWithPP xmobarPP
        -- SNIP --

It's the 'docksEventHook' line that makes it work.

Offline

#5 2016-01-01 17:14:14

navi_se
Member
Registered: 2015-07-06
Posts: 135

Re: [SOLVED] Xmobar covered in one workspace and Xmonad issues after -Syu

You are not keeping with your name wink

This was awesome, unistalling using -Rcs did the trick, and after reinstalling I could compile again.

Adding that block to xmonad.hs fixed the bar issue!

Thanks smile

Offline

Board footer

Powered by FluxBB