From 3d69afdf0a6c861c29021f5a7c88d4551037f2be Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Sat, 4 Jul 2020 12:38:01 -0500 Subject: [PATCH] Minor edits --- .config/xmobar/xmobarrc2 | 4 +++- .xmonad/xmonad.hs | 21 ++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.config/xmobar/xmobarrc2 b/.config/xmobar/xmobarrc2 index 301756e..d16cc27 100755 --- a/.config/xmobar/xmobarrc2 +++ b/.config/xmobar/xmobarrc2 @@ -3,7 +3,9 @@ -- you can find weather location codes here: http://weather.noaa.gov/index.html Config { font = "xft:Mononoki Nerd Font:pixelsize=12:antialias=true:hinting=true" - , additionalFonts = [ "xft:FontAwesome:pixelsize=13", "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true" ] + , additionalFonts = [ "xft:FontAwesome:pixelsize=13" + , "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true" + ] , bgColor = "#292d3e" , fgColor = "#B45BCF" , position = Static { xpos = 1920 , ypos = 0, width = 1920, height = 24 } diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 714d12f..46bd895 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -449,11 +449,26 @@ searchList = [ ("a", archwiki) ------------------------------------------------------------------------ -- WORKSPACES ------------------------------------------------------------------------ +-- My workspaces are clickable meaning that the mouse can be used to switch +-- workspaces. This requires xdotool. You need to use UnsafeStdInReader instead +-- of simply StdInReader in xmobar config so you can pass actions to it. Also, +-- you will notice I add tags to the clickable workspaces to select from +-- the additionalFonts that I have set in my xmobar configs. + +xmobarEscape :: String -> String +xmobarEscape = concatMap doubleLts + where + doubleLts '<' = "<<" + doubleLts x = [x] myWorkspaces :: [String] -myWorkspaces = ["dev", "www", "sys", "doc", "vbox", "chat", "mus", "vid", "gfx"] --- myWorkspaces = ["\61612","\61899","\61947","\61635","\61502","\61501","\61705","\61564","\62150","\61872"] --- myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9"] +myWorkspaces = clickable . (map xmobarEscape) + -- $ ["1", "2", "3", "4", "5", "6", "7", "8", "9"] + $ ["dev", "www", "sys", "doc", "vbox", "chat", "mus", "vid", "gfx"] + where + clickable l = [ "" ++ "" ++ ws ++ "" ++ "" | + (i,ws) <- zip [1..9] l, + let n = i ] ------------------------------------------------------------------------ -- MANAGEHOOK ------------------------------------------------------------------------