Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I define a key combination which toggles between my default borderwidth (for example 2) and disabled borders (borderwidth=0) in xmonad. Compare this related question: Change the red border between windows in xmonad

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I suppose the XMonad.Actions.NoBorders module (in xmonad-contrib) is helpful here (I've not tried it myself, tough(a)). It exports the toggleBorder function, which

[toggles] the border of the currently focused window.

It's rather small and self-explanatory, so if binding toggleBorder does not do exactly what you want, you probably can adept it to your needs.

(a) I'm not sure what you're about to achieve, but if you'd prefer not to have to press a key at all, the XMonad.Layout.NoBorders module is great. It exports the smartBorders layout modifier that removes the borders if it is not needed (if there's only one window and only one screen, for example).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.