From be9705f4f42954916aaf0c94b17e3ae57a699ebe Mon Sep 17 00:00:00 2001 From: Baitinq Date: Wed, 6 Jul 2022 20:01:31 +0200 Subject: XMonad+XMobar: add clickable workspaces --- dotfiles/xmobar.hs | 4 ++-- dotfiles/xmonad.hs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'dotfiles') diff --git a/dotfiles/xmobar.hs b/dotfiles/xmobar.hs index 81e91c1..16325a1 100644 --- a/dotfiles/xmobar.hs +++ b/dotfiles/xmobar.hs @@ -12,7 +12,7 @@ Config { -- layout , sepChar = "%" -- delineator between plugin names and straight text , alignSep = "}{" -- separator between left-right alignment - , template = "%XMonadLog% }{ %WM_NAME%" + , template = "%UnsafeXMonadLog% }{ %WM_NAME%" -- general behavior , lowerOnStart = False -- send to bottom of window stack on start @@ -22,6 +22,6 @@ Config { , pickBroadest = False -- choose widest display (multi-monitor) , persistent = False -- enable/disable hiding (True = disabled) - , commands = [ Run XMonadLog, + , commands = [ Run UnsafeXMonadLog, Run XPropertyLog "WM_NAME" ] } diff --git a/dotfiles/xmonad.hs b/dotfiles/xmonad.hs index 95f36a2..3280f51 100644 --- a/dotfiles/xmonad.hs +++ b/dotfiles/xmonad.hs @@ -46,6 +46,8 @@ import XMonad.Actions.CycleWS import XMonad.Hooks.EwmhDesktops +import XMonad.Util.ClickableWorkspaces + ------------------------------------------------------------------------ -- Workspaces -- The default number of workspaces (virtual screens) and their names. @@ -224,8 +226,8 @@ myStatusBar = statusBarProp "xmobar" (do , ppTitle = id , ppSep = " | " , ppLayout = (\_ -> "") - , ppHidden = createDwmBox "#bbbbbb" . wrap " " " " - , ppHiddenNoWindows = wrap " " " " + , ppHidden = (\s -> clickableWrap ((read s::Int) - 1) (createDwmBox "#bbbbbb" (" " ++ s ++ " "))) --better way to clickablewrap . + , ppHiddenNoWindows = (\s -> clickableWrap ((read s::Int) - 1) (" " ++ s ++ " ")) } ) where -- cgit 1.4.1