Hi all, I am redoing my xmonad configuration and I have two issues which hopefully someone can kindly answer.
First issue:
xmobar is shown at the top of all fullscreens (at least the programs I tried i.e. firefox/youtube and vlc). in Firefox only.Second issue:
I am using the latest stable version of picom with --experimental-backends option, which enables transparency blur. Alacritty responds correctly, as does VLC (just for sake of testing), however xmobar is opaque. Could this be an EWMH issue in my xmonad config?xmonad.hs: Edit 1: updated to reflect fullscreen fix for everything but Firefox
import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Hooks.EwmhDesktops import XMonad.Hooks.ManageHelpers import XMonad.Layout.LayoutModifier import XMonad.Layout.NoBorders import XMonad.Layout.Renamed import XMonad.Layout.Spacing import XMonad.Layout.StateFull (focusTracking) import XMonad.Util.Cursor import XMonad.Util.Run main = do h <- spawnPipe "xmobar -x 0" xmonad $ docks $ ewmh def { terminal = "alacritty" , startupHook = myStartupHook , layoutHook = myLayoutHook , logHook = myLogHook h , handleEventHook = handleEventHook def <+> fullscreenEventHook , manageHook = myManageHook <+> manageDocks } myManageHook = isFullscreen --> doFullFloat myStartupHook = setDefaultCursor xC_left_ptr myLogHook h = dynamicLogWithPP xmobarPP { ppOutput = hPutStrLn h } {- myTheme = def { activeColor = myFocusedBorderColor , inactiveColor = myUnfocusedBorderColor , activeBorderColor = myFocusedBorderColor , inactiveBorderColor = myUnfocusedBorderColor , activeTextColor = myActiveTextColor , inactiveTextColor = myFocusedBorderColor -- , fontName = "xft:Sarasa UI SC:size=10" , decoHeight = 16 } myFocusedBorderColor = "#3498db" myUnfocusedBorderColor = "#111111" myActiveTextColor = "black" -} -- Layouts mySpacing x = spacingRaw True (Border 0 x x x) True (Border x x x x) True myTiled = renamed [Replace "Tall"] $ avoidStruts $ mySpacing 4 $ focusTracking $ Tall 1 (3/100) (1/2) myMirror = renamed [Replace "Mirror"] $ avoidStruts $ mySpacing 4 $ focusTracking $ Mirror $ Tall 1 (3/100) (1/2) myFull = renamed [Replace "Full"] $ avoidStruts $ noBorders $ Full myLayoutHook = smartBorders $ myTiled ||| myMirror ||| myFull
xmobar.conf:
Config { font = "-misc-fixed-*-*-*-*-12-*-*-*-*-*-*-*" , borderColor = "black" , border = TopB , bgColor = "black" , fgColor = "grey" , alpha = 255 , position = TopW L 100 , allDesktops = True , overrideRedirect = True , commands = [ -- Run Network "wlan0" ["-L","0","-H","32", "--normal","green","--high","red"] 10 Run Network "wlan0" ["--template", "Net: <tx>kB|<rx>kB", "-L","1000","-H","5000", "--low", "gray", "--normal","green","--high","red"] 10 , Run Cpu ["-L","3","-H","50", "--normal","green","--high","red"] 10 , Run Memory ["-t","Mem: <usedratio>%"] 10 , Run Swap [] 10 , Run Date "%a %Y-%m-%d %H:%M:%S" "date" 10 , Run StdinReader ] , sepChar = "%" , alignSep = "}{" , template = "%StdinReader% }{ %cpu% | %memory% | %wlp1s0b1% <fc=#ee9a00>%date%</fc>" }
picom.conf
# GLX Backend backend = "glx"; glx-no-stencil = true; glx-copy-from-front = false; use-damage = true; glx-no-rebind-pixmap = true; # Blur blur: { method = "dual_kawase"; strength = 5; } # Software Settings opacity-rule = [ "50:class_g = 'xmobar'", "95:class_g = 'Alacritty'", "90:class_g = 'vlc'"]; # Some EWMH settings to get xmobar working mark-ovredir-focused = false; use-ewmh-active-win = true;
xprop (xmobar):
_NET_WM_STRUT(CARDINAL) = 0, 0, 17, 0 _NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 17, 0, 0, 0, 0, 0, 0, 1919, 0, 0 _NET_WM_PID(CARDINAL) = 12816 _NET_WM_DESKTOP(CARDINAL) = 4294967295 _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK WM_NAME(STRING) = "xmobar" WM_CLASS(STRING) = "xmobar"
Any help is appreciated.
Edit 1: xmobar now hides unless it is Firefox! Explanation updated.
Edit 2: xmobar blur has been fixed. Replace class_g: with name for xmobar in picom.conf.
First issue:
xmobar is shown at the top of all fullscreens (at least the programs I tried i.e. firefox/youtube and vlc). in Firefox only.
Second issue:
I am using the latest stable version of picom with --experimental-backends option, which enables transparency blur. Alacritty responds correctly, as does VLC (just for sake of testing), however xmobar is opaque. Could this be an EWMH issue in my xmonad config?
xmonad.hs: Edit 1: updated to reflect fullscreen fix for everything but Firefox
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.LayoutModifier
import XMonad.Layout.NoBorders
import XMonad.Layout.Renamed
import XMonad.Layout.Spacing
import XMonad.Layout.StateFull (focusTracking)
import XMonad.Util.Cursor
import XMonad.Util.Run
main = do
h <- spawnPipe "xmobar -x 0"
xmonad $ docks $ ewmh def
{ terminal = "alacritty"
, startupHook = myStartupHook
, layoutHook = myLayoutHook
, logHook = myLogHook h
, handleEventHook = handleEventHook def <+> fullscreenEventHook
, manageHook = myManageHook <+> manageDocks
}
myManageHook = isFullscreen --> doFullFloat
myStartupHook = setDefaultCursor xC_left_ptr
myLogHook h = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn h }
{- myTheme = def
{ activeColor = myFocusedBorderColor
, inactiveColor = myUnfocusedBorderColor
, activeBorderColor = myFocusedBorderColor
, inactiveBorderColor = myUnfocusedBorderColor
, activeTextColor = myActiveTextColor
, inactiveTextColor = myFocusedBorderColor
-- , fontName = "xft:Sarasa UI SC:size=10"
, decoHeight = 16
}
myFocusedBorderColor = "#3498db"
myUnfocusedBorderColor = "#111111"
myActiveTextColor = "black"
-}
-- Layouts
mySpacing x = spacingRaw True (Border 0 x x x) True (Border x x x x) True
myTiled = renamed [Replace "Tall"]
$ avoidStruts
$ mySpacing 4
$ focusTracking
$ Tall 1 (3/100) (1/2)
myMirror = renamed [Replace "Mirror"]
$ avoidStruts
$ mySpacing 4
$ focusTracking
$ Mirror
$ Tall 1 (3/100) (1/2)
myFull = renamed [Replace "Full"]
$ avoidStruts
$ noBorders
$ Full
myLayoutHook = smartBorders
$ myTiled ||| myMirror ||| myFull
xmobar.conf:
Config { font = "-misc-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
, borderColor = "black"
, border = TopB
, bgColor = "black"
, fgColor = "grey"
, alpha = 255
, position = TopW L 100
, allDesktops = True
, overrideRedirect = True
, commands = [
-- Run Network "wlan0" ["-L","0","-H","32", "--normal","green","--high","red"] 10
Run Network "wlan0" ["--template", "Net: <tx>kB|<rx>kB", "-L","1000","-H","5000", "--low", "gray", "--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50", "--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Swap [] 10
, Run Date "%a %Y-%m-%d %H:%M:%S" "date" 10
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{ %cpu% | %memory% | %wlp1s0b1% <fc=#ee9a00>%date%</fc>" }
picom.conf
# GLX Backend
backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = false;
use-damage = true;
glx-no-rebind-pixmap = true;
# Blur
blur:
{
method = "dual_kawase";
strength = 5;
}
# Software Settings
opacity-rule = [
"50:class_g = 'xmobar'",
"95:class_g = 'Alacritty'",
"90:class_g = 'vlc'"];
# Some EWMH settings to get xmobar working
mark-ovredir-focused = false;
use-ewmh-active-win = true;
xprop (xmobar):
_NET_WM_STRUT(CARDINAL) = 0, 0, 17, 0
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 17, 0, 0, 0, 0, 0, 0, 1919, 0, 0
_NET_WM_PID(CARDINAL) = 12816
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
WM_NAME(STRING) = "xmobar"
WM_CLASS(STRING) = "xmobar"
Any help is appreciated.
Edit 1: xmobar now hides unless it is Firefox! Explanation updated.
Edit 2: xmobar blur has been fixed. Replace class_g: with name for xmobar in picom.conf.
Import Xmobar
config :: Config
config = defaultConfig {
...
}
main :: IO ()
main = xmobar config
It seems to be that the xmobar package in the arch repos doesn't install the same way xmonad does because I get this import error when I try to compile it:
1 of 1] Compiling Main ( .config/xmobar/xmobar.hs, .config/xmobar/xmobar.o )
.config/xmobar/examples/xmobar.hs:19:1: error:
Could not find module ‘Xmobar’
There are files missing in the ‘xmobar-0.35’ package,
try running 'ghc-pkg check'.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
19 | import Xmobar
| ^^^^^^^^^^^^^
Anybody know a solution?
]]>Hi everyone,
I've written two posts on how to build a vim-like xmonad environment. Features include
- 3-dimensional workspace
- window sorting
- shelving
- two-way window history step through
- task group
- advanced prompt
- topical workspace
- float styles
- per-workspace scratchpad
- wallpaper gallery modeYou can find the posts here
1. http://lynnard.tk/blog/2013/11/05/build … -and-more/
2. http://lynnard.tk/blog/2013/12/30/more-xmonad-goodies/Happy new year and happy hacking!
This sounds incredibly cool - does any know where one might find this project? Both links seem broken now can't seem to find anything with a websearch with those titles either.
]]>Hi all, one question, on xmonad how can I make xmobar always visible? And Can I add other bars? Top or bottom
You probably want to check this.
]]>Could it be that the issue is back? Or do I need to do something and activate emwh? I do have this in my config:
main = do
status <- spawnPipe myDzenStatus
conky <- spawnPipe myDzenConky
xmonad $ ewmh defaults {
logHook = myLogHook status
}
which should activate ewmh.
By the way, should this _NET_WM_STATE_DEMANDS_ATTENTION be observable through `xprop`? Because I do see the WM_URGENT hint in programs that set it, but I don't see the _NET_WM_STATE_DEMANDS_ATTENTION in qTox (even using `xprop -spy`).
]]>Thanks,
flexo
....
, ((0, 0x1008FF13), readProcess "~/.xmonad/bin/volume.sh" [] [] >>= alert ) -- This gives me an error
-- , ((0, 0x1008FF13), spawn "amixer -q set Master 2%+; ~/.xmonad/bin/volume.sh" >>= alert ) -- This just ouputs a dzen popup of "()" to the center of the screen.
....
alert = dzenConfig centered . show
centered = onCurr (center 150 66)
>=> font "-*-helvetica-*-r-*-*-64-*-*-*-*-*-*-*"
>=> addArgs ["-fg", "#80c0ff"]
>=> addArgs ["-bg", "#000040"]
....
I would like to leave the "amixer" commnad in the xmonad but it can be moved to the volume.sh if all else fails.
Thank you for your time.
]]>while changeWindowButton.isPressed() {
layout.makeSpaces(Windows);
}
I configured my xmonad pretty long time ago, and even that I did with help of some tutorial or with complete config file from which I copied it and only edited parts I understood.
I am using this layout:
myLayout = ResizableTall 1 (3/100) (1/2) [] ||| tiled ||| Mirror tiled ||| Full
where
tiled = spacing 5 $ Tall nmaster delta ratio
nmaster = 1
ratio = 2/3
delta = 5/100
newLayout = avoidStruts $ smartBorders $ myLayout
//edit: I didn't realize I can change the size of GridSelect cells, I feel stupid like some Windows user, I will take a closer look at it... I need some advice with the layout thing tho
]]>Another bit of extra info (only if goToSelected is not enough or you want to learn more): from the documentation, you can also click on "Source". Then you can see how withSelectedWindow uses gridselectWindow and only runs an action/callback on the window "w" in the "Just w" case by pattern matching on the Maybe value. But I repeat, because this function checks for Nothing, you can simply give it a function to run on the selected window and you don't have to worry about the case where the user cancels the selection.
]]>Maybe represents something that is optional; it's either "Just value" or "Nothing". In this case, the user can cancel the selection procedure. withSelectedWindow is a helper that only runs the action in case the user selected a window (if you use gridselectWindow directly, you have to check for a Nothing yourself). You can use this to build your own action, but perhaps you were looking for goToSelected?
]]>...
, ((mod4Maks, xK_h), gridselectWindow defaultGSConfig)
...
I am using bringSelected and spawnSelected without any problems, but I can't find what the type Maybe Window is or how to use it.
I am getting this error:
xmonad.hs:100:41:
Couldn't match type `Maybe Window' with `()'
Expected type: X ()
Actual type: X (Maybe Window)
In the return type of a call of `gridselectWindow'
In the expression: gridselectWindow defaultGSConfig
In the expression:
((mod4Mask, xK_h), gridselectWindow defaultGSConfig)